Tuesday, January 12, 2010

VB Source Code for Departmental Stores

Case Study - Departmental store project in VB



Visual Basic is is the ideal development environment for business applications like Departmental Stores. What are the basic operations in system involved in a Departmental Store? They are traders. They purchase goods from whole sellers and sell the items with a marginal profit. The purpose or goal for the software system is to assist the management in assessing profit / loss to make financial decisions, to streamline the inventory / stores operations, purchase decisions etc. Making electronic billing is another necessity. In large departmental stores there may be many billing counters catering the needs of hundreds of customers.

So the major modules are Purchase Orders, Purchase, Purchase Returns, Sales, Sales Returns.

Everything starts with making purchases. Since there is no manufacturing in departmental store all goods are purchased. There are multiple suppliers for different items. Purchase manager will get quotations from multiple suppliers and make final decisions. After authorization from finance/accounts department he will make purchase orders.

Before writing code, we need to design our database. First we need to select our back-end or database server. For small stores with single user environment MS-Access database is enough. But for large stores with huge volume of data Microsoft SQL Server or Oracle Database server is needed. It depends on the requirement and need. After selecting the database design the tables, primary key and relations. One to many relationships will be there in Master detail tables.

Consider Purchase Order. To make a purchase order we need to store supplier details, Purchase order number, Date etc. And we need to store Products/ items, their quantity, rate and amount. So we will create two tables, one for the master details like supplier details which will fit in one record. For Detail part there are as many record as the number of items / products. The primary key is the Purchase order Number.

In this fashion design tables for Purchase Inwards (Goods Received), Purchase Return, Sales, Sales Return.

Separate tables are needed for Master details like Prouducts, Suppliers.

After creating tables design forms in VB. The master details will fit in textbox, DateTime picker. The details will fit in a FlexGrid control. FlexGrid is the activex control with excel like cells with rows and columns.

Billing is done with Products BAR code details. A barcode scanner will scan the BAR code printed on the product. The scanner is linked with the computer system via a Serial communication port or USB port. To read the serial port you can use MSComm Activex control in Visual Basic. I have covered Com Port Tutorial in another post. The BAR CODE is equivalent to a product number stored in product database. So you can retrieve the amount / rate of the product using a database query.

Thus you have completed the Billing part. Normally bills/invoices are printed on Dot-Matrix printers. For fast printing use Direct Port Printing. The Printer object in VB will be slow as it prints in Graphics mode. The text mode printing can be achieved by using Win32 Printer APIs or Direct Port Printing. Use File IO and specify "LPT1" or "PRN" as file name and when you flush the file it will be printed.

Reporting can be done using Crystal Reports. There can be no readymade solution for Departmental Stores or other retail business. Each business is unique and have specific requirement. So a custom made software is necessary. You can tailor the existing programs to suit your needs. I have developed many such applications of Departmental Stores, Hardware Stores, Retail Chains, Medical Shops, Restaurants and more.

Write to me if you want my assistance. You can hire me at a reasonable price.

My email: sundaracm@gmail.com