Académique Documents
Professionnel Documents
Culture Documents
April 2013
TABLE OF CONTENTS
REVIEW 1 ...................................................................................................................................7 1 -Problem Definition ..................................................................................................................8 1.1.Introduction ............................................................................................................................8 1.2. Existing Scenario...................................................................................................................8 1.3. Proposed Solution .................................................................................................................8 2 -Customer Requirement Specification ......................................................................................9 2.1.Users of System......................................................................................................................9 2.2. Functional Requirements .......................................................................................................9 2.2.1. Admin.................................................................................................................................9 2.2.2. Employee............................................................................................................................9 2.3. System Requirements ............................................................................................................10 2.3.1. Hardware Requirements .....................................................................................................10 2.3.2. Software Requirements ......................................................................................................10 Review 1 - Task Sheet..................................................................................................................11 REVIEW 2 ...................................................................................................................................12 3 - Architecture and Design of the Project ...................................................................................13 4 - Algorithms .............................................................................................................................14 4.1. Login Algorithm ..................................................................................................................14 4.2. Create Employee Account Algorithm ...................................................................................15 4.3. Insert Supplier Algorithm ......................................................................................................16 4.4. Update Supplier Algorithm ...................................................................................................17 4.5. Delete Supplier Algorithm ....................................................................................................18 4.6. Insert Product Algorithm .......................................................................................................19
Sales and Purchase Management System for Mobile Shop 4.7. Update Product Algorithm ....................................................................................................20 4.8. Delete ProductAlgorithm ......................................................................................................21 4.9.Change Password Algorithm ..................................................................................................22 4.10. Make Customer List Algorithm...........................................................................................23 4.11. Make Invoice Algorithm .....................................................................................................24 5 -Process Diagrams ....................................................................................................................25 5.1. Employee...............................................................................................................................25 5.2. Admin ...................................................................................................................................26 6 - Data Flow Diagram (DFD) .....................................................................................................27 6.1. DFD Level 0 Context Diagram ..........................................................................................28 6.2. DFD Level 1 ..........................................................................................................................29 6.3. DFD Level 2 ..........................................................................................................................30 7 - Entity Relationship (E-R) Diagram .........................................................................................31 7.1. Entities...................................................................................................................................31 7.1.1. User ....................................................................................................................................31 7.1.2. Customer ............................................................................................................................32 7.1.3. Supplier ..............................................................................................................................32 7.1.4. Product ...............................................................................................................................33 7.1.5.Functions .............................................................................................................................33 7.1.6.Sales ....................................................................................................................................34 7.2. E-R Diagram .........................................................................................................................35 Review 2 - Task Sheet..................................................................................................................36 REVIEW 3 ...................................................................................................................................37 8 - Database Design/Structure ......................................................................................................38 8.1. Data Diagram ........................................................................................................................38
Sales and Purchase Management System for Mobile Shop 8.2. Tables ....................................................................................................................................39 8.2.1.[User] Table ........................................................................................................................39 8.2.2. Customer ............................................................................................................................39 8.2.3. Supplier ..............................................................................................................................39 8.2.4. [Function] Table .................................................................................................................40 8.2.5. Product Table .....................................................................................................................40 8.2.6. Sales Table .........................................................................................................................41 8.2.7. Invoice Table ......................................................................................................................41 8.3. Table Constraints...................................................................................................................42 9 - GUI Design .............................................................................................................................43 9.1. Main ......................................................................................................................................43 9.1.1. Main Frame ........................................................................................................................43 9.1.2. Login Frame .......................................................................................................................43 9.1.3. Configure Frame ................................................................................................................44 9.2. Employee ..............................................................................................................................45 9.2.1. Employee Main Frame ......................................................................................................45 9.2.2. Change Password Frame ...................................................................................................46 9.2.3. Customer Management Frame ..........................................................................................47 9.2.4. Insert Customer Frame ......................................................................................................48 9.2.5. Edit Customer Frame..........................................................................................................50 9.2.6. Sales Management Frame ..................................................................................................52 9.3. Admin....................................................................................................................................54 9.3.1. Admin Main Frame ............................................................................................................54 9.3.2. User Account Management Frame ....................................................................................55 9.3.3. Create Account Frame .......................................................................................................56
Sales and Purchase Management System for Mobile Shop 9.3.4.Edit Account Frame ...........................................................................................................57 9.3.5.About us ..............................................................................................................................58 9.3.6.Supplier Management Frame .............................................................................................59 9.3.7.Insert Supplier Frame .........................................................................................................60 9.3.8.Edit Supplier Frame ...........................................................................................................61 9.3.9. Product Management Frame .............................................................................................62 9.3.10. Insert Product Frame .......................................................................................................63 9.3.11. Edit Product Frame...........................................................................................................65 9.3.12. Product Details Frame ......................................................................................................67 9.3.13. Report Management Frame ..............................................................................................68 9.3.14.Employee Report ...............................................................................................................69 9.3.15. Product Report..................................................................................................................69 9.3.16. Supplier Report ...............................................................................................................69 9.3.17. Sales Report......................................................................................................................70 9.3.18. Customer Report .............................................................................................................70 Review 3 - Task Sheet ................................................................................................................71
This is to certify that Mr. Mr. Mr. Mr. Mr. NGUYEN NGOC VAN PHONG NGUYEN THANH NHAN TRAN MINH TRUNG CAO DUY TUAN LE TUAN AN
Have successfully Designed & Developed Sales and Purchase Management System for Mobile Shop Submitted by: TRAN PHUOC SINH
Date of Issue:
Authorized Signature:
REVIEW 1
1 - Problem Definition
1.1. Introduction
The project Sales & and purchase management system for mobile is to develop software based information of Mobile shopping. In global business market the mobile is most important accessory in real life. Visualizing the huge opportunity, this is an effort to maximize the business through the development of this software and keeping the data and thus increasing the customer base from the local as well as global markets around the world. Nowadays software is a prominent tool of marketing mantra. With the advent of the software technologies, world has become a global village. Every year, millions more people around the world are added to the existing customer base. So considering a big hike in the revenue in this booming sector and one of the successful businesses through this software one should be proud to have such a technical deal.
deducted from the rate as the product was sold. The user information is kept secret from other users as a company policy because the
whole business is the game of contract. When user visits the shown with different offers and advertisements through which he
can update his knowledge regarding the Mobile phone available for sale. Besides that he can search for specified Mobile phone in our database, if he is interested and needs to book a Mobile phone or to sale on then he needs a registration to be the member.
a. Report
ITEM REPORT: reportdetails and status of the products. SALES REPORT:report details of the sales invoice. PURCHASE REPORT: report details of the orders. EMPLOYEE REPORT: report details of the employees. CUSTOMER REPORT: report details of the customers.
b. Manager
Insert, Update, Delete datails of the products.
2.2.2.
Employee
a. Login system
Login to system by account, link to the main page.As user id rules the system so a person is known by his uniqueness of his user id. As it is to provide the viable candidate system, so the user id is being validated with password in different cases to validate the genunity of the candidate.This module keeps the status of who and when logged in and for which purpose and how much time.
Sales and Purchase Management System for Mobile Shop SALES: invoiced sales. PURCHASE: up orders according to customer requirementsif there is no inventory of products and delete orders which are complete.
Hardware Requirements
A minimum computer system that will help you access all the tools in thecourses is a
2.3.2.
-
Software Requirements
Java Runtime Environment (JRE) 6 MS SQL Server 2008 Window XP or higher JDK 6 or better Netbeans7.8.1 or better Java SE 6 or better MS SQL Server 2008
Development Software
Technology
Sqljdbc4.jar
10
Sr. No.
01 02 03
eProject Title
Date of Preparation of Activity Plan Actual Team Actual Start Member Status Days Date Names All members 18/04/2013 Completed
11
02
Tran PhuocSinh
REVIEW 2
12
3-
13
4-
Algorithms
14
15
16
17
18
19
20
21
22
23
24
5-
25
5.2.
Admin
26
6-
27
28
29
30
7-
31
7.1.2.
Customer
7.1.3.
Supplier
32
7.1.4.
Product
7.1.5.
Function
33
7.1.6.
Sales
34
35
Sr. No.
01 02 03 04 05
Task Architecture
eProject Title
21/04/2013
07
Tran PhuocSinh
36
Completed
Algorithms
All members
REVIEW 3
37
38
10 100 20 100
The gender of customer : male or female The address of customer The phone of customer The email of customer
No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
50 50 50 2000
8.2.5.Product Table
Sr. No. 1 2 3 4 5 6 7 8 Pro_ID Pro_Name Sup_ID Pro_Price Func_ID Pro_Image Qty Pro_Color Field Name Data Type int varchar int money int varchar varchar varchar 100 100 20 50 Size Null Default Value PK Key Table-Field Ref Description
FK
FK
The unique number of product The name of product Supplier.Su The ID of Supplier p_ID supply Product The price of product [Function].F The ID of Product unc_ID Function The image of Product The quantity of Product The Color of Product
40
8.2.6.Sales Table
Sr. No. 1 2 3 4 5 Sales_ID [User_ID] Cus_ID [Sum] DoC Field Name Data Type int varchar int money date 10 Size Null Default Value PK FK FK Key Table-Field Ref Description
No No No Yes Yes
The unique number of Sales [User].[User The id of User _ID] Customer.C The id of Customer us_ID The sum of Sales The date of Sales
8.2.7.Invoice Table
Sr. No. 1 2 3 4 5 6 7 Invoice_ID Pro_ID Sales_ID Cus_Name Pro_Price SQty Total Field Name Data Type int int int varchar money int money 50 Size Null Default Value PK FK FK Product.Pro _ID Sales.Sales_ ID Key Table-Field Ref Description The unique number of Invoice The id of Product The id of Sales The name of Customer The price of Product The quatity of Product saled Pro_Price*Qty
41
42
No Name
1 2 btnlogin btnconnect
Type
JButton JButton
Validation
Event
Action Performed Action Performed
Description
Open Login frame Open Configure frame
Status
Enable Enable
9.1.2.
Login
43
Type
JTextField JPasswordFiled JComboBox JButton JButton
Validation
Not blank Not blank
Event
Action Performed Action Performed Action Performed
Description
Input id of User Input password of User Input role of User Check account of User exist in User Reset all text field
Status
Enable Enable Enable Enable Enable
9.1.3.
Configure Database
No Name
1 2 3 4 5 6 7 txtServer txtPort txtDatabase txtUsername txtPassword btnSubmit btnClose
Type
JTextField JTextField JTextField JTextField JPasswordFiled JButton JButton
Validation
Not blank Not blank Not blank Not blank Not blank
Event
Description
Input server name Input port Input database name Input SQL Username Input SQL pass Test and Save Close this frame
Status
Enable Enable Enable Enable Enable Enable Enable
44
No
1 2 3 4 5 6 7
Name
btnAccount btnSales btnCust btnHelp btnAbout btnLogout btnExit
Type
JButton JButton JButton JButton JButton JButton JButton
Validation
Event
Action Performed Action Performed Action Performed Action Performed Action Performed Action Performed Action Performed
Description
Open Employee Details Frame Open Sales System Frame Open Customer Management Frame Open Help Open About Frame Log out the System Exit the System
Status
Enable Enable Enable Enable Enable Enable Enable
45
9.2.2.
No Name
1 2 3 4 5 lblName lblID txtOldPass txtNewPass txtConfirmPas s
Type
JLabel JLabel JPassword JPassword JPassword
Validation
Not blank, contain more than 6 character Not blank, contain more than 6 character Not blank, contain more than 6 character, same txtNewPass
Event
KeyPresse d KeyPresse d KeyPresse d
Description
Display name of user Display id of user Old users password New users password Confirm users password
Status
Enable Disable Enable Enable Enable
btnSubmit
JButton
Action Performed
Test all field is valid, change users password and close this dialog
Enable
46
9.2.3.
No Name
1 2 3 4 btnInsert btnUpdate btnDelete tblShowDetails
Type
JButton JButton JButton JTable
Validation
Event
Action Performed Action Performed Action Performed
Description
Test all field is valid, insert customer details Test all field is valid, insert customer details Test all field is valid, Delete customer details Show all Customer Details
Status
Enable Enable Enable Enable
47
9.2.4.
No Name
1 2 txtName txtIdentity
Type
JTextField JTextField
Validation
Not blank
Event
Description
Customers name Customers Identity No
Status
Enable Enable
3 4 5 6
Not blank,
Check if Customers gender is Male Check if Customers gender is Female Customers DoB Address of Customer
48
8 9 10
Email of Customer Test all field is valid, Save customer details Clear all field, clear select of rbtnMale ,rbtnFemale and cdDoB
49
9.2.5.
No Name
1 txtID
Type
JTextField
Validation
Not blank, must begin with EM and contain 3 number ^Em\\d{3}$ Not blank
Event
Description
Customers ID
Status
Disable
2 3
txtName txtIdentity
JTextField JTextField
Enable Enable
rbtnMale
JRadioButton
Enable
50
Not blank,
txtPhone
JTextField
9 10 11
Not blank, must begin with 0 and contain 7 to 9 number ^0\\d{7,9}$ Not blank, must be format any@any.any Action Performed Action Performed
Enable
Email of Customer Test all field is valid, Save customer details Clear all field, clear select of rbtnMale ,rbtnFemale and dcDoB
51
9.2.6.
No
1 2 3 4 5 6
Name
txtEmplID txtSalesID txtCustName cbbProdID txtQty btnNew
Type
JTextField JTextField JTextField JConboBox JTextField JButton
Validation
Not blank, exist in User Not blank Not blank exist in Product Not blank, > 0 and <Qty in Product
Event
Description
Employees ID Saless ID Customers Name Products ID Quantity of Product sales Enable all txtCustNamecbbProdID, txtQty Insert record to Invoice and tblInvoice Enable btnUpdate, btnDelete Clear all JTextField except txtEmplID Disable Print the Invoice Show the details of Invoice
Status
Disable Disable Disable Disable Disable Enable
btnInsert
JButton
Enable
8 9 10 11
52
No
1 2 3 4 5 6 7
Name
txtEmplID txtSalesID txtCustName cbbProdID txtQty btnNew btnInsert
Type
JTextField JTextField JTextField JComboBox JTextField JButton JButton
Validation
Not blank, exist in User Not blank Not blank exist in Product Not blank, > 0 and <Qty in Product
Event
Description
Employees ID Saless ID Customers Name Products ID Quantity of Product sales Save record to Sales Insert record to Invoice and tblInvoice Enable btnUpdate, btnDelete Clear all JTextField except txtEmplID Delete the record in table tblInvoice Print the Invoice Show the details of Invoice
Status
Disable Disable Enable Enable Enable Enable Enable
8 9 10 11
53
No 1 2 3 4 5 6 7 8 9
Name btnHome btnUser btnReport btnProduct btnSuplier btnHelp btnAbout btnLogout btnExit
Type JButton JButton JButton JButton JButton JButton JButton JButton JButton
Validation
Event Action Performed Action Performed Action Performed Action Performed Action Performed Action Performed Action Performed Action Performed Action Performed
Description Open Home frame Open User frame Open Report frame Open Product frame Open Supplier frame Open Help frame Open About us frame Log out the system Exit the system
Status Enable Enable Enable Enable Enable Enable Enable Enable Enable
54
9.3.2.
No
1 2 3
Name
btnCreateAcc btnEditAcc txtSearch
Type
JButton JButton JTextField
Validation
Event
Action Performed Action Performed Key Release Key Release Mouse Clicked
Description
Open create account dialog Open edit account dialog Search account id or account name and show at tblListAcc List Account
Status
Enable Enable Enable
tblListAcc
JTable
Enable
55
9.3.3.
No
1
Name
txtID
Type
JTextField
Validation
Auto initialize when open create account dialog Not blank, containt more than 6 character Not blank, containt more than 6 character, same txtPass Not Blank, not contain number, not contain special character
Event
Description
Users ID Users password Confirm password of user Users name
Status
Disable
2 3
txtPass txtConfirmPas s
JPassword JPassword
KeyPressed KeyPressed
Enable Enable
txtName
JTextField
KeyPressed
Enable
rbtnMale
JRadioButton
Enable
56
8 9 10
Email of user Address of user Test all field is valid, create account and close this dialog Clear all field, set select cbType items index 0, clear select of rbtnMale and rbtnFemale
11
btnReset
JButton
Enable
9.3.4.
No
1
Name
txtName
Type
JTextField
Validation
Not Blank, not contain number, not contain special character
Event
KeyPressed
Description
Name of user
Status
Enable
57
5 6 7
KeyPressed KeyPressed
Email of user Address of user Test all field is valid, change information of user and closethis dialog
9.3.5.
About us Frame
No
1
Name
btnClose
Type
JButton
Validation
Event
Action Performed
Description
Close About us dialog
Status
Enable
58
9.3.6.
No
1 2 3 4
Name
btnInsert btnUpdate btnDelete tblShowDetails
Type
JButton JButton JButton JTable
Validation
Event
Action Performed Action Performed Action Performed Key Released Mouse Clicked
Description
Test all field is valid, insert customer details Test all field is valid, insert customer details Test all field is valid, Delete customer details Show all Customer Details
Status
Enable Enable Enable Enable
59
9.3.7.
No
1 2
Name
txtName txtAddress
Type
JTextField JTextArea
Validation
Not blank Not blank,
Event
Description
Suppliers name Address of Supplier
Status
Enable Enable
txtPhone
JTextField
4 5 6
Not blank, must begin with 0 and contain 7 to 9 number ^0\\d{7,9}$ Not blank, must be format any@any.any Action Performed Action Performed
Enable
Email of Supplier Test all field is valid, Save Supplier details Clear all field
60
9.3.8.
No Name
1 2 txtName txtAddress
Type
JTextField JTextArea
Validation
Not blank Not blank,
Event
Description
Suppliers name Address of Supplier
Status
Enable Enable
txtPhone
JTextField
4 5 6
Not blank, must begin with 0 and contain 7 to 9 number ^0\\d{7,9}$ Not blank, must be format any@any.any Action Performed Action Performed
Enable
Email of Supplier Test all field is valid, Save Supplier details Clear all field
61
9.3.9.
No 1 2 3 4 5 6 7
Event
Action Performed Action Performed Action Performed Action Performed Action Performed Key Released Mouse Clicked
Discription Information need to search Search Product Information Display Insert Form Display Update Form Delete Product from database Show Products Details Show All Product
62
9.3.10.
No 1 2
Validation
Event
Pro_Price
JTextField
Products Price
Enable
^\\d+$
4 Pro_Image JTextField Not blank Image must be exsited in database Action Performed Products Image Disable
5 6
btnImage Pro_Status
JButton JTextArea
Enable Enable
Pro_Color
JTextField
Products Color
Enable
63
Not blank
64
No 1 2 3
Validation
Event
Pro_Price
JTextField
Products Price
Enable
^\\d+$
5 Pro_Image JTextField Not blank Image must be exsited in database Products Image Products Status Disable
Pro_Quantity
JTextArea
Enable
7 8 9 10 11
Products Color Products CPU Products Operating System Products Screen Products Memory
65
Not blank
66
No 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Name ProductTable Pro_ID Sup_Name Pro_Name Pro_Price Pro_Color Func_CPU Func_OS Func_Screen Func_Memory Func_Radio Func_Player Func_Wifi Func_Recorder Func_Camera Func_Video Func_Other bntUpdate
Type JTable JTextField JComboBox JTextField JTextField JTextField JTextField JTextField JTextField JTextField JCheckBox JCheckBox JCheckBox JCheckBox JCheckBox JCheckBox JTextArea JButton
Validation
Event MouseClicked
Action Performed
Description Show List Product Product ID Supplier Name Products Name Products Price Products Color Products CPU Products Operating System Products Screen Products Memory Radio Player Wifi Recorder Camera Video Other of Product Update Product
Status Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable Enable
67
No 1 2 3 4 5 6
Validation
Event Mouse Clicked Action Performed Action Performed Action Performed Action Performed Action Performed
Description Select day of report Show the report of the Employee in select day Show the report of the Product in select day Show the report of the Supplier in select day Show the report of the Sales in select day Show the report of the Customer in select day
68
69
- Show all the sales on Select report date 9.3.18. Customer Report
70
Sr. No.
01
Task
eProject Title
Date of Preparation of Activity Plan Actual Team Actual Start Member Status Days Date Names All Members
02 03 04 05 06 07 08 09 10 11 12 13 14
Van Phong
28/04/2013
12
Duy Tuan
Minh Trung
Completed
71
ThanhNh an
15 16 17 18 19 20 21 22 23 24 25 26 27 28
Edit Product Frame Product Details Frame Report Management Frame Employee Report Product Report Supplier Report Sales Report Customer Report Employee Main Frame Sales Management Frame Change Password Frame Customer Management Frame Insert Customer Frame Edit Customer Frame
Van Phong
Tuan An
Duy Tuan
Tran PhuocSinh
72