STOCK MAINTENANCE SYSTEM
PROBLEM DOMAIN:
INVENTORY SYSTEM is a real time application used in the merchant’s day to day
system. This is a database to store the transaction that takes places between the Manufacturer,
Dealer and the Shop Keeper that includes stock inward and stock outward with reference to the
dealer. Here we assume our self as the Dealer and proceed with the transaction as follows:
The Manufacturer is the producer of the items and it contains the necessary information
of the item such as price per item, Date of manufacture, best before use, Number of Item
available and their Company Address.
The Dealer is the secondary source of an Item and he purchases Item from the
manufacturer by requesting the required Item with its corresponding Company Name and the
Number of Items required. The Dealer is only responsible for distribution of the Item to the
Retailers in the Town or City.
The Shop Keeper or Retailer is the one who is prime source for selling items in the
market. The customers get Item from the Shop Keeper and not directly from the Manufacturer or
the Dealer.
The Stock is the database used in our System which records all transactions that takes
place between the Manufacturer and the Dealer and the Dealer and the Retailer.
USE CASE DIAGRAM:
Sales
Purchase
Company name
Company name
DEALER SHOP KEEPER
Price/item Price/Item
PRODUCER
Items ordered
Items ordered
Total price Total price
ACTIVITY DIAGRAM:
Inventory
System
Select from
the Menu
Purchase Sales Stock Exit
Display the
Transaction Details
Company
Name
Price/Item
No of Items
ordered
Total Price If Availability > No of
Items Ordered
Displays Insufficient Displays price
no of items of Items
SEQUENCE DIAGRAM:
PRODUCER DEALER SHOPKEEPER
[Link]
[Link]
[Link] NAME
[Link] NAME
[Link]/ITEM
[Link]/ITEM
[Link] OF ITEMS ORDERED
[Link] OF ITEMS ORDERED
[Link] PRICE
[Link] WITH AVAILABILITY
[Link] INSUFFICIENT/TOTAL PRICE
COLLABORATION DIAGRAM:
5: [Link]/ITEM
9: [Link] PRICE
PRODUC DEALER
ER
1: [Link]
3: [Link] NAME
7: [Link] OF ITEMS ORDERED
4: [Link] NAME
8: [Link] OF ITEMS ORDERED
10: [Link] WITH AVAILABILITY
2: [Link]
6: [Link]/ITEM
11: [Link] INSUFFICIENT/TOTAL PRICE
SHOPKEE
PER
COMPONENT DIAGRAM:
MANUFA DEALER SHOPKE
CTURER EPER
DATABASE
CLASS DIAGRAM:
MANUFACTURER
Manufacturer Name
Company Name
Date of Manufactured
Address
Contact Number
Price
Purchase()
Sales()
DEELER
Dealer Name
Date of Items Received
Address
Contact Number
Price
No of Items Ordered
No of Items Sold
Purchase()
Sales()
Show stock Details()
SHOPKEEPER
ShopKeeper Name
Address
Contact Number
Price
No of Items Ordered
Purchase()
Sales()
DEPLOYMENT DIAGRAM:
Process
or
Printer
Mouse
Keyboar
d
CODING:
FORM1
Dim db As Database
Dim rs As Recordset
Private Sub Command1_Click()
[Link]
End Sub
Private Sub Command2_Click()
[Link]
End Sub
Private Sub Command3_Click()
[Link]
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\prj789\invent\[Link]")
Set rs = [Link]("SYSTEM")
End Sub
FORM2
Dim db As Database
Dim rs As Recordset
Dim i As Integer
Private Sub Command1_Click()
[Link]
End Sub
Private Sub Command2_Click()
[Link]
For i = 1 To [Link]
If rs(0) = [Link] Then
[Link]
If [Link] = "" Then
MsgBox "enter the no of items ordered"
Else
rs(6) = [Link]
rs(7) = rs(5) * rs(6)
rs(4) = rs(4) + Val([Link])
[Link] = rs(7)
[Link] = rs(4)
[Link] = rs(3)
[Link]
GoTo l1
End If
End If
[Link]
Next i
l1: End Sub
Private Sub Command3_Click()
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
End Sub
Private Sub Command4_Click()
[Link]
rs(0) = [Link]
rs(1) = [Link]
rs(2) = [Link]
rs(3) = [Link]
rs(4) = [Link]
rs(5) = [Link]
rs(6) = [Link]
rs(7) = [Link]
[Link]
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\prj789\invent\[Link]")
Set rs = [Link]("SYSTEM")
End Sub
Private Sub List1_Click()
[Link] = [Link]
[Link]
For i = 1 To [Link]
If rs(0) = [Link] Then
[Link] = rs(1)
[Link] = rs(2)
[Link] = rs(3)
[Link] = rs(4)
[Link] = rs(5)
[Link] = ""
[Link] = ""
End If
[Link]
Next i
End Sub
FORM3
Dim db As Database
Dim rs As Recordset
Dim i As Integer
Private Sub Command1_Click()
[Link]
For i = 1 To [Link]
If rs(0) = [Link] Then
[Link]
If [Link] = "" Then
MsgBox "Enter the no of items needed"
Else
rs(6) = [Link]
If rs(6) <= rs(4) Then
rs(7) = rs(5) * rs(6)
rs(4) = rs(4) - Val([Link])
[Link] = rs(4)
[Link] = rs(7)
Else
MsgBox " ITEM NOT SUFFICIENT"
End If
[Link]
GoTo l1
End If
End If
[Link]
Next i
l1: End Sub
Private Sub Command2_Click()
[Link]
End Sub
Private Sub Command3_Click()
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\prj789\invent\[Link]")
Set rs = [Link]("SYSTEM")
End Sub
Private Sub List2_Click()
[Link] = [Link]
[Link]
For i = 1 To [Link]
If rs(0) = [Link] Then
[Link] = rs(4)
[Link] = rs(5)
[Link] = ""
[Link] = ""
End If
[Link]
Next i
End Sub
FORM4
Dim db As Database
Dim rs As Recordset
Dim r, i As Integer
Private Sub Command1_Click()
[Link]
End Sub
Private Sub Form_Load()
Set db = OpenDatabase("D:\prj789\invent\[Link]")
Set rs = [Link]("SYSTEM")
[Link] = 0
[Link] = 0
r=0
[Link](0) = 2000
[Link](1) = 2000
[Link](2) = 2000
[Link](3) = 1700
[Link](4) = 1750
[Link](5) = 1650
'[Link] = "GREEN"
[Link](0, 0) = "COMPANY NAME"
[Link](0, 1) = "COMPANY ADDRESS"
[Link](0, 2) = "CONTACT NUMBER"
[Link](0, 3) = "DATE OF ORDER"
[Link](0, 4) = "ITEMS AVAILABLE"
[Link](0, 5) = "PRICE/ITEM"
[Link]
r=1
Do Until [Link]
[Link] = r
[Link] = 0
[Link] = rs(0)
[Link] = r
[Link] = 1
[Link] = rs(1)
[Link] = r
[Link] = 2
[Link] = rs(2)
[Link] = r
[Link] = 3
[Link] = rs(3)
[Link] = r
[Link] = 4
[Link] = rs(4)
[Link] = r
[Link] = 5
[Link] = rs(5)
[Link] = r
[Link] = 6
'[Link] = rs(6)
'[Link] = r
'[Link] = 7
'[Link] = rs(7)
r=r+1
[Link]
Loop
End Sub
FORMS
FORM1: MAIN MENU
FORM2: PURCHASE DETAILS
FORM3: SALES DETAILS
FORM4: STOCK DETAILS
RESULT:
Thus the project is to develop for stock maintenance system using the Rational Rose Software
from the UML diagram and to implement the employee details and successfully executed using
visual basic and rational rose.