Вы находитесь на странице: 1из 329

Stop N Shop System

Sales And Stock Control Processing

Subject Code: 7010/2 Subject Title: Computer Studies Project Submitted by: Rayan Isran Senior II-S, The City School, Darakhshan Campus, Karachi.

Rayan Isran PK 530

Stop N Shop System

Sales And Stock Control Processing

Table of Contents
ANALYSIS.............................................................................................6 Company Profile ........................................................................................................7 Organizational Hierarchy..........................................................................9 Problem Definition................................................................................13 Description of the Existing System .......................................................................................................15 Data Capture.......................................................................................16 Inputs, Processes and Outputs .......................................................................................................17 ......................................................................................................18 Evaluation of the Existing System..............................................................19 Disadvantages of the Existing System..........................................................20 Suggested Improvements .......................................................................................................21 Aims and Objectives General Business Related Objectives .......................................................................................................22 Computer Related Objectives .......................................................................................................23 The Alternative Solutions .......................................................................................................26 Recommended System............................................................................30 Evaluation of Recommended System .......................................................................................................32 DESIGN..............................................................................................36
Gantt Chart............................................................................................................ 43 Minimum Hardware Specification .............................................................................................................................. 44 Minimum Software Specification .............................................................................................................................. 50

Rayan Isran PK 530

Stop N Shop System

Sales And Stock Control Processing

Table Design..........................................................................................................54

Relationships......................................................................................57 Forms Layout.......................................................................................58

.......................................................................................................58 Reports Layout.....................................................................................76 Menu Layout .......................................................................................................79 Reports Submenu..................................................................................79 ......................................................................................................80 Flowcharts..........................................................................................80 Reports............................................................................................112 IMPLEMENTATION................................................................................118 Table Design......................................................................................119
Overview of Database.........................................................................................119

Splash Screen Design View.....................................................................128 Login Form Design View .....................................................................................................142 Login Form View:................................................................................142 Main Menu:........................................................................................143 Items Form (Design View)......................................................................146

Rayan Isran PK 530

Stop N Shop System

Sales And Stock Control Processing

Form View.........................................................................................147 Supply Form (Design View).....................................................................151 Form View.........................................................................................152 Supplier Form (Design View)...................................................................156 Form View.........................................................................................157 Supply Details Form (Design View)............................................................161 Form View .....................................................................................................162 Sales Details Form (Design View)..............................................................166 Form View.........................................................................................167 Sales Form (Design View).......................................................................172 Form View.........................................................................................173
Items Report........................................................................................................178 Sales Report........................................................................................................180 Sales Details Report............................................................................................182 Supplier Report....................................................................................................184 Supply Report......................................................................................................188

Queries............................................................................................190 Tools & Techniques Used.......................................................................193 Access Documenter..............................................................................198 Program Code....................................................................................203 TESTING...........................................................................................240 Test Results.......................................................................................247 Conclusion........................................................................................295 DOCUMENTATION................................................................................298 Technical Documentation .....................................................................................................299 Items Form........................................................................................304 Supply Form......................................................................................312 Supplier Details Form...........................................................................316

Rayan Isran PK 530

Stop N Shop System

Sales And Stock Control Processing

Sales Details Form...............................................................................317 Reports Menu.....................................................................................322 EVALUATION......................................................................................325

Rayan Isran PK 530

Stop N Shop System

Sales And Stock Control Processing

ANALYSIS

Rayan Isran PK 530

Stop N Shop System

Sales And Stock Control Processing

Company Profile
Zeeshan Fazal is the owner of Stop N Shop, a well-known medical and super store in the local industry. He started this business in 2001 by acquiring a 23 yard shop located near Bilawal House, Karachi. His business first started out as a small and unstable shop, selling very few items at first. The development around the area encouraged Zeeshan to expand his business. He expanded his business in March 2002 and soon it became well-known in the locality. Initially he worked with his friend, but he later hired 3 persons to assist him in his business. Slowly and gradually, the store attracted more customers and Zeeshans profits increased dramatically. Stop N Shop is located in a locality with many shops, and therefore it attracts many customers. The shop consists of 3 freezers where frozen food and cold drinks are kept. Inside the shop, there are shelves where items are kept. The shop is quite small in the sense that there is less walking space and more room is occupied by the items. This makes it very difficult for customers to walk around and select items to buy.

Rayan Isran PK 530

Stop N Shop Sales And Stock Control Processing System There are many items however and it takes an employee time to search for a particular item. There is another room where extra stocks in packed boxes are reserved. They are unpacked whenever the shop is low on a particular item. There is a counter where items are bought and transactions are bought. Initially, Zeeshan used to write all these transactions manually in a register, but with the increasing number of customers it is becoming difficult and tedious for him to record these transactions manually. Zeeshan has hired employees to work at his store: 1 employee who works at the counter; 2 employees who search for items asked by customers (assistants); 2 employees responsible for reordering stock; 1 employee for supervising and managing the business. Since the superstore gained popularity from its customers, it became anticipated that a computerized system is needed in order to uphold the formality and reputation of the store. Not only this, but the hiring of extra staff and providing good relationship between the customers and the shopkeeper became an immediate necessity. Therefore the company applied various methods to achieve this, but was unsuccessful in doing so. Therefore a need is felt for computerizing this system. In 2009, a computerized system was needed keeping in view the increasing number of customers. By late 2009, This Company predicted that it will face a lot of problems in the upcoming years and so an immediate need was felt for the computerization of the existing system.

Rayan Isran PK 530

Stop N Shop System

Sales And Stock Control Processing

Organizational Hierarchy

Rayan Isran PK 530

Stop N Shop System

Sales And Stock Control Processing

List of Departments
Management Stock Control Billing Payroll Sales Management This department is responsible for the smooth running of the day-today activities in the store. It is managed by the manager, Haroon Hassan and the owner, Zeeshan Fazal. Stock Control This department ensures that goods are reordered whenever the current stock is low. It also ensures the stock is available for students at all times and checks for new item supplies occasionally. Billing This department is responsible for calculating the bill for the customer. It calculates the total cost of items the customer has bought, and the salesman gives the customer the bill. Payroll This department is in charge of the employees salary. The salary depends on how much a worker has worked and his service. Salary slips are given to the employees at the end of every month. Sales The sales team records to whom the company has sold its products

Rayan Isran PK 530

10

Stop N Shop Sales And Stock Control Processing System their respective prices. This data will come from the sales order. They may also be responsible for defining these output products.

Rayan Isran PK 530

11

Stop N Shop System

Sales And Stock Control Processing

Department Chosen
Stop N Shop is facing a number of problems regarding their manual system. The department I have selected is Sales and Stock Control. In this department, records of items are kept in old registers, which can easily be destroyed, misplaced or lost. The manager of the shop keeps the data of item stocks in a register. In order to ensure that the data is neither lost nor inaccurate, I have selected to computerize the stock control department of Stop N Shop. This department requires a computerized system which will record all info regarding items such as quantities, supplies, sales, etc. Due to the increase in the number of items bought, it became increasingly difficult for the staff to maintain stocks and sales. Therefore, the department faces a number of problems which paves hindrance in their way to provide the customers with efficiency. A computerized system will:

Be fast and efficient; Be accurate; Have storage space.

Rayan Isran PK 530

12

Stop N Shop System

Sales And Stock Control Processing

Problem Definition
The Stock Control department of Stop N Shop is not computerized. All of the work is done manually. This is causing a lot of problems for the company. 1. Outdated or inaccurate data The details of the items ordered such as the selling price or quantity are sometimes stored on old registers. As such, the data may be old and inaccurate and therefore the information present may not be required. 2. Wastage of Paper All the work has to be done on papers and requires files and registers to be kept in. A lot of space is consumed and the data has to be repeatedly recorded. This repetition of work also requires employment of additional staff. 3. Time-consuming and tedious The manual system is very tedious and time-consuming. The employees who are dealing with the stock control have to search for a particular item from a long list of items, which takes time. The items are also divided into sections, for example cold drinks and types of biscuits. This is a very slow and difficult task for the seller.

Rayan Isran PK 530

13

Stop N Shop Sales And Stock Control Processing System 4. The manual system is prone to errors Since all of the information is written by hand, errors may be made while entering data. If there was a computer system, it would be easy to check whether the input data is valid or not. If any invalid data would be entered, an error will be displayed by the computer, prompting the user to make amendments. E.g. a calculation mistake may be made while an employee is calculating the current stock of goods. 5. Stock Control is difficult. No efficient data storage system exists in the current system which results in difficulty to maintain the stock control. The calculation of stocks is done by surveying the canteen. If the employer misses out some products, the data entry will be wrong. The owner will purchase extra products which may not be required. When these products expire, the profit would be wasted.

Rayan Isran PK 530

14

Stop N Shop System

Sales And Stock Control Processing

Description of the Existing System


The existing system of the stock control system of Stop N Shop is all manual. The following are the tasks which are carried out by the existing system. First of all, a customer arrives at the store and asks for an item or items. The employee searches for the item(s) and gives it to the customer. If the item is not ready or available, the employee informs the item that is not available and the buyer leaves unsatisfied. If the item is available, the next step if followed and if it is not, it is ordered. The employee reads the price tag(s) of the item(s) and calculates the total cost. The customer pays accordingly. Once the customer pays, more calculations may be made to return any change.

The customer departs, and the employee waits for the next customer or checks if the sold item is sufficient enough in stock or more of it has to be ordered. If more is required, he writes it down in the register and waits until the proper time comes to place the order.

Rayan Isran PK 530

15

Stop N Shop System

Sales And Stock Control Processing

Data Capture

Rayan Isran PK 530

16

Stop N Shop System

Sales And Stock Control Processing

Inputs, Processes and Outputs


1. Item is purchased from a supplier:
Input: When some quantity of an item is bought from a supplier, its transaction is written down in the Supply Register. The Item code and description of the item purchased is mentioned along with Supplier ID and Supplier name. Whenever some quantity of an item is bought from a supplies, the transaction is written down in a register, known as the Supplies Register. The item code along with the description and name is mentioned every time a new item is bought. For example, a type of bread with the item code 1255 is purchased from a supplier. In this case, the item name would be Dawn bread. The cost price and the quantity of breads bought would also be mentioned. Process: The total amount of money is calculated using the following formula:

Total = Quantity of items * price of items


(This is the price/rate at which the items have been purchased form the supplier). Output: A hand-written receipt is given to the customer.

Rayan Isran PK 530

17

Stop N Shop System

Sales And Stock Control Processing

2. Item is sold to a customer:


Input: When an item is sold, the shop keeper looks up the page of the item in the register. Process: The total amount of money is calculated using the following formula:

Total = Quantity of item * price of item


(This is the price/rate at which the items have been purchased form the supplier). Ideally, when there are only a small number of items sold the customer, the shopkeeper will not fill in the register and write down a bill. This is because it is time-consuming and inconvenient for him, and would also keep other customers waiting. The Balance is calculated at the end of the month or sometimes even randomly to keep an eye on how much of each item is left in stock. At the end of the month, the Balance is calculated to keep an eye on how much of each item is left in stock. Output: A hand written receipt is given to the customer. Reports to the management are also output. They can be sales details reports, list of items sold the most reports or out of stock item reports.

Rayan Isran PK 530

18

Stop N Shop System

Sales And Stock Control Processing

Evaluation of the Existing System


Advantages of the Existing System Cheap and easy to use The present system is very cost-effective as there is no need of expensive equipment. It is also very easy to use and employees do not have to go through any particular training. Cost-effective Since no machines are needed, not much electrical units are consumed, cutting down the running costs. No data loss in a power failure Since the data does not rely upon computers, data is not lost in a power failure. This proves to be very useful since stock and sales data is not lost when necessary at times. Easy to implement The existing system is very simple and easy to implement. There is no need for machines so the work done is not complicated. The current system is also quite quick. No advanced skill required for the staff As no complicated machinery is used, the current employees that operate the stock control and sales system do not have to be very learned or educated. They can be moderately qualified.

Rayan Isran PK 530

19

Stop N Shop System

Sales And Stock Control Processing

Disadvantages of the Existing System


Too much paper usage
The current system uses a lot of paper for the storage of information of stocks, sales, supplies etc. The employee has to manage many registers at once, which leads to too much paper being used. Used up registers are kept aside, which may also mean that they can be misplaced or lost. The large number of registers used also means that a storage area such as a shelf is required.

Inaccurate data
Since huge amounts of data are kept, there are chances of transcription and transposition errors in generating reports. There is a more likelihood of miscommunication and human mistakes, which will produce inaccurate data. Illegible writing may also be responsible for damaged data.

The manual system is slow, time-consuming and tedious


The existing system is very slow, as many tasks are carried out, for example searching for an item may take a long time. It creates delays, causing the buyers to become impatient.

Insecure data
The registers are kept at the counter that is accessible to anyone. Anyone can easily tamper with the data. The registers can easily be damaged or stolen as they are not locked up.

More labor is required


In the manual system, a lot of tasks are carried out and therefore more labor is required.

Rayan Isran PK 530

20

Stop N Shop System

Sales And Stock Control Processing

Suggested Improvements
Proof-reading
Any transposition/transcription errors can give totally different totals. When dealing with huge amounts of data, human errors are more likely to occur. To avoid this, the data can be verified by the proof-reading method. The data is checked by double reading the data for any errors but is not specifically reliable.

Back-up of important data


Backup of important data can be kept by making photocopies of the data in the registers and keeping them in separate files.

Organized data
The data should be kept in an organized manner. Records in registers should be sorted alphabetically for easy searching.

Data safekeeping
The registers should be kept locked up in cabinets with keys available to minimum employees.

Training staff
Additional staff can be hired and trained for different tasks. For example, a separate employee can be hired for photocopying files. This will minimize human errors and may result in better data accuracy. It will also reduce the workload on a particular employee.

Rayan Isran PK 530

21

Stop N Shop System

Sales And Stock Control Processing

Aims and Objectives


General Business Related Objectives
To make the system fast and efficient
Using the manual system, the process of selling items is tedious. Searching for items takes time and transactions are calculated manually. My aim is to make the system fast using a computerized system. This would also increase customer satisfaction and the shop may also gain more popularity.

To cut down the costs


With the computerized system implemented, extra workers will no longer be required for writing/maintaining transactions and calculating costs. This will greatly increase the running cost and cut down the running costs. It will stabilize the monthly budgeting for Stop N Shop.

To maintain up-to-date data

To ensure that up to date, data is available at all times about items, prices, new supplies and sales.

To increase the level of customer satisfaction


By creating this software, my main aim is to ensure that customer satisfaction will improve as a result of quicker and more efficient transactions.

To avoid errors
The manual system is prone to errors as data is manually written on registers. Writing may also be illegible. With a computerized system, errors will be reported and transactions may be amended.
Rayan Isran PK 530

22

Stop N Shop System

Sales And Stock Control Processing

Computer Related Objectives


1. Accept valid data
The system will be coded in such a way that it will accept normal data which is within a set of rules defined by the user. For example, in the price form entering Rs.20 in the Cost Price field.

2. Accept extreme data


The system will accept extreme data. For example for the date of sale current date is the maximum value. This extreme value will be accepted but any date greater than the current date will be rejected as invalid data.

3. Reject invalid data


The system will reject all data with wrong length, type and format and also will not accept null values in specific fields. E.g. entering twentytwo in the age field will give an error because it is the wrong data type. The user will be prompted to make amendments.
4.

To ease updating of records

With the manual system, updating the item records meant more paper work. My aim is to deliver a system in which records of the items would be easily updated with the help of a computer without needing (extra) paper to store information.

5. To ease addition of records


With the manual system, adding the item records was more timeconsuming and more paper work was required. My aim is to deliver a system in which records of the items table would easily be added with the click of a button.

Rayan Isran PK 530

23

Stop N Shop System

Sales And Stock Control Processing

6. To make searching for records easy


The main problem for this shop is the organization of the records of items. As there are several items, searching is tedious for the staff. With the help of a computer, the staff will be able to find records with a click of a button. Searching for records will be much easier, as the staff will be able to search for item records at any time and retrieve data effortlessly and quickly.
7.

To ease deletion of records

Deleting records with the manual system mean throwing the papers away, this would be very unorganized and inefficient. With the new system in mind, I have planned to create a delete record button which would simply remove the current item from the items table.

8. To prevent data from being accessed by unauthorized people


With the manual system, the registers are available to everyone since it is kept in file cabinets which are not locked, and so the item data may be altered or damaged by unauthorized people. My aim is to make the item data more secure by using a login system. Only authorized staff will be able to access information about items. This will help the staff to prevent information about the items from being damaged or altered. It will also give more privacy.
9.

To ensure automatic display of item details

With the manual system, checking item details would be a hassle as the employee would have to search for the item in the register, which could have plenty of items. With the new system in mind, I have planned to display the item details automatically when an item code is clicked from a combo-box. The details would be displayed in separate textboxes.

10. To ensure automatic calculation of total


The system will be made to automatically calculate the total amount when items are added to the invoice. This will be done by using an add
Rayan Isran PK 530
24

Stop N Shop Sales And Stock Control Processing System item to invoice button which would add the item to the invoice. Each item an added, the total will increase by adding the item multiplied by the item quantity. This is much more efficient and more accurate than manually calculating the total.

11.To ensure combo-box is filled with Item IDs from item table
A combo box will be used to look up item details, rather than the employee having to manually look up the item detail. The combo-box will fetch item codes from the item table on the form load event and will be updated each item a new item is added.

12. To check generation of reports


With the manual system, generating a bill would be difficult and timeconsuming. My aim is to have buttons to easily and quickly generate reports which will be printed. Additionally, query reports would be added to lookup for a particular item/sale/stock and print them.

Rayan Isran PK 530

25

Stop N Shop System

Sales And Stock Control Processing

The Alternative Solutions


1. Hiring more staff
The company may hire more units of labor so that the work can be separated in to particular tasks and can be carried out by its specialists.

2. Use ready-made software


The company could use electronic organization soft wares which are already available in the market. This will consume less-time and errors will be minimized.

3. Computerization using Spreadsheets


Records can be computerized using spreadsheets, which will enable the sales person to perform searches quickly and accurately. Spreadsheet packages can easily carry out complex calculations with the help of formulae and functions.

4. Computerization using High Level Language Software


The shop can have a made to order software, created using a High Level Language, like Visual Basic. The software will be fully customized according to the shop's needs. Inserting, and editing records will be easy.

Rayan Isran PK 530

26

Stop N Shop System

Sales And Stock Control Processing

Evaluations of Alternatives
1. Hiring more staff
Advantages:
More tasks are carried out simultaneously. Takes less time to perform calculations. Minimizes the time wasted. A separate employee can be hired to do specific jobs so that the job is done more efficiently. E.g. an employee for organizing the item records and another for searching one particular item record.

Disadvantages
More money is spent hiring more employees. Errors can still occur in the calculation of numbers of patients in the tests due to poor mathematics or missing of any record or marks. Errors can still occur as it is manual checking and the human can let go any mistake in the document. Chances of human errors are still there.

Rayan Isran PK 530

27

Stop N Shop System

Sales And Stock Control Processing

2. Use ready-made software


Advantages:
The software will be user-friendly, easy and simple to use. Time will be saved as the work will not be done manually. The software will be error-free.

Disadvantages
The software may cost a lot of money. Some addition features may not be present in the software. The software will not be customized according to the wishes of the shop.

Rayan Isran PK 530

28

Stop N Shop System

Sales And Stock Control Processing

3. Computerization using spreadsheets


Advantages:
Very easy to store and view data as it is organized. This method has a low cost of implementation as it can be developed cheaply. Spreadsheet packages are capable of performing tasks very quickly, so time will be saved.

Disadvantages
A computer literate would be required who is familiar with spreadsheet packages. This will affect monthly costs. Data can be hacked as compared to databases and other software as there is no password protect in spreadsheet packages. The organization will not be very efficient and customizable compared to other software such as database software.

Rayan Isran PK 530

29

Stop N Shop System

Sales And Stock Control Processing

4. Computerization using High Level Language Software

Recommended System
In my opinion, computerization using a high level language software such as Visual Basic would be the best alternative solution for Stop N Shop. Reasons for its recommendations are as follows:

Reasons for Recommendation


Fast, accurate and reliable
Present day computers are very fast and are accurate due to validation checks. This will prevent invalid item records from being added to the database. Since computers are very fats, customers will not get annoyed waiting in queues for delays.

Less labor required


Since all the records are saved into the computer, item records can be easily found or added without the need of extra workers.

Secure
A login system can be made to prevent access from unauthorized personnel or hackers. This will make the system secure from theft.

Rayan Isran PK 530

30

Stop N Shop System

Sales And Stock Control Processing

Low running cost


The initial cost of the high level language software will be quite high, but the only running costs after that will be the power consumption cost and maintenance cost. Labor costs are also cut.

Easy and efficient data organization


The data can be organized efficiently in the form of tables and forms. Record searches are fast and simple. Data can easily be edited and sorted.

Easy to create backups and saving physical space


Backups will be very easy to create as they can simply be copied to USBs, flash disks, CD-ROMs, etc. Less space will also be occupied as there will be no need to keep cabinets to put registers in, only space for a computer will be required.

More customizable
Applications developed using a high level programming language are easily customizable and efficient than a database software.

Rayan Isran PK 530

31

Stop N Shop System

Sales And Stock Control Processing

Evaluation of Recommended System


Advantages:
The system would be easy to use and user-friendly. Searching, editing, deleting and adding records would be simple. Searching for a record will not become an annoyance as all records will be stored in a database which is organized and easy to retrieve data from. The system will be quite cheap, as there is no need to pay the salaries of the extra workers required in the previous system. Since the data will be stored in a computer, there will be no need of file cabinets. This will help save space and improve working conditions. Using a login system, data can be kept secure from hackers. This will make the proposed system safe and secure. There will be no need of hiring extra employees for certain jobs such as searching. The computer can perform all tasks such as searching/deleting/adding and even checking whether the data entered by the data entry operator is valid or not. All the grammatical and punctuation mistakes are always identified in MS Word. This special feature will prompt the data entry operator to make amendments. The software will be totally customizable according to the needs of the shop. Efficient and quick data organization as well as automatic reminders when the stock is low will be possible.

Rayan Isran PK 530

32

Stop N Shop System

Sales And Stock Control Processing

Rayan Isran PK 530

33

Stop N Shop System

Sales And Stock Control Processing

Disadvantages
Power usage will increase dramatically. This will increase electrical costs and therefore more money will be required. Power failures may occur which can lead to data loss and hardware malfunction. Sometimes, the system can breakdown if there is a power failure causing all data to be lost. Despite various security measures, the system will be vulnerable to viruses, Trojans, etc. A system specialist who is able to work with databases will be required. This again will affect monthly costs. Staff will be needed to trained to the computerized system. The initial expense of building the software will be very costly. Technical errors may be difficult to fix without programming knowledge.

Rayan Isran PK 530

34

IMPLEMENTATION

Stop N System

Objective #4 ShopTo ease updating of records

Simple command buttons will Sales And Stock Control be coded to allow the user to easily amend records. Simple command buttons will be coded to add records which would be saved to the database. Simple command buttons will be coded which will allow the user to search for a particular record at any time. Simple command buttons will be coded to delete records. A confirmation message will be shown before the action takes place as well. An effective authorization system will be created to secure data from unauthorized personnel. A login form will be created and a password will be required for verification.. A combo-box will be added to retrieve item data from the item tables, which will be displayed in text-boxes. Simple command buttons will be coded to automatically calculate the total cost for all items in the sales form. A combo-box will be coded to fetch item codes from the item table in the database.

Processing

4 days

Objective #5 To ease addition of records

3 days

Objective #6 To make searching for records easy

4 days

Objective #7 To ease deletion of records

3 days

Objective #8 To prevent data from being accessed by unauthorized people.

4 days

Objective #9 To ensure automatic display of item details

3 days

Objective #10 To ensure automatic calculation of total

1 week

Objective #11 To ensure combo-box is filled with Item Codes from item table Objective #12 To check report generation

1 week

Rayan Isran PK 530

The program will be coded in such a way that reports will easily be generated (simple or 35 based on queries) and can be printed.

1 week

Stop N Shop System

Sales And Stock Control Processing

DESIGN

Rayan Isran PK 530

36

Stop N Shop System

Sales And Stock Control Processing

Plan Of Action
Project Phase Objective(s) Task(s) Duration

Analyze the Existing System and identify the problem.

Observe the working(s) of the grocery store and hold discussions as well as interviews with the staff of the shop to identify and analyze the problem.

2 weeks

Analyzing the problems faced by Stop N Shop.

1 week

ANALYSIS

Evaluate the Existing System.

Identifying the Advantages and Disadvantages of the Existing System.

1 week

Suggesting improvements in the existing system.

1 week

Proposing alternative solutions to the problem and its evaluation

Suggest alternative solutions to the problem and evaluate them.

1 week

Recommending a solution and present its reason for recommendation.

1 week

Rayan Isran PK 530

37

Stop N Shop System

Sales And Stock Control Processing

Writing down the plan of action and details of the project.

Planning the targets to achieve and their deadlines.

1 week

Deciding the deadlines of the project.

1 week

Coming up with different techniques for the solution of the problem. DESIGN

Design the System Flowcharts.

1 week

Finalize the designs.

1 week

Correcting the flowcharts.

1 week

Deciding on hardware and software requirements.

Analyze the hardware and software requirements of the computerized system. Decide which hardware should be used for the computerized system and ensure that they are (easily) available in the market.

3 days

4 days

Rayan Isran PK 530

38

Stop N Shop System

Sales And Stock Control Processing

Rayan Isran PK 530

39

Stop N Shop System

Sales And Stock Control Processing

Rayan Isran PK 530

40

Stop N Shop System

Sales And Stock Control Processing

Rayan Isran PK 530

41

Stop N Shop System

Sales And Stock Control Processing

DOCUMENTATION

Thorough documentation (both user and technical) in order to facilitate maintenance and modification of the system and to guide the user of the system.

Create a user document, which should only concern the user and serve as a manual. Create a technical document about how the system works.

2 weeks

SYSTEM EVALUATION

Evaluate the new system. Check and ensure that all objectives have been accomplished. 1 week

Describe future improvements that could be made, and how they can be expanded.

Write down and describe plans for the future development. 1 week

Total Duration:

26 weeks

Rayan Isran PK 530

42

Stop N Shop System

Sales And Stock Control Processing

Gantt Chart
Gantt Chart
Plan of Action
Project Activities
August 2 3 September 1 2 3 4

Months (Each small square represents one week)


October 2 3 4 November 1 2 3 4 December 1 2 3 4 January 2 3 4 Feburary 2 3 4

Analysis

Design

Implementation

Testing

Documentation

Evaluation

Rayan Isran PK 530

43

Stop N Shop System

Sales And Stock Control Processing

Minimum Hardware Specification


The minimum hardware requirements for the computerized system are:

Processor Intel Pentium IV HT (Hyper-Threading) Processor Features: Max CPU Clock Rate 1.3GHz to 3.8 GHz Minimum feature size 180 nm to 65 nm Instruction set for x86 (i386), x86-64, MMX, SSE, SSE2, SSE3 Sockets: Socket 423, Socket 478, LGA 775 4mb cache Reasons for Recommendation: A fast processor like Pentium IV HT (Hyper Threading) would allow all the processing to be carried out faster and due to speed, a lot of time could be saved in processing data and generating receipts in the shop. Furthermore, the Sales and Stock processing system requires fast processors to maintain its reputation within the environment and to provide the finest and efficient service to the customers. It is also very compatible with all the latest peripheral devices such as USBs or latest printers.

Rayan Isran PK 530

44

Stop N Shop System

Sales And Stock Control Processing

Motherboard Intel Desktop Board D915GVWBL - Motherboard - Micro ATX - i915GV Features: Micro ATX - LGA775 Graphics adapter Sound card Network adapter Compatible with Pentium IV Reasons for Recommendation: One of the benefits of using an Intel Desktop Board D915GVWBL Motherboard is that it is cheap yet efficient and is very compatible with Pentium IV. It also contains integrated features such as Intel Graphics Media Accelerator 900, PCI Express graphics, Intel High Definition Audio and Intel Pro 10/100 LAN (optional). RAM Intel RC440B 512MB RAM Features: Standard RAM 64 Memory 512 Maximum RAM 2 Slots Reasons for Recommendation: An Intel PC440B RAM would be ideal for the computerized system as it contains enough RAM to store more memory so that it can run more efficiently. This will allow the computer to carry out process more and generate receipts quicker. Therefore, a high capacity RAM is recommended in order to achieve a quick response rate from the computer.

Rayan Isran PK 530

45

Stop N Shop System Hard Disk Intel X-25 Solid State Drive Features: 40 GB Capacity Average transfer rate of 150MBps

Sales And Stock Control Processing

Reasons for Recommendation: A hard disk with a large capacity will allow the Stop N Shop company to store large amounts of data about items, sales, supplies and other sorts of details. The company could also partition the hard disk and organize its data more efficiently e.g. item details and sales details can be organized into separate hard disks. The hard disk would also not have to be upgraded because 40 GB of memory is more than enough for the system. LCD Monitor A liquid crystal display (LCD) is a thin, flat display device made up of any number of color or monochrome pixels arrayed in front of a light source or reflector. Features: 17 Screen Active TFT screen Integrated power adapter

Reasons for Recommendation: A 17 LCD monitor will give a sharp image quality so whenever something needs to be scanned, it will give a sharp image this will make generated reports look clear. LCD monitors also have the features of high resolutions and will provide sharp quality images for accessing important scanned documents in the shop.

Rayan Isran PK 530

46

Stop N Shop System

Sales And Stock Control Processing

Printer HP 2932A Dot-Matrix Printer used for printing important files. Features: 12 pin printer 200 CPS printer speed Reasons for Recommendation: The HP 2932A Dot-Matrix Printer has the ability to print documents quite fast. It also consumes less ink compared to other printers and its printing rate is quite fast. This would save the employees time as well as the customers time. Scanner HP Scanjet G2410 Flatbed Scanner Features: Capture crisp, clear scans of photos and 3D objects Turn documents into editable text Scan and copy at the touch of a button Easy connectivity through USB 2.0 1200 dpi resolution 48 bit color Edit, organize and share scans with integrated user-friendly software Reasons for Recommendation: I recommend the HP Scanjet G2410 Flatbed Scanner because it has the ability to convert documents into text that can be edited using OCR technology. This will be very useful when an employee wants to scan a document or image to look up the price of an item and other such details. It also gives a clear and sharp image which can easily be seen. This is important for the salesman to ensure that details of the system such as item quantity are correct. This scanner is also easily available in the market and is not very expensive, thus it is a suitable choice for the Stop N Shop Sales and Stock processing system.
Rayan Isran PK 530
47

Stop N Shop System Keyboard 101 Keys Standard Keyboard

Sales And Stock Control Processing

101 keys, including ones for special functions, e.g. Numpad. Fast text insertion through Windows clipboard. Plug and Play 1.5m cable Compatible with Window 9x/Me/NT/2000/XP/2003/Windows 7/Vista Reasons for Recommendation: I recommend the 101 standard keyboard as it is economical and is very easy to input data. It does not require any new training and it functions almost like a typewriter. It will be very easy to use because of its simplicity. It is also not very noisy. It will help to reduce noise levels as the employees can concentrate on what work they are doing. Mouse USB Optical Mouse Features: Plug and Play 800 DPI Three buttons + single wheel 1.5m cable Compatible with Window 9x/Me/NT/2000/XP/2003/Windows 7/Vista

Reasons for Recommendation: A USB Mouse should be used as it is a compatible device and makes the program user-friendly. When connecting a USB mouse into a computer, there is no need of a restart. The mouse will not only provide great precision but will allow for faster scrolling speeds. Moreover, due to its optical technology, the mouse can work on any type of surface. It also comes with an extra button which can be easily customized to print a receipt or to open the program with the click of a button
Rayan Isran PK 530
48

Stop N Shop System UPS (Uninterrupted Power Supply) Belkin 1200VA Universal UPS Features: Serial/USB Ports 5-6 hours backup time integrated shutdown software included 3 battery back-up sockets

Sales And Stock Control Processing

Reasons for Recommendation: The Belkin 1200VA Universal UPS is cheap and easily available in the market. It also provides a backup time of 5-6 hours which is enough for the employees to save their work. This is crucial when a database is being accessed and used as a power failure may cause hardware and other equipment to malfunction. Rewriteable DVD Writer HP dvd1260i DVD Writer Features: Built-in placement Fully equipped with 24X recording DVD +R, DVD-R 2MB Buffer Size Can support CD-ROM/DVD-R/DVD+R/DVD-ROM/CD-RW/CD-R and plenty of other memory Max DVD burn speed 24X Reasons for Recommendation: I recommend the HP dvd1260i DVD Writer because of its enormous storage capacity its storage capacity is double that of an ordinary CD. This will allow the Stop N Shop company to back up their item details and other important documents. The item archive can then be saved. The quality of the HP dvd1260i DVD Writer is much better compared to other storage devices and data can be read as if it is being processed on a harddisk. This will be extremely useful in generating receipts and creating backups of files.
Rayan Isran PK 530
49

Stop N Shop System

Sales And Stock Control Processing

Minimum Software Specification


Operating System Windows XP Professional Version 2002 Service Pack 3 Reasons for Recommendation: Windows XP is an advanced and powerful operating system which is compatible with the Pentium IV Processor. It is important for storing item data which the employee will look up to every now and then. There will be no need of installing CD burning software as it is already built-in Windows XP. This will allow the company to back up their previous data on to CD in case there are no DVDs. Windows XP also includes built-in driver support so that installing drivers is not necessary. Microsoft Visual Basic 6.0 Visual Basic will be used as a front-end. All forms and menus which will be used to look up item and sales information will be designed in Visual Basic. It is highly compatible with other software and gives form a professional look. Visual Basic provides convenient tools to implement a database project, which is why it was selected for the Stop N Shop sales and stock processing system. Visual Basic provides a user-friendly GUI and offers a standard help file in case of problems. A drawback is that it requires basic programming knowledge, extensive programming and the language has to be learnt for the project to be made.

Reasons for Recommendation: Visual Basic 6.0 is user-friendly for both the user and the programmer. It is ideal software for developing a sophisticated database project as it contains useful database tools. It is very easy to edit data and formatting is trouble-free. It allows forms to be designed professionally, which is very important as almost every system requires reports and Visual Basic 6.0 allows reports to be easily designed and printed.

Rayan Isran PK 530

50

Stop N Shop Sales And Stock Control Processing System Visual Basic 6.0 provides the user with many controls such as command buttons, textboxes and GUI based forms. Aside from the fact that VB 6.0 provides an excellent environment, the syntax is also much simpler as compared to many other languages and it provides exceptional facilities to extend the project in the future. Microsoft Access (2007 Version) MS Access will be used as a back-end to save item records, sales details and supplier information in the form of a database structure. It allows us to create relationships with the tables created. The table for the item description will be linked to the item sales and supply details with a oneto-many relationship whereas the item supply information will be linked to the supplier details. This is very handy when working with Visual Basic 6.0 as all the required data is fetched from the database. It is therefore very important to back up this file. MS Access is very user-friendly, easy to use with simple database structures. It has proper wizard features to guide the user and provides a clear help file. It needs low hardware requirements and is simple to work with. A minor disadvantage is that some unwanted features are there which consume extra space while other essential ones are missing. Reasons for Recommendation: MS Access is user-friendly, flexible and easy to use. It is simple to create tables for item information, sales details and supply details in an organized format. One of the bigger advantages of using MS Access is that relationships can be created between tables to correlate data in many ways and ensure the consistency of this data in several ways. MS Access is ideal for constructing the database for Stop N Shop as editing data is trouble-free and a clear help file is provided to guide the user. Records can easily be edited, updated, deleted and created. The interface style is very familiar so users who have used other products will not be lost when working with MS Access. Hence I have chosen MS Access to create the database for item, sales and supply details for the Stop N Shop Sales and Stock Control processing system.

Rayan Isran PK 530

51

Stop N Shop Sales And Stock Control Processing System MS Word Microsoft Word will be used to provide user documentation for the user and technical documentation for the programmer. It will show information about the company background, the software and required hardware for the system, how the software is used and other such details. It is user-friendly and easy to use word processing software which is widely understood. It provides plenty of features to format and modify text documents. Reasons for Recommendation: MS Word is user-friendly, easy to use and flexible. It is simple to format information regarding the item as well as sales details and supply details. Flowcharts to demonstrate how the system works will be easy to implement as MS Word provides an excellent environment with Auto shapes, tables and other designing tools. Avast! Anti-Virus Avast! is an anti-virus software made by the company AVAST in 1988 when computer viruses were becoming increasingly prevalent. It is a widely used anti-virus software with 130 million users worldwide (as of September 2010). It also has the ability to detect and remove rootkits, spyware and malware and can protect its own files and processes from being damaged by malware. It can remove infections that load on Windows start-up and features audible alarms that alert the user for any detected viruses. Avast! It is necessary for the Stop N Shop Sales and Stock Control system to prevent it from being damaged/deleted or malfunctioned. It is required to prevent unauthorized hackers from stealing or modifying data. Reasons for Recommendation: I have chosen to use Avast! Anti-virus software as it is freeware and can work on any system. It can quickly detect viruses and remove them, which will be essential to wipe out viruses in the Stop N Shop system. Additionally, it has audible alarms with vocal warnings to clearly alert the employee for any detected viruses.

Rayan Isran PK 530

52

Stop N Shop System

Sales And Stock Control Processing

METHOD OF SOLUTION

Rayan Isran PK 530

53

Stop N Shop System

Sales And Stock Control Processing

Table Design
Table Name: Item Primary Key: Item Code

Field Name
Item Code Description Expiry Date Supplier Cost Price Price Reorder level Reorder Quantity Current Quantity

Data Type
Long Integer Text Date/Time Text Text Text Long Integer Long Integer Long Integer

Maximum Length
4 20 8 20 5 5 4 4 4

Table Name: Sales Primary Key: Receipt Number

Field Name
Receipt Number Date

Data Type
Text Date/Time

Maximum Length
4 8

Rayan Isran PK 530

54

Stop N Shop Sales And Stock Control Processing System Table Name: Sales Details Composite Primary Keys: Receipt Number and Serial Number

Field Name Receipt Number Serial Number Item Code Quantity

Data Type Long Integer Long Integer Long Integer Long Integer

Maximum Length 4 4 4 4

Table Name: Supply Primary Key: Supplier ID

Field Name
Receipt Number Date Supplier

Data Type
Long Integer Date/Time Text

Maximum Length
4 8 40

Rayan Isran PK 530

55

Stop N Shop System Table Name: Supplier Primary Key: Receipt Number

Sales And Stock Control Processing

Field Name
Supplier ID Name Contact Person Address Phone Mobile Email

Data Type
Long Integer Text Text Text Long Integer Long Integer Text

Maximum Length
4 20 50 80 4 4 40

Table Name: Supply Details Composite Primary Key: Receipt Number and Serial Number

Field Name
Receipt Number Serial Number Item Code

Data Type
Long Integer Long Integer Long Integer

Maximum Length
4 4 4

Rayan Isran PK 530

56

Stop N Shop System

Sales And Stock Control Processing

Relationships
Sales Details Item ItemCode
ItemDescription ExpiryDate Supplier CostPrice Price ReorderLevel ReorderQty CurrentQty
1 M 1

ReceiptNo
1 M

Sales
M 1

ReceiptNo Date

Serial No ItemCode Quantity

Supply Details
ReceiptNo SerialNo ItemCode Supply ReceiptNo
M

Supplier SupplierID
M

Date Supplier

Name ContactPerson Address Phone Mobile Email

Rayan Isran PK 530

57

Stop N Shop System

User ID Password Password

Sales And Stock Control Processing

Re-order Level Logo Re-order Quantity

Current Quantity

Cost Price

Selling Price

Forms Layout

Form Name: Login Form. Purpose: A login form has been implemented in order to keep data more secure and safe from unauthorized personnel. Only authorized staff of the Stop N Shop Company will be able to access the data by entering a valid password.

Rayan Isran PK 530

58

Stop N Shop System

Sales And Stock Control Processing

Rayan Isran PK 530

59

Stop N Shop System

Sales And Stock Control Processing

Form Name: Item Purpose: to view, edit and enter information about the items in Stop N Shop. Logo Stop N Shop Items Form (1) Item Code Description Expiry Date Supplier Cost Price Reorder Level Price Reorder Quanity Current Quantity Main Menu Edit Record Delete Record Save Record (11) (7) (8) (9) Add Record Find Record ADItem s (12) (3) (4) (5) (6) First Record Previous Record Next Record Last Record (2)

(10)

Rayan Isran PK 530

60

Stop N Shop System

Sales And Stock Control Processing

(1)

The user will enter a unique code for the new item.

(2)

After entering the Item Code, the description of the item is entered.

(3), (4), (6), (8)

These values will also have to be entered by the user.

(5)

The price at which the item has been bought will be entered. The user will only have to enter the digits; it will automatically be converted to Rs..

(7)

The price at which the item has to be sold will be entered. The user will only have to enter the digits; it will automatically be converted to Rs..

(10),(11)

The user can click on these command buttons to perform predefined tasks. This is an ADODC control connected between the table and the form.

(12)

Rayan Isran PK 530

61

Stop N Shop System

Sales And Stock Control Processing

ALGORITHM ITEMS FORM


1. PROMPT USER TO FILL IN ITEMS INFORMATION 2. IF THE USER CLICKS NEXT BUTTON THEN 3. GO TO NEXT RECORD 4. IF THE USER CLICKS FIRST BUTTON THEN 5. GO TO FIRST RECORD 6. IF THE USER CLICKS LAST BUTTON THEN 7. GO TO LAST RECORD 8. IF THE USER CLICKS PREVIOUS BUTTON THEN 9. GO TO THE PREVIOUS RECORD 10. IF THE USER CLICKS DELETE BUTTON THEN 11. DELETE RECORD AND SHOW NEXT RECORD 12. IF THE USER CLICKS SAVE RECORD THEN 13. SAVE THE RECORD 14. IF THE USER CLICKS MAIN MENU 15. CLOSE FORM, OPEN MAIN MENU 16. IF THE USER CLICKS ADD RECORD THEN 17. ADD RECORD 18. IF THE USER PRESSES SEARCH BUTTON 19. ASK ITEM ID TO SEARCH 20. SEARCH RECORD 21. END IF 22. END

Rayan Isran PK 530

62

Stop N Shop System

Sales And Stock Control Processing

Form Name: Sales Purpose: To view, edit and enter all the transactions that take place between the T.M Electronics and its customers.

Logo Receipt Number Date (1) (2)

Stop N Shop Sales form Todays Date

Look Up Items Sales Details (Data Grid) Receipt Serial Item Number Number Code Quantity First Record Previous Record Next Record (3) Last Record Select Item Item Code Description Selling Price Quantity (5)

(7)

Total Rs Amount Paid Balance (4) ADDetail s ADSales ADItems Go To Submenu Find Record Delete Record Save Record Calculate Total Calculate Balance

Add Record Print Record

Add Invoice Print Invoice

(6)

(5)

Rayan Isran PK 530

63

Stop N Shop System

Sales And Stock Control Processing

(1)

The Receipt Number will automatically be generated. It will not have to be entered by the user.

(2), (3)

This is where the date of the sales transaction is added. It can be manipulated using the DT Picker control on the right.

(3)

This is a Data grid within the Sales form. The grid has been formed from the Sales Details table as the Sales and Sales Details tables have been linked together by the Receipt Number field. The grid will show the details of the particular receipt number; the items sold, their prices, quantities etc.

(4)

All the subtotals and balance will be added up automatically and displayed over here.

(5)

The user can click on these command buttons to perform predefined tasks.

(6) (7)

These are the ADODC controls which are used to connect Tables to Forms.

This is a combo box. The combo box will display the Item Code from the Items Table. The user will select the appropriate Item Code and its details will appear in the textboxes.

Rayan Isran PK 530

64

Stop N Shop System

Sales And Stock Control Processing

ALGORITHM FOR SALES FORM


1. PROMPT USER TO FILL IN ITEMS INFORMATION 2. IF THE USER CLICKS NEXT BUTTON THEN 3. GO TO NEXT RECORD 4. IF THE USER CLICKS FIRST BUTTON THEN 5. GO TO FIRST RECORD 6. IF THE USER CLICKS LAST BUTTON THEN 7. GO TO LAST RECORD 8. IF THE USER CLICKS PREVIOUS BUTTON THEN 9. GO TO THE PREVIOUS RECORD 10. IF THE USER CLICKS DELETE BUTTON THEN 11. DELETE RECORD AND SHOW NEXT RECORD 12. IF THE USER CLICKS SAVE RECORD THEN 13. SAVE THE RECORD 14. IF THE USER CLICKS MAIN MENU 15. CLOSE FORM, OPEN MAIN MENU 16. IF THE USER CLICKS ADD RECORD THEN 17. ADD RECORD 18. AUTOMATICALLY READ DATE FROM THE SYSTEM 19. LOOKUP ITEM PRICE AND DESCRIPTION 20. CALCULATE TOTAL 21. ENTER AMOUNT PAID 22. UPDATE CURRENT QUANTITY IN STOCK 23. CALCULATE BALANCE 24. IF THE USER PRESSES SEARCH BUTTON 25. ASK RECEIPT NO. TO SEARCH 26. SEARCH RECORD 27. END IF 28. END

Rayan Isran PK 530

65

Stop N Shop System

Sales And Stock Control Processing

Form Name: Supplier Purpose: To edit, modify and input data into the supplier form. Purpose:

Logo Supplier ID

Stop N Shop Supplier Form

Name

(1) (2) First Record Last Record Next Record Previous Record (8)

Contact Person

(3) (4) (5)

Address (6) Phone Add Record Mobile Search Record Email Delete Record Save Record (7)

Edit Record Go To Submenu

(9)

Form Description: The suppliers form will contain details about a supplier.

(1) - (7)

All of these details about the supplier will be typed in by the user. The Supplier ID will be the unique code given to identify the supplier.

(8), (9)

The user can click on these command buttons to perform predefined tasks.

Rayan Isran PK 530

66

Stop N Shop System

Sales And Stock Control Processing

ALGORITHM SUPPLIER FORM


1. PROMPT USER TO FILL IN ITEMS INFORMATION 2. IF THE USER CLICKS NEXT BUTTON THEN 3. GO TO NEXT RECORD 4. IF THE USER CLICKS FIRST BUTTON THEN 5. GO TO FIRST RECORD 6. IF THE USER CLICKS LAST BUTTON THEN 7. GO TO LAST RECORD 8. IF THE USER CLICKS PREVIOUS BUTTON THEN 9. GO TO THE PREVIOUS RECORD 10. IF THE USER CLICKS DELETE BUTTON THEN 11. DELETE RECORD AND SHOW NEXT RECORD 12. IF THE USER CLICKS SAVE RECORD THEN 13. SAVE THE RECORD 14. IF THE USER CLICKS MAIN MENU 15. CLOSE FORM, OPEN MAIN MENU 16. IF THE USER CLICKS ADD RECORD THEN 17. ADD RECORD 18. IF THE USER PRESSES SEARCH BUTTON 19. ASK SUPPLIER ID TO SEARCH 20. SEARCH RECORD 21. END IF 22. END

Rayan Isran PK 530

67

Stop N Shop System

Sales And Stock Control Processing

Form Name: Supply Purpose: To view, edit and enter all the details of the supplies received by T.M Electronics from its Suppliers.

Receipt Logo Number

Stop N Shop Supply Form (1) (2) First Record Last Record Next Record Previous Record (4)

Date

Supplier

(3)

Add Record Search Record

Delete Record Save Record

Edit Record Go To Submenu (5)

Rayan Isran PK 530

68

Stop N Shop System

Sales And Stock Control Processing

Form Name: Supply Form Description: This is the supply form, it contains information about a supply, including the receipt number of the supply and the suppliers name.

(1)

This is the receipt number of the supply given; it is a unique for each supply.

(2)

This is a text box that will contain the date of the supply. It can easily be changed.

(3)

The user will type the name of the supplier in this text box, so as to identify each supply number with the suppliers name.

(4), (5)

The user can click on these command buttons to perform predefined tasks.

Rayan Isran PK 530

69

Stop N Shop System

Sales And Stock Control Processing

ALGORITHM SUPPLY FORM


1. PROMPT USER TO FILL IN ITEMS INFORMATION 2. IF THE USER CLICKS NEXT BUTTON THEN 3. GO TO NEXT RECORD 4. IF THE USER CLICKS FIRST BUTTON THEN 5. GO TO FIRST RECORD 6. IF THE USER CLICKS LAST BUTTON THEN 7. GO TO LAST RECORD 8. IF THE USER CLICKS PREVIOUS BUTTON THEN 9. GO TO THE PREVIOUS RECORD 10. IF THE USER CLICKS DELETE BUTTON THEN 11. DELETE RECORD AND SHOW NEXT RECORD 12. IF THE USER CLICKS SAVE RECORD THEN 13. SAVE THE RECORD 14. IF THE USER CLICKS MAIN MENU 15. CLOSE FORM, OPEN MAIN MENU 16. IF THE USER CLICKS ADD RECORD THEN 17. ADD RECORD 18. IF THE USER PRESSES SEARCH BUTTON 19. ASK RECEIPT ID TO SEARCH 20. SEARCH RECORD 21. END IF 22. END

Rayan Isran PK 530

70

Stop N Shop System

Sales And Stock Control Processing

Form Name: Supply Details Purpose: This form is used to supply additional information about a supply.

Receipt Logo Number

Stop N Shop Supply Details Form (1) (2) First Record Last Record Next Record Previous Record (4)

Serial Number

Item Code

(3)

Add Record Search Record

Delete Record Save Record

Edit Record Go To Submenu

(5)

Rayan Isran PK 530

71

Stop N Shop System

Sales And Stock Control Processing

ALGORITHM SUPPLY DETAILS FORM


1. PROMPT USER TO FILL IN ITEMS INFORMATION 2. IF THE USER CLICKS NEXT BUTTON THEN 3. GO TO NEXT RECORD 4. IF THE USER CLICKS FIRST BUTTON THEN 5. GO TO FIRST RECORD 6. IF THE USER CLICKS LAST BUTTON THEN 7. GO TO LAST RECORD 8. IF THE USER CLICKS PREVIOUS BUTTON THEN 9. GO TO THE PREVIOUS RECORD 10. IF THE USER CLICKS DELETE BUTTON THEN 11. DELETE RECORD AND SHOW NEXT RECORD 12. IF THE USER CLICKS SAVE RECORD THEN 13. SAVE THE RECORD 14. IF THE USER CLICKS MAIN MENU 15. CLOSE FORM, OPEN MAIN MENU 16. IF THE USER CLICKS ADD RECORD THEN 17. ADD RECORD 18. IF THE USER PRESSES SEARCH BUTTON 19. ASK ITEM ID TO SEARCH 20. SEARCH RECORD 21. END IF 22. END

Rayan Isran PK 530

72

Stop N Shop System

Sales And Stock Control Processing

Form Description: This form contains additional information about a supply, for example the item code related to the receipt number of the supply.

(1)

This is the receipt number of the supply given; it is a unique for each supply.

(2)

This is the serial number, a unique identifying number to indentify an item.

(3)

The user will type in the item code related to the supply; i.e. the name of the item being supplied.

(4), (5)

The user can click on these command buttons to perform predefined tasks.

Rayan Isran PK 530

73

Stop N Shop System

Sales And Stock Control Processing

Form Name: Sales Details Purpose: This form is used to supply additional information about a sales transaction.

Logo Receipt Number (1) (2) Item Code (3) (4) Quantity

Stop N Shop Sales Details

Serial Number

First Record Last Record Next Record Previous Record (5)

Add Record Search Record

Delete Record Save Record

Edit Record Go To Submenu

(6)

Rayan Isran PK 530

74

Stop N Shop System

Sales And Stock Control Processing

Form Description: This form contains additional details about a sales transaction between the customer and the Stop N Shop Company.

(1)

This is the receipt number of the supply given; it is a unique for each supply.

(2)

This is the serial number, a unique identifying number to identify an item.

(3)

The user will type in the item code related to the supply; i.e. the name of the item being supplied.

(4)

The user will input the quantity of the item used over here. The user can click on these command buttons to perform predefined tasks.

(5), (6)

Rayan Isran PK 530

75

Stop N Shop System

Sales And Stock Control Processing

ALGORITHM SALES DETAILS FORM


1. PROMPT USER TO FILL IN ITEMS INFORMATION 2. IF THE USER CLICKS NEXT BUTTON THEN 3. GO TO NEXT RECORD 4. IF THE USER CLICKS FIRST BUTTON THEN 5. GO TO FIRST RECORD 6. IF THE USER CLICKS LAST BUTTON THEN 7. GO TO LAST RECORD 8. IF THE USER CLICKS PREVIOUS BUTTON THEN 9. GO TO THE PREVIOUS RECORD 10. IF THE USER CLICKS DELETE BUTTON THEN 11. DELETE RECORD AND SHOW NEXT RECORD 12. IF THE USER CLICKS SAVE RECORD THEN 13. SAVE THE RECORD 14. IF THE USER CLICKS MAIN MENU 15. CLOSE FORM, OPEN MAIN MENU 16. IF THE USER CLICKS ADD RECORD THEN 17. ADD RECORD 18. IF THE USER PRESSES SEARCH BUTTON 19. ASK ITEM ID TO SEARCH 20. SEARCH RECORD 21. END IF 22. END

Rayan Isran PK 530

76

Stop N Shop System

Sales And Stock Control Processing

Reports Layout
(logo)
Stop N Shop Items Report Item Code Description Expiry Date Supplier Cost Price Reorder Level 9999 XXXXXXXXXXXXXXXXXXXX DD/MM/YYYY XXXXXXXXX 9999 9999 9999 9999 9999 Stop N Shop Sales Report Receipt No Date 9999 DD/MM/YYYY Stop N Shop Supplier Report Supplier ID 9999

Price Reorder Quantity Current Quantity

(logo)

(logo)

Rayan Isran PK 530

77

Stop N Shop System


Name Contact Person Address Phone Mobile Email Address

Sales And Stock Control Processing


XXXXXXXXXXXXXXXXXXXXXXX 999999999999999 XXXXXXXXXXXXXXXXXXXXXXX 9999999999 9999999999 XXXXXXXXXXXXXXXXXXXXXXX

(logo)

Stop N Shop Supply Report

Receipt No Date Supplier

9999 DD/MM/YYYY 9999

(logo)

Stop N Shop Supplier Details Report

Receipt No Serial Number Item Code

9999 9999 9999

(logo)

Stop N Shop Sales Details Report

Rayan Isran PK 530

78

Stop N Shop System


Receipt No Serial Number Item Code Quantity 9999 9999 9999 9999

Sales And Stock Control Processing

Rayan Isran PK 530

79

Stop N Shop System

Sales And Stock Control Processing

Menu Layout
Main Menu
Forms Submenu

Forms Submenu
Item Description Supplier

Reports Submenu Exit

Sales Sales Details Supply

Supplier Details Submenu Reports Main Menu

Reports Submenu
Search Report Report Items Report Sales Report Sales Details Report Supply Report Supplier Report Supplier Details Report Sales Details Report Supply Report Simple Items Report Sales Report Sales Details Report Supply Report Supplier Report Supplier Details Report Sales Details Report Supply Report

Rayan Isran PK 530

80

Stop N Shop System

Sales And Stock Control Processing

Flowcharts
Login

Frmlogin

Enter password

Display message Invalid Password, try again!

If passwor d is correct

No

Yes Main Menu

Main Menu

Rayan Isran PK 530

81

Stop N Shop System


Main Menu

Sales And Stock Control Processing

Display Message "Main Menu" Display Choices View Forms View Reports Exit If Choice =

View Forms Submenu

View Reports Submenu

Exit (yes/no)

Main Menu

If Choice =

End

Rayan Isran PK 530

82

Stop N Shop System


Forms Submenu

Sales And Stock Control Processing

View Forms Submenu

Display Message "View Forms"

Display Choices Item Description Sales Sales Details Supply Supplier Supply Details Submenu Reports Main Menu If Choice =

Supply Details

Item Description

Sales

Supplie r

Supply

Sales Details

Main Menu

Submen u Reports

Rayan Isran PK 530

83

Stop N Shop System

Sales And Stock Control Processing

Display Message "Submen u Reports" Display Choices Search Report ReportsItems Report Sales Report Sales Details Report Report Supplier Report Supply Report Report Supplier Details Report Submenu Forms Main Menu Simple 1. Item Report 2. Sales Report 3. Sales Details 4. Supply Report 5. Supplier Details 6. Supplier Report

If Choice =

1 Item Description Report Sales Report

3 Supply Report

4 Sales Details Report

5 Supplier Report

6 Supplier Details Report

Rayan Isran PK 530

84

Search Search Item Item Code

Search Search Supplier ID

Search Search Supplier ID

Search Search Receipt Number Number

Search Search Receipt Number Number

Search Item Item Code Code

Stop N Shop System


Back to Main Menu

Sales And Stock Control Processing

Back to Main Menu

Back to Main Menu

Main Menu

Rayan Isran PK 530

85

Stop N Shop System


Items Form Add Record

Sales And Stock Control Processing

Add Record in Items Form

Read Items Table Enter Item Code Enter Description Enter Expiry Date Enter Supplier Enter Cost Price Enter Reorder Level Enter Price Enter Reorder Quantity Enter Current Quantity Save Record Items Table

Items Table

Rayan Isran PK 530

86

Stop N Shop System


Items form Edit Record

Sales And Stock Control Processing

Edit Record in Items Form

Please Enter Item Code

Read Items Table Search for Item Code Items Table

Message: Item Code not found

No

Item Code Found = Yes

Items Form Make changes or Edit the Record as required

Save Changes

Items Table

Rayan Isran PK 530

87

Stop N Shop System


Items Form Delete Record

Sales And Stock Control Processing

Delete Record in Items Form

Please Enter Item Code

Read Items Table Search for Item Code Items Table

Message: Item Code not found

No

Item Code Found = Display Item Code Display Description Yes

Items Form

Display Expiry Date Display Supplier Display Cost Price Display Reorder Level Display Price Display Reorder Quantity Display Current Quantity

Rayan Isran PK 530

88

Stop N Shop System

Sales And Stock Control Processing

D
Do you want to delete this record? Yes/No

If Choice = Yes

No

Items Form

Delete Record

Items Table

Rayan Isran PK 530

89

Stop N Shop System


Sales Form Add Record

Sales And Stock Control Processing

Add Record in Sales Form

Read Sales table Go to last record Read code New code = code + 1 Sales Table

Enter Receipt Number Enter Date Enter Quantity Display Description Display Cost Price Display Total Display Balance Sales Details Table

Items Table

Save Record

Rayan Isran PK 530

90

Stop N Shop System


Sales Form Edit Record

Sales And Stock Control Processing

Edit Record in Sales Form

Please Enter Receipt Number Read Sales Table Search for Receipt Number

Sales Table

Message: Receipt Number not found

No

Receipt Number Found = Yes

Sales Form Make changes or Edit the Record as required Sales Details Table

Save Changes

Rayan Isran PK 530

91

Stop N Shop System


Sales Form Delete Record

Sales And Stock Control Processing

Delete Record in Sales Form

Please Enter Receipt Number Read Sales table Search for Receipt Number

Sales Table

Message: Receipt Number not found

No

Sales Form

Receipt Number Found = Display Receipt Number Yes Display Serial Number Display Item Code Display Description Display Quantity Display Cost Price Display Total Display Balance

Sales Details Table

Items Table

Rayan Isran PK 530

92

Stop N Shop System

Sales And Stock Control Processing

E
Do you want to delete this record? Yes/No

If Choic e= Yes

No

Sales Form

Sales Details Table

Delete Record

Sales Table

Rayan Isran PK 530

93

Stop N Shop System


Supplier Form Add Record

Sales And Stock Control Processing

Add Record in Items Form

Read Supplier Table

Supplier Table

Enter Supplier ID Enter Name Enter Contact Person Enter Address Enter Phone Enter Mobile Enter Email Address

Save Record

Rayan Isran PK 530

94

Stop N Shop System


Supplier Form Edit Record

Sales And Stock Control Processing

Edit Record in Supplier Form

Please Enter Supplier ID

Read Supplier Table Search for Supplier ID Supplier Table

Message: Supplier ID not found

No

Supplier ID Found = Yes

Supplier Form Make changes or Edit the Record as required

Save Changes

Rayan Isran PK 530

95

Stop N Shop System


Supplier Form Delete Record Delete Record in Supplier Form

Sales And Stock Control Processing

Please Enter Supplier ID

Read Supplier Table Search for Supplier ID Supplier Table

Message: Supplier ID not found

No

Supplier ID Found = Display Supplier ID

Supplier Form

Display Name Yes Display Contact Person Display Address Display Phone Display Mobile Display Email Address

Rayan Isran PK 530

96

Stop N Shop System

Sales And Stock Control Processing

F
Do you want to delete this record? Yes/No

If Choic e= Yes

No

Supplier Form

Delete Record

Supplier Table

Rayan Isran PK 530

97

Stop N Shop System


Supply Form Add Record

Sales And Stock Control Processing

Add Record in Supply Form

Read Supply table Go to last record Read code New code = code + 1 Supply Table

Enter Receipt Number Enter Date Enter Supplier

Items Table

Supply Table

Save Record

Rayan Isran PK 530

98

Stop N Shop System


Supply Form Edit Record Edit Record in Supply Form

Sales And Stock Control Processing

Please Enter Receipt Number Read Supply Details Table Search for Receipt Number Supply Table

Message: Receipt Number not found

No

Receipt Number Found = Yes

Supply Form Make changes or Edit the Record as required Supply Table

Save Changes

Rayan Isran PK 530

99

Stop N Shop System


Supply Form Delete Record

Sales And Stock Control Processing

Delete Record in Supply Form

Please Enter Receipt Number Read Supply table Search for Receipt Number

Supply Table

Message: Receipt Number not found

No

Receipt Number Found = Display Supplier ID Display Name Yes Display Contact Person Display Address Display Phone Display Mobile Display Email Address Items Table

Supply Form

Supply Table

Rayan Isran PK 530

100

Stop N Shop System

Sales And Stock Control Processing

G
Do you want to delete this record? Yes/No

If Choic e= Yes

No

Supply Form

Supply Table

Delete Record

Supply Table

Rayan Isran PK 530

101

Stop N Shop System


Supply Details Form Add Record

Sales And Stock Control Processing

Add Record in Supply Details Form

Read Supply Details table Go to last record Read code New code = code + 1 Supply Details Table

Enter Receipt Number Enter Serial Number Enter Item Code

Items Table

Supply Details Table

Save Record

Rayan Isran PK 530

102

Stop N Shop System


Supply Details Form Edit Record Edit Record in Supply Details Form

Sales And Stock Control Processing

Please Enter Receipt Number Read Supply Details Table Search for Receipt Number Supply Details Table

Message: Receipt Number not found

No

Receipt Number Found = Yes

Supply Details Form

Make changes or Edit the Record as required

Supply Details Table

Save Changes

Rayan Isran PK 530

103

Stop N Shop System


Supply Details Form Delete Record

Sales And Stock Control Processing

Delete Record in Supply Details Form

Please Enter Receipt Number Read Supply Details table Search for Receipt Number Supply Details Table

Message: Receipt Number not found

No

Receipt Number Found =

Yes Supply Details Form Display Receipt Number Display Serial Number Display Item Code Items Table Supply Details Table

Rayan Isran PK 530

104

Stop N Shop System

Sales And Stock Control Processing

I
Do you want to delete this record? Yes/No

If Choic e= Yes

No

Supply Details Form

Supply Details Table

Delete Record

Supply Details Table

Rayan Isran PK 530

105

Stop N Shop System


Sales Details Form Add Record

Sales And Stock Control Processing

Add Record in Sales Details Form

Read Sales Details table Go to last record Read code New code = code + 1 Sales Details Table

Enter Receipt Number Enter Serial Number Enter Item Code Enter Quantity

Items Table

Sales Details Table

Save Record

Rayan Isran PK 530

106

Stop N Shop System


Sales Details Form Edit Record

Sales And Stock Control Processing

Edit Record in Sales Details Form

Please Enter Receipt Number Read Sales Details Table Search for Receipt Number Sales Details Table

Message: Receipt Number not found

No

Receipt Number Found = Yes

Sales Details Form

Make changes or Edit the Record as required

Sales Details Table

Save Changes

Rayan Isran PK 530

107

Stop N Shop System


Sales Details Form Delete Record

Sales And Stock Control Processing

Delete Record in Sales Details Form

Please Enter Receipt Number Read Sales Details table Search for Receipt Number Sales Details Table

Message: Receipt Number not found

No

Receipt Number Found =

Yes Sales Details Form Display Receipt Number Display Serial Number Display Item Code Display Quantity Items Table Sales Details Table

Rayan Isran PK 530

108

Stop N Shop System

Sales And Stock Control Processing

J
Do you want to delete this record? Yes/No

If Choic e= Yes

No

Sales Details Form

Sales Details Table

Delete Record

Sales Details Table

Rayan Isran PK 530

109

Stop N Shop System


Item According to Item ID (code)

Sales And Stock Control Processing

Item According to Description

Items Table

Item According to ID

Display Item Code Display Description Display Re-order Level Display Re-order Quantity Display Current Quantity

Do you want to print this report? Yes/No Item According to Descriptio n

If Choice = Yes Print report on paper

No

Rayan Isran PK 530

110

Stop N Shop System


Supplier According to Supplier ID

Sales And Stock Control Processing

Supplier According to Supplier ID

Supplier Table

Supplier According to Supplier ID

Display Item Code Display Description Display Re-order Level Display Re-order Quantity Display Current Quantity

Do you want to print this report? Yes/No Supplier According to Supplier ID

If Choice = Yes Print report on paper

No

Rayan Isran PK 530

111

Stop N Shop System


Supply According to Receipt Number

Sales And Stock Control Processing

Supply According to Receipt Number

Supply Table Display Item Code Display Description Display Re-order Level Display Re-order Quantity Display Current Quantity

Supply According to Receipt Number

Do you want to print this report? Yes/No Supply According to Receipt Number

If Choice = Yes Print report on paper

No

Rayan Isran PK 530

112

Stop N Shop System

Sales And Stock Control Processing

Reports
Items Report

Display Item Code Items Report Display Description Display Expiry Date Items Table Display Supplier Display Cost Price Expired Items Query Display Reorder Level Display Price Display Reorder Quantity Display Current Quantity Do you want to print this report? Yes/No

If Choice = Yes Print report on paper

Items Report No

Rayan Isran PK 530

113

Stop N Shop System


Sales Report

Sales And Stock Control Processing

Sales Report

Items Table

Display Receipt Enter Number Receipt No Display Date Display Serial Number

Sales Report

Display Item Code Display Description Display Quantity Display Price Do you want to print this report? Yes/No

If Choice = Yes Print report on paper

Sales Report No

Rayan Isran PK 530

114

Stop N Shop System


Supplier Report

Sales And Stock Control Processing

Supplier Report

Suppliers Table

Enter Supplier ID Display Supplier ID Display Name Display Contact Person Display Address Display Phone Display Mobile Display Address Do you want to print this report? Yes/No

Supplier Report

If Choice = Yes Print report on paper

Supplier Report No

Rayan Isran PK 530

115

Stop N Shop System


Supply Report

Sales And Stock Control Processing

Supply Report

Supply Table

Enter Supplier ID

Supply Report

Display Receipt Number Display Date Display Supplier

Do you want to print this report? Yes/No

If Choice = Yes Print report on paper

Supply Report No

Rayan Isran PK 530

116

Stop N Shop System


Supply Details Report

Sales And Stock Control Processing

Supply Details Report

Supply Details Table

Enter Item Code

Supply Details Report

Display Receipt Number Display Serial Number Display Item Code

Do you want to print this report? Yes/No

If Choice = Yes Print report on paper

No

Supply Details Report

Rayan Isran PK 530

117

Stop N Shop System


Sales Details Report

Sales And Stock Control Processing

Sales Details Report

Sales Details Table

Enter Item Code

Sales Details Report

Display Receipt Number Display Serial Number Display Item Code Display Quantity

Do you want to print this report? Yes/No

If Choice = Yes Print report on paper

No

Sales Details Report

Rayan Isran PK 530

118

Stop N Shop System

Sales And Stock Control Processing

IMPLEMENTATION

Rayan Isran PK 530

119

Stop N Shop System

Sales And Stock Control Processing

Table Design
Overview of Database

Rayan Isran PK 530

120

Stop N Shop System

Sales And Stock Control Processing

Items Table

This is the design view of the Items table. As can be seen, the item code is the primary key in this table and has been given a field size of a long integer. This table contains all of the important details of the items. There are no spaces in the field names so that they can easily be accessed from Visual Basic. Datasheet View:

Rayan Isran PK 530

121

Stop N Shop System

Sales And Stock Control Processing

Sales Table

This is the design view of the Sales table. As can be seen, the receipt number field (ReceiptNo) is the primary and has been given a field size of a long integer. As you can see, the table is relatively smaller than the item table and shows information about the date of sale and receipt number. There are no spaces in the field names so that they can easily be accessed from Visual Basic. Datasheet View:

Rayan Isran PK 530

122

Stop N Shop System

Sales And Stock Control Processing

Sales Details Table

This is the design view of the Sales Details table. As can be seen, the receipt number field (ReceiptNo) is the primary and has been assigned a field size of a long integer. This table gives information regarding the sales transactions. There are no spaces in the field names so that they can easily be accessed from Visual Basic. Datasheet View:

Rayan Isran PK 530

123

Stop N Shop System

Sales And Stock Control Processing

Supplier Table

This is the design view of the supplier table. As can be seen, the supplier ID field (SupplierID) is the primary and has been given a field size of a long integer. This table contains information regarding the supplier of the item, for example his email address and phone number. There are no spaces in the field names so that they can easily be accessed from Visual Basic.

Datasheet View:

Rayan Isran PK 530

124

Stop N Shop System

Sales And Stock Control Processing

Supply Table

This is the design view of the supply table. As can be seen, the Receipt number field (ReceiptNo) is the primary and has been given a field size of a long integer. This table contains information regarding the supplies, for example the supplier name and date of supply. There are no spaces in the field names so that they can easily be accessed from Visual Basic. Datasheet View:

Rayan Isran PK 530

125

Stop N Shop System

Sales And Stock Control Processing

Supply Details Table

This is the design view of the supply table. As can be seen, the supplier ID field (ReceiptNo) is the primary and has been given a field size of a long integer. This table contains information regarding the supplies, for example the supplier name and date of supply. There are no spaces in the field names so that they can easily be accessed from Visual Basic. Datasheet View:

Rayan Isran PK 530

126

Stop N Shop System

Sales And Stock Control Processing

Relationship Layout

This is the layout of the relationships that exist between the tables. Referential Integrity has been enforced and 1 To Many Relationships have been created by linking the Primary Fields together as can be seen from the screenshot shown above. This would in turn aid in developing the software for entering data through Visual Basic.

Rayan Isran PK 530

127

Stop N Shop System

Sales And Stock Control Processing

Splash Screen

This is the splash screen that will show when the user opens the software. Splash Screen Design View

Rayan Isran PK 530

128

Stop N Shop System

Sales And Stock Control Processing

Rayan Isran PK 530

129

Stop N Shop System Login Form Design View

Sales And Stock Control Processing

This is the Login Dialog that will show up after the splash screen and allow the user to enter the username and password to be able to use the software. If entered correctly the user will be allowed to browse trough the software. However, an error message dialog box will show up if the user has entered an incorrect password and will not allow the user to open the software. Login Form View:

Rayan Isran PK 530

130

Stop N Shop System

Sales And Stock Control Processing

The above message box notifies the user upon entering the incorrect password. This stops unauthorized personal from accessing the database making sure that the Companys data is secure. Otherwise if the password is correct then it loads the main menu. Main Menu:

This is the main menu that loads after login has been successful. The user has the choice of selecting the submenu form which contains forms regarding sales, items, supplies and stocks while the submenu reports form allows the user to search through the data reports by specifying a search criterion. The user may also exit the program by clicking the Exit button, where he will be prompted to exit the application.

Rayan Isran PK 530

131

Stop N Shop System

Sales And Stock Control Processing

Submenu Reports:

This is the submenu report form where the user can search a report by entering a criterion. As can be seen, there are 6 forms the user may search from (Items, Sales, Sales Details, Supply, Supplier and Supplier Details), and the other 2 command buttons can send the user back to the main menu, or go to the forms submenu.

Rayan Isran PK 530

132

Stop N Shop System

Sales And Stock Control Processing

Forms Submenu:

This is the Submenu form where the user can select a form to go to regarding the items, sales or stocks. The user may also directly go to the submenu reports or the main menu if he wants to.

Rayan Isran PK 530

133

Stop N Shop System

Sales And Stock Control Processing

Items Form (Design View)

This is the design view of items form. Here, an ADODC control has been implemented to navigate between the records in the items table of the database. There are also 10 different command buttons each related to controlling and manipulating the records for example, the currently active record can be deleted, edited or saved. The textboxes represent the data from the item table and each textboxs data correspond to the label left of it.

Rayan Isran PK 530

134

Stop N Shop System Form View

Sales And Stock Control Processing

This is the form view of the Items table. As can be seen, it fetches data from the database and represents it in the form of textboxes which can easily be edited or deleted. The data source of each textbox is the AdItems ADODC control which is linked to the items table in the database.

Rayan Isran PK 530

135

Stop N Shop System

Sales And Stock Control Processing

This is the Dialog (Input) box that appears when the user clicks the search record button. It prompts the user to input the item code number of the item and then searches the database to find a record that matches that number. The textboxes will then have the data of that item.

Rayan Isran PK 530

136

Stop N Shop System

Sales And Stock Control Processing

This is the message box that appears asking for confirmation to save a record. This is displayed when the user clicks the save button after clicking the add new button and entering (valid) data into the textboxes. The data is then entered into the database by taking the data the user has entered into the textboxes and adding it to the database.

Rayan Isran PK 530

137

Stop N Shop System

Sales And Stock Control Processing

This is the dialog message that appears to inform the user that the save operation has been successful and the record has been saved to the database.

Rayan Isran PK 530

138

Stop N Shop System Supply Form (Design View)

Sales And Stock Control Processing

This is the design view of Supply form. Here, an ADODC control has been implemented to navigate between the records in the supply table of the database. There are also 10 different command buttons each related to controlling and manipulating the records for example, the currently active record can be deleted, edited or saved. The textboxes represent the data from the item table and each textboxs data correspond to the label left of it.

Rayan Isran PK 530

139

Stop N Shop System Form View

Sales And Stock Control Processing

This is the form view of the Supply table. As can be seen, it fetches data from the database and represents it in the form of textboxes which can easily be edited or deleted. The data source of each textbox is the AdSupply ADODC control which is linked to the Supply table in the database.

Rayan Isran PK 530

140

Stop N Shop System

Sales And Stock Control Processing

This is the Dialog (Input) box that appears when the user clicks the search record button. It prompts the user to input the item code number of the item and then searches the database to find a record that matches that number. The textboxes will then have the data of that item.

Rayan Isran PK 530

141

Stop N Shop System

Sales And Stock Control Processing

This is the message box that appears asking for confirmation to save a record. This is displayed when the user clicks the save button after clicking the add new record button and entering (valid) data into the textboxes. The data is then entered into the database by taking the data the user has entered into the textboxes and adding it to the database.

Rayan Isran PK 530

142

Stop N Shop System

Sales And Stock Control Processing

This is the message box that is shown to inform the user that the save operation has been successful.

Rayan Isran PK 530

143

Stop N Shop System Supplier Form (Design View)

Sales And Stock Control Processing

This is the design view of Supplier form. Here, an ADODC control has been implemented to navigate between the records in the Supplier table of the database. There are also 10 different command buttons each related to controlling and manipulating the records for example, the currently active record can be deleted, edited or saved. The textboxes represent the data from the item table and each textboxs data correspond to the label left of it.

Rayan Isran PK 530

144

Stop N Shop System Form View

Sales And Stock Control Processing

This is the form view of the Supplier table. As can be seen, it fetches data from the database and represents it in the form of textboxes which can easily be edited or deleted. The data source of each textbox is the AdSupplier ADODC control which is linked to the Supplier table in the database.

Rayan Isran PK 530

145

Stop N Shop System

Sales And Stock Control Processing

This is the Dialog (Input) box that appears when the user clicks the search record button. It prompts the user to input the item code number of the item and then searches the database to find a record that matches that number. The textboxes will then have the data of that item.

Rayan Isran PK 530

146

Stop N Shop Sales And Stock Control Processing System This is the message box that appears asking for confirmation to save a record. This is displayed when the user clicks the save button after clicking the add new button and entering (valid) data into the textboxes. The data is then entered into the database by taking the data the user has entered into the textboxes and adding it to the database.

Rayan Isran PK 530

147

Stop N Shop System

Sales And Stock Control Processing

This is the dialog message that appears to inform the user that the save operation has been successful and the record has been saved to the database.

Rayan Isran PK 530

148

Stop N Shop System Supply Details Form (Design View)

Sales And Stock Control Processing

This is the design view of Supply Details form. Here, an ADODC control has been implemented to navigate between the records in the Supply Details table of the database. There are also 10 different command buttons each related to controlling and manipulating the records for example, the currently active record can be deleted, edited or saved. The textboxes represent the data from the item table and each textboxs data correspond to the label left of it.

Rayan Isran PK 530

149

Stop N Shop System Form View

Sales And Stock Control Processing

This is the form view of the Supply Details table. As can be seen, it fetches data from the database and represents it in the form of textboxes which can easily be edited or deleted. The data source of each textbox is the AdSupplier Details ADODC control which is linked to the Supply Details table in the database.

Rayan Isran PK 530

150

Stop N Shop System

Sales And Stock Control Processing

This is the Dialog (Input) box that appears when the user clicks the search record button. It prompts the user to input the item code number of the item and then searches the database to find a record that matches that number. The textboxes will then have the data of that item.

Rayan Isran PK 530

151

Stop N Shop System

Sales And Stock Control Processing

This is the message box that appears asking for confirmation to save a record. This is displayed when the user clicks the save button after clicking the add new button and entering (valid) data into the textboxes. The data is then entered into the database by taking the data the user has entered into the textboxes and adding it to the database.

Rayan Isran PK 530

152

Stop N Shop System

Sales And Stock Control Processing

This is the dialog message that appears to inform the user that the save operation has been successful and the record has been saved to the database.

Rayan Isran PK 530

153

Stop N Shop System Sales Details Form (Design View)

Sales And Stock Control Processing

This is the design view of Sales Details form. Here, an ADODC control has been implemented to navigate between the records in the Sales Details table of the database. There are also 10 different command buttons each related to controlling and manipulating the records for example, the currently active record can be deleted, edited or saved. The textboxes represent the data from the item table and each textboxs data correspond to the label left of it.

Rayan Isran PK 530

154

Stop N Shop System Form View

Sales And Stock Control Processing

This is the form view of the Sales Details table. As can be seen, it fetches data from the database and represents it in the form of textboxes which can easily be edited or deleted. The data source of each textbox is the AdSupplier Details ADODC control which is linked to the Sales Details table in the database.

Rayan Isran PK 530

155

Stop N Shop System

Sales And Stock Control Processing

This is the Dialog (Input) box that appears when the user clicks the search record button. It prompts the user to input the item code number of the item and then searches the database to find a record that matches that number. The textboxes will then have the data of that item.

Rayan Isran PK 530

156

Stop N Shop System

Sales And Stock Control Processing

This is the message box that appears asking for confirmation to save a record. This is displayed when the user clicks the save button after clicking the add new button and entering (valid) data into the textboxes. The data is then entered into the database by taking the data the user has entered into the textboxes and adding it to the database.

Rayan Isran PK 530

157

Stop N Shop System

Sales And Stock Control Processing

This is the dialog message that appears to inform the user that the save operation has been successful and the record has been saved to the database.

Rayan Isran PK 530

158

Stop N Shop System

Sales And Stock Control Processing

This is the combo box that is filled with the item code of the items in the item database that is filled during the form load event. The user can easily lookup an item by selecting an item code, and the details of the item are then loaded and represented in the textboxes below the combo box.

Rayan Isran PK 530

159

Stop N Shop System Sales Form (Design View)

Sales And Stock Control Processing

This is the design view of Sales form. Here, an ADODC control has been implemented in order to navigate between the records in the Sales table of the database. There are also 10 different command buttons each related to controlling and manipulating the records for example, the currently active record can be deleted, edited or saved. The textboxes represent the data from the item table and each textboxs data correspond to the label left of it.

Rayan Isran PK 530

160

Stop N Shop System Form View

Sales And Stock Control Processing

This is the form view of the Sales table. As can be seen, it fetches data from the database and represents it in the form of textboxes which can easily be edited or deleted. The data source of each textbox is the AdSupplier Details ADODC control which is linked to the Sales table in the database.

Rayan Isran PK 530

161

Stop N Shop System

Sales And Stock Control Processing

This is the Dialog (Input) box that appears when the user clicks the search record button. It prompts the user to input the item code number of the item and then searches the database to find a record that matches that number. The textboxes will then have the data of that item.

Rayan Isran PK 530

162

Stop N Shop Sales And Stock Control Processing System This is the message box that appears asking for confirmation to save a record. This is displayed when the user clicks the save button after clicking the add new button and entering (valid) data into the textboxes. The data is then entered into the database by taking the data the user has entered into the textboxes and adding it to the database.

Rayan Isran PK 530

163

Stop N Shop System

Sales And Stock Control Processing

This is the dialog message that appears to inform the user that the save operation has been successful and the record has been saved to the database.

Rayan Isran PK 530

164

Stop N Shop System

Sales And Stock Control Processing

A Date time picker has also been implemented into the sales form in order to entry data into the date field to the right of the DT picker since it is easier and quicker to use. A simple drop down calendar appears allowing the user to navigate between months and selecting a date easily. As soon as the add command button is clicked, the value from the DT picker is inserted into the date text box.

Rayan Isran PK 530

165

Stop N Shop System

Sales And Stock Control Processing

Reports
The reports will enable the user to print out a hard copy of organized data from the database. The reports are either sorted according to the key fields or filtered by specific criteria.

Items Report
Print View

Rayan Isran PK 530

166

Stop N Shop System

Sales And Stock Control Processing

Design View

Rayan Isran PK 530

167

Stop N Shop System

Sales And Stock Control Processing

Sales Report
Print View

Rayan Isran PK 530

168

Stop N Shop System

Sales And Stock Control Processing

Design View

Rayan Isran PK 530

169

Stop N Shop System

Sales And Stock Control Processing

Sales Details Report


Print View

Rayan Isran PK 530

170

Stop N Shop System

Sales And Stock Control Processing

Design View

Rayan Isran PK 530

171

Stop N Shop System

Sales And Stock Control Processing

Supplier Report
Print View

Rayan Isran PK 530

172

Stop N Shop System

Sales And Stock Control Processing

Design View

Rayan Isran PK 530

173

Stop N Shop System

Sales And Stock Control Processing

Supplier Details Report


Print View

Rayan Isran PK 530

174

Stop N Shop System

Sales And Stock Control Processing

Design View

Rayan Isran PK 530

175

Stop N Shop System

Sales And Stock Control Processing

Supply Report
Print View

Rayan Isran PK 530

176

Stop N Shop System

Sales And Stock Control Processing

Design View

Rayan Isran PK 530

177

Stop N Shop System

Sales And Stock Control Processing

Queries
Used in Items Report to display the information of an item when the item code of that particular item is input. Private Sub Command1_Click() Dim inp As Integer inp = InputBox("Please Item Code", "Search") DataEnvironment1.rsCommItem.Open ("select * from Item where ItemCode=" & inp & "") If DataEnvironment1.rsCommItem.EOF ThenMsgBox ("Record not found!") Else rpt_item.Show Unload Me End If End Sub Used in Sales Report to display the date and receipt number of a sale when the receipt number of the sales transaction is input. Private Sub Command7_Click() Dim inp As Integer inp = InputBox("Please enter Receipt Number", "Search") DataEnvironment1.rsCommSales.Open ("select * from Sales where ReceiptNo=" & inp & "") If DataEnvironment1.rsCommSales.EOF Then MsgBox ("Record not found!") Else rpt_sales.Show Unload Me End If End Sub
________________________________________________

Rayan Isran PK 530

178

Stop N Shop Sales And Stock Control Processing System Used in Sales Details Report to view the details of a sales transaction of a particular item when the item code of that particular item is input. Private Sub Command6_Click() Dim inp As Integer inp = InputBox("Please enter Item Code", "Search") DataEnvironment1.rsCommSalesDetails.Open ("select * from SalesDetails where ItemCode=" & inp & "") If DataEnvironment1.rsCommSalesDetails.EOF Then MsgBox ("Record not found!") Else rpt_sad.Show Unload Me End If End Sub Used in Supply Report to display the date and receipt number of a supplier, along with the suppliers name when the receipt number of the supplier is input. Private Sub Command4_Click() Dim inp As Integer inp = InputBox("Please enter Receipt No.", "Search") DataEnvironment1.rsCommSupply.Open ("select * from Supply where ReceiptNo=" & inp & "") If DataEnvironment1.rsCommSupply.EOF Then MsgBox ("Record not found!") Else rpt_supply.Show Unload Me End If End Sub

Rayan Isran PK 530

179

Stop N Shop Sales And Stock Control Processing System Used in Supplier Report to display the information of a supplier, e.g. contact person and email address when the supplier ID of that person is input. Private Sub Command5_Click() Dim inp As Integer inp = InputBox("Please enter Supplier ID", "Search") DataEnvironment1.rsCommSupplier.Open ("select * from Supplier where SupplierID=" & inp & "") If DataEnvironment1.rsCommSupplier.EOF Then MsgBox ("Record not found!") Else rpt_supplier.Show Unload Me End If End Sub Used in Supply Details Report to display the details of a supply transaction of a particular item when the items code is input. Private Sub Command3_Click() Dim inp As Integer inp = InputBox("Please enter Item Code", "Search") DataEnvironment1.rsCommSupplierDetails.Open ("select * from SupplyDetails where ItemCode=" & inp & "") If DataEnvironment1.rsCommSupplierDetails.EOF Then MsgBox ("Record not found!") Else rpt_sd.Show Unload Me End If End Sub

Rayan Isran PK 530

180

Stop N Shop System

Sales And Stock Control Processing

Tools & Techniques Used

Date/Time Picker

The Date/Time Picker used in the Sales Form allows the user to easily select order and delivery dates rather than typing them down. This greatly reduces the chance of transcript errors and also makes the software very user friendly. The Date is very easy to select and allows the user to work quickly as he has to enter large amount of records into the database.

Rayan Isran PK 530

181

Stop N Shop System

Sales And Stock Control Processing

Startup Tool
The application has been set by setting the project properties and defining the startup object as shown below:

Rayan Isran PK 530

182

Stop N Shop System

Sales And Stock Control Processing

Data Environment
The Data Environment control was used to create a connection between the Front-end Visual Basic and the Back-End MS Access programs so that reports could be made with ease.

Rayan Isran PK 530

183

Stop N Shop System

Sales And Stock Control Processing

ADODC Control
The ADODC control is used to connect the Visual Basic forms with the MSAccess database so that the users could easily add, edit, delete and find data easily.

Rayan Isran PK 530

184

Stop N Shop System

Sales And Stock Control Processing

Data Report
The Data Report control is used to create all the reports that are displayed when the Show Report command button is pressed in any compatible form. Queries can also be inserted based upon a particular criterion.

Rayan Isran PK 530

185

Stop N Shop System

Sales And Stock Control Processing

Access Documenter
S:\Database2.mdb Table: Item Wednesday, January 05, 2011 Page: 1

Columns Name ItemCode Description ExpiryDate Supplier CostPrice Price ReorderLevel ReorderQty CurrentQty Type Long Integer Text Date/Time Text Text Text Long Integer Long Integer Long Integer Size 4 20 8 20 5 5 4 4 4

Relationships ItemSalesDetails Item ItemCode SalesDetails ItemCode

Attributes: RelationshipType:

Not Enforced One-To-Many

ItemSupplyDetails Item ItemCode SupplyDetails ItemCode

Attributes: RelationshipType:

Not Enforced One-To-Many

Rayan Isran PK 530

186

Stop N Shop System


SupplierItem Supplier SupplierID

Sales And Stock Control Processing

Item Supplier

Attributes: RelationshipType: S:\Database2.mdb Wednesday, January 05, 2011 Table: Sales

Not Enforced One-To-Many

Page: 2

Columns Name ReceiptNo Date Type Long Integer Date/Time Size 4 8

Relationships SalesDetailsSales SalesDetails ReceiptNo ReceiptNo Sales

Attributes: RelationshipType: S:\Database2.mdb Wednesday, January 05, 2011 Table: SalesDetails

Unique, Not Enforced One-To-One

Page: 3

Columns Name ReceiptNo SerialNo ItemCode Quantity Type Long Integer Long Integer Long Integer Long Integer Size 4 4 4 4

Relationships

Rayan Isran PK 530

187

Stop N Shop System


ItemSalesDetails Item ItemCode

Sales And Stock Control Processing

SalesDetails ItemCode

Attributes: RelationshipType:

Not Enforced One-To-Many

SalesDetailsSales SalesDetails ReceiptNo ReceiptNo Sales

Attributes: RelationshipType: S:\Database2.mdb Wednesday, January 05, 2011 Table: Supplier

Unique, Not Enforced One-To-One

Page: 4

Columns Name SupplierID Name ContactPerson Address Phone Mobile Email Type Long Integer Text Text Text Long Integer Long Integer Text Size 4 20 50 80 4 4 40

Relationships SupplierItem Supplier SupplierID Supplier Item

Attributes: RelationshipType:

Not Enforced One-To-Many

Rayan Isran PK 530

188

Stop N Shop System


SupplierSupply Supplier SupplierID

Sales And Stock Control Processing

Supply Supplier

Attributes: RelationshipType: S:\Database2.mdb Table: Supply

Not Enforced One-To-Many Wednesday, January 05, 2011 Page: 5

Columns Name ReceiptNo Date Supplier Type Long Integer Date/Time Text Size 4 8 40

Relationships SupplierSupply Supplier SupplierID Supplier Supply

Attributes: RelationshipType:

Not Enforced One-To-Many

SupplyDetailsSupply SupplyDetails ReceiptNo ReceiptNo Supply

Attributes: RelationshipType:

Unique, Not Enforced One-To-One

Rayan Isran PK 530

189

Stop N Shop System


S:\Database2.mdb Table: SupplyDetails

Sales And Stock Control Processing


Wednesday, January 05, 2011 Page: 6

Columns Name ReceiptNo SerialNo ItemCode Type Long Integer Long Integer Long Integer Size 4 4 4

Relationships ItemSupplyDetails Item ItemCode SupplyDetails ItemCode

Attributes: RelationshipType:

Not Enforced One-To-Many

SupplyDetailsSupply SupplyDetails ReceiptNo ReceiptNo Supply

Attributes: RelationshipType:

Unique, Not Enforced One-To-One

Rayan Isran PK 530

190

Stop N Shop System

Sales And Stock Control Processing

Program Code
Splash Screen
The following code is for the splash screen which is loaded when the software is opened. A timer is used which is enabled and has an interval of 2000 milliseconds. When it ticks, the login screen is shown and the splash screen is unloaded.

Private Sub Form_Load() End Sub Private Sub Timer1_Timer() 'When the timer is up, show the login form and unload this form. frmLogin.Show Unload Me End SubLogin Form Login Form Cancel Button
This code is for the cancel button. It simply hides the login form.

Private Sub cmdCancel_Click() Me.Hide End Sub OK Button


This code is executed when the user clicks the OK button and the password is checked.. If it is 101125151, the login has been successful and the main menu is closed. Otherwise the password is incorrect and a message box is shown. A counter, counter1, has also be used and increments each time a wrong password has been entered, and after 3 failed attempts the program will terminate.

Private Sub cmdOK_Click() 'check for correct password If txtPassword = "101125151" Then 'Login successful

Rayan Isran PK 530

191

Stop N Shop System

Sales And Stock Control Processing

frmMenu.Show Me.Hide Else ' After three attempts, close the software. If counter1 = 3 Then MsgBox "Invalid Password. The program will now close itself.", , "Login failed" End Else MsgBox "Invalid Password, try again!", , "Login" txtPassword.SetFocus SendKeys "{Home}+{End}" counter1 = counter1 + 1 End If End If End Sub Main Menu Form Submenu Form button Private Sub Command1_Click()
The following code will load the submenu form and will unload the main menu.

submenufrm.Show Unload Me End Sub Submenu Reports button Private Sub Command2_Click()

The following code will load the submenu reports and will unload the main menu.

frmSubmenu.Show Unload Me End Sub Exit button Private Sub Command3_Click() msg = MsgBox("Are you sure you want to exit the program?", vbYesNo + vbQuestion, "Quit") If msg = vbYes Then End End If

Rayan Isran PK 530

192

Stop N Shop System


End Sub Submenu Form

Sales And Stock Control Processing

The following codes will load the respective sub-form and unload the forms submenu.

Item button
Load the item form and unload the submenu form.

Private Sub Command1_Click() frmItems.Show Unload Me End Sub Supply Form button
Load the supply form and unload the submenu form.

Private Sub Command2_Click() frmSupply.Show Unload Me End Sub Supplier Form button
Load the supplier form and unload the submenu form.

Private Sub Command3_Click() frmSupplier.Show Unload Me End Sub Sales Details Form button
Load the sales details form and unload the submenu form.

Private Sub Command4_Click() frmSalesDetails.Show Unload Me End Sub Sales Form button

Rayan Isran PK 530

193

Stop N Shop System

Sales And Stock Control Processing

Load the sales form and unload the submenu form.

Private Sub Command5_Click() frmSales.Show Unload Me End Sub Main Menu Form button
Load the main menu form and unload the submenu form.

Private Sub Command6_Click() frmMenu.Show Unload Me End Sub Supply Details Form button
Load the supply details form and unload the submenu form.

Private Sub Command7_Click() frmSupplyDetails.Show Unload Me End Sub

Rayan Isran PK 530

194

Stop N Shop System


Submenu Reports Form

Sales And Stock Control Processing

The following code will load the report of an item. A search input box is shown where the user types the item description, and a report is then shown of that particular item containing all of the item details. The codes are called when the user clicks the Report buttons.

Item Report button


This code is called when the user clicks the Item Report button. An input box is shown where the user enters the item description as a string. The data environment (DataEnvironment1) will find the record and display the item report if it is found, otherwise it displays a message Record not found.

Private Sub Command1_Click() Dim inp As String inp = InputBox("Please enter Description", "Search") DataEnvironment1.rsCommItem.Open ("select * from Item where ItemDescription=" & inp & "") If DataEnvironment1.rsCommItem.EOF Then MsgBox ("Record not found!") End If rpt_item.Show Unload Me End Sub Main Menu button
This code is called when the user clicks the Main Menu button. It simply loads the main menu and unloads the submenu reports form.

Private Sub Command2_Click() frmMenu.Show Unload Me End Sub

Rayan Isran PK 530

195

Stop N Shop System


Supplier Details Report button

Sales And Stock Control Processing

This code is called when the user clicks the Supplier Details report button. It loads an input box with where the user inputs an integer, and loads a report of the record with the receipt number that was input by the user through the Data Environment control. If the receipt number does not exist, a Record not found message dialog is shown.

Private Sub Command3_Click() Dim inp As Integer inp = InputBox("Please enter Receipt No", "Search")DataEnvironment1.rsCommSupplierDetails.Open ("select * from SupplyDetails where ReceiptNo=" & inp & "") If DataEnvironment1.rsCommSupplierDetails.EOF Then MsgBox ("Record not found!") End If rpt_sd.Show Unload Me End Sub Supply Report button
This code is called when the user clicks the Supply report button. It loads an input box where the user types an integer, and loads a report of the record with the receipt number that was input by the user through the Data Environment control. If the receipt number does not exist, a Record not found message dialog is shown.

Private Sub Command4_Click() Dim inp As Integer inp = InputBox("Please enter Receipt No.", "Search") DataEnvironment1.rsCommSupply.Open ("select * from Supply where ReceiptNo=" & inp & "") If DataEnvironment1.rsCommSupply.EOF Then MsgBox ("Record not found!") End If rpt_supply.Show Unload Me End Sub

Rayan Isran PK 530

196

Stop N Shop System


Supplier Report button

Sales And Stock Control Processing

This code is called when the user clicks the Supplier report button. It loads an input box where the user types an integer, and loads a report of the record with the supplier number that was input by the user through the Data Environment control. If the supplier number does not exist, a Record not found message dialog is shown.

Private Sub Command5_Click() Dim inp As Integer inp = InputBox("Please enter Supplier No.", "Search") DataEnvironment1.rsCommSupplier.Open ("select * from Supplier where SupplierNo=" & inp & "") If DataEnvironment1.rsCommSupplier.EOF Then MsgBox ("Record not found!") End If rpt_supplier.Show Unload Me End Sub Sales Detailsis calledbutton the user clicks the Sales Details Report button. It This code Report when
loads an input box where the user types an integer, and loads a report of the record with the item code that was input by the user through the Data Environment control. If the item code does not exist, a Record not found message dialog is shown.

Private Sub Command6_Click() Dim inp As Integer inp = InputBox("Please enter Item Code", "Search") DataEnvironment1.rsCommSalesDetails.Open ("select * from SalesDetails where ItemCode=" & inp & "") If DataEnvironment1.rsCommSalesDetails.EOF Then MsgBox ("Record not found!") End If rpt_sad.Show Unload Me End Sub Sales Report button

Rayan Isran PK 530

197

Stop N Shop System

Sales And Stock Control Processing

This code is called when the user clicks the Sales Report button. It loads an input box with the data type date and prompts the user to type the date of the sales transaction. If no transaction took place on that date, a Record not found message dialog is shown, otherwise a report is displayed of the transaction(s) that took place on that particular date.

Private Sub Command7_Click() Dim inp As Date inp = InputBox("Please enter date in the format mm/dd/yyyy.", "Search") DataEnvironment1.rsCommSales.Open ("select * from Sales where Date=" & inp & "") If DataEnvironment1.rsCommSales.EOF Then MsgBox ("Record not found!") End If rpt_sales.Show Unload Me End Sub Submenu Forms button
This code is called when the user clicks the Submenu Forms button. It simply loads the submenu forms form and unloads this submenu reports form.

Private Sub Command8_Click() submenufrm.Show Unload Me End Sub

Rayan Isran PK 530

198

Stop N Shop System


Items Form Delete command button

Sales And Stock Control Processing

The following code is used to delete record. It is coded for the delete command button. Before deleting a record, a message appears prompting the user to confirm this delete operation.

Private Sub cmddelete_Click() msg = MsgBox("Are you sure you want to Delete this record?", vbYesNo + vbQuestion, "Delete Data") If msg = vbYes Then AdItems.Recordset.Delete X = MsgBox("Record Deleted!", vbInformation, "Data Deleted") AdItems.Recordset.MovePrevious If AdItems.Recordset.BOF Then AdItems.Recordset.MoveNext End If End If End Sub Next Record button
The following code is used for the next record button and will go to the next record in the items table. If the record is the last one, then a message dialog is shown and and moves to the last record.

AdItems.Recordset.MoveNext If AdItems.Recordset.EOF Then x = MsgBox("You have reached the end of the file.", vbInformation, "Last Record") AdItems.Recordset.MoveLast End If End Sub

Rayan Isran PK 530

199

Stop N Shop System


Previous Record button

Sales And Stock Control Processing

The following code is used for the previous record button and will go to the previous record in the items table. If the record is the first one, then a message dialog is shown and moves to the first record.

Private Sub cmdprevrec_Click() AdItems.Recordset.MovePrevious If AdItems.Recordset.BOF Then x = MsgBox("You have reached the beginning of the file.", vbInformation, "Last Record") AdItems.Recordset.MoveLast End If End Sub Save Record button
The following code has been coded for the save record button. Before saving, it is validated to see if the record is acceptable for saving, and only then will it show the save confirmation dialog.

Private Sub cmdsaverec_Click( If txtReceiptNo.Text = Empty Then m = MsgBox("Item Code can not be left blank", , "Invalid Input") Else If txtReceiptNo.Text < 0 Or txtReceiptNo.Text > 10000 Then m = MsgBox("Item Code should be between 0 and 10000", , "Invalid Input") Else If Not IsNumeric(txtReceiptNo.Text) Then m = MsgBox("Item Code should be numeric", , "Invalid Input") Else If Len(txtReceiptNo.Text) < 3 Then m = MsgBox(" Item Code should be atleast 3 characters long", , "Invalid Input") Else x = MsgBox("Do you want to save this record?", vbYesNo + vbQuestion, "Save Data") If x = vbYes Then AdItems.Recordset.Update y = MsgBox("Record saved!", vbInformation, "Save") End If

Rayan Isran PK 530

200

Stop N Shop System


End If End If End If End If End Sub First Record button

Sales And Stock Control Processing

The following code has been coded for the first record button. It simply moves to the first record in the items table.

Private Sub cmdfirstrec_Click() AdItems.Recordset.MoveFirst End Sub Last Record button


The following code has been coded for the last record button. It simply moves to the last record in the items table.

Private Sub cmdlastrec_Click() AdItems.Recordset.MoveLast End Sub Go to Submenu button


The following code has been coded for the Go to submenu button. It simply unloads this item form and loads the submenu forms form.

Private Sub cmdmainmenu_Click() submenufrm.Show Unload Me End Sub

Rayan Isran PK 530

201

Stop N Shop System


Search Record button

Sales And Stock Control Processing

The following code is used to search for a particular record. It is coded for the search command button. An input box is shown and the user inputs the item code. If found, it will load the item otherwise it will give an error.

Private Sub cmdsearchrec_Click() Dim x As String inp = InputBox("Enter Item Code", "Search Record") If inp = "" Then x = MsgBox("Search could not complete because you have not entered any Item Code!", vbCritical, "Error!") Else x = inp '"'" & inp & "'" q = "Select * from Item where ItemCode=" & x AdItems.CommandType = adCmdText AdItems.RecordSource = q AdItems.Refresh End If End Sub Add Record button
The following code has been coded for the add record command button. It adds a new record to the items table. If the current record is the last one, the item code will be set to 1, otherwise it is set to the current item code number + 1. After creating a record, focus is given to the item description text box so that the employee start typing the description without having to click the text box first.

Private Sub cmaddrec_Click() If AdItems.Recordset.EOF Then AdItems.Recordset.AddNew txtItemCode.Text = 1 Else AdItems.Recordset.MoveLast x = txtItemCode.Text AdItems.Recordset.AddNew txtItemCode.Text = x + 1 End If

Rayan Isran PK 530

202

Stop N Shop System


txtDescription.SetFocus End Sub Edit Record button

Sales And Stock Control Processing

The following code has been coded for the edit record command button. It first shows a confirmation dialog whether the employee wants to update changes or not and will save changes to and update the records and the Yes button is clicked.

Private Sub cmdeditrec_Click() x = MsgBox("Are you sure you want to Save changes made?", vbYesNo + vbQuestion, "Edit Data") If x = vbYes Then AdItems.Recordset.Update x = MsgBox("Record has been updated!", vbInformation, "Record Updated") End If End Sub Supply Details Form Delete command button
The following code is used to delete record. It is coded for the delete command button. Before deleting a record, a message appears prompting the user to confirm this delete operation.

Private Sub cmddelete_Click() msg = MsgBox("Are you sure you want to Delete this record?", vbYesNo + vbQuestion, "Delete Data") If msg = vbYes Then AdSupplyDetails.Recordset.Delete X = MsgBox("Record Deleted!", vbInformation, "Data Deleted") AdSupplyDetails.Recordset.MovePrevious If AdSupplyDetails.Recordset.BOF Then AdSupplyDetails.Recordset.MoveNext End If End If

Rayan Isran PK 530

203

Stop N Shop System


End Sub Next Record button

Sales And Stock Control Processing

The following code is used for the next record button and will go to the next record in the supply details table. If the record is the last one, then a message dialog is shown and moves to the last record.

AdSupplyDetails.Recordset.MoveNext If AdSupplyDetails.Recordset.EOF Then x = MsgBox("You have reached the end of the file.", vbInformation, "Last Record") AdSupplyDetails.Recordset.MoveLast End If End Sub Previous Record button
The following code is used for the previous record button and will go to the previous record in the supply details table. If the record is the first one, then a message dialog is shown and moves to the first record.

Private Sub cmdprevrec_Click() AdSupplyDetails.Recordset.MovePrevious If AdSupplyDetails.Recordset.BOF Then x = MsgBox("You have reached the beginning of the file.", vbInformation, "Last Record") AdSupplyDetails.Recordset.MoveLast End If End Sub Save Record button
The following code has been coded for the save record button. Before saving, it is validated to see if the record is acceptable for saving, and only then will it show the save confirmation dialog.

Private Sub cmdsaverec_Click() If txtItemCode.Text = Empty Then m = MsgBox("Item Code can not be left blank", , "Invalid Input") Else If txtItemCode.Text < 0 Or txtItemCode.Text > 10000 Then

Rayan Isran PK 530

204

Stop N Shop System

Sales And Stock Control Processing

m = MsgBox("Item Code should be between 0 and 10000", , "Invalid Input") Else If Not IsNumeric(txtItemCode.Text) Then m = MsgBox("Item Code should be numeric", , "Invalid Input") Else If Len(txtItemCode.Text) < 3 Then m = MsgBox(" Item Code should be atleast 3 characters long", , "Invalid Input") Else x = MsgBox("Do you want to save this record?", vbYesNo + vbQuestion, "Save Data") If x = vbYes Then AdSupplyDetails.Recordset.Update y = MsgBox("Record saved!", vbInformation, "Save") End If End If End If End If End If End Sub First Record button
The following code has been coded for the first record button. It simply moves to the first record in the supply details table.

Private Sub cmdfirstrec_Click() AdSupplyDetails.Recordset.MoveFirst End Sub Last Record button


The following code has been coded for the last record button. It simply moves to the last record in the supply details table.

Private Sub cmdlastrec_Click() AdSupplyDetails.Recordset.MoveLast End Sub Go to Submenu button


The following code has been coded for the Go to submenu button. It simply unloads this form and loads the submenu forms form.

Rayan Isran PK 530

205

Stop N Shop System


Private Sub cmdmainmenu_Click() submenufrm.Show Unload Me End Sub Search Record button

Sales And Stock Control Processing

The following code is used to search for a particular record. It is coded for the search command button. An input box is shown and the user inputs the item code. If found, it will load the item otherwise it will give an error.

Private Sub cmdsearchrec_Click() Dim x As String inp = InputBox("Enter Item Code", "Search Record") If inp = "" Then x = MsgBox("Search could not complete because you have not entered any Item Code!", vbCritical, "Error!") Else x = inp '"'" & inp & "'" q = "Select * from SupplyDetails where ItemCode=" & x AdSupplyDetails.CommandType = adCmdText AdSupplyDetails.RecordSource = q AdSupplyDetails.Refresh End If End Sub Add Record button
The following code has been coded for the add record command button. It adds a new record to the items table. If the current record is the last one, the item code will be set to 1, otherwise it is set to the current item code number + 1. After creating a record, focus is given to the item description text box so that the employee start typing the description without having to click the text box first.

Private Sub cmaddrec_Click() If AdSupplyDetails.Recordset.EOF Then AdSupplyDetails.Recordset.AddNew txtReceiptNo.Text = 1 Else AdSupplyDetails.Recordset.MoveLast

Rayan Isran PK 530

206

Stop N Shop System


x = txtReceiptNo.Text AdSupplyDetails.Recordset.AddNew txtDate.Text = x + 1 End If txtSerialNo.SetFocus End Sub Edit Record button

Sales And Stock Control Processing

The following code has been coded for the edit record command button. It first shows a confirmation dialog whether the employee wants to update changes or not and will save changes to and update the records and the Yes button is clicked.

Private Sub cmdeditrec_Click() x = MsgBox("Are you sure you want to Save changes made?", vbYesNo + vbQuestion, "Edit Data") If x = vbYes Then AdSupplyDetails.Recordset.Update x = MsgBox("Record has been updated!", vbInformation, "Record Updated") End If End Sub

Rayan Isran PK 530

207

Stop N Shop System


Supply Form Delete command button

Sales And Stock Control Processing

The following code is used to delete record. It is coded for the delete command button. Before deleting a record, a message appears prompting the user to confirm this delete operation.

Private Sub cmddelete_Click() msg = MsgBox("Are you sure you want to Delete this record?", vbYesNo + vbQuestion, "Delete Data") If msg = vbYes Then AdSupply.Recordset.Delete X = MsgBox("Record Deleted!", vbInformation, "Data Deleted") AdSupply.Recordset.MovePrevious If AdSupply.Recordset.BOF Then AdSupply.Recordset.MoveNext End If End If End Sub Next Record button
The following code is used for the next record button and will go to the next record in the supply table. If the record is the last one, then a message dialog is shown and moves to the last record.

AdSupply.Recordset.MoveNext If AdSupply.Recordset.EOF Then x = MsgBox("You have reached the end of the file.", vbInformation, "Last Record") AdSupply.Recordset.MoveLast End If End Sub

Rayan Isran PK 530

208

Stop N Shop System


Previous Record button

Sales And Stock Control Processing

The following code is used for the previous record button and will go to the previous record in the supply table. If the record is the first one, then a message dialog is shown and moves to the first record.

Private Sub cmdprevrec_Click() AdSupply.Recordset.MovePrevious If AdSupply.Recordset.BOF Then x = MsgBox("You have reached the beginning of the file.", vbInformation, "Last Record") AdSupply.Recordset.MoveLast End If End Sub Save Record button
The following code has been coded for the save record button. Before saving, it is validated to see if the record is acceptable for saving, and only then will it show the save confirmation dialog.

Private Sub cmdsaverec_Click() If txtReceiptNo.Text = Empty Then m = MsgBox("Item Code can not be left blank", , "Invalid Input") Else If txtReceiptNo.Text < 0 Or txtReceiptNo.Text > 10000 Then m = MsgBox("Item Code should be between 0 and 10000", , "Invalid Input") Else If Not IsNumeric(txtReceiptNo.Text) Then m = MsgBox("Item Code should be numeric", , "Invalid Input") Else If Len(txtReceiptNo.Text) < 3 Then m = MsgBox(" Item Code should be atleast 3 characters long", , "Invalid Input") Else x = MsgBox("Do you want to save this record?", vbYesNo + vbQuestion, "Save Data") If x = vbYes Then

Rayan Isran PK 530

209

Stop N Shop System

Sales And Stock Control Processing

AdSupply.Recordset.Update y = MsgBox("Record saved!", vbInformation, "Save") End If End If End If End If End If End Sub First Record button
The following code has been coded for the first record button. It simply moves to the first record in the supply table.

Private Sub cmdfirstrec_Click() AdSupply.Recordset.MoveFirst End Sub Last Record button


The following code has been coded for the last record button. It simply moves to the last record in the supply table.

Private Sub cmdlastrec_Click() AdSupply.Recordset.MoveLast End Sub Go to Submenu button


The following code has been coded for the Go to submenu button. It simply unloads this form and loads the submenu forms form.

Private Sub cmdmainmenu_Click() submenufrm.Show Unload Me End Sub

Rayan Isran PK 530

210

Stop N Shop System


Search Record button

Sales And Stock Control Processing

The following code is used to search for a particular record. It is coded for the search command button. An input box is shown and the user inputs the item code. If found, it will load the item otherwise it will give an error.

Private Sub cmdsearchrec_Click() Dim x As String inp = InputBox("Enter Item Code", "Search Record") If inp = "" Then x = MsgBox("Search could not complete because you have not entered any Item Code!", vbCritical, "Error!") Else x = inp '"'" & inp & "'" q = "Select * from Supply where ReceiptNo=" & x AdSupply.CommandType = adCmdText AdSupply.RecordSource = q AdSupply.Refresh End If End Sub Add Record button

The following code has been coded for the add record button. It adds a new record to the supply table. If the current record is the last one, the item code will be set to 1 otherwise it is set to the current item code number + 1. After creating a record, focus is given to the item description text box.

Private Sub cmaddrec_Click() If AdSupply.Recordset.EOF Then AdSupply.Recordset.AddNew txtReceiptNo.Text = 1 Else AdSupply.Recordset.MoveLast x = txtReceiptNo.Text AdSupply.Recordset.AddNew txtReceiptNo.Text = x + 1 End If txtDate.SetFocus End Sub

Rayan Isran PK 530

211

Stop N Shop System


Edit Record button

Sales And Stock Control Processing

The following code has been coded for the edit record command button. It first shows a confirmation dialog whether the employee wants to update changes or not and will save changes to and update the records and the Yes button is clicked.

Private Sub cmdeditrec_Click() x = MsgBox("Are you sure you want to Save changes made?", vbYesNo + vbQuestion, "Edit Data") If x = vbYes Then AdSupply.Recordset.Update x = MsgBox("Record has been updated!", vbInformation, "Record Updated") End If End Sub Supplier Form Delete command button
The following code is used to delete record. It is coded for the delete command button. Before deleting a record, a message appears prompting the user to confirm this delete operation.

Private Sub cmddelete_Click() msg = MsgBox("Are you sure you want to Delete this record?", vbYesNo + vbQuestion, "Delete Data") If msg = vbYes Then Adsupplier.Recordset.Delete X = MsgBox("Record Deleted!", vbInformation, "Data Deleted") Adsupplier.Recordset.MovePrevious If Adsupplier.Recordset.BOF Then Adsupplier.Recordset.MoveNext End If End If End Sub

Rayan Isran PK 530

212

Stop N Shop System


Next Record button

Sales And Stock Control Processing

The following code is used for the next record button and will go to the next record in the supplier table. If the record is the last one, then a message dialog is shown and moves to the last record.

Adsupplier.Recordset.MoveNext If Adsupplier.Recordset.EOF Then x = MsgBox("You have reached the end of the file.", vbInformation, "Last Record") Adsupplier.Recordset.MoveLast End If End Sub Previous Record button
The following code is used for the previous record button and will go to the previous record in the supplier table. If the record is the first one, then a message dialog is shown and moves to the first record.

Private Sub cmdprevrec_Click() Adsupplier.Recordset.MovePrevious If Adsupplier.Recordset.BOF Then x = MsgBox("You have reached the beginning of the file.", vbInformation, "Last Record") Adsupplier.Recordset.MoveLast End If End Sub Save Record button
The following code has been coded for the save record button. Before saving, it is validated to see if the record is acceptable for saving, and only then will it show the save confirmation dialog.

Private Sub cmdsaverec_Click() If txtSupplierID.Text = Empty Then

Rayan Isran PK 530

213

Stop N Shop System

Sales And Stock Control Processing

m = MsgBox("Item Code can not be left blank", , "Invalid Input") Else If txtSupplierID.Text < 0 Or txtSupplierID.Text > 10000 Then m = MsgBox("Item Code should be between 0 and 10000", , "Invalid Input") Else If Not IsNumeric(txtSupplierID.Text) Then m = MsgBox("Item Code should be numeric", , "Invalid Input") Else If Len(txtSupplierID.Text) < 3 Then m = MsgBox(" Item Code should be atleast 3 characters long", , "Invalid Input") Else x = MsgBox("Do you want to save this record?", vbYesNo + vbQuestion, "Save Data") If x = vbYes Then Adsupplier.Recordset.Update y = MsgBox("Record saved!", vbInformation, "Save") End If End If End If End If End If End Sub First Record button
The following code has been coded for the first record button. It simply moves to the first record in the supplier table.

Private Sub cmdfirstrec_Click() Adsupplier.Recordset.MoveFirst End Sub Last Record button


The following code has been coded for the last record button. It simply moves to the last record in the supplier table.

Private Sub cmdlastrec_Click() Adsupplier.Recordset.MoveLast

Rayan Isran PK 530

214

Stop N Shop System


End Sub Go to Submenu button

Sales And Stock Control Processing

The following code has been coded for the Go to submenu button. It simply unloads this form and loads the submenu forms form.

Private Sub cmdmainmenu_Click() submenufrm.Show Unload Me End Sub Search Record button
The following code is used to search for a particular record. It is coded for the search command button. An input box is shown and the user inputs the item code. If found, it will load the item otherwise it will give an error.

Private Sub cmdsearchrec_Click() Dim x As String inp = InputBox("Enter Supplier ID", "Search Record") If inp = "" Then x = MsgBox("Search could not complete because you have not entered any Supplier ID!", vbCritical, "Error!") Else x = inp '"'" & inp & "'" q = "Select * from Supplier where SupplierID=" & x Adsupplier.CommandType = adCmdText Adsupplier.RecordSource = q Adsupplier.Refresh End If End Sub

Rayan Isran PK 530

215

Stop N Shop System


Add Record button

Sales And Stock Control Processing

The following code has been coded for the add record command button. It adds a new record to the table. If the current record is the last one, the supplier ID will be set to 1, otherwise it is set to the current supplier ID number + 1. After creating a record, focus is given to the item description text box so that the employee start typing the description without having to click the text box first.

Private Sub cmaddrec_Click() If Adsupplier.Recordset.EOF Then Adsupplier.Recordset.AddNew txtSupplierID.Text = 1 Else Adsupplier.Recordset.MoveLast x = txtSupplierID.Text Adsupplier.Recordset.AddNew txtSupplierID.Text = x + 1 End If txtName.SetFocus End Sub Edit Record button
The following code has been coded for the edit record command button. It first shows a confirmation dialog whether the employee wants to update changes or not and will save changes to and update the records if the Yes button is clicked.

Private Sub cmdeditrec_Click() x = MsgBox("Are you sure you want to Save changes made?", vbYesNo + vbQuestion, "Edit Data") If x = vbYes Then Adsupplier.Recordset.Update x = MsgBox("Record has been updated!", vbInformation, "Record Updated") End If End Sub

Rayan Isran PK 530

216

Stop N Shop System


Sales Details Form Delete Record button

Sales And Stock Control Processing

The following code is used to delete record. It is coded for the delete command button. Before deleting a record, a message appears prompting the user to confirm this delete operation.

Private Sub cmddelete_Click() msg = MsgBox("Are you sure you want to Delete this record?", vbYesNo + vbQuestion, "Delete Data") If msg = vbYes Then AdSalesDetails.Recordset.Delete X = MsgBox("Record Deleted!", vbInformation, "Data Deleted") AdSalesDetails.Recordset.MovePrevious If AdSalesDetails.Recordset.BOF Then AdSalesDetails.Recordset.MoveNext End If End If End Sub Next Record button
The following code is used for the next record button and will go to the next record in the sales details table. If the record is the last one, then a message dialog is shown and moves to the last record.

AdSalesDetails.Recordset.MoveNext If AdSalesDetails.Recordset.EOF Then x = MsgBox("You have reached the end of the file.", vbInformation, "Last Record") AdSalesDetails.Recordset.MoveLast End If End Sub

Rayan Isran PK 530

217

Stop N Shop System


Previous Record button

Sales And Stock Control Processing

The following code is used for the previous record button and will go to the previous record in the sales details table. If the record is the first one, then a message dialog is shown and moves to the first record.

Private Sub cmdprevrec_Click() AdSalesDetails.Recordset.MovePrevious If AdSalesDetails.Recordset.BOF Then x = MsgBox("You have reached the beginning of the file.", vbInformation, "Last Record") AdSalesDetails.Recordset.MoveLast End If End Sub Save Record button
The following code has been coded for the save record button. Before saving, it is validated to see if the record is acceptable for saving, and only then will it show the save confirmation dialog.

Private Sub cmdsaverec_Click() If txtReceiptNo.Text = Empty Then m = MsgBox("Item Code can not be left blank", , "Invalid Input") Else If txtReceiptNo.Text < 0 Or txtReceiptNo.Text > 10000 Then m = MsgBox("Item Code should be between 0 and 10000", , "Invalid Input") Else If Not IsNumeric(txtReceiptNo.Text) Then m = MsgBox("Item Code should be numeric", , "Invalid Input") Else If Len(txtReceiptNo.Text) < 3 Then m = MsgBox(" Item Code should be atleast 3 characters long", , "Invalid Input") Else x = MsgBox("Do you want to save this record?", vbYesNo + vbQuestion, "Save Data") If x = vbYes Then AdSalesDetails.Recordset.Update y = MsgBox("Record saved!", vbInformation, "Save") End If

Rayan Isran PK 530

218

Stop N Shop System


End If End If End If End If End Sub First Record button

Sales And Stock Control Processing

The following code has been coded for the first record button. It simply moves to the first record in the supplier table.

Private Sub cmdfirstrec_Click() AdSalesDetails.Recordset.MoveFirst End Sub Last Record button


The following code has been coded for the last record button. It simply moves to the last record in the supplier table.

Private Sub cmdlastrec_Click() AdSalesDetails.Recordset.MoveLast End Sub Go to Submenu button


The following code has been coded for the Go to submenu button. It simply unloads this form and loads the submenu forms form.

Private Sub cmdmainmenu_Click() submenufrm.Show Unload Me End Sub

Rayan Isran PK 530

219

Stop N Shop System


Search Record button

Sales And Stock Control Processing

The following code is used to search for a particular record. It is coded for the search command button. An input box is shown and the user inputs the item code. If found, it will load the item otherwise it will give an error.

Private Sub cmdsearchrec_Click() Dim x As String inp = InputBox("Enter Item Code", "Search Record") If inp = "" Then x = MsgBox("Search could not complete because you have not entered any Item Code!", vbCritical, "Error!") Else x = inp '"'" & inp & "'" q = "Select * from SalesDetails where ItemCode=" & x AdSalesDetails.CommandType = adCmdText AdSalesDetails.RecordSource = q AdSalesDetails.Refresh txtReceiptNo.SetFocus End If End Sub Add Record button
The following code has been coded for the add record command button. It adds a new record to the table. If the current record is the last one, the receipt number will be set to 1, otherwise it is set to the current receipt number + 1. After creating a record, focus is given to the serial number text box so that the employee can start typing the serial number without having to click the text box first.

Private Sub cmaddrec_Click() If AdSalesDetails.Recordset.EOF Then AdSalesDetails.Recordset.AddNew txtReceiptNo.Text = 1 Else AdSalesDetails.Recordset.MoveLast x = txtReceiptNo.Text 'x = x + 1 AdSalesDetails.Recordset.AddNew txtReceiptNo.Text = x + 1

Rayan Isran PK 530

220

Stop N Shop System


txtSerialNo.SetFocus End If End Sub Edit Record button

Sales And Stock Control Processing

The following code has been coded for the edit record command button. It first shows a confirmation dialog whether the employee wants to update changes or not and will save changes to and update the records if the Yes button is clicked.

Private Sub cmdeditrec_Click() x = MsgBox("Are you sure you want to Save changes made?", vbYesNo + vbQuestion, "Edit Data") If x = vbYes Then AdSalesDetails.Recordset.Update x = MsgBox("Record has been updated!", vbInformation, "Record Updated") End If End Sub Sales Form Delete Record button
The following code is used to delete record. It is coded for the delete command button. Before deleting a record, a message appears prompting the user to confirm this delete operation.

Private Sub cmddelete_Click() msg = MsgBox("Are you sure you want to Delete this record?", vbYesNo + vbQuestion, "Delete Data") If msg = vbYes Then AdSales.Recordset.Delete X = MsgBox("Record Deleted!", vbInformation, "Data Deleted") AdSales.Recordset.MovePrevious If AdSales.Recordset.BOF Then AdSales.Recordset.MoveNext End If End If End Sub

Rayan Isran PK 530

221

Stop N Shop System


Next Record button

Sales And Stock Control Processing

The following code is used for the next record button and will go to the next record in the sales details table. If the record is the last one, then a message dialog is shown and moves to the last record.

AdSales.Recordset.MoveNext If AdSales.Recordset.EOF Then x = MsgBox("You have reached the end of the file.", vbInformation, "Last Record") AdSales.Recordset.MoveLast End If End Sub Previous Record button
The following code is used for the previous record button and will go to the previous record in the sales details table. If the record is the first one, then a message dialog is shown and moves to the first record.

Private Sub cmdprevrec_Click() AdSales.Recordset.MovePrevious If AdSales.Recordset.BOF Then x = MsgBox("You have reached the beginning of the file.", vbInformation, "Last Record") AdSales.Recordset.MoveLast End If End Sub Save Record button
The following code has been coded for the save record button. Before saving, it is validated to see if the record is acceptable for saving, and only then will it show the save confirmation dialog.

Private Sub cmdsaverec_Click() If txtReceiptNo.Text = Empty Then m = MsgBox("Item Code cannot be left blank", , "Invalid Input") Else

Rayan Isran PK 530

222

Stop N Shop System

Sales And Stock Control Processing

If txtReceiptNo.Text < 0 Or txtReceiptNo.Text > 10000 Then m = MsgBox("Item Code should be between 0 and 10000", , "Invalid Input") Else If Not IsNumeric(txtReceiptNo.Text) Then m = MsgBox("Item Code should be numeric", , "Invalid Input") Else If Len(txtReceiptNo.Text) < 3 Then m = MsgBox(" Item Code should be atleast 3 characters long", , "Invalid Input") Else x = MsgBox("Do you want to save this record?", vbYesNo + vbQuestion, "Save Data") If x = vbYes Then AdSales.Recordset.Update y = MsgBox("Record saved!", vbInformation, "Save") End If End If End If End If End If End Sub First Record button
The following code has been coded for the first record button. It simply moves to the first record in the sales table.

Private Sub cmdfirstrec_Click() AdSales.Recordset.MoveFirst End Sub Last Record button


The following code has been coded for the last record button. It simply moves to the last record in the sales table.

Private Sub cmdlastrec_Click() AdSales.Recordset.MoveLast End Sub

Rayan Isran PK 530

223

Stop N Shop System


Go to Submenu button

Sales And Stock Control Processing

The following code has been coded for the Go to submenu button. It simply unloads this form and loads the submenu forms form.

Private Sub cmdmainmenu_Click() submenufrm.Show Unload Me End Sub Search Record button
The following code is used to search for a particular record. It is coded for the search command button. An input box is shown and the user inputs the item code. If found, it will load the item otherwise it will give an error.

Private Sub cmdsearchrec_Click() Dim x As String inp = InputBox("Enter Item Code", "Search Record") If inp = "" Then x = MsgBox("Search could not complete because you have not entered any Item Code!", vbCritical, "Error!") Else x = inp '"'" & inp & "'" q = "Select * from Sales where ItemCode=" & x AdSales.CommandType = adCmdText AdSales.RecordSource = q AdSales.Refresh txtReceiptNo.SetFocus End If End Sub Add Record button
The following code has been coded for the add record command button. It adds a new record to the table. If the current record is the last one, the receipt number will be set to 1, otherwise it is set to the current receipt number + 1. After creating a record, focus is given to the serial number text box so that the employee can start typing the serial number without having to click the text box first.

Private Sub cmaddrec_Click() If AdSales.Recordset.EOF Then

Rayan Isran PK 530

224

Stop N Shop System


AdSales.Recordset.AddNew txtReceiptNo.Text = 1 Else AdSales.Recordset.MoveLast x = txtReceiptNo.Text 'x = x + 1 AdSales.Recordset.AddNew txtReceiptNo.Text = x + 1 txtDate.SetFocus End If End Sub Edit Record button

Sales And Stock Control Processing

The following code has been coded for the edit record command button. It first shows a confirmation dialog whether the employee wants to update changes or not and will save changes to and update the records if the Yes button is clicked.

Private Sub cmdeditrec_Click() x = MsgBox("Are you sure you want to Save changes made?", vbYesNo + vbQuestion, "Edit Data") If x = vbYes Then AdSales.Recordset.Update x = MsgBox("Record has been updated!", vbInformation, "Record Updated") End If End Sub

Rayan Isran PK 530

225

Stop N Shop System

Sales And Stock Control Processing

Declaring variables at the top of the code window.

Dim total As Double Dim subtotal As Double Dim serial As Integer Dim add As Boolean Subroutines
Combofill is a subroutine written to fill the combo box with item codes from item table. This subroutine is called from form load.

Public Sub combofill() Aditem.Recordset.MoveFirst While Not Aditem.Recordset.EOF Combo1.AddItem txtitem.Text Aditem.Recordset.MoveNext Wend End Sub Private Sub Form_Load() add = False combofill End Sub
Lookupitem is a subroutine written to retrieve information regarding the item that is being sold. This subroutine is called from combo1.click event procedure.

Public Sub lookupitem(i) 'for data type text itemcode Dim q1 As String Dim a As String 'Variable a is used just to concatenate " " a = "'" & i & "'" ql = "Select * from Items where Itemcode=" & a Aditem.CommandType = adCmdText Aditem.RecordSource = ql Aditem.Refresh End Sub
Populategrid is a subroutine written to fill the datagrid with related records from the salesdetails table. This subroutine is called from combo1.click event procedure. Rayan Isran PK 530 226

Stop N Shop System

Sales And Stock Control Processing

Public Sub populategrid() If add = False Then 'to populate the grid Dim b As String Dim q As String b = "'" & txtReceiptNo.Text & "'" q = "select* from SalesDetails where ReceiptNo=" & b Addet.CommandType = adCmdText Addet.RecordSource = q Addet.Refresh End If End Sub

Rayan Isran PK 530

227

Stop N Shop System

Sales And Stock Control Processing

TESTING

Rayan Isran PK 530

228

Stop N Shop System

Sales And Stock Control Processing

Testing of Input Data


Input data can be categorized into three categories:
a) Normal data b) Abnormal data c) Extreme data

Testing Normal Data Reference to Computer Related Objective #1: Accept valid and normal data: When normal data is entered, it will be saved. No error message will be displayed.
Test Case Reference to Computer Related Objective Objective #1. Normal data is accepted and saved. Objective #1. Normal data is accepted and saved. 3 Objective #1. Normal data is accepted Test Form Name Field Name Testing Dtaa Expected Result

Enter normal data while adding new Item code. Enter normal data while adding new Receipt number

Items Form

Item Code

1031

Record is added. No error.

Sales Form

Receipt 8787 Number

Record is added. No error.

Sales Details Item Form Code

520

Record is added. No error.

Rayan Isran PK 530

229

Stop N Shop System


and saved.

Sales And Stock Control Processing

b) Testing Abnormal Data Reference to Computer Related Objective #2: Reject invalid and abnormal data: When abnormal data is entered, it will not be saved. An error message will be displayed instead, prompting the user to make amendments.

Test Case

Reference to Computer Related Objective Objective #2. Reject invalid value. Display an error message.

Test

Form Name

Field Name

Testing Data

Expected Result

Enter abnormal data while adding a new Item code.

Items Form

Item ID

(Blank field)

Display Error Message Item Code cannot be left blank.

Objective #2 Reject invalid value. Display an error message.

Enter abnormal data while adding new a Receipt number.

Sales Form

Receipt Number

-22

Display Error Message Receipt Number cannot be less than 0

Objective #2

Enter abnormal data while

Sales Details

Quantity sold

six

Display Error Message

Rayan Isran PK 530

230

Stop N Shop System


Reject invalid value. Display an error message. 7 Objective #2 Reject invalid value. Display an error message. adding new Receipt number Form

Sales And Stock Control Processing


quantity sold should be numeric

Enter abnormal data while adding new Receipt number

Items Form

Item Brand new Description imported dairy milk chocolate, Cadbury.

Display Error Message Item description cannot be more than 20 characters long.

c) Testing Extreme Data Reference to Computer Related Objective #3: Accept extreme data. Reject any value less than lower extreme limit or greater than upper extreme limit defined.

Test Case

Reference to Computer Related Objective Objective #3. Extreme data is accepted. Objective

Test

Form Name

Field Name

Testing Data

Expected Result

Enter extreme data in NIC Enter

Suppliers Mobile Form Number

0300293283

Record is added. No error.

Suppliers Mobile
231

03002932835

Display

Rayan Isran PK 530

Stop N Shop System


#3. Data greater than extreme upper limit is rejected 10 Objective #3. Data less than extreme lower limit is rejected value greater than extreme limit in NIC Form

Sales And Stock Control Processing


Number error message NIC can not be more than 10 characters long. 1 Record is added. No error.

Enter Items value less Form than minimum extreme value defined in current quantity

ReorderQty

Testing of Process Data

Test Cas e

Reference to Computer Related Objective Objective #4. To ensure easy updating of record

Test

Form Name

Field Name

Testing Data

Expected Result

11

Enter Suppliers test data Form and Click on save button to update record Enter data and click on Supplier Form

Mobile

30200443

Displaymessage Record saved.

12

Objective #5.

Supplier ID

12

Display message Record

Rayan Isran PK 530

232

Stop N Shop System


To ensure easy addition of record 13 Objective #6. To ensure easy searching of record 14 Objective #7. To ensure easy deletion of record Objective #8. Ensure Security of data 16 Objective #9 To ensure automatic display of item details. 17 Objective #10 To ensure automatic calculation of total. save button to save record Click on Sales search Form comman d button, enter the value to search. Click on delete comman d button to delete record Enter incorrect password and click the O button. Select an item from combo box. Items Form

Sales And Stock Control Processing


saved.

Receipt Number

224

Display records containing the data that was searched. Display message Record deleted.

CurrentQty

38

15

Login Form

Password

abcdefg

Display message Invalid Password, try again! Displays the record related to Item Code 1020.

Items Form

Item Code

1020

Add record in the sales form.

Sales Form

Display total in the total text box.

Rayan Isran PK 530

233

Stop N Shop System


18 Objective #12 To ensure combo box is filled with Item IDs from Item table. On form load, look up Item codes from the Item table. Sales Form

Sales And Stock Control Processing


Item Code Display all Item Codes from Items table in the combo box.

Testing of Output Data Test Case Reference to Computer Related Objective Objective #14. To check report generation Objective #14. To check report generation Test Form Name Field Name Testing Data Expected Result

19

Click on Items report

Submenu reports

Items reports generated.

20

Click on Supplier report

Submenu reports

Supplier report generated.

Rayan Isran PK 530

234

Stop N Shop System

Sales And Stock Control Processing

Test Results
Test Case #1 Test Results for Normal Data
Reference to Computer Related Objective Objective #1. Normal data is accepted and saved.

BEFORE SAVING:

Rayan Isran PK 530

235

Stop N Shop System

Sales And Stock Control Processing

Normal Data Accepted

Rayan Isran PK 530

236

Stop N Shop System

Sales And Stock Control Processing

AFTER SAVING:

THE RECORD WAS SAVED SUCCESSFULLY AS SHOWN IN THE SNAPSHOT.

Rayan Isran PK 530

237

Stop N Shop System

Sales And Stock Control Processing Test Case #2


Reference to Computer Related Objective Objective #1. Normal data is accepted and saved.

BEFORE SAVING:

Rayan Isran PK 530

238

Stop N Shop System

Sales And Stock Control Processing

Normal Data Accepted

Rayan Isran PK 530

239

Stop N Shop System

Sales And Stock Control Processing

AFTER SAVING: THE RECORD WAS SAVED SUCCESSFULLY AS SHOWN IN THE SNAPSHOT.

Rayan Isran PK 530

240

Stop N Shop System

Sales And Stock Control Processing Test Case #3


Reference to Computer Related Objective Objective #1. Normal data is accepted and saved.

BEFORE SAVING:

Rayan Isran PK 530

241

Stop N Shop System

Sales And Stock Control Processing

Normal Data Accepted

Rayan Isran PK 530

242

Stop N Shop System

Sales And Stock Control Processing

AFTER SAVING: THE RECORD WAS SAVED SUCCESSFULLY AS SHOWN IN THE SNAPSHOT.

Rayan Isran PK 530

243

Stop N Shop System

Sales And Stock Control Processing Test Case #4


Reference to Computer Related Objective Objective #2. Reject invalid and abnormal data.

Abnormal Data Rejected.

Rayan Isran PK 530

244

Stop N Shop System

Sales And Stock Control Processing Test Case #5


Reference to Computer Related Objective Objective #2. Reject invalid and abnormal data.

Abnormal Data Rejected.

Rayan Isran PK 530

245

Stop N Shop System

Sales And Stock Control Processing Test Case #6


Reference to Computer Related Objective Objective #2. Reject invalid and abnormal data.

Abnormal Data Rejected.

Rayan Isran PK 530

246

Stop N Shop System

Sales And Stock Control Processing Test Case #7


Reference to Computer Related Objective Objective #2. Reject invalid and abnormal data.

Abnormal Data Rejected.

Rayan Isran PK 530

247

Stop N Shop System

Sales And Stock Control Processing Test Case #8


Reference to Computer Related Objective Objective #3. Extreme data is accepted.

BEFORE SAVING:

Rayan Isran PK 530

248

Stop N Shop System

Sales And Stock Control Processing

Extreme value accepted (10 digits).

Rayan Isran PK 530

249

Stop N Shop System

Sales And Stock Control Processing AFTER SAVING:

THE RECORD WAS SAVED AS SHOWN IN THE SNAPSHOT.

Rayan Isran PK 530

250

Stop N Shop System

Sales And Stock Control Processing Test Case #9


Reference to Computer Related Objective Objective #3. Extreme data is accepted.

BEFORE SAVING:

Rayan Isran PK 530

251

Stop N Shop System

Sales And Stock Control Processing

Greater than extreme value (11 digits), it is rejected and an error is displayed as shown above.

Rayan Isran PK 530

252

Stop N Shop System

Sales And Stock Control Processing AFTER SAVING:

THE RECORD WAS NOT SAVED AS SHOWN IN THE SNAPSHOT.

Rayan Isran PK 530

253

Stop N Shop System

Sales And Stock Control Processing Test Case #10


Reference to Computer Related Objective Objective #3. Extreme data is accepted.

BEFORE SAVING:

Reorder level

Rayan Isran PK 530

254

Stop N Shop System

Sales And Stock Control Processing

Extreme data is accepted.

Rayan Isran PK 530

255

Stop N Shop System

Sales And Stock Control Processing AFTER SAVING:

THE RECORD WAS SAVED AS SHOWN IN THE SNAPSHOT.

Rayan Isran PK 530

256

Stop N Shop System

Sales And Stock Control Processing Test Case #11

Reference to Computer Related Objective Objective #4. To ensure easy updating of record.

BEFORE SAVING:

Rayan Isran PK 530

257

Stop N Shop System

Sales And Stock Control Processing

Updated mobile number.

Rayan Isran PK 530

258

Stop N Shop System

Sales And Stock Control Processing AFTER SAVING:

THE RECORD WAS UPDATED AS SHOWN IN THE SNAPSHOT.

Rayan Isran PK 530

259

Stop N Shop System

Sales And Stock Control Processing Test Case #12

Reference to Computer Related Objective Objective #5. To ensure easy addition of record

BEFORE SAVING:

Rayan Isran PK 530

260

Stop N Shop System

Sales And Stock Control Processing

User adds and saves a record with the above data.

Rayan Isran PK 530

261

Stop N Shop System

Sales And Stock Control Processing AFTER SAVING:

THE RECORD WAS SAVED AS SHOWN IN THE SNAPSHOT.

Rayan Isran PK 530

262

Stop N Shop System

Sales And Stock Control Processing Test Case #13

Reference to Computer Related Objective Objective #6. To ensure easy searching of record

BEFORE SEARCHING:

Rayan Isran PK 530

263

Stop N Shop System

Sales And Stock Control Processing

User clicks Search Record and enters a serial number and clicks OK.

Rayan Isran PK 530

264

Stop N Shop System

Sales And Stock Control Processing AFTER SEARCHING:

THE DATA RELATED TO THE RECEIPT NUMBER

224 IS DISPLAYED AS SHOWN IN THE SCREENSHOT.

Rayan Isran PK 530

265

Stop N Shop System

Sales And Stock Control Processing Test Case #14

Reference to Computer Related Objective Objective #7. To ensure easy deletion of record.

BEFORE DELETING:

Rayan Isran PK 530

266

Stop N Shop System

Sales And Stock Control Processing

User deletes the record by clicking the Delete Record button and clicking the Yes button that shows up in the confirmation dialog box.

Rayan Isran PK 530

267

Stop N Shop System

Sales And Stock Control Processing AFTER DELETING:

THE RECORD RELATED TO ITEM CODE 1027 IS NO LONGER SEEN IN THE SCREENSHOT ABOVE, THUS
SHOWING IT WAS SUCCESSFULLY DELETED FROM THE DATABASE.

Rayan Isran PK 530

268

Stop N Shop System

Sales And Stock Control Processing Test Case #15

Reference to Computer Related Objective Objective #8. Ensure Security of data.

ATTEMPTING TO LOG IN WITH INCORRECT PASSWORD

Incorrect password 123456. Logging in the password 123456 yields an error and the user cannot proceed to the main menu.

Rayan Isran PK 530

269

Stop N Shop System

Sales And Stock Control Processing

Correct password 101125151.

Rayan Isran PK 530

270

Stop N Shop System

Sales And Stock Control Processing

Main menu loads when the correct password is entered and user clicks OK.

Rayan Isran PK 530

271

Stop N Shop System

Sales And Stock Control Processing Test Case # 16

Reference to Computer Related Objective Objective #9. To ensure automatic display of item details.
ITEMS TABLE VIEW:

Rayan Isran PK 530

272

Stop N Shop System

Sales And Stock Control Processing

After selecting a particular item, its details will appear in the textboxes below the combo box.

Rayan Isran PK 530

273

Stop N Shop System

Sales And Stock Control Processing Test Case #17

Reference to Computer Related Objective Objective #10. To ensure automatic calculation of total.
AFTER CLICKING ADD INVOICE BUTTON

Total = Total + (Quantity * Price) is displayed in this text box (In this case 0 + (33*26) = 726.

Calculate the total by multiplying the two numbers.

Rayan Isran PK 530

274

Stop N Shop System

Sales And Stock Control Processing

The total changes, as we have added a second item to the total. The new total is 726 + (5*12) which is 786.

User clicks the add invoice button which will multiply the quantity by the price and add that amount to the total as seen in the total textbox on the left.

Rayan Isran PK 530

275

Stop N Shop System

Sales And Stock Control Processing Test Case # 18

Reference to Computer Related Objective Objective #11. To ensure combo box is filled with Item IDs from Item table.
VIEW OF ITEM TABLE

Rayan Isran PK 530

276

Stop N Shop System

Sales And Stock Control Processing

Combo box displays item codes from the item table.

Rayan Isran PK 530

277

Stop N Shop System

Sales And Stock Control Processing AFTER SAVING:

WHEN

CLICKING A ITEM CODE, THE RECORD RELATED TO IT IS SHOWN IN THE TEXTBOXES BELOW THE COMBO-BOX.

Rayan Isran PK 530

278

Stop N Shop System

Sales And Stock Control Processing

Test Case #19

Reference to Computer Related Objective Objective #12. To check report generation. #12. generation.

ITEM

TABLE VIEW

Rayan Isran PK 530

279

Stop N Shop System

Sales And Stock Control Processing ITEM REPORT

THE REPORT OF THE ITEMS ARE GENERATED AUTOMATICALLY WHEN THE ITEM REPORT BUTTON IS CLICKED.

Rayan Isran PK 530

280

Stop N Shop System

Sales And Stock Control Processing Test Case # 20


Reference to Computer Related Objective Objective #12. To check report generation. #12. generation.

SUPPLIER FORM VIEW

Rayan Isran PK 530

281

Stop N Shop System

Sales And Stock Control Processing

Rayan Isran PK 530

282

Stop N Shop System

Sales And Stock Control Processing

Conclusion
TEST CASE
1 2 Testing Normal Data 3 Testing Normal Data 4 Testing Abnormal Data 5 Testing Abnormal Data Yes Testing Abnormal Data Yes Testing Abnormal Data Yes Testing Extreme Data The test was successful as the record was rejected and not added The test was successful as the record was rejected and not added to the database. The test was successful as the record was rejected and not added to the database. Yes The test was successful as the record was rejected and not added to the database. Yes The test was successful as the record was rejected and not added to the database. Yes The test was successful as the record was rejected and not added to the database.

TYPE

SUCCESSFUL?
Yes Yes

CONCLUSION

Testing Normal Data

The test was successful as the record was added to the database. The test was successful as the record was rejected and not added to the database.

Rayan Isran PK 530

283

Stop N Shop System


Yes Testing Extreme Data Yes Testing Extreme Data Testing Processing data (updating of record) Yes

Sales And Stock Control Processing


to the database.

The test was successful as the record was rejected and not added to the database. The test was successful as the record was rejected and not added to the database. The test was successful as the data was easily modified and the changes were saved. Yes The test was successful as the record was successfully added to the database. Yes The test was successful as records can now easily be searched by using a search button. Yes The test was success as records can now easily be deleted from the database with a delete button. Yes The test was success as the main form only showed up when the correct password was entered. Yes | The test was successful as item details were displayed in textboxes when an item code was selected from a combo-box populated with item codes.

10

11

12

Testing Processing data (addition of record). Testing Processing data (searching of record). Testing Processing data (deletion of record). Testing Processing data (security of data) Testing Processing data (automatic display of Item details)

13

14

15

16

Rayan Isran PK 530

284

Stop N Shop System


17 Yes Testing Processing data (total calculated automatically) Yes To ensure combo box is filled with Item IDs from Item Yes To check report generation.

Sales And Stock Control Processing

The test was success as the total cost is calculated automatically with the click of a button.

18

The test was successful as the combo-box in the sales form is populated with item codes from the item table. The test was success as the report was successfully generated when a particular criterion was entered. The test was success as the report was successfully generated when a particular criterion was entered.

19

20

To check report generation.

Yes

Rayan Isran PK 530

285

Stop N Shop System

Sales And Stock Control Processing

DOCUMENTATION

Rayan Isran PK 530

286

Stop N Shop System

Sales And Stock Control Processing

Technical Documentation
DESIGN.....................................................Error: Reference source not found
Gantt Chart...............................................................Error: Reference source not found Minimum Hardware Specification.................................Error: Reference source not found Minimum Software Specification..................................Error: Reference source not found Table Design..............................................................Error: Reference source not found

Relationships................................................Error: Reference source not found Forms Layout................................................Error: Reference source not found Reports Layout..............................................Error: Reference source not found Menu Layout.................................................Error: Reference source not found Reports Submenu...........................................Error: Reference source not found Flowcharts...................................................Error: Reference source not found Reports.......................................................Error: Reference source not found

IMPLEMENTATION....................................Error: Reference source not found


Table Design................................................Error: Reference source not found
Overview of Database.................................................Error: Reference source not found

Tools & Techniques Used.................................Error: Reference source not found Access Documenter........................................Error: Reference source not found Program Code...............................................Error: Reference source not found

Rayan Isran PK 530

287

Stop N Shop System

Sales And Stock Control Processing

User Documentation
Getting started
The program which is specifically designed for the Stop N Shop grocery store is used to store the details of the following: Employees Sales and stocks of goods Items available for sale Before running the software, ensure that you meet the (minimum) requirements that have been described in the Design Phase under the headings Hardware Requirements and Software Requirements. The following pages contain basic information and guidelines or the users who will operate this program and browse through various menus, reports, forms, etc. The guiding principles are easy to understand and technical language is avoided as far as possible. Each form, menu and submenus purpose and working have been clearly stated along with snapshots for better understanding and convenience to the user.

Installation
Copy the file stop_n_shop.exe from the CD to your computer and place a shortcut on your desktop.

After you have done this double click the icon to run the program.

Rayan Isran PK 530

288

Stop N Shop System

Sales And Stock Control Processing

Start Up Screen (Splash Screen)

This form is opened automatically once the program is started by the user. It displays all the information about the company including the logo, copyright laws, license, and the current version. This form will be replaced by the security access form in approximately 1-2 seconds.

Security Access Screen (Login form)

User name and Password text boxes for the user.

Rayan Isran PK 530

289

Stop N Shop Sales And Stock Control Processing System This form is made for security purposes to make sure that unauthorized personnel do not gain access to the information in the database. It prompts the user to input his/her user name and password. If both of them match, access will be granted; else the following errors will be displayed.

The incorrect password has been input.

The user will have to enter the correct ID after clicking OK button to gain access.

Main Menu

By clicking on one of these buttons, the user is able to access the corresponding form.

This is the main menu. Through this menu the user is able to access to various forms available: Submenu Form Submenu Reports

Rayan Isran PK 530

290

Stop N Shop Sales And Stock Control Processing System An exit button has also been implemented in case the user wants to close the program.

Submenu Form

By clicking on one of these buttons, the user is able to access the corresponding form.

This is the submenu form button which contains further sub forms regarding items, sales and stocks. By clicking these buttons, the user can gain access to the corresponding form.

Rayan Isran PK 530

291

Stop N Shop System

Sales And Stock Control Processing

Items Form

This is the Items form. Using this form the user can easily navigate through the available records and check out the details of the items available. The details include the: Item code Item description Expiry date of the item Supplier Cost price & selling price
Rayan Isran PK 530
292

Stop N Shop Sales And Stock Control Processing System Reorder level & reorder quantity

To navigate through the available records the user has to use the navigation buttons as shown above. When the user reaches the first record the following message will be displayed:

When the user reaches the last record the following message will be displayed:

Apart from navigation the user can also perform the following operations: Add new record(s) Save record(s) Edit (update) record(s) Delete record(s) Search for record(s)
Rayan Isran PK 530
293

Stop N Shop System Return to the submenu form

Sales And Stock Control Processing

All this can be done by using the controls present on the form as shown below:

Buttons used to perform different operations.

Adding a new record

To add a new record click the Add Record button in the controls area. All the fields will become blank, aside from the item code number which is automatically incremented by one, for the user to enter data as shown below:

Enter the data in the fields provided.

Enter the data in the fields provided.

Rayan Isran PK 530

294

Stop N Shop System

Sales And Stock Control Processing

Rayan Isran PK 530

295

Stop N Shop System

Sales And Stock Control Processing

Once you have entered all the information about the item click the Save Record button in the controls area to save the record.
Deleting a record

To delete a record select the record you would like to remove and click the Delete Record command button in the controls area. You will be prompted with a message box to confirm your action as shown below:

After clicking the Yes button, the following message box will be displayed notifying the user of the deletion:

Searching for records


To search for a specific record click the Search button in the controls area. The following message box will pop up prompting the user to enter the Item Code:

Rayan Isran PK 530

296

Stop N Shop System

Sales And Stock Control Processing

Enter the Item Code in the textbox.

After entering the Item Code click on the OK button to search. Once the record is found it will be displayed on the screen like so:

Rayan Isran PK 530

297

Stop N Shop System

Sales And Stock Control Processing

Updating Records
You can easily update the information about existing records. This can be done by using the Edit Record button in the control area. You simply edit the fields to be updated and then click the Edit Record button.

Rayan Isran PK 530

298

Stop N Shop System

Sales And Stock Control Processing

These fields have to be updated.

The price has increased from 20 to 24, while the current quantity has decreased from 29 to 25. Simply click the Edit Record button which shows a confirmation dialog:

Clicking Yes will update the changes and show the following dialog:

Rayan Isran PK 530

299

Stop N Shop System

Sales And Stock Control Processing

Supply Form

This is the Supply form. Using this form the user can easily navigate through the available records and check out the details of the items available.

Rayan Isran PK 530

300

Stop N Shop System The details include the: Receipt number Date Supplier

Sales And Stock Control Processing

The user can delete, edit, add, search and save records in the same way as has been shown in the items form.

Rayan Isran PK 530

301

Stop N Shop System

Sales And Stock Control Processing

Supplier Form

This is the Supplier form. Using this form the user can easily navigate through the available records and check out the details of the items available.

Rayan Isran PK 530

302

Stop N Shop System The details include the: Supplier ID Supplier name Contact person Address Phone of the supplier Mobile of the supplier Email of the supplier

Sales And Stock Control Processing

The user can search, add, edit, save and delete records in the same way as has been shown in the items form description above, except when searching, the user will type a Supplier ID instead of an Item Code.

Rayan Isran PK 530

303

Stop N Shop System

Sales And Stock Control Processing

Supplier Details Form

This is the Supply Details form. Using this form the user can easily navigate through the available records and check out the details of the items available. The details include the: Receipt number Serial number Item Code The user can edit, search, delete, add and save records in the same way as has been shown in the items form above.

Rayan Isran PK 530

304

Stop N Shop System

Sales And Stock Control Processing

Sales Details Form

This is the Supplier form. Using this form the user can easily navigate through the available records and check out the details of the items available. The details include the: Receipt number Serial number Item Code

Quantity of the item

The user can edit, save, delete, search and add records in the same way as has been shown in the items form above.

Rayan Isran PK 530

305

Stop N Shop System

Sales And Stock Control Processing

Sales Form

This is the sales form which is used when items are being sold to customers. This is how it works: In the controls area, click the Add Record button:

Once you clicked the Add Receipt command button a new receipt number will be displayed in the Receipt No. text box on the top o the form, which is the previous one incremented by one. The next step is to select the item from the combo box like so:

Rayan Isran PK 530

306

Stop N Shop System

Sales And Stock Control Processing

Select the item from the combo box.

Once you have selected the appropriate item its details will appear in the corresponding text boxes. Enter the quantity to be sold in the Quantity text box, and then click the Add Invoice button in the controls area, at the extreme right:

The details are entered automatically in the appropriate textboxes.

Enter the quantity to be sold.

Click this button once the quantity has been entered.

Rayan Isran PK 530

307

Stop N Shop Sales And Stock Control Processing System Once the add invoice button has been clicked, the total is automatically calculated in the textbox next to the Total Rs label. You may have noticed that the sale is added to the data grid, which shows the receipt number, serial number, item code and quantity. Once all of the items have been added, click the Calculate Total button which will display the total. Once the custom has given the total amount of money, the balance can be calculated by clicking the Calculate Balance button. Like so:
Click this button to calculate the total once the sales transaction has been complete.

Click this button after the sales transaction has been completed to automatically calculate the balance, which is displayed in the textbox next to the Balance label.

Something to keep in mind is that data in fields is rejected if it is not in the correct format. A couple of examples are shown below:

Rayan Isran PK 530

308

Stop N Shop System

Sales And Stock Control Processing

When the save button was clicked, the receipt number was found to be negative. Thus it was rejected and the record was not saved.

In this example, the phone number was found to contain the letter A, the user probably meant to write 9 instead and made a transcription error. When the edit button was clicked, the record was not updated and the error message was shown.

Rayan Isran PK 530

309

Stop N Shop System

Sales And Stock Control Processing

Reports Menu

Use these buttons to search or look up a particular report.

The submenu reports form can be accessed from the main menu by clicking the button called Submenu Reports. The form as shown above is displayed which allows the user to view different types of reports that are automatically generated by clicking the corresponding buttons. Simple Reports are ones that will simply show a report of the entire records that exist in the database. For example, when the items report button is clicked, a report is shown of all of the items and their details, as shown below:

Rayan Isran PK 530

310

Stop N Shop System

Sales And Stock Control Processing

Buttons below the heading Search Report.. are ones that are querybased. When clicked, a specific item code/receipt number/etc. is entered, and the report of the matching item/sale/supply/etc. is shown. For example, when the Items Report button is clicked, the following input box is shown:

Rayan Isran PK 530

311

Stop N Shop System

Sales And Stock Control Processing

When the Item Code is entered and the OK button clicked (or enter pressed), the report of the item with the Item Code 1021 is shown:

To zoom in, change the zoom level from this combo-box.

Click this button to print the report.

Note that in the top-left corner is a print button which allows you to print the report. Any report can be printed with this button.

Rayan Isran PK 530

312

Stop N Shop System

Sales And Stock Control Processing

EVALUATION

Rayan Isran PK 530

313

Stop N Shop System

Sales And Stock Control Processing

All the objectives mentioned earlier in the analysis stage have been successfully achieved as demonstrated below:Objectives #1, 2 & 3: Accept valid data and extreme data, but reject abnormal data. Objectives 1, 2 and 3 have been achieved - the program only accepts valid data and extreme data. This was made sure by enforcing validation checks. Any data that is invalid is rejected and not saved to the database. In the example below, the user has entered 50 into the quantity field. This is a valid value and has been appended to the database.

Rayan Isran PK 530

314

Stop N Shop Sales And Stock Control Processing System In another example shown below, the user has entered -1 in the quantity field. An error is shown prompting the user to make amendments.

Quantity entered is not a valid number.

When 100 is entered into the quantity field, which is the maximum and therefore extreme value, the record may be saved as shown below:

Rayan Isran PK 530

315

Stop N Shop System

Sales And Stock Control Processing

Rayan Isran PK 530

316

Stop N Shop Sales And Stock Control Processing System As can be seen in the database after saving, the receipt number 236 with quantity 50 was accepted. The receipt number 237 with quantity 1000 was also accepted but the receipt number 237 with quantity -1 was not appended to the database.

4. To ensure easy updating of record. Objective #4 has been achieved; an Edit Record button has been added to easily update records. Editing a record can be done in simply 2 steps: 1. Edit the fields of the record which are to be changed. This can be done in the Items Form, Sales Form, Sales Details Form, Supply Form and Supplier Form, Supply Details Form.

Rayan Isran PK 530

317

Stop N Shop System

Sales And Stock Control Processing

The mobile number has changed from 33854848 to 54875345 and needs to be updated.

Click this button to update the changes.

2. Clicking the Edit Record button will prompt the user to confirm the update, and clicking Yes in the confirmation dialog will commit the changes. 5. To ensure easy addition of record Objective #5 has been achieved; an Add Record button has been added to add new records to the database. This can be done in the Items Form, Sales Form, Sales Details Form, Supply Form and Supplier Form, Supply Details Form. Adding a record can easily be done in 3 steps:

Rayan Isran PK 530

318

Stop N Shop Sales And Stock Control Processing System 1. Click the Add Record button. This will automatically clear all fields for you and automatically increment the item code ID/supplier ID/receipt number.

Add data in these fields.

Clicking this button will allow you to add a new record.

2. Add data in the fields, for example as shown below:

Rayan Isran PK 530

319

Stop N Shop System

Sales And Stock Control Processing

3. Click the Save Record button. This will load a confirmation dialog whether to save the record. Clicking Yes will add the record to the database. BEFORE SAVING: AFTER SAVING:

Rayan Isran PK 530

320

Stop N Shop Sales And Stock Control Processing System 6. to ensure easy searching of record Objective #6 has been achieved; a Search Record button has been added to add new records to the database. This can be done in the Items Form, Sales Form, Sales Details Form, Supply Form and Supplier Form, Supply Details Form. Deleting a record can easily be done in 2 steps: 1. Click the Secord Record button in the controls area, and enter the specific data that is to be searched as shown in the screenshot below.

Enter the data to search for, in this case the Item Code.

2. Click OK, and the record will automatically be loaded, like so:

Click this button to open the Search Record dialog as shown above.

Rayan Isran PK 530

321

Stop N Shop System

Sales And Stock Control Processing

7. To ensure easy deletion of record Objective #7 has been achieved; a Delete Record button has been added to delete existing records to the database. This can be done in the Items Form, Sales Form, Sales Details Form, Supply Form and Supplier Form, Supply Details Form. Deleting a record can easily be done in 2 steps: 1. Navigate to the record which is to be deleted using the navigation controls provided.

Rayan Isran PK 530

322

Stop N Shop System

Sales And Stock Control Processing

Navigation buttons. Clicking this button will allow you to delete the currently shown record.

2. Click the delete record button to load a dialog box prompting the user to confirm the deletion. Clicking Yes in the dialog will delete the record.

Rayan Isran PK 530

323

Stop N Shop System 8. Ensure Security of data

Sales And Stock Control Processing

Objective #8 has been achieved; a login screen has been implemented where the user has to enter a username and password in order to gain access to the main form. If a wrong password is entered, the following message is shown and the user is not allowed to gain access to the main form.

Else, if the correct password and username is entered, the user gains access to the main form. 9. To ensure automatic display of item details Objective #9 has been achieved; the user is easily able to view item details from the items form.

Rayan Isran PK 530

324

Stop N Shop System

Sales And Stock Control Processing

Item details are shown in the Look Up Item section of the form by choosing an item code from the combo box as shown above. 10. To ensure automatic calculation of total The total is automatically calculated when items are added to the bill. It works by multiply the quantity with the price each time an item is added.

Rayan Isran PK 530

325

Stop N Shop System

Sales And Stock Control Processing

Total automaticall y calculated and shown in this textbox.

Find the subtotal by multiply the two, and add it to the total amount.

11. To ensure combo box is filled with Item IDs from Item table. Objective #11 has been achieved; the combo box in the Sales Form displays Item Codes that are appended from the item table.

Sales Form display:

Rayan Isran PK 530

326

Stop N Shop System

Sales And Stock Control Processing

As can be seen, the combo box is filled with the item codes from the item table. 12. To check report generation Objective #12 has been achieved; reports are now easily generated with the click of a button. When the user clicks one of the following buttons, a report will be generated:

User clicks the button to generate a report.

Rayan Isran PK 530

327

Stop N Shop System

Sales And Stock Control Processing

The Items report was generated with the click of the Item Report button and can easily be printed if required.

Rayan Isran PK 530

328

Stop N Shop System

Sales And Stock Control Processing

Future Modifications
Introducing Bar code reader A barcode reader could be implemented into the system which would read and scan barcodes which are tagged on items in the store. The item details could be looked up through the information in the database which would then be read by the barcode reader. This would then speed up the time taken to perform and complete a sales transaction. Email facility An email facility could be implemented so that the employees could communicate with suppliers and customers through email. For example, an email could be sent to a customer about special deals and offers or an email could be sent to suppliers to place orders. This would be of great convenience to the company, supplier as well as customers as it would be much more effective and would save their time. Adding a help file to the program An F1 help provider could be added in order to show a help file (.chm file) which explains how the program works and how to use it, possibly with technical information and images as well. Other useful reports can be designed Plenty of other useful reports could be designed, for example one which shows the average sales per day or one which shows how often an item is bought. These reports could further be used for statistical purposes which would greatly benefit the company. Online system Through an online system, processing will be done much faster and efficiently, and customers and suppliers can take orders online without having to be present at the shop thus making the system quicker and more convenient.

Rayan Isran PK 530

329

Вам также может понравиться