definition, investigation and analysis - · pdf file1 definition, investigation and analysis...

178
1 Definition, Investigation and Analysis Introduction and Nature of the Problem Introduction Pradhan Store is a wholesale store located in Nakhipot, Lalitpur. It has been providing its service since the year 2007. The prime service of this store is to supply goods to nearby retailers and also wholesale products to local customers at wholesale rates. The owner of the store is Mr. Mim Lal Pradhan. He also holds the responsibility of running the shop. Nature of the Problem At present, data entry is done manually by the shop keeper where records are stored in files and registers. This traditional system was efficient and worked fine some years ago when the shop was not so popular and the flow of customer was very less. Today, Pradhan Store is one of the busiest and popular stores of Nakhipot. So, this system is starting to show its weaknesses. Though the system of data entry is very simple, it becomes very tedious at times for the shopkeeper especially when the flow of customer in the shop is very high. There are separate ledgers for each customer. Invoices are attached to the respective ledgers. Cash transactions are recorded in the sales journal. When the store is busy, the shopkeeper rarely gets the free time to update these records. Therefore this traditional system of storing records is proving to become inefficient and unscientific. There are huge piles of bills and invoices in the file to be organized. When some specific record is searched when needed, it becomes very difficult and time consuming. Thus, when customer asks for their balance especially in the evening time when there is high flow of customers, theyhave to wait for a long time which leads to dissatisfaction.

Upload: vucong

Post on 06-Mar-2018

218 views

Category:

Documents


4 download

TRANSCRIPT

1  

Definition, Investigation and Analysis

Introduction and Nature of the Problem

Introduction Pradhan Store is a wholesale store located in Nakhipot, Lalitpur. It has been providing its service since the year 2007. The prime service of this store is to supply goods to nearby retailers and also wholesale products to local customers at wholesale rates. The owner of the store is Mr. Mim Lal Pradhan. He also holds the responsibility of running the shop. 

Nature of the Problem At present, data entry is done manually by the shop keeper where records are stored in files and registers. This traditional system was efficient and worked fine some years ago when the shop was not so popular and the flow of customer was very less. Today, Pradhan Store is one of the busiest and popular stores of Nakhipot. So, this system is starting to show its weaknesses. 

Though the system of data entry is very simple, it becomes very tedious at times for the shopkeeper especially when the flow of customer in the shop is very high. There are separate ledgers for each customer. Invoices are attached to the respective ledgers. Cash transactions are recorded in the sales journal. When the store is busy, the shopkeeper rarely gets the free time to update these records. Therefore this traditional system of storing records is proving to become inefficient and unscientific. There are huge piles of bills and invoices in the file to be organized.  

When some specific record is searched when needed, it becomes very difficult and time consuming. Thus, when customer asks for their balance especially in the evening time when there is high flow of customers, theyhave to wait for a long time which leads to dissatisfaction. 

2  

Investigation and Analysis 

Investigation of the Current System To find out in depth about the situation and problems of the current system, I decided to use two different methods. At first, I decided to observe the store by myself. Then I decided take an interview with Mr. Pradhan, the owner of the store. 

Observation I divided my observation time into three different timings i.e. Early morning (8‐10 AM) at noon (12‐2 PM) and in the evening (4‐6 PM).  My top priority of the observation was to note down the recording system in the register and its level of accuracy. After about a week of observation, I was able to prepare my reports on investigation of the current system summarizing all the activities. 

Findings

Recording Mechanism

The recording system was based on single entry accounting system. Cash transactions were recorded in sales journal.  Copies of invoices were attached to respective individual ledgers. Credit transaction was recorded in the individual ledger accounts. This system was pretty efficient when there were few customers visiting the store. However, during peak hours bills were piled up and were entered during free times. 

Intensity of Customers

The flow of customers was very high in the evening time as customers returned from their respective works throughout the day. In the afternoon, there were few retailers visiting the store who wanted goods for their shops. In the morning and evening, customers who bought the FMCG (Fast Moving Consumer Goods) products were higher. 

Accuracy

During peak hours, when the flow of customer was high, the shopkeeper didn’t have time to record transactions. He simply remembered it so that he could record during the free time. This is very risky as there is high change of forgetting the transactions done.  

3  

Goods Returned

Whenever a particular customer approached the shopkeeper to return goods, copy of invoices was searched in the customer’s individual ledger. If the records matched, the goods were returned. 

Security

Anybody could get access to the records in the ledgers and modify them in the absence of the owner. Appropriate security measures in order to protect the records were not used. That could result in loss of the business being made. 

Analysis The observation method was a success. I came to know much about the present condition of the store and also about the flaws in the current system being used. The method used was very simple but was unscientific, inefficient and risky especially during the peak hours of the store. 

The diagram below shows the flowchart of the current system being used in the Pradhan Store when a customer buys some product. 

 

 

 

 

 

 

 

 

 

 

 

 

 

4  

If the transaction involved cash, Cash Sales was recorded as shown below: 

 

5  

If the transaction involved credit, credit transaction was recorded as shown below: 

 

 

 

 

 

 

 

 

6  

Interview with the owner Ayush: Can you please tell me about your current system of bookkeeping in your store? 

Mr. Pradhan:  Currently, we practice single entry bookkeeping system. Cash Transactions are recorded in Cash Sales Register with product ID and names, quantities sold with their rates and the date in which the transaction was done. As for Credit Transaction, we create a page for debtors in ledgers and simply add to their balance account. When debtors pay, we simply subtract the amount paid from their current balance.  

Ayush: Why this system is creating problems in your business now? 

Mr. Pradhan: About 2 years ago, this store was not so popular. There was very low intensity of customer visiting the store.Moreover, there were very few retailers in the area. But now the no. of retailers along with the people has increased significantly leading to increase in demands for consumer goods. Today, the store is one of the busiest in Nakhipot.So, our store remains busy whole day. We have to maintain stocks, deliver goods and communicate with the customer and suppliers. There is very less time for updating and maintaining the records. Moreover, customer asks for their balance in the evening when there is high flow of customers. It takes a lot of time to search for the records which results in increase in waiting time for the customers. This causes customer dissatisfaction. Therefore, the current system is making us inefficient and there is high chance of losing our customers in the future. 

Ayush: What kind of system do you think will be able to solve your problems? 

Mr. Pradhan: The problem is in accuracy, time and automation. So a system which is scientifically built and which is fast and accurate should be able to solve the problem. 

Ayush: How do you want your new system to be? 

Mr. Pradhan: I want the new system to be real quick. The system should be fully automated especially in calculations. It should be able to keep the records of stock, customer and transactions carried out whether it is cash or credit. Moreover, search feature should be included so that searching can be done in a very less amount of time. 

Ayush: Thank You, Mr. Pradhan, for giving me the opportunity to create a new system for your store. I will try my level best to create a system that can solve all the problems that you are facing right now. 

Mr. Pradhan: Thank You, Ayush, and please send me a report of an overview of the new system that you are going to create for my store so that I can give my opinions and suggestions. 

7  

Analysis of the Interview 

The main problem that I found in Pradhan Store was lack of sufficient time to update the records. The recording system was unscientific and inefficient. Searching the data was very difficult due to improper way of managing the records. There was lack of accuracy in the records. The current system was very time consuming leading to longer waiting time for the customers leading to customer dissatisfaction. The future of the store was at risk with the current system and the owner had no enough time to plan about the future of the business. Therefore, the new system should concentrate more on the time factor. It should be quick enough to meet the requirements of the user. 

Inefficiencies Identification with the Current System

Difficulty in recording

Since the current system is based on manual system of recording, it was very tedious job to record each transaction manually. Moreover, more time was required in maintaining and updating the records. 

Difficulty in searching

Since the records were not organized properly. Records were not organized alphabetically or in any way. It was very difficult to search specific records when needed. A lot of time was wasted in searching the records which resulted in increase in customer waiting time leading to customer dissatisfaction. 

Risk of Inaccuracy

There was high risk of inaccuracy with the current system. The records were not organized scientifically. To check any errors in the records was very difficult.  

Data Security

No measures were taken to protect the data of the records. Anybody could access the records in the absence of the owner and easily modify it. 

Difficulty in report making

It was very difficult to create reports. The records were not completed. Ledger balances were not added up. There was no record of cash sales in most of the cases. 

8  

Alternative Solutions

Employing additional staff

One solution for the store is employing additional staff to manage financial sector of the store. The staff will be responsible for all the accounting tasks. However, additional expenses will be required. 

Spreadsheet package

Spreadsheet package can be used easily to organize data. But this may not solve the problem because it won’t be automated. 

Database Package

Database package can be the most effective system for organizing data. But as Mr. Pradhan has told he has very little knowledge about computer, this sophisticated tool will be very difficult for him to operate at his store. 

Tailored Software

Tailored software is widely used in market for business purposes. They are easy to use, user friendly and are flexible. User won’t require any internal process of the new system. Thought initial expense will be higher, it will serve for longer period. This will be perhaps the best solution for Pradhan Store as the software will be built based on the requirements of the Pradhan Store. 

Proposed Solution

After a short discussion with Mr. Pradhan about the solutions for the store, he took the decision to computerize his system. Tailored Software was the best way to computerize the system. So, we came into conclusion to create a tailored software meeting the requirements of the store. 

9  

Requirement Specifications

• New system should be quick, efficient and scientific. It should be easy to use. 

• The interface should be user friendly with appropriate use of icons and pictures. 

• The system should be bug and error free. 

• Search feature for different records should be included in the system. 

• Calculations should be done automatically. 

• The system should be password protected with the accessibility of changing the password at any time by the authorized user. 

User Requirements 

• User should be educated up to at least secondary level of education. • User should have basic knowledge about computer. • User should know about the basic steps of running the computer such as navigating the 

different objects and selecting them. She/he should know how to type. • User should be able to read and write English properly. 

Hardware Requirements

• Intel Pentium 4 or higher processor. 

• 256 MB of RAM (512 MB Recommended) since sufficient memory is required while working with database. 

• Hard Disk with at least 100 MB of Free Space to store sufficient records. 

• Removable Drives such as USB or CD/DVD to make backups of the current system and valuable data and information in case of a system failure. 

• Keyboard to enter records. 

• Mouse to navigate and click on the choices. 

• UPS to ensure uninterrupted power supply in case of any power failure leading to loss of data and information. 

Software Requirements

• Microsoft Access(Recommended) or OpenOffice(Alternative) 

• Windows XP, Windows Vista or Windows 7 (Recommended). The system does not support any other OS Platforms such as Linux or MAC OS. 

 

10  

Design

Nature of the solution After discussion with Mr. Pradhan, I started to design the new system. The software is designed to solve the problems of basic single entry accounting system. 

The system is designed to be very easy to use. The system starts with the login form. User has to enter the username and password in order to get access to the system.If the username/password is incorrect, the user won’t be able to use the system. Hence, it is password protected. Once entered in the main form of the system, user will have various choices to make. User can add products and customers, search specific records in the system, record cash and credit transactions. Once the job is completed user can exit from the system. 

Aims and Objectives agreed with the Client

• To make system user friendly. To achieve this it should be easy to use with simple interface design. 

• To make the system use minimum resources so that it can run on most common Windows OS and computers with common hardware specifications. 

• To make the system fully automated wherever possible. 

• To make searching feature as flexible as possible. 

• To be error and bug free. 

• To be able to make wide range of reports based on system requirements. 

• To be flexible so that it can be extended or modified whenever needed. 

 

 

 

11  

Data Structures As per the requirements of the store, the system would require four relational databases would be necessary to be designed.  

The tables with their Field Name, Data Type, Description and Example are given below: 

Tables:  

Orders

Field Name  Data Type  Description  Example 

OrderID  Number  Unique  ID  given  to  each order 

CustomerID  Number  Unique  customer  ID  of the  customer  associated with the order 

 

OrderDetails

Field Name  Data Type  Description  Example 

OrderID  AutoNumber Unique ID given to each order 3 

ProductID  Number  Unique ID given to each product 

Quantity  Number  Quantity of the product purchased 

70 

 

Rate  Currency  Rate of the product purchased 

Rs.34 

TransactionDate  Date/Time  Date of the purchase  3/7/2013 

TotalAmount  Currency  Total amount of the transaction 

200 

12  

Product

Field Name  Data Type  Description  Example 

ProductID  AutoNumber  Unique ID given to each product 

ProductName  Text  Name of the product  Wheel 

Category  Text  Category of the product  Washing Powder 

Rate  Currency  Price of the product  Rs. 40 

Quantity  Number  Quantity of the product available 

45 

Description  Text  Information about the product 

Cheap  washing powder. 

Customer

Field Name  Data Type  Description  Example 

CustomerID  AutoNumber  This field stores unique Customer_ID given to each customer. 

89 

CustomerName  Text  This field store name of the customer. 

Prakash Gadal 

Address  Text  This field stores address of the customer. 

Kathmandu 

ContactNumber  Text  This field stores customer’s contact number. 

9808765341 

Balance  Currency  This field stores net balance of the customer. 

89 

13  

Flat File One  flat  file will be necessary  to store password. Since our software can have only one user, there will be only one password. So storing password in a relational database is unnecessary. 

Field Name  Type  Size  Description 

Password  Text    Stores password of a user 

 

The entity relationships (E‐R Diagram) among the tables used in the system is given below: 

 

14  

Input Screens The input screens for Pradhan Store Sales Management System is designed to be very simple and easy to use. 

Log In Interface:

The login form allows user to enter the correct username and password to get access to the main form of the system. It prevents unauthorized access to the system. 

Change Password Interface:

This form allows changing password of the system in a very easy manner to ensure security of the system by changing password time and again. 

15  

Add New Product Interface: 

This form allows user to enter all information about the new product brought in the store.  

Add New Customer Interface:

This form allows user to enter all information about the new customer in the store. 

16  

Sales Interface:

 

The Sales Interface allows user to enter all the information of the transaction being carried out whether it is a cash transaction or credit transaction. 

17  

Customer Credit Settlement Interface

 

Output Screens: Search Interface:

This form allows searching almost anything stored in the database. It is very easy to search specific records in the database. 

18  

Reports: Based on Customer:

Based on Date:

19  

Based on Invoice ID

 

 

 

 

 

 

20  

Process Model

The above flowchart represents the outlook of the overall system. As we can see, program will start with login window. Failure of user to login will directly lead to exit. Successful login will lead to the main window from where user can select different forms. User can also switch between add new customer and add new product in the sales window. 

 

 

 

 

 

21  

Flowchart for Input forms:

Add New Customer:

Add new customer form will help user to add new customer with all valid information provided. 

 

 

 

 

 

22  

Add New Product:

23  

Change Password

 

 

24  

Validate Sub Process  

 

 

 

 

 

 

 

 

 

 

 

25  

Customer Credit Settlement

 

 

 

 

 

 

 

 

 

 

 

26  

Update records in database (sub process)  

 

 

27  

Sales  

 

28  

Search:

29  

Reports

Report based on invoice

 

 

30  

 

Report Based on Date

31  

 

 

Report Based on Customer

32  

 

 

33  

 

Output Flowchart Report and search are intended to do following things: 

 

Intended Benefits of the New System

• The system will be fully automated. Computer will solve problems wherever possible automatically. 

• Design of the system will be user friendly. It will be easy to enter data. 

• Identification of invalid data through error checking. For Example: If customer’s credit amount is less than the amount to be settled, the system will alert user. 

• Searching of the specific records will be made very easy and quick. 

 

Limits of the scope of the Solution

• Whole system is entirely based on single entry system. Therefore it will have all limitation of single entry system. 

• The system will not run on any other OS Platforms other than Windows as it is developed for only Windows Platform using Visual Basic. 

• It won’t be possible to have multiple transactions in single order. Therefore user has to add multiple transactions separately. 

• User cannot print reports. It can be viewed on the screen only.  

34  

 

File Size Estimation  

Table Name 

Size of Fields (bytes) 

Maximum size of 

record in tables 

Estimated Numbers of records 

after 1 year 

Maximum Size of Database 

Maximum size of 

record with overhead (10%) 

Customer Table 

8,25,25,25,8  91  900 81900bytes= 

79.9 KB 88KB 

Order Details 

8,4,4,8,8,8  40  60000 2400000bytes= 2343.75 KB 

2578KB 

Orders  8,8  16  60000 960000bytes=937.5 

KB 1031KB 

Product  8,25,25,8,8,40  114  1500  171000bytes=167KB  184KB  

Maximum Estimated Size of the files after 1 year=(88+2578+1031+184) KB         =3881 KB             =3.8 MB 

 

 

35  

 

Software Development, Testing and Implementation For development of the software, I decided to use Microsoft Visual Basic 6.0. Visual Basic is an event  driven  programming  language.  The  best  feature  of  this  programming  language  is interactive  development  environment.  For  designing  data  structure, MS Access  2007 will  be used. This is the best DBMS software. 

Since VB6  is an event driven GUI based programming  language, different controls and events will be needed.  

MS Access 2007 has been used to design tables and their relationships. 

 

Event Procedures and implementation of designed input and output forms:  

Login

Event  Control  Control Type  Processing 

Click  cmd_LogIn  Command Button  Shows  main  form  based  on validity of the password. 

 

Design View:

36  

Run View with sample data:

MainScreen

Event  Control  Control Type  Processing 

Click  Sales  Command Button  Loads sales form 

Click  CustomerCreditSettlement 

Command Button  Loads customercreditsettlement form 

Click  Search  Command Button  Loads Search form 

Click  Report  Command Button  Loads Report form 

Design View:

37  

Menu Design

Since this is a main form, few menu items would be required to make navigation easier. Here is a list of menu items that were developed: 

Menu Name  Main Menu  Purpose 

Add Customer  Add  AddCustomer form is displayed  

Add Product  Add  AddProduct form is displayed  

Change Password  Help  Shows ChangePassword form  

User Manual  Help  Opens User Manual 

About  Help  Shows About form 

Menu Design View:

38  

Menu during runtime:

AddProduct

Event  Control  Control Type  Purpose 

Load  AddProduct  Form  Creates database connection, recordset and updates new ProductID. 

Click  cmd_Add  Command Button  Adds new customer to the database by  calling  Add_Product  sub procedure. 

Other custom sub and function procedures are listed below: 

Name  Purpose 

ID  This  sub  procedure  automatically  updates  ProductID  for  new customer to be added. 

39  

scr_clr  This sub procedure clears all the textboxes.  

Add_Product  This sub procedure adds product to the database. 

 

Design View:

Run View with sample data:

40  

AddCustomer

Event  Control  Control Type  Purpose 

Load  AddCustomer   Form  Creates database connection, recordset and updates customer list 

Click  cmd_Add  Command Button  Adds new customer to the database 

Other custom sub and function procedures are listed below:

41  

Name  Purpose 

ID  This  sub  procedure  automatically  updates  CustomerID  for  new customer to be added. 

scr_clr  This sub procedure clears all the textboxes.  

Add_Customer  This sub procedure adds product to the database. 

 

Design View:

Run View with sample data:

42  

CustomerCreditSettlement

Events  Name  Control  Purpose 

Load  CustomerCreditSettlement  Form  Creates  database  connection, recordset  and  updates customer list. 

Click  cmd_Settle  CommandButton  Updates the Customer Balance

Other custom sub and function procedures are listed below:

Name  Purpose 

scr_clr  This sub procedure clears all the textboxes.  

Design View:

43  

Run View with sample data:

 

 

Sales

44  

Event  Name  Control  Purpose 

Load  SalesForm  Form  Creates  database  connection, recordset,  updates  product  and customer lists. 

Click  cmd_Ok  Command Button  Adds order to the database 

Click  combo_CustomerName  Combo box  Updates  CustomerID  based  on customer selected. 

Click  combo_ProductName  Combo box  Updates  ProductID  based  on customer selected. 

Click  cmd_NewProduct  Command Button  Shows AddProduct Form 

Click  cmd_NewCustomer  Command Button  Shows AddCustomer Form 

 

Other custom sub and function procedures are as follows: 

Name  Purpose 

update_customer_balance  This  sub  procedure  automatically  updates  the  balance  of  the customer involved in credit transaction. 

add_order_detail  This sub procedure adds data to the database. 

add_order  This sub procedure adds data to the database. 

stock_exists  This  Boolean  function  procedure  returns  true  if  stock  exists  and false if stock doesn’t exists. 

update_product  This sub procedure updates quantity of product after sales. 

scr_clr  This clears all textboxes in the form. 

update_order_id  This updates OrderID automatically. 

txt_quantity_change  This updates total whenever quantity changes. 

 

Design View:

45  

 

Run View with Sample Data:  

 

Change Password 

46  

Event  Name  Control  Purpose 

Click  cmd_Change  Command Button  Changes password in the password file. 

Design View:

Run View with sample data:

Search:

47  

Event  Name  Control  Purpose 

Load  SearchForm  Form  Creates  database  connection, recordset and setups the recordset. 

Click  cmd_Search  Command Button  Searches  the  keyword  in  the database  based  on  the  category selected. 

 

Design View:

 

 

 

Run View with Sample Data:

48  

Report

Event  Control  Control Type  Processing 

Click  cmd_InvoiceIDBased  Command Button  Loads InvoiceIDReport Form 

Click  cmd_DateBased  Command Button  Loads DatewiseReport Form 

Click  cmd_CustomerBased  Command Button  Loads CustomerWiseReport Form 

Design

View:

InvoiceIDReport

49  

Event  Name  Control  Purpose 

Load  InvoiceIDReport  Form  Creates database connection, recordset and setups the recordset. 

Click  cmd_Go  Command Button  Searches the specific data according to the InvoiceID in the database and displays it. 

Click  cmd_New  Command Button  Clears the screen. 

Design View:

Sample Invoice ID Report:

50  

DateWiseReport

Event  Name  Control  Purpose 

Load  DatewiseReport  Form  Creates database connection, recordset and setups the recordset. 

Click  cmd_Go  Command Button  Searches the specific data according to the Date in the database and displays it. 

Click  Cmd_New  Command Button  Clears the screen. 

Design View:

51  

Sample Date Wise Report:

CustomerWiseReport

52  

Event  Name  Control  Purpose 

Load  CustomerWiseReport  Form  Creates database connection, recordset, setups the recordset and update the Customer List. 

Click  cmd_Go  Command Button  Searches the specific data according to the CustomerID in the database and displays it. 

Click  combo_CustomerName  Combo box  Updates  CustomerID  based  on customer selected. 

Click  cmd_New  Command Button  Clears the screen 

Click  Datagrid1  Datagrid  Shows  details  of  the  record  in textboxes. 

Design View:

53  

Sample Customer Wise Report:  

 

54  

Data Structure Design  

Customer Table

Design View:

 

Datasheet View:

 

 

 

 

 

55  

Orders Table

Design View:

Datasheet View:

56  

OrderDetails Table

Design View:

Datasheet View:

 

 

 

 

 

 

 

57  

Product Table

Design View:

Datasheet View:

 

 

58  

Programming Codes:

Add New Product: Dim cnn As ADODB.Connection Dim rsProduct As ADODB.Recordset  Private Sub cmd_Add_Click() If txt_ProductName.Text = "" Or IsNumeric(txt_Quantity.Text) = False Or IsNumeric(txt_Rate.Text) = False Or txt_Category.Text = "" Or txt_Description.Text = "" Then 'checks if fields are empty and valid MsgBox "Please fill all forms with valid information.",vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure Else     Call Add_Product End If End Sub  Private Sub Form_Load() ' creates database connections and creates recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rsProduct = New ADODB.Recordset rsProduct_sql = "select* from Product" rsProduct.LockType = adLockOptimistic rsProduct.CursorLocation = adUseClient rsProduct.CursorType = adOpenStatic rsProduct.ActiveConnection = cnn rsProduct.Source = rsProduct_sql rsProduct.Open Call ID rsProduct.MoveFirst End Sub  Private Sub ID() ' updates Product ID rsProduct.MoveLast txt_ProductID.Text = rsProduct!ProductID + 1 End Sub     

59  

Private Sub Add_Product() ' adds product rsProduct.MoveFirst While NotrsProduct.EOF If rsProduct.Fields("ProductName") = txt_ProductName.Text Then     Dim ans As String ans = MsgBox("Product with similar name already exists." &vbCrLf& "Do you want to update the stock of existing product?" &vbCrLf& "New selling price will be set.",vbYesNo)     If ans = vbYes Then rsProduct.Fields("Quantity") = rsProduct.Fields("Quantity") + Val(txt_Quantity.Text) rsProduct.Fields("Rate") = txt_Rate.Text rsProduct.Update MsgBox "Stock successfully updated.",vbInformation 'informs user about succesful addition of stock scr_clr         Exit Sub     End If End If rsProduct.MoveNext Wend rsProduct.MoveLast rsProduct.AddNew rsProduct.Fields(1) = txt_ProductName.Text rsProduct.Fields(2) = txt_Category.Text rsProduct.Fields(3) = txt_Quantity.Text rsProduct.Fields(4) = txt_Rate.Text rsProduct.Fields(5) = txt_Description.Text rsProduct.Update MsgBox "New Product Record Added Successfully", vbInformation scr_clr End Sub  Private Sub scr_clr() 'clears all the textboxes txt_ProductName.Text = "" txt_Category.Text = "" txt_Quantity.Text = "" txt_Rate.Text = "" txt_Description.Text = "" Call ID End Sub   

 

60  

Add New Customer: Dim cnn As ADODB.Connection Dim rsCustomer As ADODB.Recordset  Private Sub cmd_Add_Click() If txt_CustomerName.Text = "" Or txt_Address.Text = "" Or IsNumeric(txt_Contact.Text) = False Or IsNumeric(txt_Balance.Text) = False Then 'checks if fields are empty and valid MsgBox "Please fill all forms with valid information.",vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure Else     Call Add_Customer End If End Sub  Private Sub Form_Load() 'creates Database connections and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rsCustomer = New ADODB.Recordset rsCustomer_sql = "select * from Customer" rsCustomer.LockType = adLockOptimistic rsCustomer.CursorLocation = adUseClient rsCustomer.CursorType = adOpenStatic rsCustomer.ActiveConnection = cnn rsCustomer.Source = rsCustomer_sql rsCustomer.Open Call ID rsCustomer.MoveFirst End Sub  Private Sub ID() ' updates Customer ID rsCustomer.MoveLast txt_CustomerID.Text = rsCustomer!CustomerID + 1 End Sub Private Sub Add_Customer() ' adds customer rsCustomer.AddNew rsCustomer.Fields(1) = txt_CustomerName.Text rsCustomer.Fields(2) = txt_Address.Text rsCustomer.Fields(3) = txt_Contact.Text rsCustomer.Fields(4) = Val(txt_Balance.Text) rsCustomer.Update MsgBox "New Customer Record Added Successfully", vbInformation 

61  

scr_clr End Sub  Private Sub scr_clr() 'clears all the textboxes txt_CustomerName.Text = "" txt_Address.Text = "" txt_Contact.Text = "" txt_Balance.Text = "" Call ID End Sub  

Change Password Private Sub cmd_Change_Click() Open "security details.txt" For Input As #1 Open "security.txt" For Output As #2 While Not EOF(1)     Input #1, Pass     If txt_OldPassword.Text = "" Or txt_NewPassword.Text = "" Or txt_ReNewPassword.Text = "" Then MsgBox "Please Enter all Information Correctly", vbCritical ' alerts user about invalid information entered         Close #1, #2         Exit Sub     End If     If txt_OldPassword.Text<> Pass Then MsgBox "Invalid Old Password", vbCritical 'alerts user about invalid password entered         Write #2, Pass     Else         If txt_NewPassword.Text = txt_ReNewPassword.Text Then MsgBox "Password Changed Successfully", vbInformation 'informs user about successful changing of password             Pass = txt_ReNewPassword.Text             Write #2, Pass         Else MsgBox "New Password and Retyped Password didn't match", vbCritical 'alerts user about mismatch of entered new password             Write #2, Pass         End If     End If Wend Close #1, #2 Kill "security details.txt" 'delete security details.txt Name "security.txt" As "security details.txt" ' rename security.txt to security details.txt 

62  

Unload Me End Sub  

Customer Credit Settlement: Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset  Private Sub cmd_Settle_Click() If combo_CustomerName.Text = "" Or txt_Amount.Text = "" Or IsNumeric(txt_Amount.Text) = False Then 'checks if fields are empty and valid MsgBox "Please fill all forms with valid information.",vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure End If rs.MoveFirst While Notrs.EOF     If txt_CustomerID.Text = rs.Fields("CustomerID") Then             If rs.Fields("Balance") < Val(txt_Amount.Text) Then 'checks if acutal balance is less than amount paid by the customer MsgBox "Amount exceeds balance of "&rs.Fields("CustomerName") & "." &vbCrLf& "Please enter valid amount.",vbCritical txt_Amount.Text = ""                 Exit Sub             Else rs.Fields("Balance") = rs.Fields("Balance") ‐ Val(txt_Amount.Text) 'reduces balance of the customer by the amount paid rs.Update             End If txt_NewBalance.Text = rs.Fields("Balance")         End If rs.MoveNext Wend MsgBox "Successfully settled", vbInformation Call scr_clr End Sub  Private Sub Form_Load() Call connect Call update_category_customers End Sub   

63  

Private Sub connect() 'creates database connections and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs = New ADODB.Recordset rs.Open "select * from Customer", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  Private Sub update_category_customers() ' lists the customers in combobox rs.MoveFirst While Notrs.EOF combo_CustomerName.AddItem (rs.Fields("CustomerName")) rs.MoveNext Wend End Sub    Private Sub combo_CustomerName_Click() 'updates customer ID and balance after a customer is selected rs.MoveFirst While Notrs.EOF If rs.Fields("CustomerName") = combo_CustomerName.Text Then txt_CustomerID.Text = rs.Fields("CustomerID") txt_CurrentBalance.Text = rs.Fields("Balance") End If rs.MoveNext Wend End Sub  Private Sub scr_clr() 'clears all the textboxes combo_CustomerName.Text = "" txt_CustomerID.Text = "" txt_CurrentBalance = "" txt_Amount.Text = "" txt_NewBalance.Text = "" End Sub         

64  

Sales: Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim rs2 As ADODB.Recordset Dim rs3 As ADODB.Recordset Dim rs4 As ADODB.Recordset  Private Sub cmd_NewCustomer_Click() AddCustomer.Show End Sub  Private Sub cmd_NewProduct_Click() AddProduct.Show End Sub  Private Sub combo_ProductName_Click() rs3.MoveFirst While Not rs3.EOF If rs3.Fields("ProductName") = combo_ProductName.Text Then txt_ProductID.Text = rs3.Fields("ProductID") txt_Rate.Text = rs3.Fields("Rate") End If rs3.MoveNext Wend End Sub  Private Sub cmd_Ok_Click()   If combo_CustomerName.Text = "Customer Name" Or IsNumeric(txt_Quantity.Text) = False Or combo_ProductName.Text = "Product Name" Then 'checks if fields are empty and valid MsgBox "Please fill all forms with valid information.", vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure Else     Call add_order_detail End If End Sub  Private Sub Form_Load() Call connect Call update_category_customers Call update_order_id Call txt_quantity_Change txt_Today.Text = Date 

65  

End Sub  Private Sub connect() ' creates database connection and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs = New ADODB.Recordset rs.Open "select * from OrderDetails", cnn, adUseClient, adLockOptimistic, adCmdText Set rs2 = New ADODB.Recordset rs2.Open "select * from Customer", cnn, adUseClient, adLockOptimistic, adCmdText Set rs3 = New ADODB.Recordset rs3.Open "select * from Product", cnn, adUseClient, adLockOptimistic, adCmdText Set rs4 = New ADODB.Recordset rs4.Open "select * from Orders", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  Private Sub update_category_customers() 'lists the customers and products in the combobox rs2.MoveFirst rs3.MoveFirst While Not rs3.EOF combo_ProductName.AddItem (rs3.Fields("ProductName")) rs3.MoveNext Wend While Not rs2.EOF combo_CustomerName.AddItem (rs2.Fields("CustomerName")) rs2.MoveNext Wend End Sub  Private Sub combo_CustomerName_Click() rs2.MoveFirst While Not rs2.EOF If rs2.Fields("CustomerName") = combo_CustomerName.Text Then txt_CustomerID.Text = rs2.Fields("CustomerID") End If rs2.MoveNext Wend End Sub  Private Sub update_order_id() ' Updates Order ID rs.MoveLast txt_OrderID.Text = rs.Fields("OrderID") + 1 End Sub  

66  

Private Sub add_order_detail() 'adds orderdetails If Stock_Exists = True Then     If Option_Cash = False And Option_Credit = False Then MsgBox ("Please select the transaction method"), vbExclamation 'alerts user to select the transaction method     Else rs.AddNew rs.Fields("ProductID") = txt_ProductID.Text rs.Fields("Quantity") = txt_Quantity.Text rs.Fields("Rate") = txt_Rate.Text rs.Fields("TotalAmount") = txt_Total.Text rs.Fields("TransactionDate") = txt_Today.Text rs.Update         Call Add_Order         Call update_product         Call Add_Credit     End If Else MsgBox ("Quantity has exceeded the Current Stock. Please Check The Current Stock"), vbExclamation 'alerts user about insufficient quantity     Exit Sub End If End Sub  Private Sub txt_quantity_Change() 'calculates total txt_Total.Text = Val(txt_Quantity.Text) * Val(txt_Rate.Text) End Sub  Private Sub update_product() ' updates product stock rs3.MoveFirst While Not rs3.EOF If txt_ProductID.Text = rs3.Fields("ProductID") Then rs3.Fields("Quantity") = rs3.Fields("Quantity") ‐ Val(txt_Quantity.Text) rs3.Update Exit Sub End If rs3.MoveNext Wend End Sub  Private Sub Add_Order() 'adds order rs4.AddNew rs4.Fields("OrderID") = txt_OrderID.Text rs4.Fields("CustomerID") = txt_CustomerID.Text 

67  

rs4.Update MsgBox ("Order Added Successfully"), vbInformation ' informs user about successful addition of order End Sub  Private Sub Add_Credit() 'update customer balance if it is a credit transaction If Option_Credit.Value = True Then     Call Update_credit scr_clr End If End Sub  Private Sub Update_credit() rs2.MoveFirst While Not rs2.EOF If txt_CustomerID.Text = rs2.Fields("CustomerID") Then rs2.Fields("Balance") = rs2.Fields("Balance") + Val(txt_Total.Text) rs2.Update Exit Sub End If rs2.MoveNext Wend End Sub  Private Function Stock_Exists() As Boolean ' checks whether stock of the product exists or not rs3.MoveFirst While Not rs3.EOF If rs3.Fields("ProductID") = txt_ProductID.Text Then     If Val(txt_Quantity.Text) > Val(rs3.Fields("Quantity")) Then Stock_Exists = False     Else Stock_Exists = True     End If End If rs3.MoveNext Wend End Function  Private Sub scr_clr() 'clears all the textboxes txt_ProductID.Text = "" combo_ProductName.Text = "Product Name" txt_Quantity.Text = "" txt_Rate.Text = "" Option_Cash = False And Option_Credit = False 

68  

Call update_order_id End Sub  

Search Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim rs2 As ADODB.Recordset  Private Sub cmd_Search_Click() If combo_Category.Text = "Select Search Category" Then MsgBox "Please select search category", vbCritical 'alerts user about category Exit Sub End If If txt_SearchItem.Text = "" Then MsgBox "Please enter in the text box to search", vbCritical 'alerts user about no keywords to search     Exit Sub End If Select Case combo_Category.Text     Case "Product's Name"     rs2.Filter = "ProductName like '*" &Me.txt_SearchItem.Text& "*'"     Set DataGrid1.DataSource = rs2 ' sets datagrid source to recordset End Select Select Case combo_Category.Text     Case "Customer's Name" rs.Filter = "CustomerName like '*" &Me.txt_SearchItem.Text& "*'"     Set DataGrid1.DataSource = rs ' sets datagrid source to recordset End Select Select Case combo_Category.Text     Case "Customer's Address" rs.Filter = "Address like '*" &Me.txt_SearchItem.Text& "*'"     Set DataGrid1.DataSource = rs 'sets datagrid source to recordset End Select Select Case combo_Category.Text     Case "Customer's Contact Number" rs.Filter = "ContactNumber like '*" &Me.txt_SearchItem.Text& "*'"     Set DataGrid1.DataSource = rs 'sets datagrid source to recordset End Select Select Case combo_Category.Text     Case "Product's Category"     rs2.Filter = "Category like '*" &Me.txt_SearchItem.Text& "*'"     Set DataGrid1.DataSource = rs2 'sets datagrid source to recordset End Select 

69  

End Sub  Private Sub Form_Load() ' updates the list in search category combo_Category.AddItem "Product's Name" combo_Category.AddItem "Customer's Name" combo_Category.AddItem "Customer's Address" combo_Category.AddItem "Customer's Contact Number" combo_Category.AddItem "Product's Category" Call connect End Sub  Private Sub connect() ' connect the databases and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs = New ADODB.Recordset rs.Open "select * from customer", cnn, adUseClient, adLockOptimistic, adCmdText Set rs2 = New ADODB.Recordset rs2.Open "select * from product", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  

CustomerWise Report Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim rs1 As ADODB.Recordset Dim rs2 As ADODB.Recordset Dim rs3 As ADODB.Recordset Dim rs4 As ADODB.Recordset  Private Sub cmd_Go_Click() If combo_CustomerName.Text = "Customer Name" Then 'checks if fields are empty and valid MsgBox "Please Select The Customer", vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure End If Set rs1 = New ADODB.Recordset SQL = "select * From Orders where CustomerID=" & Val(txt_CustomerID) rs1.LockType = adLockOptimistic rs1.CursorLocation = adUseClient rs1.CursorType = adOpenStatic rs1.ActiveConnection = cnn rs1.Source = SQL rs1.Open Set DataGrid1.DataSource = rs1 'sets datagrid source to recordset 

70  

End Sub  Private Sub cmd_New_Click() Call scr_clr End Sub  Private Sub Form_Load() Call connect Call update_customer_category End Sub  Private Sub connect() 'creates database connections and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs = New ADODB.Recordset rs.Open "select * from Customer", cnn, adUseClient, adLockOptimistic, adCmdText Set rs2 = New ADODB.Recordset rs2.Open "select * from OrderDetails", cnn, adUseClient, adLockOptimistic, adCmdText Set rs3 = New ADODB.Recordset rs3.Open "select * from Orders", cnn, adUseClient, adLockOptimistic, adCmdText Set rs4 = New ADODB.Recordset rs4.Open "select * from Product", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  Private Sub update_customer_category() 'lists customer in combobox rs.MoveFirst While Not rs.EOF combo_CustomerName.AddItem (rs.Fields("CustomerName")) rs.MoveNext Wend End Sub Private Sub combo_CustomerName_Click() rs.MoveFirst While Not rs.EOF If rs.Fields("CustomerName") = combo_CustomerName.Text Then txt_CustomerID.Text = rs.Fields("CustomerID") End If rs.MoveNext Wend End Sub   Private Sub DataGrid1_Click() 'called whenever datagrid element is clicked 

71  

If DataGrid1.Col = 0 Then 'checks if order ID was clicked show_order_detail 'shows order detail in textboxes End If End Sub  Private Sub show_order_detail() 'shows details about selected order in textbox rs2.MoveFirst While Not rs2.EOF  If DataGrid1.Text = rs2.Fields("OrderID") Then txt_InvoiceID.Text = DataGrid1.Text txt_ProductID.Text = rs2.Fields("ProductID") txt_Rate.Text = rs2.Fields("Rate") txt_Quantity.Text = rs2.Fields("Quantity") txt_Total.Text = rs2.Fields("TotalAmount") txt_TransDate.Text = rs2.Fields("TransactionDate")  Call Product_Name  End If rs2.MoveNext Wend End Sub  Private Sub Product_Name() 'shows product name in textbox rs4.MoveFirst While Not rs4.EOF     If rs4.Fields("ProductID") = txt_ProductID.Text Then txt_ProductName.Text = rs4.Fields("ProductName")     End If rs4.MoveNext Wend End Sub  Private Sub scr_clr() 'clears all textboxes txt_InvoiceID.Text = "" txt_ProductID.Text = "" txt_ProductName.Text = "" txt_TransDate.Text = "" combo_CustomerName.Text = "Customer Name" txt_CustomerID.Text = "" txt_Total.Text = "" txt_Rate.Text = "" txt_Quantity.Text = "" Set DataGrid1.DataSource = Nothing 'resets the Datagrid End Sub 

72  

Datewise Report Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim rs1 As ADODB.Recordset Dim TransDate As Date  Private Sub cmd_Go_Click() If txt_dates.Text = "" Then 'checks if fields are empty and valid MsgBox "Please Enter Date", vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure End If TransDate = Format(txt_dates.Text, "mm/dd/yyyy") Set rs = New ADODB.Recordset SQL = "select * From OrderDetails where TransactionDate=#" &TransDate& "#" rs.LockType = adLockOptimistic rs.CursorLocation = adUseClient rs.CursorType = adOpenStatic rs.ActiveConnection = cnn rs.Source = SQL rs.Open Set DataGrid1.DataSource = rs 'sets datagrid source to recordset Call totalamount End Sub  Private Sub cmd_New_Click() scr_clr End Sub  Private Sub Form_Load() 'creates database connections and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs1 = New ADODB.Recordset rs1.Open "select * from OrderDetails", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  Private Sub totalamount() 'calculates total rs1.MoveFirst While Not rs1.EOF If rs1.Fields("TransactionDate") = txt_dates.Text Then     totals = totals + rs1.Fields("TotalAmount") End If rs1.MoveNext 

73  

Wend txt_Total.Text = totals End Sub  Private Sub scr_clr() 'clears all textboxes and datagrid txt_dates.Text = "" Set DataGrid1.DataSource = Nothing txt_Total.Text = "" End Sub  

Invoice ID Report Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim rs2 As ADODB.Recordset Dim rs3 As ADODB.Recordset Dim rs4 As ADODB.Recordset  Private Sub cmd_Go_Click() If IsNumeric(txt_InvoiceID.Text) = False Then 'checks if fields are empty and valid MsgBox "InvoiceID should be numberic", vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure End If rs2.MoveFirst While Not rs2.EOF If rs2.Fields("OrderID") = txt_InvoiceID.Text Then Call Add_CustomerID cap_ProductID.Caption = rs2.Fields("ProductID") Call Product_Name cap_Quantity.Caption = rs2.Fields("Quantity") cap_Rate.Caption = rs2.Fields("Rate") cap_Total.Caption = rs2.Fields("TotalAmount") End If rs2.MoveNext Wend End Sub  Private Sub cmd_New_Click() scr_clr End Sub    

74  

Private Sub Form_Load() Call connect End Sub  Private Sub connect() 'creates database connections and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs = New ADODB.Recordset rs.Open "select * from Customer", cnn, adUseClient, adLockOptimistic, adCmdText Set rs2 = New ADODB.Recordset rs2.Open "select * from OrderDetails", cnn, adUseClient, adLockOptimistic, adCmdText Set rs3 = New ADODB.Recordset rs3.Open "select * from Orders", cnn, adUseClient, adLockOptimistic, adCmdText Set rs4 = New ADODB.Recordset rs4.Open "select * from Product", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  Private Sub Product_Name() 'shows product name rs4.MoveFirst While Not rs4.EOF     If rs4.Fields("ProductID") = cap_ProductID.Caption Then cap_ProductName.Caption = rs4.Fields("ProductName")     End If rs4.MoveNext Wend End Sub  Private Sub Add_CustomerID() 'shows customer id rs3.MoveFirst While Not rs3.EOF     If rs3.Fields("OrderID") = txt_InvoiceID.Text Then cap_CustomerID.Caption = rs3.Fields("CustomerID")     End If rs3.MoveNext Wend Call Add_CustomerName End Sub       

75  

Private Sub Add_CustomerName() 'shows customer name rs.MoveFirst While Not rs.EOF     If rs.Fields("CustomerID") = cap_CustomerID.Caption Then cap_CustomerName.Caption = rs.Fields("CustomerName")     End If rs.MoveNext Wend End Sub  Private Sub scr_clr() 'clears the screen txt_InvoiceID.Text = "" cap_CustomerID = "" cap_CustomerName = "" cap_ProductID = "" cap_ProductName = "" cap_Quantity = "" cap_Rate = "" cap_Total = "" End Sub           

            

76  

Testing Before the full implementation of the system, a series of tests will be done to check whether the program is bug or error free. It will be tested whether it completely fulfills the requirement of the end user or fails to meet the desired outcome. The system is tested and the bugs are cleared out.

System will be tested from every aspect possible. Any type of valid or invalid data will be input to check the desired results. The program is tested with normal, abnormal and extreme data to make sure that the software reacts properly in all the conditions.

Normal Data: Valid data is entered to check whether it is accepted or not.

Extreme Data: Data out of range is entered to see whether validations apply or not.

Abnormal Data: Invalid data is input to see if it is accepted or not. 

Test Plan:

S.No. 

Test  Purpose  Test Method  Data Entered  Expected 

Outcome 

1  Login  To check if user can log in with wrong password. 

Enter wrong password and click 

login. 

Password: pass  Error message 

2  Change Password 

To check if password can be changed entering wrong old password. 

Enter wrong old password and enter new password and 

click change password. 

Old Password: oldpass 

New Password: shopee 

Error Message 

3  Change Password 

To check if password can be changed even with 

incorrect retype password. 

Enter correct old password and different new 

password and retypenew password. 

Old Password: 

shop 

New Password: 

grocery 

Retyped New Password: 

Store 

Error Message 

77  

4  Change Password 

To check what happens when new password is blank and retype new password is also blank. 

Enter correct old password and leave other fields blank. 

Old Password: 

Shop 

Error Message 

5  Add New Customer 

Check if program accepts blank Address or Contact 

Number fields of a customer. 

Enter other information but leave Contact Number and Address fields blank.

‐  Error Message 

6  Add New Customer 

To check if customer is correctly added in the 

database. 

Enter information in all fields and click Add

Customer Name: Saurav 

Address: Kaushaltar 

 Contact Number: 

9808765341 

Correct addition of the 

details of thenew 

customer in the database 

7  Sales  To check if customer ID and product ID are 

automatically updated when they are selected 

from combo box. 

Select customer and product from combo 

box. 

‐  Customer ID  and Product ID 

updated automatically 

in the respective textboxes 

8  Sales  To see what happens when operator tries to sell more quantity than 

available stock. 

Enter quantity being sold more than 

available. 

Product: Shin‐ramyun 

Quantity: 200 

Error message 

9  Sales  To check whether the Total Amount price 

changes if any change is made in the quantity 

field.  

Select Product and change its Quantity.

Initial Quantity: 0 

Final Quantity: 50 

Changing values in the total amount 

field. 

10  Sales  To check if cash sales actually works well. 

Make successful sales transaction  

All Valid Data Entered. 

Change in database 

11  Sales  To check if credit sales actually works well. 

Make successful credit transaction 

Making transaction random with 

Change in database 

78  

random information 

12  Customer Credit 

Settlement 

To see what happens when actual balance is less than the balance 

being paid. 

Enter balance more than the actual 

balance 

Balance: 10000  Error message 

13  Customer Credit 

Settlement 

To see what happens when customer is 

selected and balance is left blank. 

Press Settle without entering anything. 

‐  Error Message 

14  Add New Product 

To check if same product can be added twice. 

Enter the product existing in the stock

Product Name: Mountain Dew 

Prompt user for the action. 

15  Add New Product 

To check whether the product can be added without entering all 

details. 

Leave detail field blank and press add

‐  Error Message 

16  Search  To see what happens when search item is left 

blank 

Leave search item field blank 

‐  Error Message 

17  Search  To see what happens if no category is selected. 

Leave category unselected 

‐  Error Message 

18  Search  To see what happens if no search item is found. 

Enter invalid information in search 

term 

‐  Blank Datagrid 

19  Sales  To check whether stock of the product is updated or not after purchase. 

Make successful credit or cash transaction  

All information entered correctly 

Change in Database 

20  OrderID 

Report 

To see what happens when characters are 

entered in OrderID field. 

Enter characters in OrderID field 

Twenty  Error message 

79  

Test No.1 In this window, wrong password was entered. The password entered was “pass”. 

 

So, an error message was shown suggesting that the wrong password has been entered. 

 

User will keep on seeing this error message unless correct password is entered. 

Result: Successful 

 

80  

Test No.2 In the change password window, wrong old password was entered but the new password and retype new password were entered correctly. 

 

 

An error message was shown suggesting that the old password didn’t match.  Result: Successful   

81  

Test No.3 In this window, correct old password is entered and different new password and retype new password are entered. 

 

 An error suggesting that the new password and retyped password did not match. User will keep on getting the same message until both new and retyped password is matched. 

 

Result: Successful 

 

 

 

 

82  

 

Test No.4 In this window, old password was entered but the other fields were left blank. 

 

 

Error Message Suggesting that all fields were not filled correctly was shown. User will keep seeing this message unless data are entered in all fields correctly. 

 

Result: Successful 

 

 

 

 

83  

 

Test No.5 In the add customer window, all information were entered with some data but the Address and Contact Number were left blank. 

 

 

 

An error message suggesting that all fields were not filled properly was shown. User will see this message unless all the fields are filled correctly. 

 

Result: Successful 

 

 

 

84  

 

Test No.6 In this window all the information required for Add New Customer were entered correctly.  

 

 

Message showing that the records were added successfully was shown. Later in the database the record was successfully added. 

 

85  

Result: Successful 

Test No.7 Initial view of the sales window is shown. 

 

A customer and product was selected from their respective combo boxes. The Customer ID and Product ID were automatically shown. Also, the rate of the product was automatically shown. 

 

86  

Result: Successful 

Test No.8 In this window, the quantity of the stock was entered more than the available stock of the selected product. 

 

 

 Error message suggesting that the required quantity of the product is not available is shown. User has to check the status of the stock then decide what action to take about the quantity of the order.   Result: Successful   

 

  

87  

  

Test No. 9 Initial Sales Window when the quantity of the product was zero. 

 

Total Amount is Zero when the Quantity is Zero. 

The value of the quantity is changed from 0 to 40. 

 

Total Amount now has changed. So when there is change in quantity there is change in Total Amount. 

88  

Result: Successful 

Test No.10  

Here all the data were entered correctly in the sales window. The transaction method selected was cash. After the data was entered OK button was clicked. 

 

Message showing that the order was successfully added to the database was shown. Later in the database record was added successfully. 

 

 

89  

Result: Successful 

Test No. 11 The initial balance of the customer “Prakash RajGadal” can be seen below: 

 

Sales Transaction was successfully ordered with credit as selected after entering required data and pressing the OK button. 

 

 

 

Later on the database the balance of Prakash Raj Gadal was updated. The Balance increased by 1350. 

 

 

90  

Result: Successful 

Test No.12 In this Customer Credit Settlement Window, Customer is selected with amount paid to settle is exceeding the current balance of the customer. 

 

 

Error Message suggesting that the Amount Paid by the customer is exceeds the current balance of the customer. User cannot settle the credit unless Amount is less than or equals to the current balance of the customer. 

 

Result: Successful 

 

91  

 

Test No.13 In this window, the Amount to be settled is left blank but the Customer is selected. 

 

 

 

Error message suggesting that all information should be correctly entered in order to settle the credit is shown. 

 

Result: Successful 

 

 

92  

 

Test No.14 In this Add Product Window, Product with similar name that already exists in the database is entered. 

 

 

Whenever such action is taken, following dialog box is displayed where user is asked to decide whether to add new product or update existing product.  

 

Result: Successful 

 

 

 

93  

Test No.15 In this window, the fields are not filled completely. 

 

 

 

An error message suggesting that all fields should be filled correctly is shown. This shows that user needs to enter complete information about the product in order to add that product in the record. 

 

Result: Successful 

 

 

94  

Test No.16 In this search window, search category is selected but search item is left blank. 

 

 

 

Error message suggesting that search item is empty is shown. Nothing can be searched unless a search item is entered. 

 

Result: Successful 

 

95  

Test No.17 In this window, data is entered in the textbox but the search category is not selected. 

 

 

 

An error message suggesting that search category should be selected is shown. This shows that in order to search for anything search category must be selected first. 

 

Result: Successful 

96  

Test No.18 In this window, invalid search item is entered i.e which is not present in the record is entered.  

 

 

Blank Datagrid is obtained which shows that that the record does not exist. 

 

Result: Successful 

 

 

 

 

 

97  

Test No.19 Initial Quantity of the product “Coca Cola” before Sales Transaction can be seen below: 

 

Sales Transaction is made where Coca Cola is the product: 

 

Later the Database the quantity of the product is updated. The quantity decreased by 4. 

 

 

Result: Successful 

98  

Test No.20 In this InvoiceID Report Window, InvoiceID was entered as string. 

 

 

 

This suggests that InvoiceID should never be string. It should always be in number form. 

Result: Successful 

 

 

 

99  

Implementation

System Changeover After discussing with Mr. Pradhan, it was agreed that the system will be directly implemented. As the software is simple and user friendly direct implementation of the system would be a suitable choice. Moreover, Mr.Pradhan has some knowledge about using the computer.  So, there would not be a problem after quick user training. 

Installation After thorough testing of the system, the system is now fully implemented in the Pradhan Store. The software has been installed on the computer and user has started using the software. 

User Training As Mr.Pradhan had some knowledge about using the computer, it was easy to train him and it was less time consuming. Different trainings were given to him such as the installation of software, adding and editing the records and handling the errors that might occur while using the software along with displaying the reports on the screen. 

Evidence of the new system being used by the end user:

100  

Appropriateness of Structure and Exploitation of Available Resources:

Available Hardware Resources: Microsoft Access and Visual Basic 6.0 do not require heavy resources to run. They are the software which can run in most common hardware and software. Therefore, the choice for computer system chosen was the common one. 

Hard disk with enough free space to store the Windows Operating System along with the database and Visual Basic 6.0. 

Monitor to display output. 

Keyboard and Mouse to navigate around the programming language, database management system and the operating system with ease and to input data into the fields as required. 

Flash drive, CD ROM or DVD to take backups frequently and avoid loss of important data. 

Available Software Resources: For development of the software, I decided to use Microsoft Visual Basic 6.0. Visual Basic is an event  driven  programming  language.  The  best  feature  of  this  programming  language  is interactive  development  environment.  For  designing  data  structure, MS Access  2007 will  be used. This  is the best DBMS software.  It  is very easy to create relationships  in the MS Access. The Operating  System  used was Microsoft Windows  7  since  it  is  the most  commonly  used Operating System nowadays. 

 

Logs of Problems Encountered Date  Problem Description  Action Taken Comments

4/8/2013 

MSDATGRD.OCX was missing from the computer which led to failure in loading of forms having data grids. 

Downloaded MSDATGRD.OCX. Problem Solved. 

04/3/2013 Windows Crashed. Blue Screen of Death (BSOD) 

New Copy of Windows installed. Problem Solved. 

101  

Evaluation Pradhan  Store  Sales Management  system  is  now  fully  implemented  by  Pradhan  Store.  This software fully is based on the requirement specified by the owner of the store. 

 

Degree of Successin Meeting the Original Objectives: It was agreed that software should be user friendly as possible. This is made possible with the help of appropriate Graphical User Interface. There  is  intensive use of  interactive buttons and help options where possible. Moreover, the system design is simple and sleek. This can be seen easily in design of forms. However, there was no use of pictures and icons to make the interface catchy and attractive.(Page: 15 to 20) 

It was also agreed that software should be fully automated. Therefore automatic calculations in all possible places were used.  For example  total  is  automatically  calculated when product  is selected and quantity is entered. Total Transaction is also calculated in the Date Wise Report of particular date. The automation of the new system was successful.(Page: 19) 

Searching was one of  the major  feature  to be added  in  the new  system. Users do not know what sorts of information are present in the database. Therefore searching is also designed to search anything that the user wants. User can search name, address and even contact number. User  can  also  list  out  product  by  category  and  customer  by  their  address.  Therefore development of searching system was successful. (Page 18) 

This software was agreed to be able to prepare reports. This is completely implemented in the new system. User can prepare wide range of reports such as report based on customers, date as well  as  invoice.  Therefore  development  of  report  is  successfully  implemented  in  current system. However, user won’t be able to print reports.(Page No: 19 and 20) 

As  agreed with  the  owner,  this  software  needs  to  run  on minimum  software  and  hardware specifications.  Therefore,  user  can  run  this  system  be  in most  computers  having  common specifications.  However,  this  software  will  not  work  in  any  other  OS  platform  other  than Microsoft Windows.(Page No: 10) 

 

102  

User’s response to the system The Client seems to be very satisfied and delighted with the new system. This system seems to be much more efficient and quick then the previous system. He has sent a  letter  in which he has expressed his opinions on the new system. 

 

Desirable Extensions Even though the client seems to be happy and a lot more satisfied with this new system there are few areas where this system can be extended in the future. In future, extension of the software could include: 

1. Purchase Management as well where creditors are to be managed. 2. Stock management system to maintain stock. 3. Make the system able to record multiple transactions at a time. 4. Make the system to make graphical reports and be able to print them 

 

1  

Technical Documentation

Hardware Specification used for System Development and System Implementation

• Intel Pentium 4  3.6 Ghz 

• 1 GB of RAM  

• Hard Disk with more than 10 GB of Free Space  

• Removable Drives such as USB or CD/DVD. 

• Keyboard  

• Mouse 

• LCD Monitor 

• UPS  

Software Specification used for System Development and System Implementation

• Microsoft Access 2007 

• Microsoft Windows 7 

• Microsoft Visual Basic 6.0  

2  

Data Structures As per the requirements of the store, the system would require four relational databases would be necessary to be designed.  

The tables with their Field Name, Data Type, Description and Example are given below: 

Tables:  

Orders

Field Name  Data Type  Description  Example 

OrderID  Number  Unique  ID  given  to  each order 

      8 

CustomerID  Number  Unique  customer  ID  of the  customer  associated with the order 

      4 

 

OrderDetails

Field Name  Data Type  Description  Example 

OrderID  AutoNumber Unique ID given to each order 3 

ProductID  Number  Unique ID given to each product 

Quantity  Number  Quantity of the product purchased 

70 

 

Rate  Currency  Rate of the product purchased 

Rs.34 

TransactionDate  Date/Time  Date of the purchase  3/7/2013 

TotalAmount  Currency  Total amount of the transaction 

200 

3  

Product

Field Name  Data Type  Description  Example 

ProductID  AutoNumber  Unique ID given to each product 

ProductName  Text  Name of the product  Wheel 

Category  Text  Category of the product  Washing Powder 

Rate  Currency  Price of the product  Rs. 40 

Quantity  Number  Quantity of the product available 

45 

Description  Text  Information about the product 

Cheap  washing powder. 

Customer

Field Name  Data Type  Description  Example 

CustomerID  AutoNumber  This field stores unique Customer_ID given to each customer. 

89 

CustomerName  Text  This field store name of the customer. 

PrakashGadal 

Address  Text  This field stores address of the customer. 

Kathmandu 

ContactNumber  Text  This field stores customer’s contact number. 

9808765341 

Balance  Currency  This field stores net balance of the customer. 

89 

4  

Flat File One  flat  file will be necessary  to store password. Since our software can have only one user, there will be only one password. So storing password in a relational database is unnecessary. 

Field Name  Type  Size  Description 

Password  Text    Stores password of a user 

 

The entity relationships (E‐R Diagram) among the tables used in the system is given below: 

 

 

 

 

 

5  

Input Forms:

Log In Form:

The login form allows user to enter the correct username and password to get access to the main form of the system. It prevents unauthorized access to the system. 

Change Password Form:

This form allows changing password of the system in a very easy manner to ensure security of the system by changing password time and again. 

6  

Add New Product Form:

This form allows user to enter all information about the new product brought in the store.  

 

Add New Customer Form:

This form allows user to enter all information about the new customer in the store. 

7  

Sales Form:

 

The form allows user to enter all the information of the transaction being carried out whether it is a cash transaction or credit transaction. 

8  

Search Form:

Customer Credit Settlement:

9  

Reports: Based on Customer:

Based on Date:

10  

Based on Invoice ID

 

11  

Process Model  

The above flowchart represents the outlook of the overall system. As we can see, program will start with login window. Failure of user to login will directly lead to exit. Successful login will lead to the main window from where user can select different forms. User can also switch between add new customer and add new product in the sales window. 

 

 

 

 

 

12  

Flowchart for Input forms:

Add New Customer:

Add new customer form will help user to add new customer with all valid information provided. 

 

 

13  

Add New Product:

14  

Change Password

 

 

15  

Validate Sub Process  

 

 

 

 

 

 

 

 

 

 

 

16  

Customer Credit Settlement

 

 

 

 

 

 

 

 

17  

Update records in database (sub process)  

 

 

18  

Sales  

 

19  

Search:

20  

Reports

Report based on invoice

 

 

21  

 

Report Based on Date

22  

 

 

 

23  

Report Based on Customer

 

 

24  

 

Output Flowchart Report and search are intended to do following things: 

 

 

25  

 

Data Structure Design  

Customer Table

Design View:

 

Datasheet View:

 

 

26  

 

 

 

Orders Table

Design View:

Datasheet View:

27  

OrderDetails Table

Design View:

Datasheet View:

 

 

 

 

28  

 

 

 

Product Table

Design View:

Datasheet View:

29  

 

 

Programming Codes:

Add New Product: Dim cnn As ADODB.Connection Dim rsProduct As ADODB.Recordset  Private Sub cmd_Add_Click() If txt_ProductName.Text = "" Or IsNumeric(txt_Quantity.Text) = False Or IsNumeric(txt_Rate.Text) = False Or txt_Category.Text = "" Or txt_Description.Text = "" Then 'checks if fields are empty and valid MsgBox "Please fill all forms with valid information.",vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure Else     Call Add_Product End If End Sub  Private Sub Form_Load() ' creates database connections and creates recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rsProduct = New ADODB.Recordset rsProduct_sql = "select* from Product" rsProduct.LockType = adLockOptimistic rsProduct.CursorLocation = adUseClient rsProduct.CursorType = adOpenStatic rsProduct.ActiveConnection = cnn rsProduct.Source = rsProduct_sql rsProduct.Open Call ID rsProduct.MoveFirst End Sub  Private Sub ID() ' updates Product ID rsProduct.MoveLast txt_ProductID.Text = rsProduct!ProductID + 1 

30  

End Sub     Private Sub Add_Product() ' adds product rsProduct.MoveFirst While NotrsProduct.EOF If rsProduct.Fields("ProductName") = txt_ProductName.Text Then     Dim ans As String ans = MsgBox("Product with similar name already exists." &vbCrLf& "Do you want to update the stock of existing product?" &vbCrLf& "New selling price will be set.",vbYesNo)     If ans = vbYes Then rsProduct.Fields("Quantity") = rsProduct.Fields("Quantity") + Val(txt_Quantity.Text) rsProduct.Fields("Rate") = txt_Rate.Text rsProduct.Update MsgBox "Stock successfully updated.",vbInformation 'informs user about succesful addition of stock scr_clr         Exit Sub     End If End If rsProduct.MoveNext Wend rsProduct.MoveLast rsProduct.AddNew rsProduct.Fields(1) = txt_ProductName.Text rsProduct.Fields(2) = txt_Category.Text rsProduct.Fields(3) = txt_Quantity.Text rsProduct.Fields(4) = txt_Rate.Text rsProduct.Fields(5) = txt_Description.Text rsProduct.Update MsgBox "New Product Record Added Successfully", vbInformation scr_clr End Sub  Private Sub scr_clr() 'clears all the textboxes txt_ProductName.Text = "" txt_Category.Text = "" txt_Quantity.Text = "" txt_Rate.Text = "" txt_Description.Text = "" Call ID End Sub 

31  

  

 

Add New Customer: Dim cnn As ADODB.Connection Dim rsCustomer As ADODB.Recordset  Private Sub cmd_Add_Click() If txt_CustomerName.Text = "" Or txt_Address.Text = "" Or IsNumeric(txt_Contact.Text) = False Or IsNumeric(txt_Balance.Text) = False Then 'checks if fields are empty and valid MsgBox "Please fill all forms with valid information.",vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure Else     Call Add_Customer End If End Sub  Private Sub Form_Load() 'creates Database connections and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rsCustomer = New ADODB.Recordset rsCustomer_sql = "select * from Customer" rsCustomer.LockType = adLockOptimistic rsCustomer.CursorLocation = adUseClient rsCustomer.CursorType = adOpenStatic rsCustomer.ActiveConnection = cnn rsCustomer.Source = rsCustomer_sql rsCustomer.Open Call ID rsCustomer.MoveFirst End Sub  Private Sub ID() ' updates Customer ID rsCustomer.MoveLast txt_CustomerID.Text = rsCustomer!CustomerID + 1 End Sub Private Sub Add_Customer() ' adds customer rsCustomer.AddNew 

32  

rsCustomer.Fields(1) = txt_CustomerName.Text rsCustomer.Fields(2) = txt_Address.Text rsCustomer.Fields(3) = txt_Contact.Text rsCustomer.Fields(4) = Val(txt_Balance.Text) rsCustomer.Update MsgBox "New Customer Record Added Successfully", vbInformation scr_clr End Sub  Private Sub scr_clr() 'clears all the textboxes txt_CustomerName.Text = "" txt_Address.Text = "" txt_Contact.Text = "" txt_Balance.Text = "" Call ID End Sub  

Change Password Private Sub cmd_Change_Click() Open "security details.txt" For Input As #1 Open "security.txt" For Output As #2 While Not EOF(1)     Input #1, Pass     If txt_OldPassword.Text = "" Or txt_NewPassword.Text = "" Or txt_ReNewPassword.Text = "" Then MsgBox "Please Enter all Information Correctly", vbCritical ' alerts user about invalid information entered         Close #1, #2         Exit Sub     End If     If txt_OldPassword.Text<> Pass Then MsgBox "Invalid Old Password", vbCritical 'alerts user about invalid password entered         Write #2, Pass     Else         If txt_NewPassword.Text = txt_ReNewPassword.Text Then MsgBox "Password Changed Successfully", vbInformation 'informs user about successful changing of password             Pass = txt_ReNewPassword.Text             Write #2, Pass         Else MsgBox "New Password and Retyped Password didn't match", vbCritical 'alerts user about mismatch of entered new password             Write #2, Pass 

33  

        End If     End If Wend Close #1, #2 Kill "security details.txt" 'delete security details.txt Name "security.txt" As "security details.txt" ' rename security.txt to security details.txt Unload Me End Sub  

Customer Credit Settlement: Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset  Private Sub cmd_Settle_Click() If combo_CustomerName.Text = "" Or txt_Amount.Text = "" Or IsNumeric(txt_Amount.Text) = False Then 'checks if fields are empty and valid MsgBox "Please fill all forms with valid information.",vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure End If rs.MoveFirst While Notrs.EOF     If txt_CustomerID.Text = rs.Fields("CustomerID") Then             If rs.Fields("Balance") < Val(txt_Amount.Text) Then 'checks if acutal balance is less than amount paid by the customer MsgBox "Amount exceeds balance of "&rs.Fields("CustomerName") & "." &vbCrLf& "Please enter valid amount.",vbCritical txt_Amount.Text = ""                 Exit Sub             Else rs.Fields("Balance") = rs.Fields("Balance") ‐ Val(txt_Amount.Text) 'reduces balance of the customer by the amount paid rs.Update             End If txt_NewBalance.Text = rs.Fields("Balance")         End If rs.MoveNext Wend MsgBox "Successfully settled", vbInformation Call scr_clr End Sub  

34  

Private Sub Form_Load() Call connect Call update_category_customers End Sub   Private Sub connect() 'creates database connections and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs = New ADODB.Recordset rs.Open "select * from Customer", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  Private Sub update_category_customers() ' lists the customers in combobox rs.MoveFirst While Notrs.EOF combo_CustomerName.AddItem (rs.Fields("CustomerName")) rs.MoveNext Wend End Sub    Private Sub combo_CustomerName_Click() 'updates customer ID and balance after a customer is selected rs.MoveFirst While Notrs.EOF If rs.Fields("CustomerName") = combo_CustomerName.Text Then txt_CustomerID.Text = rs.Fields("CustomerID") txt_CurrentBalance.Text = rs.Fields("Balance") End If rs.MoveNext Wend End Sub  Private Sub scr_clr() 'clears all the textboxes combo_CustomerName.Text = "" txt_CustomerID.Text = "" txt_CurrentBalance = "" txt_Amount.Text = "" txt_NewBalance.Text = "" End Sub    

35  

Sales: Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim rs2 As ADODB.Recordset Dim rs3 As ADODB.Recordset Dim rs4 As ADODB.Recordset  Private Sub cmd_NewCustomer_Click() AddCustomer.Show End Sub  Private Sub cmd_NewProduct_Click() AddProduct.Show End Sub  Private Sub combo_ProductName_Click() rs3.MoveFirst While Not rs3.EOF If rs3.Fields("ProductName") = combo_ProductName.Text Then txt_ProductID.Text = rs3.Fields("ProductID") txt_Rate.Text = rs3.Fields("Rate") End If rs3.MoveNext Wend End Sub  Private Sub cmd_Ok_Click()   If combo_CustomerName.Text = "Customer Name" Or IsNumeric(txt_Quantity.Text) = False Or combo_ProductName.Text = "Product Name" Then 'checks if fields are empty and valid MsgBox "Please fill all forms with valid information.",vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure Else     Call add_order_detail End If End Sub 

36  

 Private Sub Form_Load() Call connect Call update_category_customers Call update_order_id Call txt_quantity_Change txt_Today.Text = Date End Sub  Private Sub connect() ' creates database connection and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs = New ADODB.Recordset rs.Open "select * from OrderDetails", cnn, adUseClient, adLockOptimistic, adCmdText Set rs2 = New ADODB.Recordset rs2.Open "select * from Customer", cnn, adUseClient, adLockOptimistic, adCmdText Set rs3 = New ADODB.Recordset rs3.Open "select * from Product", cnn, adUseClient, adLockOptimistic, adCmdText Set rs4 = New ADODB.Recordset rs4.Open "select * from Orders", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  Private Sub update_category_customers() 'lists the customers and products in the combobox rs2.MoveFirst rs3.MoveFirst While Not rs3.EOF combo_ProductName.AddItem (rs3.Fields("ProductName")) rs3.MoveNext Wend While Not rs2.EOF combo_CustomerName.AddItem (rs2.Fields("CustomerName")) rs2.MoveNext Wend End Sub  Private Sub combo_CustomerName_Click() rs2.MoveFirst While Not rs2.EOF If rs2.Fields("CustomerName") = combo_CustomerName.Text Then txt_CustomerID.Text = rs2.Fields("CustomerID") End If rs2.MoveNext Wend 

37  

End Sub  Private Sub update_order_id() ' Updates Order ID rs.MoveLast txt_OrderID.Text = rs.Fields("OrderID") + 1 End Sub  Private Sub add_order_detail() 'adds orderdetails If Stock_Exists = True Then     If Option_Cash = False AndOption_Credit = False Then MsgBox ("Please select the transaction method"), vbExclamation 'alerts user to select the transaction method     Else rs.AddNew rs.Fields("ProductID") = txt_ProductID.Text rs.Fields("Quantity") = txt_Quantity.Text rs.Fields("Rate") = txt_Rate.Text rs.Fields("TotalAmount") = txt_Total.Text rs.Fields("TransactionDate") = txt_Today.Text rs.Update         Call Add_Order         Call update_product         Call Add_Credit     End If Else MsgBox ("Quantity has exceeded the Current Stock. Please Check The Current Stock"), vbExclamation 'alerts user about insufficient quantity     Exit Sub End If End Sub   Private Sub txt_quantity_Change() 'calculates total txt_Total.Text = Val(txt_Quantity.Text) * Val(txt_Rate.Text) End Sub  Private Sub update_product() ' updates product stock rs3.MoveFirst While Not rs3.EOF If txt_ProductID.Text = rs3.Fields("ProductID") Then rs3.Fields("Quantity") = rs3.Fields("Quantity") ‐ Val(txt_Quantity.Text) rs3.Update Exit Sub End If 

38  

rs3.MoveNext Wend End Sub  Private Sub Add_Order() 'adds order rs4.AddNew rs4.Fields("OrderID") = txt_OrderID.Text rs4.Fields("CustomerID") = txt_CustomerID.Text rs4.Update MsgBox ("Order Added Successfully"), vbInformation ' informs user about successful addition of order End Sub  Private Sub Add_Credit() 'update customer balance if it is a credit transaction If Option_Credit.Value = True Then     Call Update_credit scr_clr End If End Sub  Private Sub Update_credit() rs2.MoveFirst While Not rs2.EOF If txt_CustomerID.Text = rs2.Fields("CustomerID") Then rs2.Fields("Balance") = rs2.Fields("Balance") + Val(txt_Total.Text) rs2.Update Exit Sub End If rs2.MoveNext Wend End Sub   Private Function Stock_Exists() As Boolean ' checks whether stock of the product exists or not rs3.MoveFirst While Not rs3.EOF If rs3.Fields("ProductID") = txt_ProductID.Text Then     If Val(txt_Quantity.Text) > Val(rs3.Fields("Quantity")) Then Stock_Exists = False     Else Stock_Exists = True     End If End If rs3.MoveNext 

39  

Wend End Function  Private Sub scr_clr() 'clears all the textboxes txt_ProductID.Text = "" combo_ProductName.Text = "Product Name" txt_Quantity.Text = "" txt_Rate.Text = "" Option_Cash = False AndOption_Credit = False Call update_order_id End Sub  

Search Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim rs2 As ADODB.Recordset  Private Sub cmd_Search_Click() If combo_Category.Text = "Select Search Category" Then MsgBox "Please select search category", vbCritical 'alerts user about category Exit Sub End If If txt_SearchItem.Text = "" Then MsgBox "Please enter in the text box to search", vbCritical 'alerts user about no keywords to search     Exit Sub End If Select Case combo_Category.Text     Case "Product's Name"     rs2.Filter = "ProductName like '*" &Me.txt_SearchItem.Text& "*'"     Set DataGrid1.DataSource = rs2 ' sets datagrid source to recordset End Select Select Case combo_Category.Text     Case "Customer's Name" rs.Filter = "CustomerName like '*" &Me.txt_SearchItem.Text& "*'"     Set DataGrid1.DataSource = rs ' sets datagrid source to recordset End Select Select Case combo_Category.Text     Case "Customer's Address" rs.Filter = "Address like '*" &Me.txt_SearchItem.Text& "*'"     Set DataGrid1.DataSource = rs 'sets datagrid source to recordset End Select Select Case combo_Category.Text 

40  

    Case "Customer's Contact Number" rs.Filter = "ContactNumber like '*" &Me.txt_SearchItem.Text& "*'"     Set DataGrid1.DataSource = rs 'sets datagrid source to recordset End Select Select Case combo_Category.Text     Case "Product's Category"     rs2.Filter = "Category like '*" &Me.txt_SearchItem.Text& "*'"     Set DataGrid1.DataSource = rs2 'sets datagrid source to recordset End Select End Sub  Private Sub Form_Load() ' updates the list in search category combo_Category.AddItem "Product's Name" combo_Category.AddItem "Customer's Name" combo_Category.AddItem "Customer's Address" combo_Category.AddItem "Customer's Contact Number" combo_Category.AddItem "Product's Category" Call connect End Sub  Private Sub connect() ' connect the databases and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs = New ADODB.Recordset rs.Open "select * from customer", cnn, adUseClient, adLockOptimistic, adCmdText Set rs2 = New ADODB.Recordset rs2.Open "select * from product", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  

CustomerWise Report Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim rs1 As ADODB.Recordset Dim rs2 As ADODB.Recordset Dim rs3 As ADODB.Recordset Dim rs4 As ADODB.Recordset  Private Sub cmd_Go_Click() If combo_CustomerName.Text = "Customer Name" Then 'checks if fields are empty and valid 

41  

MsgBox "Please Select The Customer", vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure End If Set rs1 = New ADODB.Recordset SQL = "select * From Orders where CustomerID=" &Val(txt_CustomerID) rs1.LockType = adLockOptimistic rs1.CursorLocation = adUseClient rs1.CursorType = adOpenStatic rs1.ActiveConnection = cnn rs1.Source = SQL rs1.Open Set DataGrid1.DataSource = rs1 'sets datagrid source to recordset End Sub  Private Sub cmd_New_Click() Call scr_clr End Sub  Private Sub Form_Load() Call connect Call update_customer_category End Sub  Private Sub connect() 'creates database connections and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs = New ADODB.Recordset rs.Open "select * from Customer", cnn, adUseClient, adLockOptimistic, adCmdText Set rs2 = New ADODB.Recordset rs2.Open "select * from OrderDetails", cnn, adUseClient, adLockOptimistic, adCmdText Set rs3 = New ADODB.Recordset rs3.Open "select * from Orders", cnn, adUseClient, adLockOptimistic, adCmdText Set rs4 = New ADODB.Recordset rs4.Open "select * from Product", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  Private Sub update_customer_category() 'lists customer in combobox rs.MoveFirst While Notrs.EOF combo_CustomerName.AddItem (rs.Fields("CustomerName")) rs.MoveNext Wend End Sub 

42  

Private Sub combo_CustomerName_Click() rs.MoveFirst While Notrs.EOF If rs.Fields("CustomerName") = combo_CustomerName.Text Then txt_CustomerID.Text = rs.Fields("CustomerID") End If rs.MoveNext Wend End Sub   Private Sub DataGrid1_Click() 'called whenever datagrid element is clicked If DataGrid1.Col = 0 Then 'checks if order ID was clicked show_order_detail 'shows order detail in textboxes End If End Sub  Private Sub show_order_detail() 'shows details about selected order in textbox rs2.MoveFirst While Not rs2.EOF  If DataGrid1.Text = rs2.Fields("OrderID") Then txt_InvoiceID.Text = DataGrid1.Text txt_ProductID.Text = rs2.Fields("ProductID") txt_Rate.Text = rs2.Fields("Rate") txt_Quantity.Text = rs2.Fields("Quantity") txt_Total.Text = rs2.Fields("TotalAmount") txt_TransDate.Text = rs2.Fields("TransactionDate")  Call Product_Name  End If rs2.MoveNext Wend End Sub  Private Sub Product_Name() 'shows product name in textbox rs4.MoveFirst While Not rs4.EOF     If rs4.Fields("ProductID") = txt_ProductID.Text Then txt_ProductName.Text = rs4.Fields("ProductName")     End If rs4.MoveNext Wend End Sub  Private Sub scr_clr() 'clears all textboxes 

43  

txt_InvoiceID.Text = "" txt_ProductID.Text = "" txt_ProductName.Text = "" txt_TransDate.Text = "" combo_CustomerName.Text = "Customer Name" txt_CustomerID.Text = "" txt_Total.Text = "" txt_Rate.Text = "" txt_Quantity.Text = "" Set DataGrid1.DataSource = Nothing 'resets the Datagrid End Sub 

Datewise Report Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim rs1 As ADODB.Recordset Dim TransDateAs Date  Private Sub cmd_Go_Click() If txt_dates.Text = "" Then 'checks if fields are empty and valid MsgBox "Please Enter Date", vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure End If TransDate = Format(txt_dates.Text, "mm/dd/yyyy") Set rs = New ADODB.Recordset SQL = "select * From OrderDetails where TransactionDate=#" &TransDate& "#" rs.LockType = adLockOptimistic rs.CursorLocation = adUseClient rs.CursorType = adOpenStatic rs.ActiveConnection = cnn rs.Source = SQL rs.Open Set DataGrid1.DataSource = rs 'sets datagrid source to recordset Call totalamount End Sub  Private Sub cmd_New_Click() scr_clr End Sub  Private Sub Form_Load() 'creates database connections and adds recordsets 

44  

Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs1 = New ADODB.Recordset rs1.Open "select * from OrderDetails", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  Private Sub totalamount() 'calculates total rs1.MoveFirst While Not rs1.EOF If rs1.Fields("TransactionDate") = txt_dates.Text Then totals = totals + rs1.Fields("TotalAmount") End If rs1.MoveNext Wend txt_Total.Text = totals End Sub  Private Sub scr_clr() 'clears all textboxes and datagrid txt_dates.Text = "" Set DataGrid1.DataSource = Nothing txt_Total.Text = "" End Sub  

Invoice ID Report Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim rs2 As ADODB.Recordset Dim rs3 As ADODB.Recordset Dim rs4 As ADODB.Recordset  Private Sub cmd_Go_Click() If IsNumeric(txt_InvoiceID.Text) = False Then 'checks if fields are empty and valid MsgBox "InvoiceID should be numberic", vbCritical 'alerts user about invalid information entered     Exit Sub 'exits the procedure End If rs2.MoveFirst While Not rs2.EOF If rs2.Fields("OrderID") = txt_InvoiceID.Text Then 

45  

Call Add_CustomerID cap_ProductID.Caption = rs2.Fields("ProductID") Call Product_Name cap_Quantity.Caption = rs2.Fields("Quantity") cap_Rate.Caption = rs2.Fields("Rate") cap_Total.Caption = rs2.Fields("TotalAmount") End If rs2.MoveNext Wend End Sub  Private Sub cmd_New_Click() scr_clr End Sub    Private Sub Form_Load() Call connect End Sub  Private Sub connect() 'creates database connections and adds recordsets Set cnn = New ADODB.Connection cnn.ConnectionString = "dsn=Sales" cnn.Open Set rs = New ADODB.Recordset rs.Open "select * from Customer", cnn, adUseClient, adLockOptimistic, adCmdText Set rs2 = New ADODB.Recordset rs2.Open "select * from OrderDetails", cnn, adUseClient, adLockOptimistic, adCmdText Set rs3 = New ADODB.Recordset rs3.Open "select * from Orders", cnn, adUseClient, adLockOptimistic, adCmdText Set rs4 = New ADODB.Recordset rs4.Open "select * from Product", cnn, adUseClient, adLockOptimistic, adCmdText End Sub  Private Sub Product_Name() 'shows product name rs4.MoveFirst While Not rs4.EOF     If rs4.Fields("ProductID") = cap_ProductID.Caption Then cap_ProductName.Caption = rs4.Fields("ProductName")     End If rs4.MoveNext Wend End Sub 

46  

 Private Sub Add_CustomerID() 'shows customer id rs3.MoveFirst While Not rs3.EOF     If rs3.Fields("OrderID") = txt_InvoiceID.Text Then cap_CustomerID.Caption = rs3.Fields("CustomerID")     End If rs3.MoveNext Wend Call Add_CustomerName End Sub   Private Sub Add_CustomerName() 'shows customer name rs.MoveFirst While Notrs.EOF     If rs.Fields("CustomerID") = cap_CustomerID.Caption Then cap_CustomerName.Caption = rs.Fields("CustomerName")     End If rs.MoveNext Wend End Sub  Private Sub scr_clr() 'clears the screen txt_InvoiceID.Text = "" cap_CustomerID = "" cap_CustomerName = "" cap_ProductID = "" cap_ProductName = "" cap_Quantity = "" cap_Rate = "" cap_Total = "" End Sub  

 

1  

Installation Guide:

Step 1: Insert the CD into the CD/DVD Drive and browse the CD. Open the file named Setup.exe 

 

Step 2: A setup screen will appear. Click Next

2  

Step 3 The System will be installed on default directory. If you want to change the location of the system, then you can change by clicking on “…” button.  

Click on Yes to create the directory. 

3  

Step 4 Click Start to initiate the installation process. 

 

Step 5

 

Your installation is complete when you see this screen.  

 

4  

If you want to view User Documentation, then click on the button “View User Documentation.docx”. Uncheck “Launch Pradhan Store Sales Management System” as the system is not ready yet to be run. ODBC Connection has to be created manually.  

Step 6

 

Click Exit to exit from setup.exe 

5  

Step 7 From this step, you will learn how to create ODBC connection manually. 

Go to Control Panel: 

 

Click on start button and select control panel as shown in the figure. 

 

 

 

 

 

 

6  

Step 8

 

In the control panel window, click on Category as seen in the figure and select small icons or large icons. After you’ve done that the view of the control panel will change into “View by: Small Icons.” Or “View by: Large Icons”.  

 

Click on ODBC after you see this screen as shown in figure.

7  

Step 9:

Then Click On System DSN. 

 

Then click on Add. 

8  

Step 10:

Scroll until you find “Microsoft Access Driver (*.mdb,*.accdb) “. Select it and click Finish. 

After you see this screen, Click select as shown in the figure. 

 

9  

Step 11:

Browse into the folder where Pradhan Store Sales Management System is installed. The Default Directory of Installation is “C:\Program Files\Pradhan Store Sales Management System”. You will see “Sales.mdb” in the box as shown in figure if you have browsed in the correct directory. Select it and Click OK. 

 

In the Data Source Name, type the name of the file you selected just now i.e. “Sales”. Then Click OK. 

 

10  

Step 12:

You will be able to see that Sales Database is successfully added in the System Data Sources. Click OK. You have Now Successfully Created ODBC Connection Manually.  Your software is now fully functional. Run your software by clicking on Star Menu then All Programs and you will be able to see Pradhan Store Sales Management System. Click on that and Click the Pradhan Store Sales Management System.exe as shown in the figure.  You can create shortcut if you want to. The program can also be run from its directory.   

11  

Log In This window appears as soon as you run the Pradhan Store Sales Management System. This window asks you to enter the password in order to get access to the system.  

 

If you enter correct password a new window will appear on the screen. If you enter incorrect password then you will see the following error message on the screen. 

 

 

This error message will keep on coming unless you enter the correct password. 

12  

Main Screen This is the main window of the Pradhan Store Sales Management System. You can only get access to this window after entering the correct password in log in window. This is where you can choose what to do. 

 

Menu of the Menu Window:

This is the menu bar in the Main Window of the Pradhan Store Sales Management System. 

 

If you click on Add you will be able to see the following choices on your screen: 

 

Clicking on Add New Customer will open the Add Customer Window. Clicking on Add New Product will open the Add New Product Window. 

13  

If you click on Help in the Menu Bar of the Main Screen, you will be able to see following choices. 

 

Clicking on Change Password will open the Change Password Window. 

Clicking on User Manual will open the User Manual which you are viewing now. 

Clicking on About will open the About Window. 

 

You could have noticed the Ctrl + P, Ctrl + C, F1 at the right hand side of Add New Product, Add New Customer and User Manual respectively. These are shortcut keys. If you press these keys on your keyboard you can see the window directly without having to do anything. 

For Example: If you press Ctrl+P on your keyboard, Add Product will show up instantly. This will save your time. That is why they are called shortcut keys. 

 

Change Password This window will appear if you select the Change Password from the Menu Bar of the Main Screen.  

 

14  

Make sure you type the Old password correctly. Otherwise, you will not be able to change your password. You will get error message like this: 

 

Also, your new password and retyped new password should match. If it doesn’t then you will get error message like this: 

 

If you enter all information correctly then you will get message like this: 

 

15  

Add New Customer This is the Add New Customer window where you will enter the information about the new customer.  

 

You should enter in all spaces. If you do not enter information in any one of the spaces, you will see an error message like this: 

 

Note:You will also get this message if you enter text in Balance Field because Balance is never in text format even if you have entered information in all fields. 

If you enter all information correctly you will get a message like this: 

 

16  

Add New Product This is the Add New Product window where you will enter information about the new product. 

 

Just as in Add New Customer Window, you will have to enter information in all spaces provided. If you don’t, you will get similar error message. 

 

Note: Just like in Add New Customer Window, your data should match the data format. Quantity and Rate should not be in text format because they are always numbers. If you enter in text format, you will get the same error message. 

 

 

17  

If you add all information correctly you will get the following message: 

 

If you somehow enter new product that already exists, then you will be prompted with a message like this: 

 

If you select “Yes” then, your entered selling price will be set and your quantity of that product will be updated. You will receive this message: 

 

If you select “No” then a new product record will be added with same name but with different Product ID. 

 

 

 

18  

Sales This is the sales window where you will record your transaction details. 

 

This window is made automatic where possible. You only have to select the transaction method. Select the customer name and product name. And enter the quantity of the product to be sold.  

The Total Amount is calculated automatically.  

You can even go to the Add New Customer window and Add New Product by clicking on the New Customer Button and New Product Button respectively. 

You should enter all information correctly.You should not forget to select customer or product or even enter the quantity. The quantity should never be in text format. If you forget then you will get an error message: 

 

19  

If you fill all information correctly and forget to select the transaction method then you will get a different error message: 

 

If you fill all information correctly and also select the transaction method but if you have entered the quantity more than the available quantity then you will be prompted about it: 

 

You will have to check the current stock in search window. Then you will have to decide what to do next. 

If you enter all information correctly with transaction method selected and enough quantity entered. Then you will get the following message: 

 

 

 

20  

Customer Credit Settlement This is the window where you settle the Customer’s Credit.  

 

The amount should never be entered as a text as amount is never in text format. If you enter the amount in text format or forget to choose the customer then you will get this error message: 

 

 

 

 

 

21  

 

Here, the current balance of the customer Anwesh Pradhan is 640 but the Amount to be settled is 700. When Settle was clicked, the following error message showed up: 

 

So, amount more than the current balance cannot be settled. Only the amount less or equals to the current balance can be settled. Later, amount of 600 was entered then following message showed up: 

 

The balance was successfully settled and you can also see the new balance of the customer. 

22  

Search This is the search window. Here, you will be able to search almost anything based on the search category you select. 

 

You should never forget to select the search category. If you don’t select search category then you will get the following error message: 

 

And if you select search category but don’t enter anything in the space, following message will show up: 

 

23  

 

Here, a search is carried out based on Customer’s Address. There is no any customer whose address is Liverpool. Hence, a blank data grid is obtained. This tells that there are no any records related to the search carried out. 

Suppose a customer has changed his/her address or contact number. The present record needs to be modified. To do that, just do a search of that particular customer. Then modify the data on the data grid as shown below: 

 

24  

 

 

Therefore, if you want to modify any current record then do a search on that and modify through the data grid. 

 

Report This is the report window. You can choose type of report that you want to have a look on in this window. 

 

25  

Invoice ID Report This is the Invoice ID Report Window. This will display the Sales Report based on the Invoice ID entered.  

 

The Invoice ID entered should always be numeric. If it is entered as a text or no Invoice ID is entered, following error message will show up: 

 

26  

The following is the sample of Invoice ID Report: 

 

 

 

 

 

 

 

 

 

27  

Datewise Report This is the Datewise report window. This shows the report of all transaction of a particular date along with the total transaction done in that date. 

 

Date should not be in any other format other than (mm/dd/yyyy). If it is entered in other format then syntax error will be shown. 

Here is the sample of the Date Wise Report: 

 

 

28  

CustomerWise Report This is the CustomerWise Report window. This displays individual report of sales detail of a particular customer.  

 

There are two stages in this report. The first is you choose Customer Name and Click GO: 

 

29  

You can see that records are seen in Data Grid but no data are shown in sales detail. In order to see the sales detail: 

Double‐Click on one of the data in the Order ID column on the data grid. Then you can see the sales detail of that record. This is the second stage. 

 

 

 

 

 

 

 

 

 

30  

Frequently Asked Questions (FAQ)

Can I add multiple transactions simultaneously? 

‐You cannot add multiple transactions simultaneously. This system is based on single entry 

system. But just as you finish one transaction, you can continue with the same customer. This will make your job easier and faster. 

Can I change the username of the system? 

‐You cannot change the username of the system but you can change the password of the 

system. Your system will remain secure by changing password time and again.  

Will it run on a computer with common specifications? 

‐The system is built to use minimum resources as possible. So, this system will work fine in 

computer with common specifications. 

Can I print the reports? 

‐Reports cannot be printed. It can only be viewed on the screen. 

Do I have to calculate totals of a sales transaction? 

‐No you don’t have to calculate totals manually. You only have to enter the quantity to be sold. 

Totals are calculated automatically.