smart stock inventory system project report

51
Smart Stock Inventory System W.D Rasika (GAM/IT/2015/P/0023)

Upload: rasika-weragoda

Post on 14-Apr-2017

63 views

Category:

Education


2 download

TRANSCRIPT

Page 1: smart stock inventory system project report

Smart Stock Inventory System

W.D Rasika (GAM/IT/2015/P/0023)

Page 2: smart stock inventory system project report

Content

Chapter 1.01.1 Introduction1.2 Aims & Objectives1.3 Proposed Solutions

Chapter 2.02.1 Functional Requirement2.2 Non Functional Requirements2.3 Hardware Requirements2.4 Software Requirements

Chapter 3.0 3.1 Use case Diagram3.2 Use case Description

3.3 Activity Diagram 3.4 Class Diagram

3.6 ER Diagram3.6 Interfaces3.7 Database structure

Chapter 4.0 4.1 Source Code

Chapter 5.0 5.1 Future Developments

1 | P a g e

Page 3: smart stock inventory system project report

CHAPTER 1Introduction

1.1. Introduction

The overseeing and controlling of the ordering, storage and use of components that a company will use in the production of the items it will sell as well as the overseeing and controlling of quantities of finished products for sale. A business's inventory is one of its major assets and represents an investment that is tied up until the item is sold or used in the production of an item that is sold. It also costs money to store, track and insure inventory. Inventories that are mismanaged can create significant financial problems for a business, whether the mismanagement results in an inventory glut or an inventory shortage. Successful inventory management system involves creating a purchasing plan that will ensure that items are available when they are needed (but that neither too much nor too little is purchased) and keeping track of existing inventory and its use. Two common inventory-management strategies are the just-in-time method, where companies plan to receive items as they are needed rather than maintaining high inventory levels, and materials requirement planning, which schedules material deliveries based on sales forecasts.In our Software include many functions such as Add items, Invoicing, GRN & Settings. In addition to this there are two extra features in this Software.

1.2. Aims & Objectives

1.2.1. Avoid Stock-Outs

Making sure that your customers have access to products when they need or want them is a key service issue in inventory control. Your system should include a well-outlined replenishment system, where critical inventory levels at a store result in swift shipments from your distribution center or directly from a vendor. Given the time and effort put into promoting products to attract customer interest, you want inventory on hand when they come to buy.

1.2.2. Avoid Excess Inventory

Optimized inventory control actually balances a fine line between too much and too little. In fact, a main reason companies have gone to just-in-time systems and advanced software solutions is to avoid having excess inventory while trying to meet demand. Carrying too much inventory in distribution centers or retail stores is costly. It takes up space, employee time, utility costs and limits floor space for selling. Plus, perishable items or products with expiration dates must be thrown out if you can't sell them.

2 | P a g e

Page 4: smart stock inventory system project report

1.2.3. Move Goods Efficiently

Efficiency in inventory means the ability to quickly receive and store products as they come in and retrieve and ship when they go out. Every extra second spent in these processes adds to the costs of inventory management. Plus, efficient distribution is a customer satisfaction issue for trade channel sellers and retailers. Retailers expect suppliers to meet prescribed delivery timetables, and customers expect customized orders and products to arrive on time.

1.2.4. Maximize Profit Margins

Well-managed inventory control is often a key in meeting profit margin objectives. Gross profit margin is the difference between revenue earned from sales and the costs of goods sold. Take away fixed costs including buildings, utilities and labor and you get to operating margin.

Investing as little as possible in inventory control while meeting the other objectives is critical in earning profit and growing your business.

1.3. Proposed Solutions

Any organization that carries an inventory of products has a need to maintain accurate information on the movements of all these items to better serve its customers and run a profitable business. Whether you need to manage one supply closet or a multi-facility warehouse operation, the goal is to cut down on manual data entry costs, minimize your inventory write-offs and overstocks and increase efficiencies in your supply chain.

A complete inventory management solution will consist of management software, mobile computers and label printers. These tools will enable your business to track inventory levels and movements in your warehouse or stock room by item, serial number, or lot number. With full visibility into your entire incoming and outbound inventory, you can make better decisions to maintain dynamic stock levels that meet the demands of your customers and usage.

Create New User Account With privilegeso Maintain different accountso All activities has responsibility person cause will keep activity log

Add Itemo To add item details to database o Searching Itemo Delete Itemo Updating

3 | P a g e

Page 5: smart stock inventory system project report

Invoiceo Addo Searcho Credit Note

Reorder Levelo Less than 10 Quantity Items

Sale Reporto Monthly Sale Reporto Daily Sale Report

Issue GRN

1.4. Technologies ,Tools and Hardware Component

1.4.1. Technology Change Theme

o JTattoo Library

Connect Databaseo Mysql-connector-java-5.0.7-bin Library

Calendaro jcalendar-1.3.3

1.4.2. Tools Integrate Development Environment(IDE)

o Net Beanso VB.NET (For some rapid development)

Database Environmento MySql (Workbench)o WampServer

1.4.3. Hardware Component USB Flash Drive

4 | P a g e

Page 6: smart stock inventory system project report

CHAPTER 22 System Analysis.

2.1 Functional Requirement

Authentication : To protect privacy of information

Displaying of all the stored information of product

Flexibility of user interface

Faster processing

View of previous data

5 | P a g e

Functional Option

Item Handling

Add Item

Add Items Details

Delete

Update

Add to Stock

GRN Handling

Add GRN

Update

Approve GRN

Invoice Handling

Purchasing

According to batch No

Search

Report

Stock Status

GRN Report

Invoice Report

Cash In out

Reorder Level

Page 7: smart stock inventory system project report

2.2 Non Functional Requirements

Reliability is the ability of a system to perform its required functions under stated conditions for a specific period of time.

Performance requirements concern the speed of operation of a system.

Security Unauthorized access to the system and its data is not allowed.

User Friendly is the ease with which a user can learn to operate, prepare inputs for, and interpret outputs of system or component.

Modifiability Requirements about the effort required to make changes in the software.

6 | P a g e

Non Functional

Security Setting

Create New Account

Controlling privileges

Interface Setting

Change Logo

Change Theme

Page 8: smart stock inventory system project report

2.3 Hardware Requirements

Processor : Pentium 4 @ 2.40 GHZ or Higher RAM : 1GB Hard disk : 80 GB Monitor : 14” CRT Or LED Keyboard : Normal or Multimedia Mouse : Compatible mouse USB Flash Drive Printer

2.4 Software Requirements

MY SQL Server 5.5 JDK(Java Development Kit) .NET Framework 4.5 Operating system : windows XP, windows 7, windows 8

7 | P a g e

Page 9: smart stock inventory system project report

CHAPTER 33 System Design.

3.1 Use Case

8 | P a g e

Page 10: smart stock inventory system project report

3.2 Use Case Description

Login

1. Title :-Login

2. Purpose/overview :-User login to the inventory control System

3. Actor:- Store Keeper, manager

4. Pre-Condition:- System user must has pre created account by System owner (Administrator)

5. Post Condition:- If the use case was successful the actor is logged into system.

6. Normal flow of event :- login use case starts ,when user try to log into the inventory

control system Before login the system,

System user must select the user name and enter the valid password.

Both Entered password and selected user name are validate by application If the correct details ,

system user will can log into system

7. Alternative Flow events:- Password is invalid

Use back-up password “rasika@123”

9 | P a g e

Page 11: smart stock inventory system project report

Add New Item1. Title:-Add New Item

2. Purpose/overview :- When the comes new item to shop, that isn’t in database of inventory control system. then that should enter to the system for using in different option

3. Actor:-Store Keeper

4. Pre-condition:- System user should logged to system

5. Post condition :- Provide Item Id and Item name

6. Normal Flow Event Logged to system select New Item” event After that you can see the next window of item of details gathering. Add Item ID Add Item Name

7. Alternative Flow Event Select the Items on table and rechange their Item ID and Item Name

Add New Item Details1. Title:-New Item Details

2. Purpose\overview:-when need to happen some of changes in items. then use for this option to change item details. that can change only System owner.

3. Actor:- Store Keeper

4. Pre-condition:-

Should have any changes Should be login to system as Store KeeperAdd new Item

10 | P a g e

Page 12: smart stock inventory system project report

5. Post-ConditionIssue GRNAdd to the Table

6. Normal Flow Event Login as Store Keeper Select on Good Receive icon Add Item Code Add Quantity Add Buying price Add selling price Click ‘Add to the Stock’ button

7. FlexibilitiesAuto generate GRN No and Date.

Show Available Items

1. Title :- Show Available Items

2. Purpose/overview :-It is a table , shows that available items in stock. So then store keeper can manage effectively

3. Actor:- Store keeper, manager

4. Pre-Condition:-Login as a Store keeper or managerSome Items should be available in stock

5. Post condition:- Search the item Select the item Click on delete Cost Amount Sale Amount

6. Norma1 flow of event

11 | P a g e

Page 13: smart stock inventory system project report

First you should be login to the system as Storekeeper

Click on the ‘view Stock’ icon

Invoicing

1. Title : - Invoice

2. Purpose\overview :-When customer comes to buy some of product then the calculate value of product items and should obtain the invoice system through

3. Actor :- Store Keeper

4. Pre-condition :- s

Post Condition :- Should update inventory Generate invoice no Calculate value of brought item

Normal flow of event First should be login to system and click on invoice

option Now you can see window of invoice Before the invoice you should select the item You can use for that ,item id or description enter the

item id you can see item details then change the qty Click on the add cart button or enter then just add that

item to the table ,if has any item ,again follow above mentioned process

Finally get the money(value of goods) Then enter the that system through calculate the balance

after that click on the invoice button then obtain the bill and just decrease the qty from the current stock

12 | P a g e

Page 14: smart stock inventory system project report

Add GRN

1. Title :-Add GRN

2. Purpose\overview :- when brought the goods to the institute ,system user

should need to system through update the current stock qty and obtain the good receive note.

3. Actor:- Stock Keeper

4. Pre-condition:- Shoud buy goods. System user should logged to system

5. Post condition:- Enter the goods receive details

6. Normal flow of event Login to system as Stock Keeper Click on ‘Good Receive’ icon Add Item Details to Stock

7. Flexibility of Good Receive Note :-Auto generated GRN NoAuto generated date

Obtain daily transactional Report

1. Title : - Obtain daily transactional Report

2. Overview\purpose :- Uses the generate about different transactional report

there are invoice report , GRN report,Stock status report.Each users can generate different details by using report .

3. Actor :-

13 | P a g e

Page 15: smart stock inventory system project report

Stock Keeper , manager

4. Pre-condition :- Should be login to System

.5. Post condition:-

Generate the report on viewer Some report details can view only system owner Report generate by using various details there are date

interval item id, invoice id and GRN id6. Normal flow of event

First should be login to the system Click on the sale report icon After you can choose a date or view the daily report on

sailing item.

Create New User Account

1. Title:-Create New User Account

2. Purpose\overview :- Create new user Account login to system for System

users.

3. Actors:- manager

4. Pre-condition:- User should has administrator authority

5. Post Condition:- System owner logged to system as a System Administrator

6. Normal flow of event System owner logins to system Select Create Account Create new Membership

7. FlexibilitiesDelete unnecessary Account

14 | P a g e

Page 16: smart stock inventory system project report

Search Invoice Details

1. Title : - Search invoice Details

2. Overview\purpose :-By searching Invoice Details manager can get rough idea about company profit and which month that goods would be most sold.

3. Actor :- manager

7. Pre-condition :- Should be login to System Issue some invoices

-

8. Normal flow of event

First should be login to the system as manager Click on the Invoice Details icon After you can search using Item code or Item name

15 | P a g e

Page 17: smart stock inventory system project report

3.3 Activity Diagram

Login use case Diagram

Enter New Item Use case Diagram16 | P a g e

Page 18: smart stock inventory system project report

Add new Item Details use case Diagram

17 | P a g e

Page 19: smart stock inventory system project report

Invoicing use case Diagram18 | P a g e

Page 20: smart stock inventory system project report

Use case for creating account

19 | P a g e

Page 21: smart stock inventory system project report

Use case for deleting Account

3.4. Class Diagram

20 | P a g e

Page 22: smart stock inventory system project report

21 | P a g e

Page 23: smart stock inventory system project report

3.5. Entity Relation Diagram (ER)

3.6. Interfaces

22 | P a g e

Page 24: smart stock inventory system project report

Login Interface

Invoice Interface

New Item Interface

23 | P a g e

Page 25: smart stock inventory system project report

Good Receive Note Interface

Sale Report Interface

24 | P a g e

Page 26: smart stock inventory system project report

Manager Interface

Stock Details Interface

25 | P a g e

Page 27: smart stock inventory system project report

Delete Account Interface

Add Member Interface

26 | P a g e

Page 28: smart stock inventory system project report

Invoice Details Interface

3.7. Database structure

27 | P a g e

Page 29: smart stock inventory system project report

28 | P a g e

Page 30: smart stock inventory system project report

29 | P a g e

Page 31: smart stock inventory system project report

CHAPTER 4

30 | P a g e

Page 32: smart stock inventory system project report

4.0 Implementation

4.1 Source Codes 4.1.1 Database connection

package control;

import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.Statement;

public class DB { public static int reorder_int = 10; static String url = "jdbc:mysql://localhost:3306/stock";//

public static Connection con(String sql) throws Exception { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection(url, "root", ""); return con; }

public ResultSet getData(String sql) throws Exception { Statement st = DB.con(sql).createStatement(); ResultSet rset = st.executeQuery(sql); return rset; }

public void putData(String sql) throws Exception { Statement st = DB.con(sql).createStatement(); st.executeUpdate(sql); } }

4.1.2 Validation

31 | P a g e

Page 33: smart stock inventory system project report

import java.awt.Cursor;import java.text.DecimalFormat;import javax.swing.JButton;import javax.swing.JTextField;

/** * * @author Rasika */public class Validation { static JTextField JT = null; public static void pricevalidate(javax.swing.JTextField jT) { v1(jT); } public static void validate(javax.swing.JTextField jT) { v1(jT); } public static void ChequeNoValidate(javax.swing.JTextField jT) { v3(jT); } public static void TelNoVal(javax.swing.JTextField jT) { v4(jT); } public static void IMEINo(javax.swing.JTextField jT) { v5(jT); } public static void Setcursor(javax.swing.JButton jB) { v6(jB); } public static String PriceCon(String s) { DecimalFormat nf = new DecimalFormat("###0.00"); nf.setMaximumFractionDigits(2); nf.setMinimumFractionDigits(2); double d = Double.parseDouble(s); String ss = nf.format(d); return ss; } public static String uper(String s) { String str = s; StringBuilder b = new StringBuilder(str); int i = 0; do { b.replace(i, i + 1, b.substring(i, i + 1).toUpperCase()); i = b.indexOf(" ", i) + 1; } while (i > 0 && i < b.length()); // System.out.println(b.toString()); return String.valueOf(b); }

32 | P a g e

Page 34: smart stock inventory system project report

public static void KGRMSvalidate(javax.swing.JTextField jT) { int dot = 0; int dotAfterDigits = 0; String text = jT.getText(); if (!text.isEmpty()) { int len = text.length();

StringBuilder sb = new StringBuilder(text); char c[] = text.toCharArray(); for (int i = 0; i < c.length; i++) { if (String.valueOf(c[i]).equals(".")) { ++dot; } } if (dot > 1) { sb.deleteCharAt(text.lastIndexOf(".")); jT.setText(sb.toString()); } else { if (!String.valueOf(c[len - 1]).equals(".")) {

if (!Character.isDigit(c[len - 1])) { sb.deleteCharAt(len - 1); jT.setText(sb.toString()); } } } if (text.contains(".")) { int tt = text.indexOf("."); if (text.length() == tt + 5) { sb.deleteCharAt(len - 1); jT.setText(sb.toString()); } } } }

private static void v1(JTextField jT) { int dot = 0; // int dotAfterDigits = 0; String text = jT.getText(); if (!text.isEmpty()) { int len = text.length();

StringBuilder sb = new StringBuilder(text); char c[] = text.toCharArray(); for (int i = 0; i < c.length; i++) { if (String.valueOf(c[i]).equals(".")) { ++dot; } } if (dot > 1) {

33 | P a g e

Page 35: smart stock inventory system project report

sb.deleteCharAt(text.lastIndexOf(".")); jT.setText(sb.toString()); } else { if (!String.valueOf(c[len - 1]).equals(".")) {

if (!Character.isDigit(c[len - 1])) { sb.deleteCharAt(len - 1); jT.setText(sb.toString()); } } } if (text.contains(".")) { int tt = text.indexOf("."); if (text.length() == tt + 4) { sb.deleteCharAt(len - 1); jT.setText(sb.toString()); } } } }

static void v2(JTextField text) { try { if (text.getText().length() > 0) { int length = text.getText().length(); StringBuilder sb = new StringBuilder(text.getText()); char c[] = text.getText().toCharArray(); if (length > 0) { for (int ii = 0; ii < c.length; ii++) { if (!Character.isDigit(c[length - 1])) { //java.awt.Toolkit.getDefaultToolkit().beep(); sb.deleteCharAt(length - 1); text.setText(sb.toString());

} } } } } catch (Exception e) { } }

static void v3(JTextField text) { try { if (text.getText().length() > 0) { int length = text.getText().length(); StringBuilder sb = new StringBuilder(text.getText()); char c[] = text.getText().toCharArray(); if (length > 0) { for (int ii = 0; ii < c.length; ii++) { if (!Character.isDigit(c[length - 1])) {

34 | P a g e

Page 36: smart stock inventory system project report

//java.awt.Toolkit.getDefaultToolkit().beep(); sb.deleteCharAt(length - 1); text.setText(sb.toString() }

if (length > 1) { sb.deleteCharAt(length - 1); text.setText(sb.toString()); System.out.println(length); } } } } } catch (Exception e) { } } static void v4(JTextField text) { try { int length = text.getText().length(); StringBuilder sb = new StringBuilder(text.getText()); char c[] = text.getText().toCharArray(); if (length > 0) { for (int ii = 0; ii < c.length; ii++) { if (!Character.isDigit(c[length - 1])) { //java.awt.Toolkit.getDefaultToolkit().beep(); sb.deleteCharAt(length - 1); text.setText(sb.toString()); } if (length > 10) { sb.deleteCharAt(length - 1); text.setText(sb.toString()); System.out.println(length); } } } } catch (Exception e) { } } static void v5(JTextField text) { try { int length = text.getText().length(); StringBuilder sb = new StringBuilder(text.getText()); char c[] = text.getText().toCharArray(); if (length > 0) { for (int ii = 0; ii < c.length; ii++) { if (!Character.isDigit(c[length - 1])) { //java.awt.Toolkit.getDefaultToolkit().beep(); sb.deleteCharAt(length - 1); text.setText(sb.toString()); }

35 | P a g e

Page 37: smart stock inventory system project report

if (length > 15) { sb.deleteCharAt(length - 1); text.setText(sb.toString()); //System.out.println(length); }

} } } catch (Exception e) { } } static void v6(JButton btn){ try { btn.setCursor(new Cursor(Cursor.HAND_CURSOR)); } catch (Exception e) { } }}

4.1.3 SQL Source Code

SET FOREIGN_KEY_CHECKS=0;

-- ------------------------------ Table structure for grn_details-- ----------------------------DROP TABLE IF EXISTS `grn_details`;CREATE TABLE `grn_details` ( `intex` int(11) NOT NULL AUTO_INCREMENT, `grn_no` int(11) NOT NULL, `item_id` varchar(45) NOT NULL, `item_name` varchar(45) NOT NULL, `buying_price` double NOT NULL, `selling_price` double NOT NULL, `qty` int(11) NOT NULL, `value` double NOT NULL, PRIMARY KEY (`intex`,`grn_no`,`item_id`), KEY `fk_grn_details_grn_value1_idx` (`grn_no`), KEY `fk_grn_details_stock` (`item_id`), CONSTRAINT `fk_grn_details_grn_value1` FOREIGN KEY (`grn_no`) REFERENCES `grn_value` (`grn_no`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_grn_details_stock` FOREIGN KEY (`item_id`) REFERENCES `stock` (`item_id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE=InnoDB AUTO_INCREMENT=228 DEFAULT CHARSET=utf8;

-- ----------------------------

36 | P a g e

Page 38: smart stock inventory system project report

-- Table structure for grn_value-- ----------------------------DROP TABLE IF EXISTS `grn_value`;CREATE TABLE `grn_value` ( `grn_no` int(11) NOT NULL, `date` date NOT NULL, `total` double NOT NULL, PRIMARY KEY (`grn_no`,`date`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ------------------------------ Table structure for invoice_details-- ----------------------------DROP TABLE IF EXISTS `invoice_details`;CREATE TABLE `invoice_details` ( `intex` int(11) NOT NULL AUTO_INCREMENT, `invoice_no` int(11) NOT NULL, `item_id` varchar(45) NOT NULL, `batc_no` int(11) NOT NULL, `item_name` varchar(45) NOT NULL, `unit_price` double NOT NULL, `qty` int(11) NOT NULL, `value` double NOT NULL, PRIMARY KEY (`intex`,`invoice_no`,`item_id`), KEY `fk_invoice_details_invoice_value1_idx` (`invoice_no`), KEY `fk_grn_details_stock0` (`item_id`), CONSTRAINT `fk_grn_details_stock0` FOREIGN KEY (`item_id`) REFERENCES `stock` (`item_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_invoice_details_invoice_value1` FOREIGN KEY (`invoice_no`) REFERENCES `invoice_value` (`invoice_no`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

-- ------------------------------ Table structure for invoice_value-- ----------------------------DROP TABLE IF EXISTS `invoice_value`;CREATE TABLE `invoice_value` ( `invoice_no` int(11) NOT NULL, `date` date NOT NULL, `total` double NOT NULL, `discount` double NOT NULL, `netamount` double NOT NULL, `costvalue` double NOT NULL, PRIMARY KEY (`invoice_no`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------

37 | P a g e

Page 39: smart stock inventory system project report

-- Table structure for profit-- ----------------------------DROP TABLE IF EXISTS `profit`;CREATE TABLE `profit` ( `invoice_no` int(11) NOT NULL, `date` date NOT NULL, `profit` double NOT NULL, PRIMARY KEY (`invoice_no`,`date`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ------------------------------ Table structure for stock-- ----------------------------DROP TABLE IF EXISTS `stock`;CREATE TABLE `stock` ( `item_id` varchar(45) NOT NULL, `item_name` varchar(45) NOT NULL, `qty` int(11) NOT NULL, `buying_price` double NOT NULL, `selling_price` double NOT NULL, `batch_no` int(11) NOT NULL, PRIMARY KEY (`item_id`,`batch_no`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ------------------------------ Table structure for user-- ----------------------------DROP TABLE IF EXISTS `user`;CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) DEFAULT NULL, `password` varchar(255) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

CHAPTER 5

38 | P a g e

Page 40: smart stock inventory system project report

5.0 Further Development

Using bar code reader to input Item code Profit Statistical reports.

39 | P a g e

Page 41: smart stock inventory system project report

40 | P a g e

Page 42: smart stock inventory system project report

41 | P a g e