306
Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Sudan University of Science & Technology College of Computer science & Information Technology, Sudan Genetic Computer School, Singapore Bangladesh Branch, Dhaka. Shah Sultan Soap Inventory Shah Sultan Soap Inventory Control Systems Control Systems (SSIC) (SSIC) This project is submitted in partial fulfillment for the B.Sc This project is submitted in partial fulfillment for the B.Sc (Hon’s) degree in Computer and Information Systems. (Hon’s) degree in Computer and Information Systems. Developed by the Student given bellow: 1. Project Leader MIZANUR RAHMAN REG. NO: 0310-061-0017 2. Project Members MUHAMMAD FAKHRUL ISLAM REG. NO: 0310-081- 0008 Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

ShahSoap Project Documentation (BSc)

Embed Size (px)

Citation preview

Page 1: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Sudan University of Science & TechnologyCollege of Computer science & Information Technology, Sudan

Genetic Computer School, SingaporeBangladesh Branch, Dhaka.

Shah Sultan Soap InventoryShah Sultan Soap InventoryControl SystemsControl Systems

(SSIC)(SSIC)

This project is submitted in partial fulfillment for the B.Sc (Hon’s) This project is submitted in partial fulfillment for the B.Sc (Hon’s) degree in Computer and Information Systems.degree in Computer and Information Systems.

Developed by the Student given bellow:

1. Project Leader

MIZANUR RAHMAN REG. NO: 0310-061-0017

2. Project Members MUHAMMAD FAKHRUL ISLAM REG. NO: 0310-081-0008

MD. ATIKUZZAMAN LIMON REG. NO: 0310-071-0016

3. Project Supervisor: DR. SHAFIQUR RAHMAN

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 2: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Submitted On: June 2006

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

‘Project‘Project Title’Title’

“Shah Sultan Soap Inventory“Shah Sultan Soap InventoryControl Systems.(SSIC)”Control Systems.(SSIC)”

(Version: 2.1)(Version: 2.1)

UsingUsing Visual Basic 6.0 Visual Basic 6.0 as Front End, as Front End,

MS SQL Server 2000 MS SQL Server 2000 as Back Endas Back End & &Crystal Report 8.5 for Report GeneretCrystal Report 8.5 for Report Generet””

Page 3: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

This project

“Shah Sultan Soap Inventory

Control System (SSIC)”

Is dedicated

To-

The Parents Of all helpful memebers..

Page 4: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Praise to Allah, the creator and sustained who has given us strength and opportunity to complete the Indrustrial Project-2006 “Shah Sultan Soap Inventory Control Systems”

We are thanking to the Sudan University of science & Technology, Sudan for

proposal to devloping this project “Shah Sultan Soap Inventory Control Systems” which is leading to B.Sc (Hon’s) in omputer and Information Systems degree.

We would like to convey our appreciation and thanks for those who had dealt with me patiently and were generous enough to guide me with appropriate knowledge for this project.

Then We would like to thank especially to Mr. Hasimul Haque Hetu, Managing Director,Genetic Computer School Singapore, Bangladesh campus and Head of the Overseas Department , Singapore , for granting us this project and his faith on us for working on it.

We also thanks all my teachers and staff, specially to Mr. Sk. Ziaur Rahman, Campus manager and Instructor of Genetic Computer School Singapore, Bangladesh campus Who spent his valuable time for us with patience to explain and advioce us when ever I felled any kind of problem.

We also express my sincere indebteness to my family members who helped, encouraged and inspired me completing this project.

Page 5: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Praise to Allah, the creator and sustained who has given us strength and opportunity to complete the Industrial Project-2006 “Shah Sultan Soap Inventory Control Systems”

Firstly We are thanking to the Sudan University of science & Technology, Sudan

for proposal to devloping this project “Shah Sultan Soap Inventory Control Systems” which is leading to B.Sc (Hon’s) in omputer and Information Systems degree.

We would like to convey our appreciation and thanks for those who had dealt with me patiently and were generous enough to guide me with appropriate knowledge for this project.

Then we would like to thank especially to Mr. Hasimul Haque Hetu, Managing Director, Genetic Computer School Singapore, Bangladesh campus and Head of the Overseas Department, Singapore, for granting us this project and his faith on us for working on it.

We also thanks all my teachers and staff, specially to Mr. Sk. Ziaur Rahman, Campus manager and Instructor of Genetic Computer School Singapore, Bangladesh campus Who spent his valuable time for us with patience to explain and advioce us when ever I felled any kind of problem.

We also express my sincere indebteness to my family members who helped, encouraged and inspired me completing this project.

Page 6: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

NO PROJECT CONTENTS PAGE

01 1. SYSTEM SPECIFICATION

1.1 Scenario and Question Paper 1.2 Data Flow Diagram-DFD 1.3 System Analysis

02 2. SOFTWARE SPECIFICATION

2.1 Software Identification 2.2 Software Description

03 3. SOFTWARE DESIGN

3.1 Decision Table3.2 Data Dictionary

04 4. DATABASE DESIGN

4.1 Relationship Diagram4.2 Database Structure

05 5. INPUT SCREEN

06 6. OUTPUT SCREEN

07 7. CODING

08 8. OPERATING INSTRUCTION

8.1 Hardware and Software Requirements 8.2 Operating Instruction

099. CONCLUSION AND SUGGESTION

10 10. LIMITATIONS

11 11. GLOSSARY

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 7: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

[1.1] “Scenario and Question Paper”

------------------------------------1.Main Form (MDI Form): ----------------------------------

When you run the application, first you will be seen a login form. After inputting theLogin form to the selective control then it will be verified by the related databaseThen show a form, which is to be called as MDI form. By using this main form you cango any form or any report at the same moment. In this form there are 12(Twelve) menus,Which are?

Purchase, Product, Personal, Sales Executive, Distributor, Update, Reports, Calculator, User Add, Database Backup, About, Help.

---------------Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

1

Page 8: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 2.Purchase:---------------

From this menu you can manipulate or entry all purchase related information.Products are purchase of two ways they are LC Purchase and Verbal Purchase.All kinds of raw materials are used for making the Products. In the purchase menu there are 12(twelve) sub menu which are as follows:LC Product Information, LC Information, LC Details, LC Product Received, LC Other Cost, LC Damage product, Verbal Information, Verbal Order (Raw Materials),Verbal raw materials received, verbal raw materials money receipt, damage raw materials product, raw materials in factory.

------------3.Product:------------

From this menu you can add new product, their price and new finished goods (product) quantity. The sub menus of this form are Product information, ProductPrice and product in.

--------------4. Personal:-------------- From this menu you can add all employee information, their sales amount and money transaction and the free or gift product information.Four (4) sub menus are available of these menus which are employee information, personal sales, Personal money receipt and free product.

----------------------5. Sales Executive:----------------------

All sales executive and sales executive party information and their transaction areinputted by using this menu related form. There are eight (8) sub menus of this sales executive menu which are as follows:Sales executive information, Sales executive order, Sales executive product out,Sales executive money receipt, Sales executive party information, Sales executive party order, Sales executive party sales, Sales product return.

----------------6. Distributor:---------------

From this menu all distributor information and their transaction related submenu will be appeared. There are seven (7) submenus of the distributor menu which are Distributor Information, Distributor Order, Distributor Product out, Distributor money receipt, Distributor product return, Advance payment and Distributor product loss adjust.

-------------7.Update:-------------

From this menu you have to update some forms which are Sales Executive product out, Sales Executive Money Receipt and Distributor Product Out.If you make any mistakes by using this form then you have to update those forms which are to be showed from the update menu. All fields will not be updated from the update forms.

---------8.Reports:---------

After inputting all data to the related forms, you can see the required reports of that particular report. All reports section is individual. There are 13(thirteen) reports submenu of the report menu. The submenus are Stock, Product Report, Employee info, sales executive report, sales executive party

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 9: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 report, distributor information report, distributor advance report, sales report, Login/Logout report, LC report, verbal order report, raw materials report.

---------------9.Calculator:---------------

This calculator can be used as normal calculation. This has been given for your convenience of accounting. This calculator has to be developed for the Shah Sultan Inventory Control ver 2.0.

----------10.User:---------- By using this menu you can add new user with their password and user type for their security. There are 4(four) types of security of this form. These are Authority, Administrator, Normal user and guest. All user names will be showed by the list box which is showed beside the left side of the other controls.

-------------------------11.Database Backup:--------------------------------------

After inputting all data of the required form then, click the database backup menu to restore the all data of a specific location (E:\ShahSoapBackup) of the hard drive. This process will be appropriate as daily basis. A backup file will be created automatically of that particular day of a specific location. Every file name will be started as Shah Soap and the current system date of the file name's last side.If you can click the menu twice of the different time then it will be updated of the old backup files of that particular day.

------------12.About:------------

From this form you can know the Software name and its version no. And also the developer name. On the other hand you know the system information of your computer by clicking the system info button.

-----------13.Help:-----------

By using this Shah Soap help file you can know everything of this software. All User can see the help file except the guests. There are 3(three) submenu of this help menu these are: Contents, Search for Help and Using Help.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 10: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

[1.2][1.2] Data Flow Diagram- DFDData Flow Diagram- DFD

DFD of User Login

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 11: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

DFD of Shah Soap Inventory Control System.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 12: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 13: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

DFD of Raw Materials

DFD of Distributor

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 14: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

DFD of Sales

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 15: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

DFD of Employee Sales

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 16: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

[1.3][1.3] System System Analysis Analysis

Shah Sultan Inventory Control Systems

1.3.1 Goal of the Shah Sultan Soap Inventory Control System:

M/S New Shah Sultan Soap, Joypurpara, Matidale, Bogra, Bangladesh has a soap factory. This soap factory serve for the customers and perform repeated work like product purchase by Lc and Verbal Order, product information, sales executive information, employee’s information, distributor information, lose & profit information, payment and queries etc. The administrator, sales executive, distributo and employee’s perform these works by the register book/ tally book and cataloging system. This system depend on manual system, which is most tedious, time consuming and not error free processing. So we developed useful computer software, which can be reducing, the manual labor to a greater extent with faster, efficient and error free information processing, storing, searching and retrieving.

1.3.2 Difference between manual and automatic system:

We live in an age of science and this is the era of computer. The aim to make life form to easy to easier, speedy to speedier, have lifted communication and information today’s success. In the first time man would keep accounting by sticks and fingers. But through the passage of time and men’s knowledge and thinking, they enveloped letters and finger, pen and papers. In this system any calculation or processing which needs human intervention, this system called manual system.

When we process a big data processing application, human interactive may result erroneous and more troublesome and information and time consuming in the manual system. To solve this kind of problems man interactive data and information processing with machines. In this process to get the specific result, some procedure and databases are to be recorded in the language of the machine. This process with out human intervention is called automatic system. In automatic system user or client works speedy and process error less data or information.

1.3.3 About “SSIC” AUTOMATION:To achieve the ultimate goal of a SSIC system, Some rules and regulation must be

maintained which from the backbone of the automated SSIC system. In some cases, the conventional SSIC system’s too troublesome and erroneous processing for both the seller, Supplier and the customers, because of its different processing workload area. This may be load to miss-information and erroneous result. This problem can solve by the automatic SSIC system. The automatic SSIC system involves software developed only for processing the function related to SSIC system, like Product Purchase, Stock, Product infromation, Office Staffs, Sales Executive,Distributor, Loss and Profit calculation and payment, and queries. The automatic SSIC systems Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 17: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 based on menu system, the menu have one or more sub which selected by the operator to perform a specific function and can be easily maintained. The procedural steps related to the project are:

1. Analyses the existing manual SSIC discussing with the Staffs and paper and report.

2. Full SSIC system divided into subsystem functions, e.g. cataloging, new product / raw product entry … Then gathering and information by keyboard. The software was developed using Visual Basic 6.0 programming language under windows XP environment because of its user-friendly availability and flexibility.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 18: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

[2.1] Software IdentificationSoftware Identification

THIS IS THE “SHAH SOAP INVENTORY CONTROL SYSTEMS- (VERSION-2.1)” INDUSTRIAL PROJECT, 2006

Project name : Shah Soap Inventory Control Systems-(Ver2.1)

Duration : 6 Months

language/Tools Front-end : Visual Basic-6 Back-end : Ms SQL Server-7.0 Report : Crystal Report8.5

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

2

Page 19: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Last Compiled on : 30th May, 2006

File Size : 100 MB

Created On : 11th January, 2006

Submitted On : 5th June, 2006

Developed by the Student given bellow:

3. Project Leader

Project Leader

MIZANUR RAHMAN REG. NO: 0310-061-0017

4. Project Members MUHAMMAD FAKHRUL ISLAM REG. NO: 0310-081-0008

MD. ATIKUZZAMAN LIMON REG. NO: 0310-071-0016

Institute : Genetic Computer School, Singapore under, Sudan University of Science & Technology, Sudan.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 20: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

[2.2] SYSTEM Description Description

SYSTEM DESCRIPTION: It is in the nature of the system that they share a common life cycle pattern. After

a system has been in operation of a number of years, it gradually decays and becomes less and less effective because of the changing environment to which it has to adapt. For a time it is possible overcome problems by amendments and minor modifications other system but eventually it will be necessary to acknowledge the need for fundamental changes.

A new system will operate for a number of years until it too become obsolescent and the cycle begin. for this software here takes some activities for system development.the are as follows:-

1.Establisment of terms of reference2.Intial study 3.Detailed study4.Detailed design 5.Implementation6.Maintenance and review

Approaches to system development: The various approach to system development, which worth considering can be categorized as ‘individual application’ and ‘database’. Individual applications approach:This approach is essentially short term and long turns system development.

Integrated system approach:

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

SUB SYSTEMS

SUB SYSTEMS

SUB SYSTEMS

ANALYSIS AND DESIGN

ANALYSIS AND DESIGN

ANALYSIS AND DESIGN

OVER ALL PLAN

Page 21: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

CURRENT SSIC SYSTEM AND ITS PROBLEMS:

The authority always purchases raw matteriaols and crear new product. Raw materials bring from the supplier by lc and collects information form the product to be used for cataloging before delivering to the customer. When a customer come for buy some product after sales if the customer want to give back that product it occurs a problem.

The problems associated with the SSIC system are of two types:

1. General problem area2. Specific problems area.

1. GENERAL PROBLEM AREA:

The general problems that have to be faced by the management while using the conventional SSIC system are:

1. In the manual system labor spent is huge and in some cases it is troublesome.2. The administration/authority may have to face problem with verbal assurance3. Problems of keeping track with a wide variety of processes like Collect order, Invoicing

And maintain stock etc.4. Lengthy and time consuming decision making.

2. SPECIFIC PROBLEM AREA:

The specific problems that have to be faced by the management while using the conventional SSIC system are”

1. The deadlines of the various processes are not maintained strictly2. Waste of time and manpower in clerical works3. Appropriate remainders should be maid if issues of product/Raw product purchase /

suppliers not come in time, but it is difficult in manual system.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 22: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

[2.2] FUNCTIONAL AND TECHNICAL OBJECTIVES:

The objectives of the project are of tow types:

FUNCTIONAL OBJECTIVES:

1. Retrieving information in minimum time with minimum efforts2. Ensuring accurate and speedy processing of information.3. Trying to avoid human errors and inconsistencies.4. To provide error free, reliable and faster service.5. To generate statistical information for decision making and future reference

TECHNICAL OBJECTIVES:

1. To design the project with flexibility so that it can be changed with the enhanced or transformed features in the future.

2. To make the system easily maintainable3. To schedule the project efficiently so hat the administration can provide the cost

systematically. 4. To build the system with security considerations 5. To ensure the reliability of the system in the face of malfunctioning of hardware and

software to take suitable action 6. To provide easier design

2.3 Analysis of the processes:

The SSIC system involves different sub processes to complete its operation. Some of these are product /raw product purchase information, produc information, product price information, sales exrcutive information, distributor information, employee’s information, salary / payment system, calculation, report and queries etc.

1. All the information of the employees is created and maintained by an authorized staff.

2. Employee can enter this system only valid username and password. Here any employee can apply and view leave information with their valid username and password.

3. After create a new employee information then that employee can sales this product.

4. After create a new sales executive he can sales this product.5. The holiday and working day information is deepened on attendance. If

attendance then it works as working day or not attendance then it takes the status as holiday.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 23: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

6. After purchasing of some product (i.e. Soap) it must be entry into the system and then automatically generates a voucher no, Supplier ID, and invoice ID.

7. In this system all information of product purchase, purchase price, set sell price, quantityproduct name, customer’s and sales etc. are must entry by the operator.

8. Set price is used for set or edits the sale price of l the stock product.9. In sale there maintained the customer information stock on hand, VAT, sale

price and product sale price are maintained. A voucher is also generating here. Daily sale, customer voucher report also generate here.

10. Loss and profit depend on expense and income which is depends on product purchase, daily expense, salary payment and sailing amount.

[3.1] Decision TablesDecision Tables

DECISION TABLES:A decision table is a table showing -the various actions to be taken for different

combinations of conditions.

The upper rows of the table specify the variables of conditions to be evaluated and lower row specify the corresponding action to be taken when a condition or a set of condition is satisfied.

In other way we can say, A decision table is a tabular representation of conditions and their required actions to be carried out. Decision tables are normally used in program design as they are precise and concise. It deserves as a very useful means of portraying complex condition and their relationships to the actions required. if ordinary narrative is used, it will be long winded and the clarity will also be lost.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

3

Page 24: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 there are four (4) basic elements in a decision tables. They are as follow.

The Condition Stub.

The Condition Entries

The Action Stub.

The Action Entries.

Condition Stub

ConditionEntries

ActionStub

ActionEntries

Fig: component of a decision table

In the condition stub, the conditions are listed one below the other. In the action stub, all the possible actions that can be taken are listed.

The condition entries are made up of “yes” or “no” answer to each condition. The condition entries will contain many combinations of answer.

The action will be takers based on the combinations of conditions are indication in the actions entries. For example, an “x” in the action indicates that the action will be taken and a blank or a “─” indicates that no action will be taken.

Some of the decision tables are given below:

Decision Table for login Record: -

Condition stub Condition Entries

1. Check correct username/password Y N

Action Stub Action Entries

1.Successfully login X -

2. Display error message - X

Decision Table for Add Employee Record: -Condition RULES

1. check all required field values not empty and valid data Y Y Y Y N N N N

2. check unique username Y Y N N Y Y N N

3. confirmation Y N Y N Y N Y N

Action1. Add record X - - - - - - -

2. Error massage for invalid data or blanks files - - - - X X X X

3. Error massage for username - - X X - - - -

4. Do nothing - X - - - - - -

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 25: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Decision Table for Update Employee Record: -

Conditions RULES

1. check existence of employee ID from database Y Y Y Y N N N N

2. check all required field values not empty and valid data Y Y N N Y Y N N

3. confirmation Y N Y N Y N Y N

Actions1. Add record X - - - - - - -

2. Error massage ( Not found ) - - - - X X X X

3. Error massage for invalid data or blanks files - - X X - - X X4. Do nothing - X - - - - - -

Decision Table for Remove Employee Record: -Conditions RULES

1. Check existence of employee ID from database Y Y N N

2. Confirmation Y N Y N

Actions1. Remove record X - - -

2. Error massage ( Not found ) - - X X

3. Do nothing - X - -

Decision Table for Add Product Purchase Record: -Conditions RULES

1. check all required field values not empty and valid data Y N

Actions

1. Add purchase record and increase stock on hand X -

2. Error massage for invalid data or blanks files - X

Decision Table for Remove Product Purchase Record: -Conditions RULES

1. Confirmation Y N

Actions

1. Remove product and decrease stock on hand form database. X -

2. Do nothing - X

Decision Table for Remove Purchase Voucher Record: -Conditions RULES

1.. Check existence of Purchase voucher ID from database Y Y N N

2.. Confirmation Y N Y N

Actions

1. Remove Purchase voucher and decrease stock on hand form database. X - - -

2. Error massage ( Not found ) - - X X

3. Do nothing - X - -

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 26: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Decision Table for LC Record: -Conditions RULES

1. check all required field values not empty and valid data Y NActions

1. Add LC opening record and unload form X -2. Continue LC form - X

Decision Table for Sales (Sales Executive & Dealer) Record: -Conditions RULES

1. check all required field values not empty and valid data Y Y N N2. . Check product stock on hand from database Y N Y N

Actions

1. Add sales record and decrease product stock on hand to database. X - - -2.Error massage for invalid data or blanks files - - X X3. Error massage for insufficient stock - X - -

Decision Table for Remove Sales Invoice Record: -Conditions RULES

1. Confirmation Y N

Actions1. Remove product sales record and increase stock on hand form database. X -

2. Do nothing - X

Decision Table for Remove sales invoices Record: -Conditions RULES

1.. Check existence of sales invoice ID from database Y Y N N2.. Confirmation Y N Y N

Actions

1. Remove sales invoice record and increase stock on hand form database. X - - -2. Error massage ( Not found ) - - X X3. Do nothing - X - -

Decision Table for Dealer/Sales Exe. Information:

Conditions RULES

1. Select Dealer/Sales Exe. ID, and check validity of ID Y Y Y Y N N N N

2. Check Address Y Y N N Y Y N N

3. Opening Balance Y N Y N Y N Y NActions

1. Error Massage for invalid ID, - - - - X X X X

2. . Get A/C status as “Present” - - X - - - - -

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 27: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

3. Get A/C status as “Late-Present X X - - - - - -

4. Area wise information - - - X - - - -

Decision Table for Order Information:Conditions RULES

1. Select Dealer/Sales Exe. ID Y Y Y Y N N N N

2. Check valid date range Y Y N N Y Y N N

3. Check duplicate product entry Y N Y N Y N Y N

Actions

1. Error Massage for invalid ID - - X X X X X X

2. For zero amount - X - - - - - -

- - - - - - - -

Decision Table for Invoice Information:Conditions RULES

1. Select Dealer /Sales Exe. ID Y Y Y Y N N N N

2. Check valid date range Y Y N N Y Y N N

3. Check duplicate Invoice number Y N Y N Y N Y N

Actions

1. Error Massage for invalid ID - - X X X X X X

2. Submit Invalid Invoice no. - X - - - - - -

3. Update Invoice Number X - - - - - - -

Decision Table for Sales Payment Information:Conditions RULES

1. Select employee/dealer/sales exe. ID Y Y Y Y Y Y Y Y N N N N N N N N2. Select date for payment Y Y Y Y N N N N Y Y Y Y N N N N

3. Check all fields are not blank and valid.

Y Y N N Y Y N N Y Y N N Y Y N N

4. Confirmation Y N Y N Y N Y N Y N Y N Y N Y N

Actions1. Error message for Zero balance

- - - - - - - - X X X X X X X X

2. Show all due Invoice for payment.

X X X X X X X X - - - - - - - -

3. Show all payment information.

X X X X - - - - - - - - - - - -

4. Error message for blank /invalid fields.

- - X X X X X - - - - - - - -

5. Update Payment Record. X - - - - - - - - - - - - - - -

6. Do nothing - X - - - - - - - - - - - - - -

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 28: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

[3.2] Data Dictionary

DATA DICTIONARY:A data dictionary contains “data about data”. It is where detailed information about data used in a

program is kept, such as data type, valid data range etc.All definitions in the data dictionary have certain requirements regardless of the type of entry.

They are: The name of the data used. The data type. The data range.

A brief description of the data.

The Data Dictionary of This “Fast Food / Snacks / Stationary / Café Management Systems” -Project Is As Follows:

Data name Data type Data range DescriptionDD Integer 1-31 Accept a number as a day and check it’s validityMM Integer 1-12 Accept a number as a month and check it’s validity

YYYY Integer 1-3000 Accept a number as a day and check it’s validityDGRIDNAM String A-Z/ 0-9 Accept a short name form user by assign this variable for

further use.OPT Char A-Z/ 0-5 A variable assigned to accept option from user what he

choose.CH Char press any key To escape one window form another window or menu.

NAME String A-Z/ 0-9 Accept customer’s full name by assign this variable.ADD String A-Z/ 0-9 Accept customer’s address by assign this variable.PH String 9999999 Accept customer’s phone number. Phone number has fixed

limit. Not more or less than 7 digits. FAX String A-Z/ 0-9 Accept user’s fax number by assign this variable. For further

use. QNT Real O-999 Accept quantity form user. How many he/she wants to buy?PP Real 0-9999.99 A unique numeric value assigned the product price.

VAT Real 0-9999999.99 a value will come out after calculation and store in this variable. Vat charge is 15%.

TOTAL Real 0-999999.99 by calculation QNT *PP , comes out total amount and store in this variable

TOTAL. GT Real 0-9999999.99 By calculation TOT +VAT , comes out grand total and store

in this variable GT.TAKA Real 0-9999999.99 After calculation by and watching the GT, whatever the

customer pays through this variable.RETURN Real 0-9999999.99 If customer pays more than GT, then rest of the amount store

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 29: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

in this variable.TEMP Real 9999 When any quantity sale for lot then the change value store is

this variable to indicate at update sectionDAY Integer name of seven

daysThis variable content seven days is an array. To check the

validation of the date. PRESS char A-Z/ ‘0’-‘9’ A variable assigned to accept option from user what he

choose.Data name Data type Data range Description

HLP char A-Z A variable which accept Y, Yes for help or N, No for no need of any help.

I integer 0-9 This variable is used to increment the line of a box as row or column wise as counter.

XI integer 0-99 This variable is used to hold a numeric value to draw about it represents a point by row wise.

X 2 integer 0-99 This variable represents another point by row wise to draw a box.

Y1 integer 0-99 This variable represents a point by column wise to draw a box.

Y2 integer 0-99 This variable represents another point by column wise to draw a box.

NA integer 0-99 To read the length of customer’s nick name, for changing up case.

AN integer 0-99 A variable as a counter, which count the name by using “For loop”.

TEMP1 integer 0-99 It holds the massage of “THANK YOU” as integer.TEMP2 integer 0-99 Read the length of the massage of “THANK YOU”. TEMP3 integer 0-99 A variable as a counter, which count the massage using for

loop.Name nvarchar A-Z/ 0-9 A variable assigned to accept option from user what he

choose.

End of dictionary.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 30: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

4

Page 31: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

SYSTEM DEVELOPMENT ACTIVITIES:

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Establishment of Turns Reference

Initial Study to Test Feasibility

ManagementDecision

Detailed Study

ManagementDecision

Detail Design of Physical System

Software Developing

Implementation

System Maintenance and Review

Page 32: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

CHAPTER 3

DESIGN AND IMPLEMENTATION OF THE CANDIDATE SYSTEM

* Introduction* Designing the project * Designing the entry forms * Report design* Designing the menu* Coding * Building an Application* Testing the project

DESIGN AND IMPLEMENTATION OF THE CANDIDATE SYSTEM

3.1 Introduction : System design is a solution of ‘how to’ approach to the creation of a new

system. The design phase is a transition from a user-oriented document.

* Logical design: This phase of design specifies the needs of system at a level of detail that

virtually determines the information flow into and the required data sources. The logical design steps are:

1. Current system reviews 2. The out put specification3. The input specification.

* Physical design:This phase of design involves the following:

1. Database 2. Information flow design

3.2 Design the project:Here a complete database system is developed. The files included in this project are:

1. Tables 2. Database entry forms3. Queries4. Report 5. Menu etc

Which are used in different parts of the database system? To control and link all files together from a specific control area the project manager.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 33: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

The project manager male’s easier design, help to modify and run the individual components of the application. In the library system project, the project names.

3.3 Database design : Database is designed to manage large bodies of information. The management

of data involves both the definitions of structure for the storage of information and the provision of mechanism for the manipulation. The database is used to organize and relate tables and views.

The designing of a database involves the followings:

1.Determine the purpose of the database 2.Determine the tables required 3.Determine the fields, their types and width required 4.Determine the relation ships between the tables required 5.Refine the design

3.4 Designing the Entry Forms:Forms are designed to provide the user with a familiar interface for

viewing and entering data into the database. Forms provide a rich set of objects that can respond the user events so that the user can accomplish their information management tasks easily.

Some events for objects are:

Click Event: It works when an object is clicked.Key press Event: It works when an object is key pressed (Enter).Valid Event: It works when the cursor is passed from the object.Different forms are used in the Library systems are shown in the following figures.

3.5 Report Design

After collecting and organizing data, user can add reports to the application to print the desired output data on paper or display the on monitor in attractive and useful format by using suitable program code and data source.

The report menu will help to produce different output reports according to the user requirements related to library system.

3.6 Designing the MenuMenus provide a structured accessible route for the user to leverage the commands contained

in the application. Proper planning and design of menus is an important task for any application.

When designing the menu system, the following quid lines are to be maintained:1.The system has to be organized according to the tasks users will perform.2.Each menu should have a meaningful title closer to the function it performs3.Submenus should be created for appropriate menu items if required.

The program files will contain the necessary code required for Fast food/Snacks Stationary/Café Management system. The program files used in this project are.

3.7 Building an applicationThe purpose of building an application is to integrate the system components

into one file. A typical database application consists of data structures, user interface screens and reports.

To build an application, the following steps are maintained:1. Setting the application starting point

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 34: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

2. Setting the user environment 3. Displaying the interface4. Controlling the event loop5. Restoring the original environment

The for Shah Sultan Soap Inventroy Control system project made an application named SSICt System. APP to integrate the database, forms, menus, programs reports etc.

3.8 Testing the ProjectProgram Testing is the vital task in project completing. It involves finding problems in the

program code, entry forms, reports and queries. Firstly, individual testing of the components is performed to check desired output. After Successful testing of individual testing, building an application SSIC System performs integration. APP. This application is the controller of SSIC System. The outputs are given in the previous section.

3.9 Feasibility of the proposed system

This study helps to overcome the limitation in implementing a design with respect to various fields and aspects. It also helps the designer to choose the right decision.

Feasibility analysis considers the followings:

* Economic Feasibility:

The designed SSIC system can be implemented with a low cost. The hardware and software listed here justified the fact that as the analysis and design phase are completed, its implementation is not at all hard and costly job.

* Technical Feasibility:In designing the system, we used most modular and structured approach, so future updating

of hardware and software will not make problems. The developed system will easily adapt to the system.

* Organizational feasibility:As the authority are dealing SSIC system are too much interested to computerize system, it is

hope that implementing the system. The current system time consuming and may provide erroneous information in Fast food/ Stationary/ Café system. The Product Customer and the office staffs of SSIC system procedure both for customer and sales. The developed will help a lot to solve these problems with in comfort in operation. So, the developed system is also organizationally feasible.

3.10 User Acceptance of the proposed system: The developed library system for the Shah Sultan Soap Inventory Control system of SSIC

is a better approach for automating the current system.The developed SSIC system software reflects the functioning of the existing manual system, so it can be used for maintaining the central Shah Soap of Bogra SSIC system. The software can be easily operated and maintained with large volume of records of SSIC. That provides information with attractive entry screens and reports. The function like Product Purchase, Stock, Sales Executive Distributor,Employee, Loss and Profit calculation and payment, and queries can be easily

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 35: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

maintained with interactive colorful entry screen. The software is provided with an easier mouse operated pop-up menu. Different functions are associated with different submenus.

The user clicks a menu or submenu and an entry screen or a report for that submenu is activated. The submenus are named closer to the function, so user can perform the desired task easily. The software was developed using Visual Basic with back-end SQL Server under windows XP environment because of its availability.

It provides: 1. Attractive, smart and efficient menu environment 2. Easier maintenance3. Accurate and easier processing4. Higher data security 5. Less manual labor

3.11 Suggestions for Future Development Since this is the first version, there may be deficiencies. We shall be highly grateful if those are pointed out to us. Suggestions for the improvements of the current version are cordially invited. Such suggestions will be acknowledged with thanks and be incorporated in next edition.

.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 36: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

[4.2] Database StructureDatabase Structure

1. Lc Product Information:

ProductName nvarchar 25 0 PkProductType nvarchar 25 0 PKOrigine nvarchar 40 1WeightType nvarchar 7 1QtyPerDrum float 8 1

2. LC Information

ProformaInvoiceNo nvarchar 100 0ProformaDate datetime 8 1LCANo nvarchar 50 1LCADate datetime 8 1LCNo nvarchar 50 1LCDate datetime 8 1HSCode nvarchar 50 1ExporterName nvarchar 50 1ImporterName nvarchar 50 1CNFAgentName nvarchar 50 1CNFAgentAddress nvarchar 100 1BankName nvarchar 50 1Branch nvarchar 50 1PreferredBank nvarchar 50 1CountryBranch nvarchar 50 1

3. LC Details

LcNo nvarchar 50 0ProductName nvarchar 50 1ProductType nvarchar 50 1ValueDoller float 8 1RateOfCurrency float 8 1Quantity float 8 1

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 37: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

CurrencyType nvarchar 50 1Total float 8 1

4. LC Product Received

LCNo nvarchar 50 0 PkConsignDate datetime 8 0 PkInvoiceNo nvarchar 50 1InvoiceDate datetime 8 1ProductName nvarchar 50 0 PkProductType nvarchar 50 1Quantity float 8 1TotalLiterKg float 8 1Rate float 8 1TotalAmount float 8 1Remarks nvarchar 100 1

5. Party Information

PartyName nvarchar 50 0 PkProperitorName nvarchar 50 0District nvarchar 50 1Address nvarchar 100 1Phone nvarchar 50 1Division nvarchar 50 1

6. Verbal Order Details

OrderNo nvarchar 50 0ProductName nvarchar 50 0ProductType nvarchar 50 1Rate float 8 0Qty float 8 0TotalLiterKg float 8 0Amount float 8 1

7. Verbal Order Master

OrderNo nvarchar 50 0 PkOrderDate datetime 8 1OrderTime datetime 8 1Delivary datetime 8 1PartName nvarchar 50 1ContactPerson nvarchar 50 1TotalAmount float 8 1OFull varchar 4 1

8. Verbal Raw Material Received Detail

OrderNo nvarchar 50 1ProductName nvarchar 50 1ProductType nvarchar 50 1Qty float 8 1TotalLiterKg float 8 1

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 38: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Rate float 8 1DrumValue float 8 1TotalAmt float 8 1remarks nvarchar 100 1

9. Verbal Raw Material Received Master

OrderNo nvarchar 50 0 PkOrderDate datetime 8 1ReceivedDate datetime 8 1ReceivedTime datetime 8 1PartyName nvarchar 50 1Conveyance float 8 1LabourCost float 8 1DriverName nvarchar 50 1TruckNo nvarchar 15 1OtherExp float 8 1TotalAmount float 8 1

10. Verbal Raw Material MR

PartyName nvarchar 50 1MRNo nvarchar 50 0 PkPayDate datetime 8 0 PkPayType nvarchar 15 1DDTTCheckNo nvarchar 50 1BankName nvarchar 50 1Branch nvarchar 50 1PayAmount float 8 1LeftAmount float 8 1

11. LC Main Stock

ProductName nvarchar 25 0 PkProductType nvarchar 25 0 PkQty float 8 1LiterKg float 8 1

12. LC Other Cost

LCNo nvarchar 50 0ConsignDate datetime 8 0CNFAgentCost float 8 1MiscelleniousCost float 8 1Tax float 8 1LoadingCost float 8 1UnloadingCost float 8 1OtherCost float 8 1

13. Product Information

ProductName nvarchar 50 0 Pk

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 39: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

CartonPiece float 8 0Price float 8 1

14. Product Price]

PDate datetime 8 0ProductName nvarchar 50 0NewPrice float 8 1OldPrice float 8 1

15. Main Stock

ProductName nvarchar 50 0 PkCarton float 8 1Piece float 8 1BadCarton float 8 1BadPiece float 8 1

16. Employee Information

EmpId nvarchar 50 0 PkEmpName nvarchar 50 1Designation nvarchar 50 1Address nvarchar 100 1Phone nvarchar 50 1

17. Personal Sales Detail

EmpID nvarchar 50 1pInvoiceNo nvarchar 50 1ProductName nvarchar 50 1Carton float 8 1Piece float 8 1RatePerPiece float 8 1TotalAmount float 8 1

18. Personal Sales Master

EmpID nvarchar 50 1PkpInvoiceNo nvarchar 50 1ProductName nvarchar 50 1Carton float 8 1Piece float 8 1RatePerPiece float 8 1TotalAmount float 8 1

19. Personal Slaes MR

EmpID nvarchar 50 1PInvoiceNo nvarchar 50 1MRNo nvarchar 50 0 Pk

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 40: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

PayType nvarchar 50 1PayDate datetime 8 1Amount float 8 1Remarks nvarchar 50 1

20. Free Product

EmpID nvarchar 50 1GiftDate datetime 8 1ProductName nvarchar 50 1Carton float 8 1Piece float 8 1Remark nvarchar 100 1

21. Bank Information

BankName nvarchar 50 1BranchName nvarchar 50 0 PkAccountHolderName nvarchar 50 1AccountNumber nvarchar 50 0 PkOpeningDate datetime 8 1BankAddress nvarchar 80 1Phone nvarchar 50 1

22. Daily Stock

SDate datetime 8 0 PkProductName nvarchar 50 0 PkCarton float 8 1Piece float 8 1BadCarton float 8 1BadPiece float 8 1

23. Sales Executive Information

MID nvarchar 50 0 PkMName nvarchar 50 1Designation nvarchar 50 1Address nvarchar 100 1Phone nvarchar 50 1Mobile nvarchar 50 1Area nvarchar 100 1

24. Sales Executive Order Details

MOrderNo nvarchar 50 1ProductName nvarchar 50 1Cartoon float 8 1Piece float 8 1Rate float 8 1Total float 8 1

25. Sales Executive Order Master

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 41: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

MOrderNo nvarchar 50 0PkOrderDate datetime 8 1DeleveryDate datetime 8 1MID nvarchar 50 1MName nvarchar 50 1TotalAmount float 8 1FullOrNot nvarchar 50 1

26. Sales Executive Product Sales Details

MSInvoiceNo nvarchar 50 1ProductName nvarchar 50 1Carton float 8 1Piece float 8 1RatePiece float 8 1TotalAmount float 8 1

27. Sales Executive product Sales Master

MSInvoiceNo nvarchar 50 0PkMSOrderNo nvarchar 50 1MID nvarchar 50 1MDID nvarchar 50 1DeliveryDate datetime 8 1InvoiceAmount float 8 1PaidupAmoun float 8 1Balance float 8 1

28. Sales Executive MR

MDID nvarchar 50 1MInvoiceNo nvarchar 50 1MRNo nvarchar 50 0PkPayType nvarchar 50 1PayDate datetime 8 1Amount float 8 1Remarks nvarchar 100 1ShopeName nvarchar 50 1

29. Sales Executive Product Return

MID nvarchar 50 1MInvoiceNo nvarchar 50 1ReturnDate datetime 8 1ProductName nvarchar 50 1Carton float 8 1Piece float 8 1RateCarton float 8 1TotalAmount float 8 1Remarks nvarchar 100 1

30. Sales Executive Account Status

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 42: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

MID nvarchar 50 1MName nvarchar 50 1TotalGatePassAmt numeric 9 1TotalPaidupAmt numeric 9 1Balance numeric 9 1

31. Sales Executive Advance Payment

MID varchar 50 0PkMName varchar 60 0PkMrNo varchar 50 0PkPayDate datetime 8 1PayType varchar 20 1Amount float 8 1Balance numeric 9 1

32. Distributor Information

DID nvarchar 50 0PkShopName nvarchar 50 1PropreitorName nvarchar 50 1JoinDate datetime 8 1Address nvarchar 100 1TelNo nvarchar 50 1MobNumber nvarchar 25 1CreditLimit float 8 1

33. Distributor Order Details

DOrderNo nvarchar 50 1ProductName nvarchar 50 1Cartoon float 8 1Piece float 8 1

34. Distributor Order Master

DOrdeNo nvarchar 50 0PkDID nvarchar 50 1ShopName nvarchar 50 1OrderDate datetime 8 1DeliveryDate datetime 8 1FullOrNot nvarchar 50 1

35. Distributor Product Sales Details

DInvoiceNo nvarchar 50 1ProductName nvarchar 50 1Cartoon float 8 1Piece float 8 1RatePerCartoon float 8 1TotalAmount float 8 1Remark nvarchar 100 1

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 43: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

36. Distributor product Sales Master

DInvoiceNo nvarchar 50 0DeliveryDate datetime 8 0LagerName nvarchar 50 1PageNo nvarchar 50 1DID nvarchar 50 1OrderNo nvarchar 50 1Place nvarchar 50 1TrackNo nvarchar 50 1DriverName nvarchar 50 1InvoiceAmount float 8 1PaidupAmount float 8 1Balance float 8 1Total float 8 1TransPortCost float 8 1

37. Distributor MR

DID nvarchar 50 0DInvoiceNo nvarchar 50 1MRNo nvarchar 50 0PayType nvarchar 50 1PayDate datetime 8 1TotalAmount float 8 1BankName nvarchar 50 1Branchname nvarchar 50 1AccountNo nvarchar 50 1CheckNo nvarchar 50 1

38. Distributor Product Return

DID nvarchar 50 1DInvoice nvarchar 50 0PkCondition nvarchar 50 1ReturnDate datetime 8 1ProductName nvarchar 50 0PkCarton float 8 1Piece float 8 1RateCarton float 8 1TotalAmount float 8 1Remarks nvarchar 100 1

39. Distributor Account Status

DID nvarchar 50 0PkShopName nvarchar 50 0NvoiceAmount float 8 1Paidupamount float 8 1RecevalAmount float 8 1

40. Distributor Advance Payment

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 44: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

DID varchar 50 0PkShopName varchar 60 0MRNo varchar 50 0PayDate datetime 8 1PayType varchar 20 1Amount float 8 1BalanceAmount float 8 1

41. User Information

UserName nvarchar 50 0Password nvarchar 50 1[Group] nvarchar 50 1

42. Loging Time

UserID char 50 1PDate datetime 8 1LoginTime datetime 8 1LogOuttime datetime 8 1[Group] nvarchar 50 1

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 45: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

5

Page 46: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

At first we need to log in the form. If the log in password is correct then we can enter the main form.

Log In: This is the first screen of the application. This has been done for security of information. Without knowing password no one can enter this application. All user name lists will be showed by the user name combo box.

To Enter:A) Select user name from the list.B) Type your passwords in the box.C) Click the ok button.

To Exit:A) Click the cancel button or press (ctl+c) by keyboard.

(11) i) Log Off ii) Shut down.

i)Log Off: If you select log off from the main menu by the right click, log in forms comes closing the application. You have to select user type from the list and type password in the box. Finally click OK.

ii)Shut Down: If you select shut down menu from the main menu by the right click then the

application will be closed.

After Completed the log in then we can use the MDI (Main) Form.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 47: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

LC Product Information:

LC and verbal order purpose which product import from different countries will be inputted by this form. Without inputted Lc product information form you could not be seen any product list from Lc & verbal order related information.

A) To Open the Form: Click the purchase menu and then select the Lc product information form.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 48: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

B) To Data Entry: If product name is same but product type is different then select the product name

otherwise write down the product name of the combo box. Input the product type country of origin; select the weight type (Liter/ K.G/Pieces) and

Liter/K.G per drum/Bag of the related text box and combo box. With out information you cannot save the data.

After inputting all the data of the Lc product information from, click the Save button.

C) To Close Form: Click the exit button to close the form permanently.

Lc Information:

Lc related all initial information is inputted by using of this form. Without inputting all information you could not be saved if at a time.

A) To Open the Form: Click the purchase menu and then select the Lc product information form.

B) To Data Entry: Input the Proforma Invoice No, Proforma Invoice Date, Lca No, Lca Dare, Lc No, Lc No

Dare, HS-Code Exporter Name, Importer Name, CNF Agent Name, CNF Agent Address, Bank Name And Country/ Branch Name of the Lc information form. All data must be inputted of this form. Data will be inputted to the subsequent text box and DTPicker box (which is used only for month-day-year purpose).

After inputting all the valid data of the Lc information form, then click the Save button for restore all the data of the database permanently.

C) To Close Form: Click the exit button to close the form permanently.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 49: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Lc Details:

By this form individual Lc related product details quantity and its rate will be shown by this form.

A) To Open The Form: Click the purchase menu and select the Lc Details form.

B) To Data Entry: Select the Lc no required Product Name, Product Type from the combo box. After

select particular product and its type input the Product Quantity, Total Value (total cost of that particular product which will be showed as foreign currency) select the currency type from the combo and then input the present rate of currency. Total amount will be shown as automatically.

After inputting all the data of the required text box and combo box then click the add button. Then all data will be shown to the grid in the same moment all text box and combo box will be clear. If multiple products add to the grid you can use same procedure.

If any Row delete from the grid then select the particular product by the grid and then click the Remove button.

After inputting all data if you have to erase all data to the grid, text box or combo box click the clear button.

Grand total amount will be showed automatically below the grid. Entire total amount’s (TK) sum will be showed of the Grand Total text box from the grid.

After inputting all the data to the grid, then click the save button to change the reflect of the database.

C) To Close The Form:

Click the Exit button to close the form permanently.

Lc Product Received:

By this form which product & their types will have been received from Lc No of consignment date wise. In this form invoice no & invoice date is to be inputted.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 50: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

A) To Open This Form: Click the Purchase menu & select the Lc Product Received menu.

B) To Data Entry: Select the Lc No, Product Name and Product Type from the combo box and input the

consignment date& Invoice Date from DTPicker box and at last input the Invoice No, Total Liter/K.G, Quantity, Rate, Remarks, Truck No, and Driver Name from the text Box.

Total Amount & Grand Total Amount will be showed as automatically. Without input or select the data except Remarks text box, no records will not be added to

the Grid.

C) ADD : After inputting or select data from the combo box & text box click the add button. Multiple products could be added to the grid. Same product & its types will not be added at a time. Product name duplication should be avoided. If Remarks text box is blank data has to be added to the grid.

D) Remove: If remove any record fro the grid then select the Row and click the Remove button. Without selecting any row from the grid no data has not been deleted.

E) Clear: If you think you mistake some major parts of this form then click the clear button to clear all records from the combo box, text box and the grid also.

F) Save: After adding all records to the grid. Input the Truck No, Driver Name to the text box and then click the save button. Always input the valid data to the Lc product received from

G) To Close The Form: Click the Exit button to close the form permanently.

Lc Other Cost:-------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 51: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

This is the form where Lc related secondary expenses occurs.CNF agent charge, miscellaneous cost, tax for different purposes, loadingcost, unloading cost and other cost amount will be inputted by this form. Lc no List will be seen by the combo box of the form and All secondary expenses types information will be added in this form but some unnecessary cost will not be.

After inputting all data click the save button and then click theexit button.

LC Damage Product Loss:-------------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 52: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Lc purposes all damage products information are inputted by this form. You can add product name, product type, its quantity, Total Litres/Kg,Total amount (TK), CNF Agent name from the Lc no by selecting the combobox. All inputted data will be added to the flex grid which is under theLc damage product Loss form.Grand Total amount (TK) will be showed below the grid. After doing allworks successfully click the save button.To close the form click the exit button.

Add:

By using this button all data will be added to the grid. Without inputting data to the text box or selecting combo box except remarks text box no data will not be added to the grid. So enter all data to the appropriate text box or combo box.

Remove:

After adding data to the grid, if you think some major mistakes occurs which will not be corrected of that moments then use remove button. By using this button you must select the row from the grid then click the remove button, and then data will be removed from that row.

Clear:

Before click save button if all data need to erase at the same time then use the clear button to clear all data from the controls.

Party Information:-----------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 53: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

If Shah Sultan Soap factory Company gets Raw Materials Products from different company without doing all Lc related works those company are called as Party. Party’s payment should be realized as DD or TT. Some debit or credit amount Taka should be showed by this application.By using this form party name, propeitor name, District/Division name, Address, Telephone no and Mobile no will be inputted to the text box.After inputting all information click the save button to restore the data permanently.

To close the form clicks the exit button.

Raw Materials Order To Party (Verbal):--------------------------------------------------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 54: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

If party get any order from company by phone or fax then this form is been used. Order related all information are inputted to this form.Firstly, you have to enter the order No in the text box. Be sure do not enter same order no in multiple times. Order no must be unique, duplicacy should be avoided.Secondly input the Order date, Time, Delivery date to DT Picker text box and the text box. Select the Party Name, Product Name, and Product Type from the combo box. And finally input the contact person, order rate, quantity, total Liters/Kg to the text box.Grand Total amount (TK) will be showed below the grid. After doing all

works successfully click the save button.To close the form click the exit button.

Add:

By using this button all data will be added to the grid. Without inputting all data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combo box.

Remove:

After adding data to the grid, if you think some major mistakes occurs which will not be corrected of that moment then use remove button. By using this button you must select the row from the grid then click the remove button then data will be removed from that row.

Clear:

Before click save button if all data need to erase at the same time then use the clear button to clear all data from the controls.

Raw Materials Party Order realized (Verbal):------------------------------------------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 55: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

After order some different products to the party of a particular day and time, if the order granted to the company then this form will be used. All order item will be showed besides the left side grid of the form after selecting the order no from the order no combo box. Order date, Received date, Order Time will be inputted of this text box. Select the Party name, Product Name, Product Type from the required combo box. Rate (TK), Quantity, Total Litres/Kg, Drum value and remarks should be added of the required text box.

Total Amount value will be showed automatically after inputting the rate, qunatity, and drum value (if required) of the control related text box.Drum value will be added if the product "Costic Soda" selected from the combo box. Subtotal will be showed below the grid where all total amounts’s (From grid) addition will be showed. Grand total will be showed after adding all Transport in, Labor payment and other payment of the required text box.Without inputting truck driver name and truck no any data will notbe saved of the database.

To close the form click the exit button.

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combo box.

Remove:

After adding data to the grid, if you think some major mistakes occurs which will not be corrected of that moment then use remove button. By using this button you must select the row from the grid then click the remove button then data will be removed from that row.

Clear:

Before click save button if all data need to erase at the same time then use the clear button to clear all data from the controls.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 56: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Payment To Party Against Raw Materials Received:-----------------------------------------------------------

By using this form party's payment will be showed. All parties’ payment should be added of this form. Select the party name from the combo box. After selecting the party name from the combo box all parties total receivable amount will be showed automatically. Enter the money receipt no, pay date, DD/TT/CHEQUE No, Bank name, Branch name, Payment amount to the party of the text box and select the pay type from the combo box. After inputting payment amount (TK) to party's text box, the balance text box will be showed at this time.After entering all data of this form to restore data to the database click the save button.

To close the forms click the exit button.

Damage Raw Materials Product:---------------------------------------

By using this form you can add damage product quantity whichare received from LC or verbal raw materials order purposes. Damageor loss product amount will be realized by this form.Party name, Product name and Product type select from the combo box and consignment received date, Loss assumes date is inputted to the DTPicker text box. On the other-hand Loss quantity, total (Loss) Litre/Kg, and total taka's amount should be inputted to the text box.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 57: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Grand total amount will be showed below the grid. All Total amounts’ takaof the grid will be added of the grand total text box.After inputting all data to the grid then click the save button to restorethe data in the database permanently.To close the forms click the exit button.

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Clear:

Before click save button if all data need to erase at the same time then usethe clear button to clear all data from the controls.

Raw Materials in Factory:------------------------------

If raw materials(which product will be received from Lc and different Party) in, in the factory to prepare product then this form will be used.By using this form you must have enter the gate pass no, ledger no, page no,carried by, carton and total piece of the text box. Product name, Product type,

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 58: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Product in date, and Product in time should be selected from the combo box orthe DTPicker box.After inputting all data to the grid click the save button to restore the data inthe database. To close the form click the exit button.

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Clear:

Before click save button if all data need to erase at the same time then usethe clear button to clear all data from the controls.

Product Information:--------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 59: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

By using this form you can add all product names with their piece per carton.Without inputting product name and piece per carton text box data could notbe saved to the database.After inputting all data to the subsequent text box click the save button.All restore data which have been saved to the database will be showed belowthe Product details grid.

To close the forms click the exit button.

Product Price:-----------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 60: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

From this form you change product price(updated) with its date. This form is tobe used to fix up the price of the product. If you change the price of the productof a particular date then you can also use this form.Firstly select the product name from the combo box and input the presentprice per carton and updated price to the text box and also input the dateto the DTPicker box.After inputting all data to the required controls then click the save button.To close the forms click the exit button.All restore data which will be saved to the database will be showed of thegrid below the downside.

Finished Goods Stock In:------------------------------

If Finished Goods (which product is to be ready to sale) Stock in, from the factory then it will be ready for sale to the Sales Executive, Salesexecutive party and Distributor or Dealer. All finished goods quantity will be in to the main stock.

By using this form you must have enter the gate pass no, ledger no, page no,carried by, carton and total piece of the required text box. Product name, Product type, In date, and In time should be selected from the combo boxor the DTPicker box.After inputting all data to the grid click the save button to restore the data inthe database.

To close the forms click the exit button.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 61: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Clear:

Before click save button if all data need to erase at the same time then usethe clear button to clear all data from the controls.

Employee Information:----------------------------Company's employees (Which employees is to do transaction with the company for different purposes) information will be inputted of this form. Employee ID will has been started automatically, for preventing duplicity no employee ID will not be duplicated. Employee name, Designation, Address and Phone number will be inputted of the required text box.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 62: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

After inputting all data of this form click the save button. To add new data of this form just click insert button and then enter the required information of the controls. All inputted data which are to be restored to the database will be showed to the grid below the form.

To close the form clicks the exit button.

Search:

If you see or update a single employee's details of the necessary controls then enter the required employee's ID to the text box beside the form which will be surrounded by a black line and then click the search button then you could see the data of the text box.Refresh:

To clear all data from the controls click the refresh button.

Personal Sales:-------------------

By using this form you could enter all personal sales informationfrom company employee. Invoice no, carton, piece, rate per piece, andtotal amount which will be inputted to the required text box. Selectthe employee name(when employee name selected employee codewill be showed beside the employee name combo box) and Product name from the combo box.Total amount will be showed automatically when rate, carton, or piece enter to the text box. Grand total amount will be showed below the grid .All Total amount's taka of the grid will be added of the grand total text box.After inputting all data to the required controls click the save buttonto save data in the database.

To close the form click the exit button.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 63: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Refresh:

Before refresh clear button if all data need to erase at the same time then use the refresh button to clear all data from the controls.

Personal Money Receipt:----------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 64: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Company employee's transaction purposes their payment should be realizedfrom this form. When employee name selected from the combo, outstandinginvoice amount will be showed in a text box. After entering the amount tothe text box, then the balance of the invoice amount will be changed automatically. Select the employee name, (after selecting employee name from the combo box the employee code will be showed beside the text box.)Invoice no, Pay Type from the combo box. Money receipt no, amount, andremarks will be written to the required text box.After entering all data in this form click the save button to restore the datain the database.

To close the form click the exit button.

Free or Gift Products: --------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 65: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Any employee or other person takes some product without any cost then this formis to be used. No amount should not be realized by this form.Select the Employee name (Employee code will be showed beside the Employee name combo), Product name, Product type from the required combo box. Enter the date, carton, piece and remarks of the necessary text box.After entering all data of the controls of the form click the save button andto close the form click the exit button.

Sales Executive Information Details:--------------------------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 66: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

By using of this form all sales executive full information details will be inputted. All sales executive are the employee of Shah Sultan Soap Factory.Sales executive ID will be generated automatically and also all ID will be unique. Enter the Sales executive name, designation, address, phone no, Area, and mobile no to the required text box controls of the form.After inputting all data to all controls of the form click the save button and to close the form click the exit button.All restored data will be showed by the grid which is to be beside the grid.

Sales Executive Order Details:-------------------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 67: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

If any sales executive takes any order by his client then this form will be used. It method is not permanently used as product sales, when product sales finally then gate pass no must be used where sales executive order details has no gate pass no. Enter the order no, order date, delivery date, carton, total piece, rate per carton to the required text box or DTPicker box. Select the sales executive name (sales executive ID will be showed beside the combo box of sales executive name), product name from the combo box.Grand total amount will be showed below the grid. All Total amounts’ takaof the grid will be added of the grand total text box. After inputting all data to all controls of the form click the save button and to close the form click the exit button.

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button then data will be removed from that row.

Clear:

Before click clear button if all data need to erase at the same time then use the clear button to clear all data from the controls.

Sales Executive Product Out:---------------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 68: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

From this form if product sells to the sales executive's client finally then it will be used. After order from sales executive client finally then this form is activated.To use this form firstly input the gate pass no, place, truck no driver name, ledger name, page no, carton, total piece, rate per carton and remarks to the required text box and DTPicker box. Then select the sales executive name(sales executive id will be showed beside the combo box),order no(after selecting order no from the order no combo box all order details will be showed beside the grid of the form),product name from the required combo box.Grand total amount will be showed below the grid. All Total amounts’ takaof the grid will be added of the grand total text box.

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button then data will be removed from that row.

Clear:

Before click clear button if all data need to erase at the same time then use the clear button to clear all data from the controls.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 69: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Finally select the appropriate order condition from the combo box below the MSFlex grid and input the transport cost to the text box.

After inputting all data of the form click the save button and to close the form click the exit button.

Sales Executive Money Receipt:-------------------------------------

By using this form if any sales executive transaction of their clientagainst a gate pass no. In this form every sales executive wise their gate pass no will be individually. Balance amount of every gate pass no will be showed by using this form.Select the sales executive name, gate pass no, pay type from therequired combo box. After selecting gate pass no from the combobalance will be showed automatically below this form.Enter the MR No, Amount and remarks to the required text box.After selecting or entering all data from the controls of the text box click the save button to restore the data permanently.To close the form click the exit button.

Sales Executive Party Information:-----------------------------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 70: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Sales executive party information will be saved by using this form. If any Sales executive transaction with a party then their information must be storeagainst a sales executive.Sales executive ID should be generated automatically. Distributor name,Proprietor name, address, place are to be entered of the required text box. Sales executive name should be selected from the combo box (sales executiveID will be showed beside the sales executive name text box).

After all data input click the save button and to close the form click theexit button.

Sales Executive Party Order:-------------------------------------

By using this form sales executive party's order will be inputted. Every order no of this form will be unique. Party’s name will be mentioned against a sales executive name. Enter the order no, Carton no and piece of the required text box and select the order date, delivery date, Sales executive name, party name and the product name from the required combo box. After selecting the sales executive name then sales executive ID will be showed beside the sales executive combo box.

After inputting all data to the required controls of the form click the Add button.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 71: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Clear:

Before click clear button if all data need to erase at the same time then use the refresh button to clear all data from the controls. When all data inputted to the grid with serial number click the save button to store the data in the database permanently and to exit the form click the exit button.

Sales Executive Party Sales:-------------------------------------

Sales executive party sales will be realized against a order no by using this form. Sales executive party sales will be done under a sales executive name.Enter the invoice no or gate pass no, carton no, total piece, and the rate per carton of the required text box and select the delivery date, sales executive name(Sales executive ID will be showed beside the control),party name(Sales executive Distributor ID will be showed beside the control),order no(After selecting the order no from the combo box, all order items product and their rate will be showed beside the grid at a time),Product name from the required controls from the form. After inputting all data to the required controls click the add button then all data will be added to the grid with a serial no which is below the controls.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 72: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Clear:

Before click clear button if all data need to erase at the same time then use the refresh button to clear all data from the controls.After inputting all data to the grid then select the order condition which is below the grid. Grand Total (All amount summation which is of the grid) will be showed automatically beside the order condition control.

Click the save button after inputting all data correctly to restore the data in the database and to close the form click the exit button.

Sales Executive Product Return:------------------------------------------

If any sales executive return any product against a gate pass no then this form will be used. You must mention perfect quantity of product which will be returned. Enter the carton no, total piece, rate per carton, total amount and remarks of the required text box. Select the sales executive name(Sales executive ID will be showed beside the control),gate pass no(After selecting the gate pass no from the combo box then total sales quantity and rate of every particular product will be showed beside the grid box), mention the return date and product name from the required combo

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 73: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

box and DTPicker box. When input all data correctly click the add button to store the data in the grid.

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove: After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Clear:

Before click clear button if all data need to erase at the same time then use the refresh button to clear all data from the controls.Grand Total (All amount summation which is of the grid) will be showed automatically beside the order condition control.

Click the save button after inputting all data correctly to restore the data in the database and to close the form click the exit button.

Distributor or Dealer Information:------------------------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 74: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

All enlisted distributor of the company's initial information will be inputted by using this form. Every distributor has unique ID no and it will be generated automatically. Enter the Distributor or dealer name, Distributor proprietor name, Distributor joining date, address, telephone no, mobile no and credit limit of the required text box. After inputting all data of the required controls click the save button to store the data in the database and also the data will be showed of the grid which is below the controls.If you add another new distributor name just click the insert button and if you update any record of the distributor first you select the distributor name(By selecting the distributor all information enter the distributor ID which will be beside of the form and then click thesearch button) then click the update button. To refresh all data from the form click the refresh button.To close the form click the exit button.

Distributor Order:---------------------

When any distributor orders some product then this form will be used. Only product quantity will be showed by using this form.Enter the order no, carton no and piece of the required text box and select the order date, delivery date, dealer name (Dealer ID will be showed below the dealer name combo box) and select the product name from the required combo box and DTPicker box of the form. After inputting all data to the controls of the form click the add button to add the data in the grid in the grid box with individual serial no.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 75: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.Clear:

Before click clear button if all data need to erase at the same time then use the refresh button to clear all data from the controls.

Click the save button after inputting all data correctly to restore the data in the database and to close the form click the exit button.

Distributor Product Out:------------------------------

When any distributor finally take products against a invoice no or gate pass no then this form will be used. In this form other secondary cost will be added of this form.Enter the invoice no, place of order, truck no, truck driver name, ledger name, page no, carton no, total piece no, rate per carton and remarks of the appropriate text box of the form. Select the distributor name (Distributor ID will be showed beside the control after selecting the distributor name), order no (All order quantity will be showed beside the grid of the form), Product delivery date and product name from the required combo box and DTPicker box of the form. Total amount will be showed automatically after adding the data of text box of carton and rate per carton of the form.After inputting all data of the controls of the grid click the add button to add the data to the grid which is below the controls of the form.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 76: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Clear:

Before click clear button if all data need to erase at the same time then use the refresh button to clear all data from the controls.

Select the order condition from the combo box and enter the transport cost of the text box from the form. Grand Total (All amount summation which is of the grid and the sum of transport cost) will be showed automatically beside the transport cost control of the form.

Click the save button after inputting all data correctly to restore the data in the database and to close the form click the exit button.

Distributor Money Advance:-------------------------------------

If any distributors pay any amount as advance then this form will be used. All advance amounts will be inputted by using of this form. First select the Distributor name and pay type from the required the combo box, enter the money receipt no and amount to the required text box and input the date to the DTPicker text box.After inputting all data of the required controls click the save button to restore the data in the database permanently.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 77: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

To close the applications click the exit button.

Distributor Money Receipt:----------------------------------

Distributor money receipt form works as three ways which are as follows:

(A)If any distributor transaction of the company against a gate pass no then this form will be used. In this form every distributor and their invoice no wise balance will be showed individually. Multiple types' payment could be adjusted by using this form in a single or particular date. After selecting an invoice no of a particular distributor the balance amount will be showed in a text box automatically. When any payment will be taken by this form, then the balance amount will be reduced of amount wise.

Enter the money receipt no, amount of taka of the required text box. Select the distributor name, particular invoice no, money pay date and pay type from the appropriate combo box then click the add button to show the data in the grid which is below the controls.

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combo box. Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Clear:

Before click clear button if all data need to erase at the same time then use the refresh button to clear all data from the controls.Grand Total (All amount summation which is of the grid) will be showed automatically which is below the form.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 78: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Click the save button after inputting all data correctly to restore the data in the database and to close the form click the exit button.

(B1)If any distributor pay any amount as advance before take any gate pass no then the advance money will be adjusted by using of this form. Firstly advance money will be inputted of the distributor advance form then the advance amount will be showed of the distributor money receipt form after selecting the particular distributor name from the combo box. Advance amount will be showed from the right side advance text box. If you want to adjust the advance amount from the form then input the amount in the balance text box which is below the advance text box then select the invoice no, paydate from the combo box and the DTPicker box. Select the advance adjust from the pay type combo box. Enter the money receipt no to the required text box. The invoice amount will be showed automatically after selecting the invoice no from the combo box. Balance amount (Tk) will be showed automatically after inputting the balance amount of the balance text box. Total balance showed total amount of taka which have been paid.Grand total text box shows the amount which amount has to be given by the distributor.After inputting all data click the exit button to close the form.

(B2)If any distributor pay any amount as advance before take any gate pass no then the advance money will be adjusted by using of this form. Firstly advance money will be inputted of the distributor advance form then the advance amount will be showed of the distributor money receipt form after selecting the particular distributor name from the combo box. Advance amount will be showed from the right side advance text box. If you want to adjust the advance amount from the form then input the amount in the balance text box which is below the advance text box then select the invoice no, paydate from the combo box and the DTPicker box. Select the advance and other from the pay type combo box. Enter the money receipt no to the required text box. The invoice amount will be showed automatically after selecting the invoice no from the combo box. Enter the amount(Tk) to the text box which is not to be balanced from the advanced amount. Balance amount(Tk) will be showed automatically after inputting the balance amount of the balance text box. Total balance showed total amount of taka which have been paid as advanced money and without paying the advanced money. After clicking the add button data will be showed as two ways in the grid one is which amount has to be paid as advance and another is which amount has to be paid without advance.Grand total text box shows the amount which amount has to be given by the distributor.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 79: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

After inputting all data click the exit button to close the form.

ADD:

After inputting all data to the required controls click the add button to add the data in the grid. Without inputting any data of the required controls, data will not be added in the grid.

REMOVE:

If you want to remove data of any row which is in the grid, the select the row and click the remove button to remove the row permanently from the grid.

CLEAR:

To clear all data from all controls click the clear button.

SAVE:

After inputting all data to the grid click the save button to store the data permanently.

Distributor Product Return:-----------------------------------

If any distributors return any product against a gate pass no or an invoice no then this form will be used. You must mention perfect quantity of product which will be returned.Enter the carton no, total piece, rate per carton, total amount and remarks of the required text box of the form. Select the distributor name(Distributor ID will showed beside the control),enter the product return date, product condition, gate pass no(After selecting gate pass no all product sales quantity and their rate will be showed the grid which is right side of the form) and product name from the required combo box from the form.After adding all data to the grid perfectly click the add button.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 80: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Clear:

Before click clear button if all data need to erase at the same time then use the refresh button to clear all data from the controls.Grand Total (All amount summation which is of the grid) will be showed automatically which is below the form.

Click the save button after inputting all data correctly to restore the data in the database and to close the form click the exit button.

Distributor Product Loss Adjust:-----------------------------------------

If any invoice is not fully paid finally from a distributor then this form will be used. Loss amount will be adjusted with one or multiple product and their rate. Loss amount of a distributor will be realized finally of a year's ending time or closing time.

Enter the left invoice no, total piece, amount and remarks of the required text box. Select the distributor name (Distributor ID will be showed automatically beside the control), enter the loss

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 81: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

adjust date or loss assume date, invoice no (after selecting a particular invoice no from the combo box of the form all sales quantity of the products and their rate will showed in a grid of the right side of the form), product name from the required combo box of the form. When enter all valid data of the form click the add button for showing the dataof the grid.

Add:

By using this button all data will be added to the grid. Without inputting all necessary data to the text box or selecting combo box, no data will not be added to the grid. So enter all data to the appropriate text box or combobox.

Remove:

After adding data to the grid, if you think some major mistakes occurs whichwill not be corrected of that moment then use remove button. By using thisbutton you must select the row from the grid then click the remove button thendata will be removed from that row.

Clear:

Before click clear button if all data need to erase at the same time then use the refresh button to clear all data from the controls.Grand Total (All amount summation which is of the grid) will be showed automatically which is below the form.

Click the save button after inputting all data correctly to restore the data in the database and to close the form click the exit button.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 82: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

----------Update:----------

From this menu you have to update some forms which are Sales Executive product out, Sales Executive Money Receipt and Distributor Product Out.If you make any mistakes by using this form then you have to update those forms which are to be showed from the update menu. All fields will not be updated from the update forms.

If you want to update:

Sales Executive Product Out: -

If any mistakes occurs by the operators while inputting the form Sales ExecutiveProduct Out then Update form of the Sales Executive Product Out will be required for removing the mistakes. All fields are not updated by using this form.Only Product name, Carton number, Pieces, Rate, Amount and Remarks related fieldsdata should be updated by using this form and this is the second phase to save and update data in the database.On the other hand, Place of order, Truck no, Driver name, Ledger name, Page no and Delivery date related data will be updated by using this form and this is thefirst phase to save and update data in the database.There are some procedures for updating of this form. These are as follows:

GO:----

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 83: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Firstly select the invoice no from the combo box then click the go button. After clicking the combo button you will be seen the data of Sales Executive ID, Place of order, Truck no, Driver name, Ledger name, Page no, Delivery date and all products list their carton number, pieces number, rate, amount & remarks are to be showed in the grid which is below the required controls.

REFRESH:---------

If you want to clear or refresh data from the controls at a time for inputting the new data then click the refresh button.

SAVE(Phase1):--------------

If you want to update data which data’s are the upper side from the grid then this button will be used. By using this button you can update the place of order, truck no,driver name, ledger name and the delivery date of the Sales Executive Product out.

SAVE(Phase2):--------------

If you want to update product name, and their quantity, rate, amount and remarksthen use the save button to save and update the data permanently.If anyone mistake Product name or carton number or pieces or rate or amount or remarks fields while inputting the data of this form, then first select the row (which row you want to update) click the remove button to remove the previous data from the grid. Select the product name from the combo box, enter the carton no, total piece, Rate per carton, total amount and remarks to the required text box. After inputting all data to the control click the save button then the data will be updatedpermanently and show it in the grid.

Remove:--------

By using this button if you want to remove data from the grid for data updating clickthe remove button. Data will not be removed if you do not select the required rowfrom the grid.

Clear:-----

If you want to clear all data from all of the controls and the grid then click the clearbutton to clear the data or refresh the data from the control or grid.

Exit:----

To close the form clicks the exit button.

Sales Executive Money Receipt:- From this update form, firstly you select the Sales Executive name, Gate pass no and Money receipt no from the required combo box then invoice amount and paid-up amount will be showed from required text box then update the paid-up amount to the text box and click the update button. After clicking the update button all data will be updated at this moment.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 84: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Distributors/Dealers Product Out: -

If any mistakes occurs by the operators while inputting the form DistributorProduct Out then Update form of the Distributor Product Out will be required for removing the mistakes. All fields are not updated by using this form. Only Product name, Carton number, Pieces, Rate, Amount and Remarks related fields data should be updated by using this form and this is the second phase to save and update data in the database.On the other hand, Place of order, Truck no, Driver name, Ledger name, Page no and Delivery date related data will be updated by using this form and this is thefirst phase to save and update data in the database.There are some procedures for adaptation of this form. These are as follows:

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 85: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

GO:----

Firstly select the invoice no from the combo box then click the go button. After clicking the combo button you will be seen the data of Distributor ID, Place of order,Truck no, Driver name, Ledger name, Page no, Delivery date and all products list their carton number, pieces number, rate, amount & remarks are to be showed in the grid which is below the required controls.

REFRESH:----------

If you want to clear or refresh data from the controls at a time for inputting the new data then click the refresh button.

SAVE (Phase1):---------------

If you want to update data which data’s are the upper side from the grid then this button will be used. By using this button you can update the place of order, truck no,driver name, ledger name and the delivery date of the Distributor Product out.

SAVE (Phase2):---------------

If you want to update product name, and their quantity, rate, amount and remarksthen use the save button to save and update the data permanently.If anyone mistake Product name or carton number or pieces or rate or amount or remarks fields while inputting the data of this form, then first select the row (which row you want to update) click the remove button to remove the previous data from the grid. Select the product name from the combo box, enter the carton no, total piece, Rate per carton, total amount and remarks to the required text box. After inputting all data to the control click the save button then the data will be updatedpermanently and show it in the grid.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 86: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Remove:--------

By using this button if you want to remove data from the grid for data updating clickthe remove button. Data will not be removed if you do not select the required rowfrom the grid.

Clear:------

If you want to clear all data from all of the controls and the grid then click the clearbutton to clear the data or refresh the data from the control or grid.

Exit:----

To close the form clicks the exit button.

Calculator:------------

This calculator can be used as normal calculator. This has been given for your convenience of accounting.

To Open:

a. Just click on the menu Calculator.

Add User:-----------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 87: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

When any user group of Authority needs to be added or create new user in the log in form, and then use this form. Only Authority can do this.

To Open:

a. You have to go in the menu Add User.

To Add User:

a. First click the Add button.b. Type the User Name and Password in the respective box.c. Select the user Group from the list.d. Click the Save button. Then it will be added in the left box.

To Delete User:

a. Select the User Name from the left box.b. Click the Delete button.c. When you make a mistake to select in the left box click the Cancel button.

Database Backup:--------------------

After inputting all data of the required form then, click the database backup menu to restore the all data of a specific location (E:\ShahSoapBackup) of the hard drive. This process will be appropriate as daily basis. A backup file will be created automatically of that particular day of a specific location. Every file name will be started as Shah Soap and the current system date of the file name's last side.If you can click the menu twice of the different time then it will be updated of the old backup files of that particular day.

About:--------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 88: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

From this about form you can know the Software Developer Company Name, Developers name, their contact address and the System Information (By clicking the System Infor… button) of your computers.

Help:-----

By using this Shah Soap help file you can know everything of this software. All User can see the help file except the guests. There are 3(three) submenu of this help menu these are: Contents, Search for Help and Using Help.

Contents: From the contents you can know some short briefing about every particular topic after clicking the contents which topics are showed as green letters.

Search for Help: From clicking the submenu from the help menu you can search a specific topic after select any topic and clicking the display button.

Using Help: From clicking the submenu from the help menu you can know how to use the help file.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 89: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Report Details:

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

6

Page 90: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

--------------Report Caption.

STOCK REPORT

1. Caption: Date wise product opening stock report(Individual date wise product opening stock which shows product quantity, pices, product bad quantity and product bad pieces)2. Caption: Date wise product closing stock report(Individual date wise product closing stock which shows product quantity, pices, product bad quantity and product bad pieces)3. Caption: Raw Materials present stock report(Raw materials present stock which shows raw materials quantity and raw materials quantity)4. Caption: Product present stock report(Product present stock which shows product quantity & pieces and product bad quantity and pieces)

PRODUCT ORDER/ DELIVERY/SALES/OUT DETAILS REPORT

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 91: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

1. Caption: All Product information report(Enlisted all products information where shows product unit and product unit wise Litre/Kg/pieces)2. Caption: All Products price history report(Show enlisted all product date wise different price value per unit)3. Caption: Date wise all products price history report(Show enlisted all products price list and updated price list from a particular date1 to date2)4. Caption: Date wise all products order list report (Enlisted all products order list from a particular date1 to date2)5. Caption: Date wise all products sales position(Enlisted all products sales position from a particular date1 to date2)6. Caption: Date wise all products product out details report(Enlisted all products sales details from a particular date1 to date2)7. Caption: Date wise all products delivery details report(Enlisted all products delivery details from a particular date1 to date2)8. Caption: Individual product order list details report of a individual date(Individual date wise an individual product order list details)9. Caption: Individual product out list details report of a individual date(Individual date wise an individual product sales details)10. Caption: Individual delivery list details report of a individual date(Individual date wise an individual product delivery details) 11. Caption: Date wise individual product order list details report(Individual product wise order list details from a particular date1 to date2)12. Caption: Date wise individual product delivery list details report(Individual product wise delivery list details from a particular date1 to date2)13. Caption: Date wise individual product out or sales report (Individual product wise sales details from a particular date1 to date2)

EMPLOYEE DETAILS REPORT

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 92: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

1. Caption: Individual employee details report(Individual employee all information details)2. Caption: Date wise individual employee sales details report(Individual employee sales details from date1 to date2)3. Caption: Date wise individual employee payment details report(Individual employee payments details from date1 to date2)4. Caption: All employee information details report(Enlisted all employee details information)5. Caption: All employee personal account status details report(Enlisted all employee personal account status details for transaction of Shah Sultan Soap Factory)6. Caption: All gift or free products details report(Free product or gift product which have been given for different details)7. Caption: Date wise all free or gift products details report(Free product or gift product which have been given for different details from a particular date1 to date2)8. Caption: Date wise all sales details report(Total sales details from a particular date1 to date2)9. Caption: Date wise all payment details report(Payment details report from a particular date1 to date2)

SALES EXECUTIVE DETAILS REPORT

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 93: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

1. Caption: All sales executive information details report(Enlisted all sales executive information details)2. Caption: Individual date wise sales executive product order list details report(Individual date wise and sales executive product order list details)3. Caption: Individual date wise sales executive product return details report(Individual date wise and sales executive product returns list details)4. Caption: Individual date wise sales executive product out (sales) details report(Individual date wise and sales executive product sales details)5. Caption: Individual date wise sales executive payment details report(Individual date wise and sales executive all payment list details) 6. Caption: Individual date wise sales executive product delivery details report(Individual date wise and sales executive product delivery list details) 7. Caption: Date wise sales executive product order list details report(All sales executive product order list details from a particular date1 to date2)8. Caption: Date wise sales executive product out(sales) details report(All sales executive product sales details from a particular date1 to date2)9. Caption: Date wise sales executive product delivery details report(All sales executive product delivery list details from a particular date1 to date2)10. Caption: Date wise sales executive product return details report(All sales executive products return details from a particular date1 to date2)11. Caption: Date wise sales executive payment details report(All sales executive payment details from a particular date1 to date2)12. Caption: Date wise sales executive product sales graphical report (All sales executive product sales details with graphical representation from a particular date1 to date2)13. Caption: Individual Sales Executive information details report(Individual sales executive information details)14. Caption: Individual Sales executive and individual date wise product order list details report(Individual sales executive product order list details from a particular date)15. Caption: Individual Sales executive and individual date wise product delivery list details report(Individual sales executive product delivery list details from a particular date) 16. Caption: Individual Sales executive and individual date wise product sales or product out details report

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 94: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

(Individual sales executive product sales details from a particular date)17. Caption: Individual Sales executive and individual date wise payment details report(Individual sales executive payment details from a particular date)18. Caption: Individual Sales executive and individual date wise product return details report(Individual sales executive product return details from a particular date)19. Caption: Individual Sales executive and date wise product order list details report(Individual sales executive product order list details from a particular date1 to date2)20. Caption: Individual Sales executive and date wise product delivery list details report (Individual sales executive product delivery list details from a particular date1 to date2)21. Caption: Individual Sales executive and date wise product out or sales list details report(Individual sales executive product sales details from a particular date1 to date2)22. Caption: Individual Sales executive and date wise payment list details report(Individual sales executive payment details from a particular date1 to date2)23. Caption: Individual Sales executive and date wise product return details report(Individual sales executive product return details from a particular date1 to date2)

SALES EXECUTIVE PARTY REPORT

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 95: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

1. Caption: All Sales Executive Party Information details report(Enlisted sales executive parties information details)2. Caption: Date wise all sales executive party's product order details report(All sales executive parties’ product order details from a particular date1 to date2)3. Caption: Date wise all sales executive party's product sales details report (All sales executive parties’ product sales details from a particular date1 to date2)4. Caption: Date wise Individual Sales executive party's product order details report(Individual sales executive party product order details from a particular date1 to date2)5. Caption: Date wise Individual Sales executive party's product sales details report(Individual sales executive party product sales details from a particular date1 to date2)

DISTRIBUTOR INFORMATION DETAILS REPORT

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 96: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

1. Caption: Individual Distributor name and individual date wise product order details report(Individual distributor name wise product order details from a particular date)2. Caption: Individual Distributor name and individual date wise product delivery details report(Individual distributor name wise product delivery details from a particular date)3. Caption: Individual Distributor name and individual date wise product out/sales details report(Individual distributor name wise product sales details from a particular date) 4. Caption: Individual Distributor name and individual date wise payment details report(Individual distributor name wise payment details from a particular date)5. Caption: Individual Distributor name and individual date wise product return details report(Individual distributor name wise product return details from a particular date)6. Caption: Individual Distributor name and date wise product order details report (Individual distributor name wise product order details from a particular date1 to date2)7. Caption: Individual Distributor name and date wise product delivery details report (Individual distributor name wise product delivery details from a particular date1 to date2)8. Caption: Individual Distributor name and date wise product out/sales details report(Individual distributor name wise product sales details from a particular date1 to date2) 9. Caption: Individual Distributor name and date wise payment details report (Individual distributor name wise payment details from a particular date1 to date2)10. Caption: Individual Distributor name and date wise product return details report (Individual distributor name wise product return details from a particular date1 to date2)11. Caption: Individual date wise product order details report(All product order details from a particular date)12. Caption: Individual date wise product delivery details report(All product delivery details from a particular date)13. Caption: Individual date wise product out/sales details report(All product sales details from a particular date)14. Caption: Individual date wise product return details report(All product return details from a particular date)15. Caption: Individual date wise payment details report(All payment details from a particular date)16. Caption: Date wise all products order details report(All products order details from a particular date1 to date2)17. Caption: Date wise all products delivery details report(All products delivery details from a particular date1 to date2)18. Caption: Date wise all products out/sales details report(All products sales details from a particular date1 to date2)19. Caption: Date wise all payment details report(All Payment details from a particular date1 to date2)20. Caption: Date wise all products return details report(All products return details from a particular date1 to date2)

DISTRIBUTOR ADVANCE REPORT

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 97: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

1. Caption: Date wise all distributors advance payment details report(All distributors advance payment details from a particular date1 to date2)2. Caption: Date wise individual distributor name wise advance payment details report(Individual distributor advance payment details from a particular date1 to date2)

SALES REPORT

1. Caption: Date wise all products sales (Sales executive, Distributor & Personal) details report(All products sales (From sales executive, distributors and personal) details from a particular date1 to date2)

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 98: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

LOGIN/LOGOUT REPORT

1. Caption: Date wise all types of users’ login and logout details report(All users or user types login time, logout time and duration of time from a particular date1 to date2)2. Caption: Individual user & type wise and date wise login and logout details report(Individual user or user types login time, logout time and duration of time from a particular date1 to date2)

LC PRODUCT REPORT

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 99: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

1. Caption: All LC's initial information details report(All LC related initial information details)2. Caption: Individual LC no details report(Individual LC no wise initial information details)3. Caption: Date wise all LC's damage product details report(All damage products from LC from a particular date1 to date2)4. Caption: Individual LC no wise damage product details report(Individual LC no wise all damage product details)5. Caption: All LC & Verbal order related product information report(LC & Verbal order related all products order information details)6. Caption: Date wise all LC product received details report(LC purposes product received details from a particular date1 to date2)7. Caption: Individual LC no wise all products received details report(Individual LC no wise all products received details)8. Caption: Date wise LC and Verbal order related product received details report(LC & Verbal order related all products received details from a particular date1 to date2)9. Caption: Date wise LC and Verbal order related product received details report with graphical representation.(LC & Verbal order related all products received details from a particular date1 to date2 with graphical representation)

VERBAL ORDER RELATED REPORT

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 100: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

1. Caption: Date wise individual order no wise raw materials received details (Verbal order) report(Individual order no wise raw materials received details from a particular date1 to date2)2. Caption: Date wise raw materials received details (Verbal order) report(Raw materials received details from a particular date1 to date2)3. Caption: Date wise and individual raw materials party's payment details report(Individual party wise payment details from a particular date1 to date2)4. Caption: Date wise all raw materials party's payment details report(All parties’ payment details from a particular date1 to date2)

RAW MATERIALS REPORT

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 101: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

1. Caption: All raw materials parties’ information report(All parties (Raw materials) information details)2. Caption: All raw materials parties’ current account status(All parties (Raw materials) present account status3. Caption: Date wise all raw materials in (in the factory) details report(All raw materials products in, in factory details from a particular date1 to date2)

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 102: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Code for the FFscmMain Form:

Option Explicit

Dim PixelX As IntegerDim PixelY As IntegerDim ReturnToStart As LongDim NewMess As String

Private Sub MDIForm_Load()On Error Resume NextUnload frmSplashUnload frmUserLogin

Dim rs As New ADODB.RecordsetDim A(100) As StringDim i As IntegerDim Count As Integer

i = 0Count = 0

rs.Open "select * from MainStock", Cnn, adOpenDynamic, adLockOptimisticCopyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

7

Page 103: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Do While Not rs.EOF Count = Count + 1 rs.MoveNextLoop

rs.MoveFirstDo While Not i = CountA(i) = Trim(UCase(rs(0))) & "= " & Val(rs(1))i = i + 1rs.MoveNextLoop

rs.Close

Dim Temp$

For i = 0 To CountTemp$ = Temp$ + Space(1) + A(i) + Space(1)Next i

PixelX = Screen.TwipsPerPixelXPixelY = Screen.TwipsPerPixelY

FixMessage Temp$

InitImages Temp$ScrollImage.Enabled = TrueNewMess = Temp$

App.HelpFile = App.Path + "\" + "SULTANFI.prj.HLP" HelpContextID = IDH_CONTENTS End Sub

Private Sub MDIForm_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)If Button = 2 Then Me.PopupMenu mnuLogEnd IfEnd Sub

Private Sub MDIForm_Unload(Cancel As Integer)On Error Resume NextDim rs As New ADODB.Recordset

rs.Open "select * from LoginInformation ", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs(0) = Userrs(1) = Daters(2) = PTimers(3) = Time()rs.Updaters.Close

End Sub

Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)Dim A As String

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 104: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

If UnloadMode = 0 ThenA = MsgBox("Do You Want To Close The Application ?", vbYesNo + vbQuestion)

If A = vbYes ThenUnload Me

ElseCancel = 1Exit SubEnd IfEnd IfEnd Sub

Private Sub mnuabout_Click()frmaboutpro.ShowEnd Sub

Private Sub mnuAdvance_Click()frmDistributorAdvance.ShowEnd Sub

Private Sub mnuBackUp_Click()On Error Resume NextDim ComDate As DateDim A As String

Dim strDBPath As StringA = MsgBox("Do You Want To Backup DataBase ?", vbQuestion + vbYesNo)If A = vbYes ThenScreen.MousePointer = vbHourglass Dim AA As Date Dim strSQLDataBackup As String

ComDate = Date strSQLDataBackup = "BACKUP DATABASE ShahSoap TO Disk='E:\ShahBackup\ShahSoap " & Format(ComDate, "mmm-dd-yyyy") & "'" & " WITH INIT" ''''ComDate

Cnn.Execute strSQLDataBackupScreen.MousePointer = vbNormalEnd If

End Sub

Private Sub mnubankinformation_Click()frmBankInfo.ShowEnd Sub

Private Sub mnuCalculator_Click()Calculator.ShowEnd Sub

Private Sub mnuDistributorAdvance_Click()frm_rptDistributorAdvance.ShowEnd Sub

Private Sub mnuDistributorCommissionCartoonWise_Click()frmDistributorCommission.Show

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 105: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 End Sub

Private Sub mnuDistributorInfo_Click()frmDistributorInfo.ShowEnd Sub

Private Sub mnuDistributorinfoR_Click()frm_rptDistributor.ShowEnd Sub

Private Sub mnuDistributorMR_Click()frmDistributorMR.ShowEnd Sub

Private Sub mnuDistributorMRUpdate_Click()frmDistributorMRUpdate.ShowEnd Sub

Private Sub mnuDistributorOrder_Click()frmDistributorOrder.ShowEnd Sub

Private Sub mnuDistributorOut_Click()frmDistributorProductOut.ShowEnd Sub

Private Sub mnudistributorproductout_Click()frmDistributorProductOutUpdate.ShowEnd Sub

Private Sub mnuDistributorReturn_Click()frmDistributorReturn.ShowEnd Sub

Private Sub mnuDlostAdjust_Click()frmDistributorProductLossAdjust.ShowEnd Sub

Private Sub mnuEmployee_Click()

End Sub

Private Sub Marquee_Timer()On Error Resume NextDim t As DoubleFor t = 2 To Len(Trim(NewMess)) Unload imgChar(t)Next

Dim rs As New ADODB.RecordsetDim A(100) As StringDim i As IntegerDim Count As Integeri = 0Count = 0

rs.Open "select * from MainStock", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF Count = Count + 1 rs.MoveNextLoop

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 106: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs.MoveFirstDo While Not i = Count

A(i) = Trim(UCase(rs(0))) & "= " & CInt(rs(1))i = i + 1rs.MoveNextLooprs.Close

Dim Temp$

For i = 0 To CountTemp$ = Temp$ + Space(1) + A(i) + Space(1)Next i

PixelX = Screen.TwipsPerPixelXPixelY = Screen.TwipsPerPixelY

FixMessage Temp$

InitImages Temp$ScrollImage.Enabled = True

End Sub

Private Sub mnuEmployeeinf_Click()frm_rptEmployee.ShowEnd Sub

Private Sub mnuEmployeeInfo_Click()frmEmployeeInfo.ShowEnd Sub

Private Sub mnuFreeProduct_Click()frmFreeProduct.ShowEnd Sub

Private Sub mnuHelpContents_Click() Dim liRc As Integer ' Activate the contents page of the help file liRc = HelpContents(Me)End Sub

Private Sub mnuHelpSearch_Click()Dim liRc As Integer ' Activate the search for help liRc = HelpSearch(Me)End Sub

Private Sub mnuHelpUsing_Click() Dim liRc As Integer ' Activate help on using help liRc = HelpUsing(Me)End Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 107: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Private Sub mnulcdamageproduct_Click()frmLCDamageProduct.ShowEnd Sub

Private Sub mnulcdetails_Click()frmLcDetails.ShowEnd Sub

Private Sub mnulcinformation_Click()frmLcInformation.ShowEnd Sub

Private Sub mnulcothercost_Click()frmLCOtherCost.ShowEnd Sub

Private Sub mnulcprodinfo_Click()frmLcProductinfo.ShowEnd Sub

Private Sub mnulcproductreceived_Click()frmLcProductReceived.ShowEnd Sub

Private Sub mnulcreport_Click()frm_rptLcProductInfo.ShowEnd Sub

Private Sub mnuLoginReport_Click()frm_rptLogin.ShowEnd Sub

Private Sub mnuLogoff_Click()Unload MefrmUserLogin.ShowfrmSplash.ShowEnd Sub

Private Sub mnuMaketingProductReturn_Click()frmMarketingReturn.ShowEnd Sub

Private Sub mnuMarketingexepartyReport_Click()frm_rptMarketingPartyReport.ShowEnd Sub

Private Sub mnuMarketingInfo_Click()frmMarketingInfo.ShowEnd Sub

Private Sub mnuMarketingMR_Click()frmMarketingMR.ShowEnd Sub

Private Sub mnuMarketingOrer_Click()frmMarketingOrderMaster.ShowEnd Sub

Private Sub mnuMarketingReport_Click()frm_rptMarketingReport.ShowEnd Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 108: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Private Sub mnuMDistributor_Click()frmMarketingDistributorInfo.ShowEnd Sub

Private Sub mnupartyinformation_Click()frmPartyInformation.ShowEnd Sub

Private Sub mnuPartyOrder_Click()frmMarketingPartyOrder.ShowEnd Sub

Private Sub mnuPartySales_Click()frmMarketingPartySales.ShowEnd Sub

Private Sub mnuPersonalMR_Click()frmPersonalMR.ShowEnd Sub

Private Sub mnuPersonalSales_Click()frmPersonalSales.ShowEnd Sub

Private Sub FixMessage(Mess$)Mess$ = Space(60) + Trim(Mess$) + Space(25) 'OLDEnd Sub

Private Sub mnuProductInfo_Click()frmProductInfo.Show

End Sub

Private Sub mnuProductionIn_Click()frmProductionIn.ShowEnd Sub

Private Sub mnuproductout_Click()frmMarketingProductOutUpdate.ShowEnd Sub

Private Sub mnuProductPrice_Click()frmProductPrice.ShowEnd Sub

Private Sub mnuproductreport_Click()frm_rptProduct.ShowEnd Sub

Private Sub mnuramainfactory_Click()frmPurchaseProductIn.ShowEnd Sub

Private Sub mnuRaw_Click()frm_rptRawInFactory.ShowEnd Sub

Private Sub mnuSales_Click()frm_rptSalesReport.Show

End Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 109: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Private Sub mnuSalesExecutiveMRUpdate_Click()frmMarketingMRUpdate.ShowEnd Sub

Private Sub mnuSEPO_Click()frmMarketingProductOut.ShowEnd SubPrivate Sub mnuSEXCarComm_Click()frmMarketingCommision.ShowEnd Sub

Private Sub mnuShutdown_Click()'Unload MeCall MDIForm_QueryUnload(0, 0)End Sub

Private Sub mnuStock_Click()frm_rptStock.Show

End Sub

Private Sub mnuUser_Click()frmNewUser.ShowEnd Sub

Private Sub mnuVerbal_Click()frm_rptVarbalReport.Show

End Sub

Private Sub mnuverbalorder_Click()frmVerbalRawMaterialOrder.ShowEnd Sub

Private Sub mnuverbalrawmaterislsmr_Click()frmVerbalRawMaterialMR.ShowEnd Sub

Private Sub mnuverbalrmdamageproduct_Click()frmVerbalRawMaterialDamage.ShowEnd Sub

Private Sub mnuverbalrmreceived_Click()frmVerbalRawMaterialReceived.ShowEnd Sub

Private Sub ScrollImage_Timer()

picMessage.Left = picMessage.Left - 3 * PixelXIf picMessage.Left < ReturnToStart Then picMessage.Left = 0End IfEnd Sub

Private Sub InitImages(Mess$)On Error Resume Next

Dim t As IntegerDim LeftLoc As LongLeftLoc = 0

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 110: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 picMessage.Top = 0picMessage.Width = (imgChar(1).Width * PixelX) * Len(Mess$)ReturnToStart = -((Len(Mess$) - 25) * imgChar(1).Width) * PixelX

For t = 2 To Len(Mess$) Load imgChar(t)Next

For t = 1 To Len(Mess$) imgChar(t).Left = LeftLoc imgChar(t).Top = 0 imgChar(t).Picture = picChar.GraphicCell(Asc(Mid(Mess$, t, 1)) - 32) imgChar(t).Visible = True LeftLoc = LeftLoc + 18NextEnd Sub

Private Sub imgChar_Click(Index As Integer)'EndEnd Sub

Module for the connection of Database:

Public Cnn As New ADODB.ConnectionDim rs As New ADODB.RecordsetDim Dayrs As New ADODB.RecordsetDim rs1 As New ADODB.RecordsetPublic PTime, User As String

Public IndividualEmp, LcProductReceived, LcProductReceivedall, LcDamage, LcDamagePro As StringPublic PDate1, PDate2, Raw, IndividualEmpSales, Verbal, VerbalOrder, AllEmpSales, DateFree, Free As StringPublic AllEmpSalesMR, IndividualEmpSalesMR, ProductPrice, MarketingOrderList, IndividualMarketing As StringPublic MarketingOut, Stock, MarketingReturn, PartyPay, IndividualDistributor As StringPublic DistributorOrderList, DistributorOut, DistributorReturn, DistributorAdvance, DistributorAdvance1 As StringPublic EmployeeMR, DistributorMR, MarketingMR, LoginData, ProductOut, ProductOrderList As StringPublic MarketingDistributorOrder, Distributorcommission, commission As StringPublic IndLcno As String

Sub main()On Error Resume NextCnn.ConnectionString = "dsn=ShahSoapS"Cnn.Open

rs.Open "select * from DailyStock where SDate='" & Date & "'", Cnn, adOpenDynamic, adLockOptimisticIf rs.EOF Then rs.Close rs.Open "select * from MainStock", Cnn, adOpenDynamic, adLockOptimisticDayrs.Open "select * from DailyStock", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF Dayrs.AddNew Dayrs("SDate") = Date Dayrs("ProductName") = rs("ProductName") Dayrs("Carton") = rs("Carton") Dayrs("Piece") = rs("Piece") Dayrs("BadCarton") = rs("BadCarton") Dayrs("BadPiece") = rs("BadPiece")

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 111: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Dayrs.Update rs.MoveNextLooprs.CloseDayrs.CloseSet rs = NothingSet Dayrs = Nothing

Elsers.CloseSet rs = NothingEnd IffrmMain.ShowEnd Sub

Public Sub Validation(KeyAscii As Integer)On Error Resume NextIf KeyAscii = 8 Or KeyAscii = 46 Then Exit SubIf KeyAscii >= 48 And KeyAscii <= 58 ThenExit SubElse'MsgBox "Enter An Enteger Value", vbCritical + vbOKOnlyKeyAscii = 0End IfEnd Sub

Public Sub SS(Usr As String)On Error Resume NextDim R As New ADODB.RecordsetR.Open "select * from Users where UserName='" & Usr & "' ;", Cnn, adOpenDynamic, adLockOptimisticIf R(2) = "Normal Users" ThenfrmMain.ShowfrmMain.mnupurchase.Enabled = FalsefrmMain.mnuProductInfo.Enabled = FalsefrmMain.mnuProductPrice.Enabled = FalsefrmMain.mnuFreeProduct.Enabled = FalsefrmMain.mnuMaketingProductReturn.Enabled = FalsefrmMain.mnuDistributorReturn.Enabled = FalsefrmMain.mnuDlostAdjust.Enabled = FalsefrmMain.mnuReport.Enabled = FalsefrmMain.mnuUser.Enabled = FalsefrmMain.mnuBackUp.Enabled = FalsefrmMain.mnuUpdat.Enabled = FalseCall Login(Usr)frmMain.ShowExit SubEnd If

If R(2) = "Guest" ThenfrmMain.ShowfrmMain.mnupurchase.Enabled = FalsefrmMain.mnuproduct.Enabled = FalsefrmMain.mnuPersonal.Enabled = FalsefrmMain.mnuMarketing.Enabled = FalsefrmMain.mnuDistributor.Enabled = FalsefrmMain.mnuReport.Enabled = FalsefrmMain.mnuUser.Enabled = FalsefrmMain.mnuBackUp.Enabled = FalsefrmMain.mnuUpdat.Enabled = FalsefrmMain.mnuHelp.Enabled = FalseExit SubEnd If

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 112: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 If R(2) = "Administrators" ThenfrmMain.ShowfrmMain.mnulcprodinfo.Enabled = FalsefrmMain.mnuProductInfo.Enabled = FalsefrmMain.mnuProductPrice.Enabled = FalsefrmMain.mnuFreeProduct.Enabled = FalsefrmMain.mnuDlostAdjust.Enabled = FalsefrmMain.mnuUser.Enabled = FalsefrmMain.mnuUpdat.Enabled = False

Call Login(Usr)frmMain.ShowExit SubEnd IfIf R(2) = "Authority" ThenfrmMain.ShowCall Login(Usr)frmMain.ShowExit SubEnd IfEnd SubPublic Sub Validationwithpoint(KeyAscii As Integer)On Error Resume NextIf KeyAscii = 8 Or KeyAscii = 46 Then Exit SubIf KeyAscii >= 48 And KeyAscii <= 58 ThenExit SubElse'MsgBox "Enter An Enteger Value", vbCritical + vbOKOnlyKeyAscii = 0End IfEnd SubPublic Sub ValidationNotPoint(KeyAscii As Integer)On Error Resume NextIf KeyAscii = 8 Or KeyAscii = 32 Then Exit SubIf KeyAscii >= 48 And KeyAscii <= 57 ThenExit SubElseKeyAscii = 0End If

End SubPrivate Sub Login(Name As String)PTime = Time()User = NameEnd Sub

Module for the Help:

Option Explicit

Global Const HELP_CONTEXT = &H1 ' Display topic in ulTopicGlobal Const HELP_QUIT = &H2 ' Terminate helpGlobal Const HELP_INDEX = &H3 ' Display indexGlobal Const HELP_CONTENTS = &H3Global Const HELP_HELPONHELP = &H4 ' Display help on using helpGlobal Const HELP_SETINDEX = &H5 ' Set the current Index for multi index helpGlobal Const HELP_SETCONTENTS = &H5Global Const HELP_CONTEXTPOPUP = &H8Global Const HELP_FORCEFILE = &H9Global Const HELP_KEY = &H101 ' Display topic for keyword in dwDataGlobal Const HELP_COMMAND = &H102Global Const HELP_POPUPID = &H104

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 113: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Global Const HELP_PARTIALKEY = &H105 ' Partial key search (display search dialog)Global Const HELP_CLOSEWINDOW = &H107Global Const HELP_CONTEXTNOFOCUS = &H108Global Const HELP_MULTIKEY = &H201Global Const HELP_SETWINPOS = &H203

' API declarationsPublic Const HBWM_KEYDOWN = &H100Public Const HBVK_F1 = &H70Declare Function HbSendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

' Function declarationsDeclare Function WinHelp32V Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As String) As LongDeclare Function WinHelp32L Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, dwData As Long) As LongFunction HelpContents(rfrmMain As Form) As Long HelpContents = WinHelp(rfrmMain.hwnd, App.HelpFile, HELP_INDEX, 0)End FunctionFunction HelpSearch(rfrmMain As Form) As Long Dim lsDummy As String lsDummy = "" HelpSearch = WinHelp(rfrmMain.hwnd, App.HelpFile, HELP_PARTIALKEY, lsDummy)End FunctionFunction HelpUsing(rfrmMain As Form) As Long HelpUsing = WinHelp(rfrmMain.hwnd, "", HELP_HELPONHELP, 0)End FunctionFunction WinHelp(ByVal vhWnd As Long, ByVal vlpHelpFile As String, ByVal vwCommand As Long, rdwdata As Variant) As Long Dim llLong As Long If VarType(rdwdata) = 3 Then ' V_LONG ' Handle call where rdwData is a numeric ie a context ID llLong = rdwdata WinHelp = WinHelp32L(vhWnd, vlpHelpFile, vwCommand, llLong) Else WinHelp = WinHelp32V(vhWnd, vlpHelpFile, vwCommand, rdwdata) End IfEnd FunctionSub HelpButton(rfrmForm As Form) Dim llRc As Long llRc = HbSendMessage(rfrmForm.hwnd, HBWM_KEYDOWN, HBVK_F1, 0)End Sub

MDI Form :Dim rs1 As New RecordsetPrivate Sub addUser_Click()frmAddUser.ShowEnd SubPrivate Sub MDIForm_Load()rs1.Open "select * From CreatUser ", cnn, adOpenDynamic, adLockOptimisticIf rs1.EOF ThenfrmAddUser.ShowfrmAddUser.cmblabel.Text = "Administrator"frmAddUser.cmbempid.Text = "E0000"frmAddUser.cmblabel.Enabled = FalsefrmAddUser.cmbempid.Enabled = FalseElseenabfrmLogin.ShowEnd Ifrs1.Close

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 114: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 End SubPrivate Sub mnuabout_Click()frmAbout.ShowEnd SubPrivate Sub mnuAttendence_Click()frmAttend.ShowEnd SubPrivate Sub mnuContaint_Click()Dim hwndHelp As Long hwndHelp = HtmlHelp(hWnd, "help.chm", HH_DISPLAY_TOPIC, 0)End SubPrivate Sub mnuDatabasebackup_Click()On Error Resume NextDim ComDate As DateDim a As StringDim strDBPath As Stringa = MsgBox("Do You Want To Backup DataBase ?", vbQuestion + vbYesNo)If a = vbYes ThenScreen.MousePointer = vbHourglass Dim aa As Date Dim strSQLDataBackup As String ComDate = Date strSQLDataBackup = "BACKUP DATABASE dbmanagement TO Disk='D:\dbmanagement " & Format(ComDate, "mmm-dd-yyyy") & "'" & " WITH INIT" ''''ComDate cnn.Execute strSQLDataBackupScreen.MousePointer = vbNormalEnd IfEnd SubPrivate Sub mnudexp_Click()frmdailyexpn.ShowEnd SubPrivate Sub mnuef_Click()frmLogin.ShowEnd SubPrivate Sub mnuempinfo_Click()frmempinfo.ShowEnd SubPrivate Sub mnuExit_Click()EndEnd SubPrivate Sub mnuLeave_Click()frmLeaveAdmin.ShowEnd SubPrivate Sub mnuLogoff_Click()enabEnd SubPrivate Sub mnulossprofite_Click()frmlossprofit.ShowEnd SubPrivate Sub mnupayment_Click()frmPayment.ShowEnd SubPrivate Sub mnuPerchase_Click()frmperchase.ShowEnd SubPrivate Sub mnuReLog_Click()frmLogin.ShowEnd SubPrivate Sub mnuSalary_Structure_Click()frmSstructure.ShowEnd SubPrivate Sub mnuSell_Click()

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 115: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 frmsell.ShowEnd SubPrivate Sub mnuSet_Price_Click()g = 1frmsetprice.ShowEnd SubPrivate Sub mnutemp_Click()Form1.ShowEnd SubPrivate Sub Timer1_Timer()ForeColor = BackColorFontSize = 55FontName = "TIMES NEW ROMAN"CurrentX = tx + 10CurrentY = tyPrint "THIS PROJECT IS DEVOLOPED BY S.M. ROKIBUZZAMAN (NEON)"ForeColor = QBColor(9)CurrentX = txCurrentY = tyPrint "THIS PROJECT IS DEVOLOPED BY S.M. ROKIBUZZAMAN (NEON)"tx = tx - 10End SubPrivate Sub ttest_Click(Index As Integer)frmsetprice.ShowEnd SubPrivate Sub mnuSexp_Click()frmtotalexp.ShowEnd SubPrivate Sub enab()'mnuef.Enabled = False'mnuAttendence.Enabled = Falsemnuempinfo.Enabled = FalsemnuSet_Price.Enabled = FalsemnuPerchase.Enabled = Falsemnulossprofite.Enabled = FalsemnuSell.Enabled = FalsemnuUser.Enabled = Falsemnuexpinfo.Enabled = FalsemnuEmployee.Enabled = FalsemnuDatabasebackup.Enabled = FalseEnd SubPrivate Sub mnusyslog_Click()Dim d As Dated = DateDataEnvironment13.Connection1.OpenDataEnvironment13.Command1 (d)DataReport11.ShowEnd Sub

LC Product Information

Dim rs As New ADODB.RecordsetDim rs1 As New ADODB.RecordsetDim rs2 As New ADODB.RecordsetPrivate Sub cboWtype_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf cboPName.text = "" Then

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 116: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 MsgBox "Please Enter The Product Name ", vbCritical + vbOKOnly cboPName.SetFocus Exit SubElseIf txtPtype.text = "" Then MsgBox "Please Enter The Product Type ", vbCritical + vbOKOnly txtPtype.SetFocus Exit SubElseIf txtCountry.text = "" Then MsgBox "Please Enter The Country of Origin", vbCritical + vbOKOnly txtCountry.SetFocus Exit SubElseIf cboWtype.text = "" Then MsgBox "Please Select The Weight Type", vbCritical + vbOKOnly cboWtype.SetFocus Exit Sub ElseIf txtltr.text = "" Then MsgBox "Please Enter The Liter or Kg Per Container/Drum", vbCritical + vbOKOnly txtltr.SetFocus Exit Sub End If rs.Open "select * from LcProductInfo", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("ProductName") = Trim(cboPName.text)rs("ProductType") = Trim(txtPtype.text)rs("Origine") = Trim(txtCountry.text)rs("WeightType") = Trim(cboWtype.text)rs("QtyPerDrum") = Trim(txtltr.text)rs.Updaters.Closers1.Open "select * from LcMainStock", Cnn, adOpenDynamic, adLockOptimisticrs1.AddNewrs1("ProductName") = Trim(cboPName.text)rs1("ProductType") = Trim(txtPtype.text)rs1.Updaters1.ClosecboPName.AddItem Trim(cboPName.text)cboPName.text = ""txtPtype.text = ""txtCountry.text = ""cboWtype.text = ""txtltr.text = ""Unload MeLoad MeEnd Sub

Private Sub Form_Load()On Error Resume Next'rs1.CursorLocation = adUseClientrs2.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimisticrs2.MoveFirstDo While Not rs2.EOF cboPName.AddItem rs2(0) rs2.MoveNextLoopCall GrcboWtype.AddItem "Litre", 0cboWtype.AddItem "KG", 1cboWtype.AddItem "Pices", 2End SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume NextSet rs = NothingEnd Sub

Private Sub txtltr_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 117: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Private Sub Gr()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "Select * from LcProductInfo", Cnn, adOpenDynamic, adLockOptimisticSet DG.DataSource = rs1End Sub

LC INFORMATIONDim rs As New ADODB.RecordsetPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf txtPinv.text = "" Then MsgBox "Please Enter The Proforma Invoice No ", vbCritical + vbOKOnly txtPinv.SetFocus Exit Sub ElseIf txtLcano.text = "" Then MsgBox "Please Enter LCA No ", vbCritical + vbOKOnly txtLcano.SetFocus Exit SubElseIf txtLcno.text = "" Then MsgBox "Please Enter LC No ", vbCritical + vbOKOnly txtLcno.SetFocus Exit Sub ElseIf txtHscode.text = "" Then MsgBox "Please Enter HS Code ", vbCritical + vbOKOnly txtHscode.SetFocus Exit SubElseIf txtExname.text = "" Then MsgBox "Please Enter The Exporter Name ", vbCritical + vbOKOnly txtExname.SetFocus Exit SubElseIf txtImpname.text = "" Then MsgBox "Please Enter The Importer Name ", vbCritical + vbOKOnly txtImpname.SetFocus Exit SubElseIf txtCnfAdd.text = "" Then MsgBox "Please Enter CNF Address ", vbCritical + vbOKOnly txtCnfAdd.SetFocus Exit SubElseIf txtBank.text = "" Then MsgBox "Please Enter The Bank Name ", vbCritical + vbOKOnly txtBank.SetFocus Exit SubElseIf txtBranch.text = "" Then MsgBox "Please Enter The Branch Name ", vbCritical + vbOKOnly txtBranch.SetFocus Exit SubElseIf txtPreBank.text = "" Then MsgBox "Please Enter The Preferred Bank Name ", vbCritical + vbOKOnly txtPreBank.SetFocus Exit Sub End IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from LcInformation", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("ProformaInvoiceNo") = Trim(txtPinv.text)rs("ProformaDate") = DDate.Valuers("LCANo") = Trim(txtLcano.text)rs("LCADate") = Ddate1.Valuers("LCNo") = Trim(txtLcno.text)rs("LCDate") = Ddate2.Valuers("HSCode") = Trim(txtHscode.text)rs("ExporterName") = Trim(txtExname.text)rs("ImporterName") = Trim(txtImpname.text)

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 118: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs("CNFAgentName") = Trim(txtCnfname.text)rs("CNFAgentAddress") = Trim(txtCnfAdd.text)rs("BankName") = Trim(txtBank.text)rs("Branch") = Trim(txtBranch.text)rs("PreferredBank") = Trim(txtPreBank.text)rs("CountryBranch") = Trim(txtCountry.text)rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormaltxtPinv.text = ""txtLcano.text = ""txtLcno.text = ""txtImpname.text = ""txtCnfname.text = ""txtBranch.text = ""txtPreBank.text = ""txtCountry.text = ""DDate.Value = DateDdate1.Value = DateDdate2.Value = DateEnd Sub

Private Sub Form_Load()On Error Resume NextDDate.Value = DateDdate1.Value = DateDdate2.Value = DateEnd Sub

Private Sub Form_Unload(Cancel As Integer)On Error Resume Nextrs.CloseSet rs = NothingEnd Sub

LC DETAILSDim rs As New ADODB.RecordsetDim rs1 As New ADODB.RecordsetDim rs2 As New ADODB.RecordsetDim remove As BooleanPrivate Sub cboCurrency_Click()If cboCurrency.text = "EURO" ThenLabel8.Caption = "Total Euro"Exit Sub

ElseIf cboCurrency.text = "Rupee" ThenLabel8.Caption = "Total Rupee"Exit SubElseIf cboCurrency.text = "US Dollar" ThenLabel8.Caption = "Total Dollar(US$$)"Exit SubElseIf cboCurrency.text = "YEN" ThenLabel8.Caption = "Total YEN"Exit SubEnd IfEnd SubPrivate Sub cboCurrency_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboLcno_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select LCNo from LcInformation where LCNo='" & cbolcno.text & "' ", Cnn, adOpenDynamic, adLockOptimisticrs1.CloseEnd SubPrivate Sub cboLcno_KeyPress(KeyAscii As Integer)KeyAscii = 0

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 119: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 End SubPrivate Sub cboPname_Click()On Error Resume NextcboPType.clearrs.Closers.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPType.AddItem rs(0)rs.MoveNextLooprs.ClosecboPType.ListIndex = 0End SubPrivate Sub cboPname_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf cbolcno.text = "" Then MsgBox "Please Select The LC No", vbCritical + vbOKOnly cbolcno.SetFocus Exit Sub ElseIf cboPName.text = "" Then MsgBox "Please Select The Product Name", vbCritical + vbOKOnly cboPName.SetFocus Exit SubElseIf cboPType.text = "" Then MsgBox "Please Select The Product Type", vbCritical + vbOKOnly cboPType.SetFocus Exit SubElseIf txtValue.text = 0 Or txtValue.text = "" Then MsgBox "Please Enter The Total Currency Value", vbCritical + vbOKOnly txtValue.text = "" txtValue.SetFocus Exit Sub ElseIf cboCurrency = "" Then MsgBox "Please Select The Currency Type", vbCritical + vbOKOnly cboCurrency.SetFocus Exit Sub ElseIf txtRatecurrency.text = 0 Or txtRatecurrency.text = "" Then MsgBox "Please Enter The Present Rate(Taka) of Currency", vbCritical + vbOKOnly txtRatecurrency.text = "" txtRatecurrency.SetFocus Exit Sub End IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboPName = hsGrid.TextMatrix(i, 2) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboPName.text = ""cboPType.text = ""txtValue.text = ""cboCurrency.text = ""txtTotal.text = "" cboPName.SetFocus Exit SubEnd IfNext iDim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cbolcno.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPName.text

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 120: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPType.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtValue.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatecurrency.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtQty.texthsGrid.TextMatrix(hsGrid.Rows - 1, 7) = cboCurrencyhsGrid.TextMatrix(hsGrid.Rows - 1, 8) = txtTotal.texthsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtTotal.text)cboPName.text = ""cboPType.text = ""txtValue.text = ""txtRatecurrency.text = ""txtQty.text = ""cboCurrency.text = ""txtTotal.text = ""If hsGrid.Rows = 2 ThenhsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cbolcnohsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPNamehsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPTypehsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtValuehsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatecurrencyhsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtQtyhsGrid.TextMatrix(hsGrid.Rows - 1, 7) = cboCurrencyhsGrid.TextMatrix(hsGrid.Rows - 1, 8) = txtTotalhsGrid.Rows = hsGrid.Rows + 1End IfcmdRemove.Enabled = TruecmdSave.Enabled = Truecbolcno.Enabled = FalseEnd SubPrivate Sub cmdClear_Click()On Error Resume NextDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcbolcno.text = ""cboPName.text = ""cboPType.text = ""txtTotal.text = ""txtGtotal.text = ""End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()If remove = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 8)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfCnn.BeginTransDim rs2 As New ADODB.Recordsetrs2.Open "select * from LcDetails", Cnn, adOpenDynamic, adLockOptimisticDim i As IntegerFor i = 1 To hsGrid.Rows - 2

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 121: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs2.AddNewrs2("LcNo") = Trim(hsGrid.TextMatrix(i, 1))rs2("ProductName") = Trim(hsGrid.TextMatrix(i, 2))rs2("ProductType") = hsGrid.TextMatrix(i, 3)rs2("ValueDoller") = hsGrid.TextMatrix(i, 4)rs2("RateOfCurrency") = hsGrid.TextMatrix(i, 5)rs2("Quantity") = hsGrid.TextMatrix(i, 6)rs2("CurrencyType") = hsGrid.TextMatrix(i, 7)rs2("Total") = hsGrid.TextMatrix(i, 8)rs2.UpdateNext irs2.CloseCnn.CommitTransDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcbolcno.text = ""txtGtotal.text = ""cmdRemove.Enabled = TruecmdSave.Enabled = Falsecbolcno.Enabled = TrueEnd SubPrivate Sub Form_Load()On Error Resume NextcboPType.clearrs1.Open "select * from LcInformation ORDER BY LCDate", Cnn, adOpenDynamic, adLockOptimisticrs1.MoveFirstDo While Not rs1.EOFcbolcno.AddItem Trim(rs1(4))rs1.MoveNextLooprs1.Closers.Open "select distinct ProductName from LcProductInfo ", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPName.AddItem rs(0)rs.MoveNextLooprs.ClosecboCurrency.AddItem "EURO", 0cboCurrency.AddItem "Rupee", 1cboCurrency.AddItem "Swiss Frank", 2cboCurrency.AddItem "US Dollar", 3cboCurrency.AddItem "UK POUND", 4cboCurrency.AddItem "YEN", 5hsGrid.TextMatrix(0, 0) = "SRNo"hsGrid.TextMatrix(0, 1) = "LC No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Product Type"hsGrid.TextMatrix(0, 4) = "Value"hsGrid.TextMatrix(0, 5) = "Rate of Currency"hsGrid.TextMatrix(0, 6) = "Quantity"hsGrid.TextMatrix(0, 7) = "Currency Type"hsGrid.TextMatrix(0, 8) = "Total(TK)"Set rs = NothingcmdRemove.Enabled = FalsecmdSave.Enabled = FalseEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtQty_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtRatecurrency_Change()On Error Resume NexttxtTotal.text = 0txtTotal.text = Val(txtValue.text) * Val(txtRatecurrency.text)

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 122: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 End SubPrivate Sub txtRatecurrency_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTotal_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubLC Product Received

Dim rs As New ADODB.RecordsetDim rs1 As New ADODB.RecordsetDim rs2 As New ADODB.RecordsetDim rs3 As New ADODB.RecordsetDim rs4 As New ADODB.RecordsetDim remove As BooleanDim blnClickStander2 As BooleanPrivate Sub cboLcno_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select LCNo from LcInformation where LCNo='" & cbolcno.text & "' ", Cnn, adOpenDynamic, adLockOptimisticrs1.ClosecboPName.clearcboPType.clearrs1.Open "select distinct ProductName,ProductType from LcDetails where LcNo = '" & cbolcno.text & "'", Cnn, adOpenDynamic, adLockOptimisticrs1.MoveFirstDo While Not rs1.EOF cboPName.AddItem Trim(rs1("ProductName")) cboPType.AddItem Trim(rs1("ProductType")) rs1.MoveNextLooprs1.CloseEnd SubPrivate Sub cboLcno_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPname_Click()On Error Resume NextcboPType.clearrs.Closers.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPType.AddItem rs(0)rs.MoveNextLooprs.ClosecboPType.ListIndex = 0End SubPrivate Sub cboPname_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click() On Error Resume NextIf cbolcno.text = "" Then MsgBox "Please Select the LC Number.", vbCritical + vbOKOnly cbolcno.SetFocus Exit SubElseIf txtInvno.text = "" Then MsgBox "Please Enter the Invoice No.", vbCritical + vbOKOnly txtInvno.SetFocus Exit SubElseIf cboPType.text = "" Then MsgBox "Please Select The Product Type.", vbCritical + vbOKOnly txtPlace.SetFocus

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 123: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Exit SubElseIf txtTltrkg.text = 0 Or txtTltrkg.text = "" Then MsgBox "Please Enter the Total Litre/Kg.", vbCritical + vbOKOnly txtTltrkg.text = "" txtTltrkg.SetFocus Exit SubElseIf txtQty.text = 0 Or txtQty.text = "" Then MsgBox "Please Enter the Product Quantity Number.", vbCritical + vbOKOnly txtQty.text = "" txtQty.SetFocus Exit SubElseIf txtRate.text = 0 Or txtRate.text = "" Then MsgBox "Please Enter the Product Rate", vbCritical + vbOKOnly txtRate.text = "" txtRate.SetFocus Exit SubEnd IfIf InvoiceDate.Value > ConDate.Value Then MsgBox "Invoice Date Should be Less Than Consignment Date.", vbInformation + vbOKOnly InvoiceDate.SetFocus Exit SubEnd IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboPName.text = hsGrid.TextMatrix(i, 2) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboPName.text = "" cboPType.text = "" txtQty.text = "" txtTltrkg.text = "" txtRate.text = "" txtTotalAmt.text = "" txtRemarks.text = "" cboPName.SetFocus Exit SubEnd IfNext icbolcno.Enabled = FalseConDate.Enabled = FalsetxtInvno.Enabled = FalseInvoiceDate.Enabled = FalsecmdSave.Enabled = TrueDim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cbolcno.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPType.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtQty.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtTltrkg.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtRate.texthsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtTotalAmt.texthsGrid.TextMatrix(hsGrid.Rows - 1, 8) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmt.text)cboPName.text = ""cboPType.text = ""txtQty.text = ""txtTltrkg.text = ""txtRate.text = ""txtTotalAmt.text = ""txtRemarks.text = ""End SubPrivate Sub cmdClear_Click()On Error Resume NextDim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 124: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Next ktxtRate.text = ""txtTotalAmt.text = ""txtInvno.text = ""txtGtotal.text = ""txtTruckNo.text = ""txtDriver.text = ""cbolcno.Enabled = TrueConDate.Enabled = TruetxtInvno.Enabled = TrueInvoiceDate.Enabled = TrueConDate.Value = DateInvoiceDate.Value = DateEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 7)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfIf txtTruckNo.text = "" Then MsgBox "Please Enter The Truck No.", vbCritical + vbOKOnly txtTruckNo.text = "" txtTruckNo.SetFocus Exit Sub ElseIf txtDriver.text = "" Then MsgBox "Please Enter The Driver Name.", vbCritical + vbOKOnly txtDriver.text = "" txtDriver.SetFocus Exit SubEnd IfCnn.BeginTransDim j As IntegerFor j = 1 To hsGrid.Rows - 2rs4.Open " select * from LcMainStock where ProductName='" & hsGrid.TextMatrix(j, 2) & "' And ProductType='" & hsGrid.TextMatrix(j, 3) & "'", Cnn, adOpenDynamic, adLockOptimisticrs4("Qty") = Val(rs4("Qty")) + Val(hsGrid.TextMatrix(j, 4))rs4("LiterKg") = Val(rs4("LiterKg")) + Val(hsGrid.TextMatrix(j, 5))rs4.Updaters4.CloseNext jDim rs2 As New ADODB.Recordsetrs2.Open "select * from LcProductReceive", Cnn, adOpenDynamic, adLockOptimisticDim i As IntegerFor i = 1 To hsGrid.Rows - 2rs2.AddNewrs2("LCNo") = Trim(hsGrid.TextMatrix(i, 1))rs2("ProductName") = Trim(hsGrid.TextMatrix(i, 2))rs2("ProductType") = hsGrid.TextMatrix(i, 3)rs2("Quantity") = hsGrid.TextMatrix(i, 4)rs2("TotalLiterKg") = hsGrid.TextMatrix(i, 5)

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 125: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs2("Rate") = hsGrid.TextMatrix(i, 6)rs2("TotalAmount") = hsGrid.TextMatrix(i, 7)rs2("Remarks") = hsGrid.TextMatrix(i, 8)rs2("ConsignDate") = ConDate.Valuers2("InvoiceDate") = InvoiceDate.Valuers2("InvoiceNo") = txtInvno.text'rs2("TruckNo") = hsGrid.TextMatrix(1, 12)'rs2("DriverName") = hsGrid.TextMatrix(1, 13)rs2.UpdateNext irs2.CloseCnn.CommitTransDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next krs3.Open "select * from LCProductreceivedMaster", Cnn, adOpenDynamic, adLockOptimisticrs3.AddNewrs3(0) = cbolcno.textrs3(1) = ConDate.Valuers3(2) = txtInvno.textrs3(3) = InvoiceDate.Valuers3(4) = txtTruckNo.textrs3(5) = txtDriver.textrs3(6) = txtGtotal.textrs3.Updaters3.Closecbolcno.text = ""txtTruckNo.text = ""txtDriver.text = ""txtInvno.text = ""cboPName.text = ""cboPType.text = ""txtQty.text = ""txtTltrkg.text = ""txtRate.text = ""txtTotalAmt.text = ""txtRemarks.text = ""txtGtotal.text = ""ConDate.Enabled = TrueInvoiceDate.Enabled = TruecmdRemove.Enabled = TrueConDate.Value = DateInvoiceDate.Value = DateEnd Sub

Private Sub Form_Load()On Error Resume NextcboPType.clearrs1.Open "select * from LcInformation ORDER BY LCDate", Cnn, adOpenDynamic, adLockOptimisticrs1.MoveFirstDo While Not rs1.EOFcbolcno.AddItem Trim(rs1(4))rs1.MoveNextLooprs1.Closers.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPName.AddItem rs(0)rs.MoveNextLooprs.CloseblnClickStander2 = FalsehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "LC No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Product Type"hsGrid.TextMatrix(0, 4) = "Quantity"

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 126: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 hsGrid.TextMatrix(0, 5) = "Total Litre/KG"hsGrid.TextMatrix(0, 6) = "Rate"hsGrid.TextMatrix(0, 7) = "Total Amount"hsGrid.TextMatrix(0, 8) = "Remarks"ConDate.Value = DateInvoiceDate.Value = DateEnd SubPrivate Sub txtQty_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtRate_Change()On Error Resume Next'txtRate.text = 0txtTotalAmt.text = Val(txtQty.text) * Val(txtRate.text)End SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtRate_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTltrkg_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTotalAmt_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

LC OTHER COST

Dim rs1 As New ADODB.RecordsetDim rs As New ADODB.RecordsetPrivate Sub Command3_Click()Unload MeEnd SubPrivate Sub cboLcno_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select LCNo from LcInformation where LCNo='" & cbolcno.text & "' ", Cnn, adOpenDynamic, adLockOptimisticrs1.CloseEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf cbolcno.text = "" Then MsgBox "Please Select The LC No from The Selected Box.", vbCritical + vbOKOnly cbolcno.SetFocus Exit SubEnd IfIf txtCnfcost.text = "" Then MsgBox "Please Enter The CNF Agent Charge/Cost ", vbCritical + vbOKOnly txtCnfcost.SetFocus Exit SubElseIf txtTax.text = "" Then MsgBox "Please Enter The Tax ", vbCritical + vbOKOnly txtTax.SetFocus Exit SubElseIf txtLcost.text = "" Then MsgBox "Please Enter The Loading Cost ", vbCritical + vbOKOnly txtLcost.SetFocus Exit Sub ElseIf txtUcost.text = "" Then MsgBox "Please Enter The Unloading Cost ", vbCritical + vbOKOnly txtUcost.SetFocus Exit SubEnd IfScreen.MousePointer = vbHourglass

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 127: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Cnn.BeginTransrs.Open "select * from LCOtherCost", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("LCNo") = Trim(cbolcno.text)rs("ConsignDate") = ConDate.Valuers("CNFAgentCost") = Trim(txtCnfcost.text)rs("MiscelleniousCost") = Trim(txtMisce.text)rs("Tax") = Trim(txtTax.text)rs("LoadingCost") = Trim(txtLcost.text)rs("UnloadingCost") = Trim(txtUcost.text)rs("OtherCost") = Trim(txtOcost.text)rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormalcbolcno.text = ""txtCnfcost.text = ""txtMisce.text = ""txtTax.text = ""txtLcost.text = ""txtUcost.text = ""txtOcost.text = ""ConDate.Value = DateEnd SubPrivate Sub Form_Load()On Error Resume Nextrs1.Open "select * from LcInformation ORDER BY LCDate", Cnn, adOpenDynamic, adLockOptimisticrs1.MoveFirstDo While Not rs1.EOFcbolcno.AddItem Trim(rs1(4))rs1.MoveNextLooprs1.CloseConDate.Value = DateEnd SubPrivate Sub txtCnfcost_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtLcost_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtMisce_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtOcost_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTax_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtUcost_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

LC DAMAGE PRODUCT LOSS

Dim rs As New ADODB.RecordsetDim rs1 As New ADODB.RecordsetDim remove1 As BooleanDim AA As IntegerPrivate Sub cboLcno_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select LCNo from LcInformation where LCNo='" & cbolcno.text & "' ", Cnn, adOpenDynamic, adLockOptimisticrs1.ClosecboPName.clearcboPType.clearrs1.Open "select distinct ProductName,ProductType from LcDetails where LcNo = '" & cbolcno.text & "'", Cnn, adOpenDynamic, adLockOptimistic

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 128: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs1.MoveFirstDo While Not rs1.EOF cboPName.AddItem Trim(rs1("ProductName")) cboPType.AddItem Trim(rs1("ProductType")) rs1.MoveNextLooprs1.Closers1.Open "select CNFAgentName from LcInformation where LCNo = '" & cbolcno.text & "'", Cnn, adOpenDynamic, adLockOptimisticrs1.MoveFirstDo While Not rs1.EOF txtCnfname.text = Trim(rs1("CNFAgentName")) ' txtCnfname.SelText rs1.MoveNextLoop

End Sub

Private Sub cboLcno_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPname_Click()On Error Resume NextcboPType.clearrs.Closers.Open "select distinct ProductType from LcProductInfo where ProductName='" & Trim(cboPName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPType.AddItem rs(0)rs.MoveNextLooprs.ClosecboPType.ListIndex = 0End SubPrivate Sub cboPname_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPType_Click()On Error Resume NextDim rsnew As New ADODB.RecordsetAA = 0rsnew.Open "select QtyPerDrum from LcProductInfo where ProductName='" & Trim(cboPName.text) & "' and ProductType='" & Trim(cboPType.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rsnew.EOF ThenAA = rsnew(0)End IfEnd SubPrivate Sub cboPType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf cbolcno.text = "" Then MsgBox "Please Select The LC No", vbCritical + vbOKOnly cbolcno.SetFocus Exit Sub ElseIf cboPName.text = "" Then MsgBox "Please Select The Product Name", vbCritical + vbOKOnly cboPName.SetFocus Exit SubElseIf cboPType.text = "" Then MsgBox "Please Select The Product Type", vbCritical + vbOKOnly cboPType.SetFocus Exit Sub ElseIf txtQty.text = 0 Or txtQty.text = "" Then MsgBox "Please Enter the Product Quantity Number", vbCritical + vbOKOnly txtQty.text = "" txtQty.SetFocus Exit Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 129: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 ElseIf txtTltrkg.text = 0 Or txtTltrkg.text = "" Then MsgBox "Please Enter the Damage Product Litre/Kg", vbCritical + vbOKOnly txtTltrkg.text = "" txtTltrkg.SetFocus Exit SubElseIf txtTotal.text = 0 Or txtTotal.text = "" Then MsgBox "Please Enter Total Taka", vbCritical + vbOKOnly txtTotal.text = "" txtTotal.SetFocus Exit Sub End IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboPName.text = hsGrid.TextMatrix(i, 4) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboPName.text = "" cboPType.text = "" txtQty.text = "" txtTltrkg.text = "" txtTotal.text = "" txtCnfname.text = "" txtRemarks.text = "" cboPName.SetFocus Exit SubEnd IfNext iDim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cbolcno.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = ConDate.ValuehsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCnfname.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = cboPName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = cboPType.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtQty.texthsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtTltrkg.texthsGrid.TextMatrix(hsGrid.Rows - 1, 8) = txtTotal.texthsGrid.TextMatrix(hsGrid.Rows - 1, 9) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtTotal.text)cboPName.text = ""cboPType.text = ""txtQty.text = ""txtTltrkg.text = ""txtTotal.text = ""''txtCnfname.text = ""txtRemarks.text = ""cbolcno.Enabled = FalseConDate.Enabled = FalsecmdRemove.Enabled = TrueEnd SubPrivate Sub cmdClear_Click()On Error Resume NextDim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcbolcno.text = ""cboPName.text = ""cboPType.text = ""txtQty.text = ""txtTltrkg.text = ""txtTotal.text = ""txtCnfname.text = ""txtRemarks.text = ""txtGtotal.text = ""cbolcno.Enabled = TrueConDate.Enabled = True

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 130: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 ConDate.Value = DateEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove1 = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 8)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End IfElse MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfCnn.BeginTransDim rs2 As New ADODB.Recordsetrs2.Open "select * from LcDamageProductLoss", Cnn, adOpenDynamic, adLockOptimisticDim i As IntegerFor i = 1 To hsGrid.Rows - 2rs2.AddNewrs2("LcNo") = Trim(hsGrid.TextMatrix(i, 1))rs2("ConsignDate") = Trim(hsGrid.TextMatrix(i, 2))rs2("CNFName") = hsGrid.TextMatrix(i, 3)rs2("ProductName") = hsGrid.TextMatrix(i, 4)rs2("ProductType") = hsGrid.TextMatrix(i, 5)rs2("Qty") = hsGrid.TextMatrix(i, 6)rs2("LiterKg") = hsGrid.TextMatrix(i, 7)rs2("Price") = hsGrid.TextMatrix(i, 8)rs2("Remarks") = hsGrid.TextMatrix(i, 9)rs2.UpdateNext irs2.CloseCnn.CommitTransDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next ktxtGtotal.text = ""txtQty.text = ""cmdRemove.Enabled = TrueConDate.Value = Datecbolcno.Enabled = TrueConDate.Enabled = TrueEnd SubPrivate Sub hsGrid_Click()remove1 = TrueEnd SubPrivate Sub Form_Load()On Error Resume NextcboPType.clearrs1.Open "select * from LcInformation ORDER BY LCDate", Cnn, adOpenDynamic, adLockOptimisticrs1.MoveFirstDo While Not rs1.EOFcbolcno.AddItem Trim(rs1(4))rs1.MoveNextLooprs1.Close

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 131: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPName.AddItem rs(0)rs.MoveNextLooprs.ClosehsGrid.TextMatrix(0, 0) = "SRNo"hsGrid.TextMatrix(0, 1) = "LC No"hsGrid.TextMatrix(0, 2) = "Consignment Date"hsGrid.TextMatrix(0, 3) = "CNF Agent Name"hsGrid.TextMatrix(0, 4) = "Product Name"hsGrid.TextMatrix(0, 5) = "Product Type"hsGrid.TextMatrix(0, 6) = "Quantity"hsGrid.TextMatrix(0, 7) = "Litre/Kg"hsGrid.TextMatrix(0, 8) = "Total TK"hsGrid.TextMatrix(0, 9) = "Remarks"remove1 = FalsecmdRemove.Enabled = FalseConDate.Value = DateEnd SubPrivate Sub txtQty_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTltrkg_Change()On Error Resume NexttxtQty.text = Val(txtTltrkg.text) / Val(AA)End SubPrivate Sub txtTltrkg_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTotal_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

Private Sub XPButton1_Click()End Sub

PARTY INFORMATION

Dim rs As New ADODB.RecordsetDim rs1 As New ADODB.RecordsetDim rs2 As New ADODB.RecordsetPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf txtPName.text = "" Then MsgBox "Please Enter The Party Name ", vbCritical + vbOKOnly txtPName.SetFocus Call Gr Exit Sub ElseIf txtProName.text = "" Then MsgBox "Please Enter Propeitor Name ", vbCritical + vbOKOnly txtProName.SetFocus Call Gr Exit SubElseIf txtDistrict.text = "" Then MsgBox "Please Enter The District Or Division Name ", vbCritical + vbOKOnly txtDistrict.SetFocus Call Gr Exit Sub ElseIf Cbodivision.text = "" Then MsgBox "Please Select The Division Name ", vbCritical + vbOKOnly Cbodivision.SetFocus Call Gr Exit SubElseIf txtAddress.text = "" Then

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 132: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 MsgBox "Please Enter The Address ", vbCritical + vbOKOnly txtAddress.SetFocus Call Gr Exit SubElseIf txtphone.text = "" Then MsgBox "Please Enter The Telephone No ", vbCritical + vbOKOnly txtphone.SetFocus Call Gr Exit Sub ElseIf txtMobileNo.text = "" Then MsgBox "Please Enter The Mobile No ", vbCritical + vbOKOnly txtMobileNo.SetFocus Call Gr Exit Sub End If Screen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from RawPartyInfo", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("PartyName") = txtPName.textrs("ProperitorName") = txtProNamers("District") = txtDistrict.textrs("Address") = txtAddress.textrs("Phone") = txtphone.textrs("Mobile") = txtMobileNo.textrs("Division") = Cbodivision.textrs.Updaters.Closers1.Open "select * from RawPartyAC", Cnn, adOpenDynamic, adLockOptimisticrs1.AddNewrs1("PartyName") = txtPName.textrs1.Updaters1.CloseCnn.CommitTransScreen.MousePointer = vbNormalCall GrtxtPName.text = ""txtProName.text = ""txtDistrict.text = ""txtAddress.text = ""txtphone.text = ""txtMobileNo.text = ""Cbodivision.text = ""End SubPrivate Sub Form_Load()On Error Resume NextCbodivision.AddItem "Barisal", 0Cbodivision.AddItem "Chittagong", 1Cbodivision.AddItem "Dhaka", 2Cbodivision.AddItem "Khulna", 3Cbodivision.AddItem "Rajshahi", 4Cbodivision.AddItem "Sylhet", 5Call GrEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume NextSet rs = NothingEnd SubPrivate Sub Gr()On Error Resume NextDim rsD As New ADODB.RecordsetrsD.CursorLocation = adUseClientrsD.Open "Select * from RawPartyInfo", Cnn, adOpenDynamic, adLockOptimisticSet DGrid.DataSource = rsDEnd Sub

RAW MATERIALS ORDER TO PARTY(VERBAL)

Dim rs As New ADODB.Recordset

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 133: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Dim rs1 As New ADODB.RecordsetDim rs2 As New ADODB.RecordsetDim rs3 As New ADODB.RecordsetDim rs4 As New ADODB.RecordsetDim blnClickStander2 As BooleanDim remove As BooleanDim LK As DoublePrivate Sub cboPartyName_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select distinct PartyName from RawPartyInfo where PartyName='" & Trim(cboPartyName.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticrs1.CloseEnd SubPrivate Sub cboPartyName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPname_Click()On Error Resume NextcboPType.clearrs.Closers.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPType.AddItem rs(0)rs.MoveNextLooprs.ClosecboPType.ListIndex = 0txtOrderRate.text = ""txtQuantity.text = ""txtTotalLKg.text = ""txtTotal.text = ""Dim rs5 As New ADODB.RecordsetLK = 0rs5.Open "select * from LcProductInfo where ProductName='" & Trim(cboPName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticLK = rs5("QtyPerDrum")rs5.ClosetxtTotalLKg.text = ""End SubPrivate Sub cboPname_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf txtOrder.text = "" Then MsgBox "Please Enter An Order Number.", vbCritical + vbOKOnly txtOrder.SetFocus Exit SubElseIf cboPartyName.text = "" Then MsgBox "Please Select The Party Name.", vbCritical + vbOKOnly cboPartyName.SetFocus Exit SubElseIf txtcontactPerson.text = "" Then MsgBox "Please Enter The Contact Person Name.", vbCritical + vbOKOnly txtcontactPerson.SetFocus Exit SubElseIf cboPName.text = "" Then MsgBox "Please Select The Product Name.", vbCritical + vbOKOnly cboPName.SetFocus Exit SubElseIf cboPType.text = "" Then MsgBox "Please Select The Product Type.", vbCritical + vbOKOnly cboPType.SetFocus Exit Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 134: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 ElseIf txtOrderRate.text = "" Or Val(txtOrderRate.text) = 0 Then MsgBox "Please Enter The Order Rate.", vbCritical + vbOKOnly txtOrderRate.SetFocus Exit SubElseIf txtQuantity.text = "" Or Val(txtQuantity.text) = 0 Then MsgBox "Please Enter The Order Quantity.", vbCritical + vbOKOnly txtQuantity.SetFocus Exit SubElseIf txtTotalLKg.text = "" Or Val(txtTotalLKg.text) = 0 Then MsgBox "Please Enter The Total Litre/Kg.", vbCritical + vbOKOnly txtTotalLKg.SetFocus Exit Sub End If Dim rs2 As New ADODB.Recordsetrs2.Open "select * from VerbalReceivedMaster where OrderNo='" & Trim(txtOrder.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs2.EOF Then MsgBox "This Order Number Is Already Saved." & Chr(13) & "Enter Another Order No.", vbInformation + vbOKOnly Call cmdClear_Click Exit SubEnd Ifrs2.CloseIf DelivaryDate.Value < OrderDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly OrderDate.SetFocus Exit SubEnd IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboPName.text = hsGrid.TextMatrix(i, 2) Then MsgBox "These Records Are Already Existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboPName.SetFocus Exit SubEnd IfNext i txtOrder.Enabled = False DTTime.Enabled = False OrderDate.Enabled = False DelivaryDate.Enabled = False cboPartyName.Enabled = False txtcontactPerson.Enabled = False OrderTime.Enabled = False Dim introw1 As Integerintrow1 = hsGrid.Rows - 1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtOrderhsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPNamehsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPTypehsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtOrderRatehsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtQuantityhsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalLKghsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtTotalhsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtTotal.text)cboPName.text = ""cboPType.text = ""txtOrderRate.text = 0txtQuantity.text = 0txtTotalLKg.text = 0txtTotal.text = 0cmdRemove.Enabled = TruecmdSave.Enabled = TrueIf hsGrid.Rows = 2 ThenhsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtOrderhsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPNamehsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPTypehsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtOrderRatehsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtQuantity.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalLKg.text

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 135: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtTotal.texthsGrid.Rows = hsGrid.Rows + 1End IfEnd SubPrivate Sub cmdClear_Click()On Error Resume NextDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kOrderDate.Enabled = TrueDelivaryDate.Enabled = TruecboPartyName.Enabled = TruetxtcontactPerson.Enabled = TrueDTTime.Enabled = TrueOrderTime.Enabled = TruetxtOrder.text = ""DTTime.Value = TimeOrderDate.Value = DateDelivaryDate.Value = DatecboPartyName.text = ""cboPName.text = ""cboPType.text = ""txtcontactPerson.text = ""txtOrderRate.text = ""txtQuantity.text = ""txtTotalLKg.text = ""txtTotal.text = ""txtGtotal.text = ""End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 7)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select The Row Then Click The Remove Button", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfDim i As IntegerScreen.MousePointer = vbHourglassCnn.BeginTransrs3.Open "select * from VerbalOrderMaster", Cnn, adOpenDynamic, adLockOptimisticrs3.AddNewrs3("OrderNo") = Trim(txtOrder.text)rs3("OrderDate") = Trim(OrderDate.Value)rs3("OrderTime") = OrderTime.Valuers3("Delivary") = DelivaryDate.Valuers3("PartName") = cboPartyName.textrs3("ContactPerson") = txtcontactPerson.textrs3("TotalAmount") = txtGtotal.textrs3.Updaters3.Closers4.Open "select * from VerbalOrderDetails", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 136: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs4.AddNewrs4("OrderNo") = Trim(hsGrid.TextMatrix(i, 1))rs4("ProductName") = Trim(hsGrid.TextMatrix(i, 2))rs4("ProductType") = hsGrid.TextMatrix(i, 3)rs4("Rate") = hsGrid.TextMatrix(i, 4)rs4("Qty") = Trim(hsGrid.TextMatrix(i, 5))rs4("TotalLiterKg") = hsGrid.TextMatrix(i, 6)rs4("Amount") = hsGrid.TextMatrix(i, 7)rs4.UpdateNext iCnn.CommitTransScreen.MousePointer = vbNormalrs4.CloseOrderDate.Value = DateDelivaryDate.Value = DateOrderTime.Value = TimeCall cmdClear_ClickEnd SubPrivate Sub Form_Load()On Error Resume Nextrs1.Open "select * from RawPartyInfo", Cnn, adOpenDynamic, adLockOptimisticrs1.MoveFirstDo While Not rs1.EOFcboPartyName.AddItem Trim(rs1(0))rs1.MoveNextLooprs1.Closers.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPName.AddItem rs(0)rs.MoveNextLooprs.ClosecmdSave.Enabled = FalsecmdRemove.Enabled = FalsehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "Order No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Product Type"hsGrid.TextMatrix(0, 4) = "Rate"hsGrid.TextMatrix(0, 5) = "Quantity"hsGrid.TextMatrix(0, 6) = "Litre/Kg"hsGrid.TextMatrix(0, 7) = "Total Amount"OrderDate.Value = DateDelivaryDate.Value = DateOrderTime.Value = TimeEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume Nextrs.Closers1.Closers2.Closers3.Closers4.CloseSet rs = NothingSet rs1 = NothingSet rs2 = NothingSet rs3 = NothingSet rs4 = NothingEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub InTime_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)End SubPrivate Sub txtOrderRate_Change()On Error Resume Next

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 137: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 txtTotal.text = 0txtTotal.text = Val(txtQuantity.text) * Val(txtOrderRate.text)End SubPrivate Sub txtOrderRate_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtQuantity_Change()On Error Resume NexttxtTotal.text = Val(txtOrderRate.text) * Val(txtQuantity.text)txtTotalLKg.text = Val(txtQuantity.text) * Val(LK)End SubPrivate Sub txtQuantity_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTotalLKg_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

RAW MATERIALS RECEIVED FROM PARTY(Verbal)

Dim rsSave As New ADODB.RecordsetDim rs As New ADODB.RecordsetDim rs2 As New ADODB.RecordsetDim rs3 As New ADODB.RecordsetDim rs4 As New ADODB.RecordsetDim rs5, rs6 As New ADODB.RecordsetDim Qty As DoubleDim remove As BooleanDim Total As DoublePrivate Sub cboOrder_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select OrderDate,PartName from VerbalOrderMaster where OrderNo='" & Trim(CboOrder.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticOrderDate.text = rs1("OrderDate")cboPartyName.text = rs1("PartName")OrderDate.Enabled = FalsecboPartyName.Enabled = Falsers1.ClosecboPName.clearrs6.Open "select distinct ProductName from VerbalOrderDetails where OrderNo = '" & CboOrder.text & "'", Cnn, adOpenDynamic, adLockOptimisticrs6.MoveFirstDo While Not rs6.EOF cboPName.AddItem Trim(rs6("ProductName")) rs6.MoveNextLooprs6.CloseDim rs4 As New ADODB.Recordsetrs4.CursorLocation = adUseClientrs4.Open "select ProductName,ProductType,Qty as Quantity,TotalLiterKg,Rate,Amount as Amount_TK from VerbalOrderDetails where OrderNo='" & Trim(CboOrder.text) & "'", Cnn, adOpenDynamic, adLockOptimisticSet OrderGrid.DataSource = rs4End SubPrivate Sub cboOrder_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPartyName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPname_Click()On Error Resume NextcboPType.clearrs.Closers.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPType.AddItem rs(0)

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 138: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs.MoveNextLooprs.ClosecboPType.ListIndex = 0txtReRate.text = ""txtQuantity.text = ""txtDrum.text = ""txtTotalAmount.text = ""End SubPrivate Sub cboPname_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf CboOrder.text = "" ThenMsgBox "Please Select The Order No", vbOKOnlyCboOrder.SetFocusExit SubElseIf cboPartyName.text = "" ThenMsgBox "Please Select The Party Name", vbOKOnlycboPartyName.SetFocusExit SubElseIf cboPName.text = "" ThenMsgBox "Please Select The Product Name", vbOKOnlycboPName.SetFocusExit SubElseIf cboPType.text = "" ThenMsgBox "Please Select Product Type Name", vbOKOnlycboPType.SetFocusExit SubElseIf txtReRate.text = "" ThenMsgBox "Please Enter The Product Rate", vbOKOnlytxtReRate.SetFocusExit SubElseIf txtQuantity.text = "" ThenMsgBox "Please Enter The Right Quantity", vbOKOnlytxtQuantity.SetFocusExit SubElseIf txtTotalLKg.text = "" ThenMsgBox "Please Enter The Total Liter KG", vbOKOnlytxtTotalLKg.SetFocusExit SubEnd IfDim rsCh As New ADODB.RecordsetrsCh.Open "select * from VerbalReceivedMaster where OrderNo='" & Trim(CboOrder.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rsCh.EOF Then MsgBox "This Record Is Already Existed. Enter Another Record..", vbInformation + vbOKOnly CboOrder.SetFocus Exit SubElsersCh.CloseEnd IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboPName.text = hsGrid.TextMatrix(i, 2) Then MsgBox "This Information Already Exists." & Chr(13) & "You can't add same Record", vbInformation, "Information" Call Blank cboPName.SetFocus Exit SubEnd IfNext i CboOrder.Enabled = False OrderDate.Enabled = False ReceivedDate.Enabled = False

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 139: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 ReceivedTime.Enabled = False cboPartyName.Enabled = False ReceivedTime.Enabled = Falseintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = CboOrder.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPType.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtReRate.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtQuantity.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalLKg.texthsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtDrum.texthsGrid.TextMatrix(hsGrid.Rows - 1, 8) = txtTotalAmount.texthsGrid.TextMatrix(hsGrid.Rows - 1, 9) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmount.text)txtGTotF.text = Val(txtGTotF.text) + Val(txtTotalAmount.text)txtReRate.text = ""txtQuantity.text = ""txtDrum.text = ""txtTotalLKg.text = ""txtTotalAmount.text = ""txtRemarks.text = ""CboOrder.Enabled = FalseOrderDate.Enabled = FalsecboPartyName.Enabled = FalsecmdRemove.Enabled = TruecmdSave.Enabled = TrueEnd SubPrivate Sub cmdClear_Click()On Error Resume NextDim k As IntegerTotal = 0CboOrder.text = ""OrderDate.text = ""txtQuantity.text = ""txtTotalLKg.text = ""txtDrum.text = ""txtLabour.text = ""txtTruckDriverNam.text = ""txtTruckNo.text = ""txttranport.text = ""txtTotalAmount.text = ""txtOtherExpenses.text = ""txtRemarks.text = ""cboPartyName.text = ""cboPName.text = ""cboPType.text = ""txtReRate.text = ""ReceivedDate.Enabled = TrueReceivedTime.Enabled = TrueCboOrder.Enabled = TrueReceivedTime.Enabled = TrueFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next ktxtGtotal.text = ""txtGTotF.text = ""Call cboOrder_ClickEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 8)) txtGTotF.text = Val(txtGTotF.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 8))

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 140: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Total = Val(Total) - Val(hsGrid.TextMatrix(hsGrid.ROW, 8)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select The Row Then Click The Remove Button", vbInformation, End IfcboPName.text = ""txtReRate.text = ""cboPType.text = ""txtQuantity.text = ""txtTotalLKg.text = ""txtDrum.text = ""txtTotalAmount.text = ""txtRemarks.text = ""txtGtotal.text = ""txtGTotF.text = ""End SubPrivate Sub cmdSave_Click()On Error Resume NextIf Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfIf txtTruckDriverNam.text = "" Then MsgBox "Please Enter Track Driver Name.", vbCritical + vbOKOnly txtTruckDriverNam.SetFocus Exit SubElseIf txtTruckNo.text = "" Then MsgBox "Please Enter Track Number.", vbCritical + vbOKOnly txtTruckNo.SetFocus Exit SubElseIf txttranport.text = "" Then MsgBox "Please Enter Transport Amount.", vbCritical + vbOKOnly txttranport.SetFocus Exit SubElseIf txtLabour.text = "" Then MsgBox "Please Enter Labour Cost.", vbCritical + vbOKOnly txtLabour.SetFocus Exit SubEnd If'txtGTotF.text = Val(txtGTotF.text) + Val(txttranport.text) + Val(txtLabour.text) + Val(txtOtherExpenses.text)Screen.MousePointer = vbHourglassCnn.BeginTransrsSave.Open "select * from VerbalReceivedMaster", Cnn, adOpenDynamic, adLockOptimisticrsSave.AddNewrsSave("OrderNo") = Trim(CboOrder.text)rsSave("OrderDate") = OrderDate.textrsSave("ReceivedDate") = ReceivedDate.ValuersSave("ReceivedTime") = ReceivedTime.ValuersSave("PartyName") = Trim(cboPartyName.text)rsSave("Conveyance") = txttranport.textrsSave("LabourCost") = txtLabour.textrsSave("DriverName") = Trim(txtTruckDriverNam.text)rsSave("TruckNo") = txtTruckNo.textrsSave("OtherExp") = txtOtherExpenses.textrsSave("TotalAmount") = txtGtotal.textrsSave.UpdatersSave.CloseDim rsLC As New ADODB.RecordsetrsSave.Open "select * from VerbalReceivedDetails", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rsSave.AddNewrsSave("OrderNo") = Trim(hsGrid.TextMatrix(i, 1))rsSave("ProductName") = Trim(hsGrid.TextMatrix(i, 2))rsSave("ProductType") = Trim(hsGrid.TextMatrix(i, 3))rsSave("Rate") = hsGrid.TextMatrix(i, 4)rsSave("Qty") = hsGrid.TextMatrix(i, 5)

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 141: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rsSave("TotalLiterKg") = hsGrid.TextMatrix(i, 6)rsSave("DrumValue") = hsGrid.TextMatrix(i, 7)rsSave("TotalAmt") = hsGrid.TextMatrix(i, 8)rsSave("remarks") = Trim(hsGrid.TextMatrix(i, 9))rsSave.UpdatersLC.Open "select * from LcMainStock where ProductName = '" & Trim(hsGrid.TextMatrix(i, 2)) & "' and ProductType ='" & Trim(hsGrid.TextMatrix(i, 3)) & "'", Cnn, adOpenDynamic, adLockOptimisticrsLC("Qty") = Val(rsLC("Qty")) + Val(hsGrid.TextMatrix(i, 5))rsLC("LiterKg") = Val(rsLC("LiterKg")) + Val(hsGrid.TextMatrix(i, 6))rsLC.UpdatersLC.CloseNext irsSave.ClosersLC.Open "select * from RawPartyAC where PartyName='" & Trim(cboPartyName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrsLC("InvoiceAmount") = Val(rsLC("InvoiceAmount")) + Val(txtGtotal.text)rsLC("Balance") = Val(rsLC("Balance")) + Val(txtGtotal.text)rsLC.UpdatersLC.CloseCnn.CommitTransScreen.MousePointer = vbNormalCboOrder.Enabled = TrueOrderDate.Enabled = TruecboPartyName.Enabled = TrueReceivedDate.Enabled = TrueReceivedTime.Enabled = TrueDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kReceivedDate.Value = DateReceivedTime.Value = TimeCall BlankCall cboOrder_ClicktxtGtotal.text = ""txtGTotF.text = ""cmdSave.Enabled = FalseEnd SubPrivate Sub Form_Load()On Error Resume NextadLockOptimisticDim rs4 As New ADODB.Recordsetrs2.Open "select OrderNo,OrderDate from VerbalOrderMaster Order by OrderDate", Cnn, adOpenDynamic, adLockOptimisticrs2.MoveFirstDo While Not rs2.EOFCboOrder.AddItem Trim(rs2("OrderNo"))rs2.MoveNextLooprs2.CloseReceivedDate.Value = DateReceivedTime.Value = Timers3.Open "select PartyName from RawPartyInfo", Cnn, adOpenDynamic, adLockOptimisticrs3.MoveFirstDo While Not rs3.EOFcboPartyName.AddItem Trim(rs3("PartyName"))rs3.MoveNextLooprs3.ClosehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "Order No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Product Type"hsGrid.TextMatrix(0, 4) = "Rate"hsGrid.TextMatrix(0, 5) = "Quantity"hsGrid.TextMatrix(0, 6) = "Total Litre/Kg"hsGrid.TextMatrix(0, 7) = "Drum Value(TK)"hsGrid.TextMatrix(0, 8) = "Total Amount"hsGrid.TextMatrix(0, 9) = "Remarks"txtOtherExpenses.text = "0"txtDrum.text = "0"

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 142: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 cmdSave.Enabled = FalseEnd SubPrivate Sub Text1_Change()Dim X As DoubleX = Val(txtLabour.text) + Val(txtGTotF.text)Text1.text = XEnd SubPrivate Sub txtDrum_Change()On Error Resume NexttxtTotalAmount.text = Val((txtReRate.text) * Val(txtQuantity.text)) + Val(txtDrum.text)End SubPrivate Sub txtDrum_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtLabour_Change()txtGTotF.text = ""txtGTotF.text = Val(txtGtotal.text) + Val(txttranport.text) + Val(txtLabour.text)End SubPrivate Sub txtLabour_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtOtherExpenses_Change()txtGTotF.text = ""txtGTotF.text = Val(txtGtotal.text) + Val(txttranport.text) + Val(txtLabour.text) + Val(txtOtherExpenses.text)End SubPrivate Sub txtOtherExpenses_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtQuantity_Change()On Error Resume NexttxtTotalAmount.text = Val(txtReRate.text) * Val(txtQuantity.text)End SubPrivate Sub txtQuantity_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtQuantity_lostfocus()On Error Resume NextEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtReRate_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTotalLKg_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub Blank()On Error Resume NextCboOrder.text = ""OrderDate.text = ""cboPartyName.text = ""cboPName.text = ""cboPType.text = ""txtReRate.text = ""txtQuantity.text = ""txtTotalLKg.text = ""txtDrum.text = ""txtTotalAmount.text = ""txtRemarks.text = ""txtTruckDriverNam.text = ""txtTruckNo.text = ""txttranport.text = ""txtLabour.text = ""txtOtherExpenses.text = ""End SubPrivate Sub txttranport_change()txtGTotF.text = Val(txttranport.text) + Val(txtGtotal.text)End Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 143: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Private Sub txttranport_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

PAYMENT TO PARTY AGAINST RAW MATERIALS RECEIVED

Dim rs1 As New ADODB.RecordsetPrivate Sub cboPartyName_Click()On Error Resume NextDim rs1 As New ADODB.RecordsettxtPartyPaidup.text = ""txtBalance.text = ""txtPartyReceivable.text = ""rs1.Open "select distinct Balance from RawPartyAC where PartyName='" & Trim(cboPartyName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistictxtPartyReceivable.text = rs1(0)rs1.CloseEnd SubPrivate Sub cboPartyName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPayType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf cboPartyName.text = "" Then MsgBox "Please Select The Party Name .", vbCritical + vbOKOnly cboPartyName.SetFocus Exit SubElseIf txtMRNo.text = "" Then MsgBox "Please Enter The Money Receit No.", vbCritical + vbOKOnly txtMRNo.SetFocus Exit Sub ElseIf cboPayType.text = "" Then MsgBox "Please Select The Pay Type.", vbCritical + vbOKOnly cboPayType.SetFocus Exit SubElseIf txtDDTTCHENO.text = "" Then MsgBox "Please Enter The DD/TT/CHEQUE NO.", vbCritical + vbOKOnly txtDDTTCHENO.SetFocus Exit Sub ElseIf txtBankName.text = "" Then MsgBox "Please Enter Bank Name.", vbCritical + vbOKOnly txtBankName.SetFocus Exit SubElseIf txtBranchName.text = "" Then MsgBox "Please Enter Bank Branch Name.", vbCritical + vbOKOnly txtBranchName.SetFocus Exit SubElseIf txtPartyPaidup.text = "" Then MsgBox "Please Enter The Payment Amount(TK) to Party.", vbCritical + vbOKOnly txtPartyPaidup.SetFocus Exit SubEnd IfDim rsSave As New ADODB.RecordsetScreen.MousePointer = vbHourglassrsSave.Open "select * from RawPartyAC where PartyName='" & Trim(cboPartyName.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticrsSave("PaidupAmount") = Val(rsSave("PaidupAmount")) + Val(txtPartyPaidup.text)rsSave("Balance") = Val(rsSave("Balance")) - Val(txtPartyPaidup.text)rsSave.UpdatersSave.ClosersSave.Open "select * from VerbalPartyPayment", Cnn, adOpenDynamic, adLockOptimisticrsSave.AddNewrsSave("PartyName") = Trim(cboPartyName.text)

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 144: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rsSave("MRNo") = Trim(txtMRNo.text)rsSave("PayDate") = PayDate.ValuersSave("PayType") = Trim(cboPayType.text)rsSave("DDTTCheckNo") = Trim(txtDDTTCHENO.text)rsSave("BankName") = Trim(txtBankName.text)rsSave("Branch") = Trim(txtBranchName.text)rsSave("PayAmount") = txtPartyPaidup.textrsSave("LeftAmount") = txtBalance.textrsSave.UpdatersSave.ClosecboPartyName.text = ""txtMRNo.text = ""PayDate.Value = DatecboPayType.text = ""txtDDTTCHENO.text = ""txtBankName.text = ""txtBranchName.text = ""txtPartyPaidup.text = ""txtBalance.text = ""txtPartyReceivable.text = ""Screen.MousePointer = vbNormalEnd SubPrivate Sub Form_Load()On Error Resume Nextrs1.Open "select * from RawPartyAC where Balance >'" & 0 & "'", Cnn, adOpenDynamic, adLockOptimisticrs1.MoveFirstDo While Not rs1.EOFcboPartyName.AddItem Trim(rs1(0))rs1.MoveNextLooprs1.ClosecboPayType.AddItem "CHEQUE", 0cboPayType.AddItem "DD", 1cboPayType.AddItem "PAY ORDER", 2cboPayType.AddItem "TT", 3PayDate.Value = DateEnd SubPrivate Sub Label1_Click()End SubPrivate Sub txtPartyPaidup_Change()On Error Resume NextIf Val(txtPartyPaidup.text) > Val(txtPartyReceivable.text) ThenMsgBox "Paidup Amount Can Not Be Grater Than Recevable Amount.", vbInformation + vbOKOnlytxtPartyPaidup.text = 0End IftxtBalance.text = Val(txtPartyReceivable.text) - Val(txtPartyPaidup.text)End SubPrivate Sub txtPartyPaidup_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

DAMAGE RAW MATERIALS PRODUCT

Dim rs As New ADODB.RecordsetDim rs1 As New ADODB.RecordsetDim rs2 As New ADODB.RecordsetDim remove As BooleanPrivate Sub cboPartyName_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select distinct PartyName from RawPartyInfo where PartyName='" & Trim(cboPartyName.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticrs1.CloseEnd SubPrivate Sub cboPartyName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPname_Click()On Error Resume Next

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 145: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 cboPType.clearrs.Closers.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPType.AddItem rs(0)rs.MoveNextLooprs.ClosecboPType.ListIndex = 0End SubPrivate Sub cboPname_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf cboPartyName.text = "" Then MsgBox "Please Select The Party Name .", vbCritical + vbOKOnly cboPartyName.SetFocus Exit SubElseIf cboPName.text = "" Then MsgBox "Please Select The Product Name.", vbCritical + vbOKOnly cboPName.SetFocus Exit Sub ElseIf cboPType.text = "" Then MsgBox "Please Select The Product Name.", vbCritical + vbOKOnly cboPType.SetFocus Exit SubElseIf txtQty.text = "" Then MsgBox "Please Enter Loss Quantity Of The Product.", vbCritical + vbOKOnly txtQty.SetFocus Exit SubElseIf txtTltrkg.text = "" Then MsgBox "Please Enter Product Total(Loss) of Litre/Kg.", vbCritical + vbOKOnly txtTltrkg.SetFocus Exit SubElseIf txtTotal.text = "" Then MsgBox "Please Enter Total Amount.", vbCritical + vbOKOnly txtTotal.SetFocus Exit Sub End IfDim rs2 As New ADODB.Recordsetrs2.Open "select * from DamageRawProduct where ProductName ='" & Trim(cboPName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs2.EOF Then MsgBox "This Product Name Is Already Saved." & Chr(13) & "Enter Another Order No.", vbInformation + vbOKOnly Exit SubEnd Ifrs2.CloseIf ConDate.Value > LossassumeDate.Value Then MsgBox "Consignment Received Date Can Not Be Greater Than Loss Assume Date.", vbInformation + vbOKOnly ConDate.SetFocus Exit SubEnd IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboPName.text = hsGrid.TextMatrix(i, 1) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboPName.text = "" cboPType.text = "" txtQty.text = "" txtTltrkg.text = "" txtTotal.text = "" cboPName.SetFocus

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 146: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Exit SubEnd IfNext i Dim introw1 As Integerintrow1 = hsGrid.Rows - 1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboPNamehsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPTypehsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtQtyhsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtTltrkghsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtTotalhsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtTotal.text)cboPartyName.Enabled = FalseConDate.Enabled = FalseLossassumeDate.Enabled = FalsecboPName.text = ""cboPType.text = ""txtQty.text = ""txtTltrkg.text = ""txtTotal.text = ""cmdRemove.Enabled = TruecmdSave.Enabled = TrueEnd SubPrivate Sub cmdClear_Click()On Error Resume NextDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboPartyName.Enabled = TrueConDate.Enabled = TrueLossassumeDate.Enabled = TruecboPartyName.text = ""cboPType.text = ""txtGtotal.text = ""ConDate.Value = DateLossassumeDate.Value = DateEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 5)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select The Row Then Click The Remove Button", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfDim rsSave As New ADODB.RecordsetDim i As IntegerrsSave.Open "select * from VerbalRawDamage", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rsSave.AddNewrsSave("PartyName") = Trim(cboPartyName.text)rsSave("ConDate") = ConDate.Value

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 147: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rsSave("AssumDate") = LossassumeDate.ValuersSave("ProductName") = Trim(hsGrid.TextMatrix(i, 1))rsSave("ProductType") = Trim(hsGrid.TextMatrix(i, 2))rsSave("LossQty") = hsGrid.TextMatrix(i, 3)rsSave("LiterKg") = hsGrid.TextMatrix(i, 4)rsSave("Taka") = hsGrid.TextMatrix(i, 5)rsSave.UpdateNext irsSave.UpdatersSave.CloseCall cmdClear_ClickConDate.Value = DateLossassumeDate.Value = DateEnd SubPrivate Sub Form_Load()On Error Resume Nextrs1.Open "select * from RawPartyInfo", Cnn, adOpenDynamic, adLockOptimisticrs1.MoveFirstDo While Not rs1.EOFcboPartyName.AddItem Trim(rs1(0))rs1.MoveNextLooprs1.Closers.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPName.AddItem rs(0)rs.MoveNextLooprs.ClosehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "Product Name"hsGrid.TextMatrix(0, 2) = "Product Type"hsGrid.TextMatrix(0, 3) = "Loss Quantity"hsGrid.TextMatrix(0, 4) = "Litre/Kg"hsGrid.TextMatrix(0, 5) = "Total Amount"ConDate.Value = DateLossassumeDate.Value = DateEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtQty_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTltrkg_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTotal_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

RAW MATERIALS IN FACTORY

Dim rs As New ADODB.RecordsetDim rsLcStock As New ADODB.RecordsetDim remove As BooleanPrivate Sub cboPname_Click()On Error Resume NextcboPType.clearrs.Closers.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPType.AddItem rs(0)rs.MoveNextLooprs.Close

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 148: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 cboPType.ListIndex = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf txtGatePassNo.text = "" Then MsgBox "Please Select The Gate Pass Number .", vbCritical + vbOKOnly txtGatePassNo.SetFocus Exit SubElseIf txtLedgerName.text = "" Then MsgBox "Please Enter Ledger Name.", vbCritical + vbOKOnly txtLedgerName.SetFocus Exit SubElseIf txtPageNo.text = "" Then MsgBox "Please Enter The Page No.", vbCritical + vbOKOnly txtPageNo.SetFocus Exit SubElseIf txtCarryBy.text = "" Then MsgBox "Please Enter The Carryed By Name.", vbCritical + vbOKOnly txtCarryBy.SetFocus Exit SubElseIf cboPName.text = "" Then MsgBox "Please Select The Product Name.", vbCritical + vbOKOnly cboPName.SetFocus Exit Sub ElseIf cboPType.text = "" Then MsgBox "Please Select The Product Name.", vbCritical + vbOKOnly cboPType.SetFocus Exit Sub

ElseIf txtCarton.text = "" Then MsgBox "Please Enter Cartoon Quantity Of The Product.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtPiece.text = "" Then MsgBox "Please Enter Piece", vbCritical + vbOKOnly txtPiece.SetFocus Exit Sub End IfProQty = 0rsLcStock.Open "select * from LcMainStock where ProductName='" & cboPName.text & "' and ProductType='" & cboPType.text & "'", Cnn, adOpenDynamic, adLockOptimisticProQty = Val(rsLcStock(2))If ProQty < Val(txtCarton.text) ThenMsgBox "This Products (Raw Materials) Stock Quantity is '" & ProQty & "' So Enter Right Quantity"txtCarton.text = ""txtPiece.text = ""txtCarton.SetFocusrsLcStock.CloseExit SubEnd IfDim rs1 As New ADODB.Recordsetrs1.Open "select * from RawInFactoryMaster where GatePassNo ='" & Trim(txtGatePassNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "This Record Is Already Saved. Enter Another GatePass No..", vbInformation + vbOKOnly txtGatePassNo.SetFocus Exit Sub End IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboPName.text = hsGrid.TextMatrix(i, 1) And Me.cboPType.text = hsGrid.TextMatrix(i, 2) Then MsgBox "These Records Are Already Existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboPName.text = "" cboPType.text = "" txtCarton.text = "" txtPiece.text = "" txtRemarks.text = "" txtCarryBy.text = ""

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 149: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 cboPName.SetFocus Exit SubEnd IfNext i Dim introw1 As Integerintrow1 = hsGrid.Rows - 1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboPNamehsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPTypehsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = Trim(txtRemarks.text)hsGrid.Rows = hsGrid.Rows + 1txtCarryBy.Enabled = FalsetxtLedgerName.Enabled = FalsetxtPageNo.Enabled = FalsetxtGatePassNo.Enabled = FalseInDate.Enabled = FalseInTime.Enabled = FalsecboPName.text = ""cboPType.text = ""txtCarton.text = ""txtPiece.text = ""txtRemarks.text = ""cmdRemove.Enabled = TrueEnd SubPrivate Sub cmdClear_Click()On Error Resume Next Dim k As Integer txtCarryBy.Enabled = TruetxtLedgerName.Enabled = TruetxtLedgerName.text = ""txtPageNo.Enabled = TruetxtPageNo.text = ""txtGatePassNo.Enabled = TruetxtGatePassNo.text = ""InDate.Enabled = TrueInTime.Enabled = TruecboPName.text = ""cboPType.text = ""txtCarton.text = ""txtPiece.text = ""txtRemarks.text = ""txtCarryBy.text = "" For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kInDate.Value = DateInTime.Value = TimeEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next Else MsgBox "Select The Row Then Click The Remove Button.", vbInformation, "Information"End IfROW = hsGrid.RowsEnd SubPrivate Sub cmdSave_Click()On Error Resume Next

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 150: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Dim rsSave As New ADODB.RecordsetScreen.MousePointer = vbHourglassrsSave.Open "select * from RawInFactoryMaster", Cnn, adOpenDynamic, adLockOptimisticrsSave.AddNewrsSave("GatePassNo") = Trim(txtGatePassNo.text)rsSave("LegerNo") = Trim(txtLedgerName.text)rsSave("PageNO") = txtPageNo.textrsSave("InDate") = InDate.ValuersSave("InTime") = InTime.ValuersSave("CarriedBy") = Trim(txtCarryBy.text)rsSave.UpdatersSave.CloseDim i As IntegerDim rsUpdate As New ADODB.RecordsetFor i = 1 To hsGrid.Rows - 2rsUpdate.Open "select * from LcMainStock where ProductName ='" & Trim(hsGrid.TextMatrix(i, 1)) & "' and ProductType='" & Trim(hsGrid.TextMatrix(i, 2)) & "'", Cnn, adOpenDynamic, adLockOptimisticrsUpdate("Qty") = Val(rsUpdate("Qty")) - Val(hsGrid.TextMatrix(i, 3))rsUpdate("LiterKg") = Val(rsUpdate("LiterKg")) - Val(hsGrid.TextMatrix(i, 4))rsUpdate.UpdatersUpdate.ClosersSave.Open "select * from RawInFactoryDetails", Cnn, adOpenDynamic, adLockOptimisticrsSave.AddNewrsSave("GatePassNo") = Trim(txtGatePassNo.text)rsSave("ProductName") = Trim(hsGrid.TextMatrix(i, 1))rsSave("ProductType") = Trim(hsGrid.TextMatrix(i, 2))rsSave("Carton") = hsGrid.TextMatrix(i, 3)rsSave("Piece") = hsGrid.TextMatrix(i, 4)rsSave("Remarks") = Trim(hsGrid.TextMatrix(i, 5))rsSave.UpdateNext iScreen.MousePointer = vbNormalCall cmdClear_ClickInDate.Value = DateInTime.Value = TimeEnd SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboPName.AddItem rs(0)rs.MoveNextLooprs.ClosehsGrid.TextMatrix(0, 0) = "NO"hsGrid.TextMatrix(0, 1) = "Product Name"hsGrid.TextMatrix(0, 2) = "Product Type"hsGrid.TextMatrix(0, 3) = "Carton"hsGrid.TextMatrix(0, 4) = "Piece"hsGrid.TextMatrix(0, 5) = "Remarks"remove = FalseInDate.Value = DateInTime.Value = TimeEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtPiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

PRODUCT INFORMATION

Dim rs As New ADODB.RecordsetPrivate Sub Form_Load()

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 151: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 On Error Resume NextCall GrEnd SubPrivate Sub Gr()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "Select * from ProductInfo", Cnn, adOpenDynamic, adLockOptimisticSet DG.DataSource = rs1End SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume Nextrs.CloseSet rs = NothingEnd SubPrivate Sub txtExit_Click()Unload MeEnd SubPrivate Sub txtPiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtSave_Click()On Error Resume NextIf txtProName.text = "" Then MsgBox "Product Name Can Not Be Blank.", vbCritical, "Shah Soap" txtProName.SetFocus Call Gr Exit SubElseIf txtPiece.text = "" Or txtPiece.text = 0 Then MsgBox "Please Enter The piece per Carton.", vbCritical, "Shah Soap" txtPiece.SetFocus Call Gr Exit SubEnd IfDim rs1 As New ADODB.RecordsetIf Not rs1.EOF ThenMsgBox "This Product Is Already Existed.", vbCritical + vbOKOnlyrs1.CloseExit SubEnd If

rs.Open "select * from ProductInfo", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("ProductName") = Trim(txtProName.text)rs("CartonPiece") = txtPiece.textrs("Price") = 0rs.Updaters.Closers.Open "select * from MainStock", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("ProductName") = Trim(txtProName.text)rs("Carton") = 0rs("Piece") = 0rs("BadCarton") = 0rs("BadPiece") = 0rs.Updaters.CloseCall GrtxtProName.text = ""txtPiece.text = ""End Sub

PRODUCT PRICE

Dim rs As New ADODB.RecordsetPrivate Sub cboProductName_Click()On Error Resume NexttxtPresentPrice.text = ""txtUpdatePrice.text = ""

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 152: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs.Open "select * from Productinfo Where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistictxtPresentPrice.text = rs("Price")rs.CloseEnd SubPrivate Sub cboProductName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from Productinfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOFcboProductName.AddItem Trim(rs("ProductName"))rs.MoveNextLooprs.ClosePDate.Value = DateCall GridetxtPresentPrice.Enabled = FalseEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume NextSet rs = NothingEnd SubPrivate Sub txtExit_Click()Unload MeEnd SubPrivate Sub Gride()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "select ProductName,Price from Productinfo", Cnn, adOpenDynamic, adLockOptimisticSet DG.DataSource = rs1End SubPrivate Sub txtSave_Click()On Error Resume NextIf cboProductName.text = "" Then MsgBox "Please Select The Product Name.", vbInformation + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtUpdatePrice.text = "" Then MsgBox "Please Insert The New Price.", vbInformation + vbOKOnly txtUpdatePrice.SetFocus Exit SubElseIf txtUpdatePrice.text = 0 Then MsgBox "Please Insert The New Price.", vbInformation + vbOKOnly txtUpdatePrice.SetFocus Exit SubEnd IfScreen.MousePointer = vbHourglassrs.Open "select * from Productinfo Where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("Price") = txtUpdatePrice.textrs.Updaters.Closers.Open "select * from ProductPriceinfo ", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("PDate") = PDate.Valuers("ProductName") = Trim(cboProductName.text)rs("NewPrice") = txtUpdatePrice.textrs("OldPrice") = txtPresentPrice.textrs.Updaters.Close

Screen.MousePointer = vbNormalCall GridecboProductName.text = ""txtPresentPrice.text = ""txtUpdatePrice.text = ""

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 153: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 cboProductName.SetFocusEnd SubPrivate Sub txtUpdatePrice_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

FINISHED GOODS STOCK IN

Dim rs As New ADODB.RecordsetDim remove As BooleanDim piece As DoubleDim ROW As IntegerPrivate Sub cboProductName_Click()On Error Resume Nextpiece = 0txtCarton.text = ""txtPiece.text = ""txtRemarks.text = ""rs.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "' And ProductName='" & Trim(cboProductName.text) & piece = rs("CartonPiece")rs.CloseEnd SubPrivate Sub cboProductName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf txtGatePassNo.text = "" Then MsgBox "Please Enter The Gate Pass Number.", vbCritical + vbOKOnly txtGatePassNo.SetFocus Exit SubElseIf txtLedgerName.text = "" Then MsgBox "Please Enter the Ledger Name.", vbCritical + vbOKOnly txtLedgerName.SetFocus Exit SubElseIf txtPageNo.text = "" Then MsgBox "Please Enter the Page Number.", vbCritical + vbOKOnly txtPageNo.SetFocus Exit SubElseIf txtCarryBy.text = "" Then MsgBox "Please Enter Carried Person Name.", vbCritical + vbOKOnly txtCarryBy.SetFocus Exit SubElseIf cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtCarton.text = "" Or txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtPiece.text = "" Or txtPiece.text = 0 Then MsgBox "Please Enter the Piece Number.", vbCritical + vbOKOnly txtPiece.SetFocus Exit SubEnd IfDim rs1 As New ADODB.Recordsetrs1.Open "select * from ProductionInMaster where GetPassNo='" & Trim(txtGatePassNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "This Gate Pass No is Already Exists. Please Insert Another Gate Pass No.", vbCritical + vbOKOnly txtGatePassNo.SetFocus rs1.Close Exit SubEnd Ifrs1.CloseDim i As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 154: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 If Me.cboProductName.text = hsGrid.TextMatrix(i, 1) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record at a time.", vbInformation, "Information" cboProductName.text = "" cmdProductName.text = "" txtCarton = "" txtPiece = "" txtRemarks.text = "" cboProductName.SetFocus Exit SubEnd IfNext i txtGatePassNo.Enabled = False txtCarryBy.Enabled = False txtLedgerName.Enabled = False txtPageNo.Enabled = False DDate.Enabled = False DTime.Enabled = False Dim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboProductName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtPiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1ROW = hsGrid.RowscboProductName.text = ""cmdProductName.text = ""txtCarton = ""txtPiece = ""txtRemarks.text = ""End SubPrivate Sub cmdClear_Click()On Error Resume Next Dim k As Integer txtGatePassNo.Enabled = True txtCarryBy.Enabled = True txtLedgerName.Enabled = True txtPageNo.Enabled = True DDate.Enabled = True DTime.Enabled = True txtGatePassNo.text = ""txtLedgerName.text = ""txtPageNo.text = ""txtCarryBy.text = ""DDate.Value = DateDTime.Value = Time For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then txtGrandTotal.text = Val(txtGrandTotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfROW = hsGrid.RowsEnd SubPrivate Sub cmdSave_Click()On Error Resume Next

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 155: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Dim i, j As IntegerIf ROW = 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from ProductionInMaster", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("GetPassNo") = Trim(txtGatePassNo.text)rs("InDate") = DDate.Valuers("LegerName") = Trim(txtLedgerName.text)rs("PageNumber") = txtPageNo.textrs("CarriedBy") = Trim(txtCarryBy.text)rs("InTime") = DTime.Valuers.Updaters.Closers.Open "select * from ProductionInDetails", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rs.AddNewrs("GetPassNo") = Trim(txtGatePassNo.text)rs("ProductName") = Trim(hsGrid.TextMatrix(i, 1))rs("Carton") = hsGrid.TextMatrix(i, 2)rs("Piece") = hsGrid.TextMatrix(i, 3)rs("Remarks") = hsGrid.TextMatrix(i, 4)rs.UpdateNext irs.CloseFor j = 1 To hsGrid.Rows - 2rs.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("Carton") = Val(rs("Carton")) + Val(hsGrid.TextMatrix(j, 2))rs("Piece") = Val(rs("Piece")) + Val(hsGrid.TextMatrix(j, 3))rs.Updaters.CloseNext jCnn.CommitTransScreen.MousePointer = vbNormal Dim k As Integer txtGatePassNo.Enabled = True txtCarryBy.Enabled = True txtLedgerName.Enabled = True txtPageNo.Enabled = True DDate.Enabled = True DTime.Enabled = TruetxtGatePassNo.text = ""txtLedgerName.text = ""txtPageNo.text = ""txtCarryBy.text = ""DDate.Value = DateDTime.Value = TimeFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kEnd SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from Productinfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOFcboProductName.AddItem Trim(rs("ProductName"))rs.MoveNextLooprs.ClosehsGrid.TextMatrix(0, 0) = "NO"hsGrid.TextMatrix(0, 1) = "Product Name"hsGrid.TextMatrix(0, 2) = "Carton"hsGrid.TextMatrix(0, 3) = "Piece"hsGrid.TextMatrix(0, 4) = "Remarks"remove = False

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 156: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 ROW = 2DDate.Value = DateDTime.Value = TimeEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume NextSet rs = NothingEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_Change()On Error Resume NexttxtPiece.text = Val(txtCarton.text) * Val(piece)End SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtPiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

EMPLOYEE INFORMATION

Dim rs As New ADODB.RecordsetPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRefresh_Click()On Error Resume NexttxtMarExID.text = ""txtEmployeeName.text = ""txtEmployeeId.text = ""txtAddress.text = ""txtDesignation.text = ""txtphone.text = ""cmdRefresh.Enabled = FalsecmdSave.Enabled = TruecmdSearch.Enabled = TruecmdUpdate.Enabled = FalsetxtEmployeeId.Locked = FalseEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf txtEmployeeId.text = "" Then MsgBox "Please Input An Employee ID.", vbCritical + vbOKOnly txtEmployeeId.SetFocus Call PG Exit SubElseIf txtEmployeeName.text = "" Then MsgBox "Please Input An Employee Name.", vbCritical + vbOKOnly txtEmployeeName.SetFocus Call PG Exit SubElseIf txtDesignation.text = "" Then MsgBox "Please Input The Employee Designation.", vbCritical + vbOKOnly txtDesignation.SetFocus Call PG Exit SubElseIf txtAddress.text = "" Then MsgBox "Please Input The Employee Address.", vbCritical + vbOKOnly txtAddress.SetFocus Call PG Exit SubEnd IfDim rs1 As New ADODB.Recordsetrs1.Open "select * from EmployeeInfo where EmpId='" & Trim(txtEmployeeId.text) & If Not rs1.EOF Then MsgBox "This Employee ID is Already Existed,Please Insert Another ID.", vbInformation + vbOKOnly txtEmployeeId.text = ""

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 157: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 txtEmployeeName.text = "" txtDesignation.text = "" txtAddress.text = "" txtphone.text = "" txtEmployeeName.SetFocus rs1.Close Call PG Exit SubEnd IfCnn.BeginTransScreen.MousePointer = vbHourglassrs.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("EmpId") = Trim(txtEmployeeId.text)rs("EmpName") = Trim(txtEmployeeName.text)rs("Designation") = Trim(txtDesignation.text)rs("Address") = Trim(txtAddress.text)rs("Phone") = txtphone.textrs.Updaters.Closers.Open "select * from PersonalACstatus", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("EmpID") = Trim(txtEmployeeId.text)rs("InvoiceAmount") = 0rs("PaidUpAmount") = 0rs("Balance") = 0rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormalCall PGtxtEmployeeId.text = ""txtEmployeeName.text = ""txtDesignation.text = ""txtAddress.text = ""txtphone.text = ""cmdUpdate.Enabled = FalsecmdSave.Enabled = TruecmdSearch.Enabled = TruecmdRefresh.Enabled = FalseEnd SubPrivate Sub PG()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimisticSet palash.DataSource = rs1End SubPrivate Sub cmdSearch_Click()On Error Resume Nextrs.Open "Select * from EmployeeInfo where EmpId='" & Trim(txtMarExID.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF ThentxtEmployeeId.text = Trim(rs("EmpId"))txtEmployeeName.text = Trim(rs("EmpName"))txtDesignation.text = Trim(rs("Designation"))txtAddress.text = Trim(rs("Address"))txtphone.text = Trim(rs("Phone"))txtEmployeeId.Locked = TruecmdSave.Enabled = FalsecmdRefresh.Enabled = TruecmdUpdate.Enabled = TrueEnd Ifrs.CloseCall PGcmdSearch.Enabled = FalseEnd SubPrivate Sub cmdUpdate_Click()On Error Resume NextDim rspa As New ADODB.Recordset

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 158: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rspa.Open "select * from EmployeeInfo where EmpId='" & Trim(txtEmployeeId.text) & rspa("EmpName") = Trim(txtEmployeeName.text)rspa("Designation") = Trim(txtDesignation.text)rspa("Address") = Trim(txtAddress.text)rspa("Phone") = txtphone.textrspa.Updaterspa.ClosetxtEmployeeName.text = ""txtDesignation.text = ""txtAddress.text = ""txtphone.text = ""cmdUpdate.Enabled = FalsecmdSave.Enabled = TruecmdSearch.Enabled = TruecmdRefresh.Enabled = FalseCall PGEnd SubPrivate Sub Form_Load()cmdUpdate.Enabled = FalseCall PGEnd SubPrivate Sub ID()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimistictxtEmployeeId.text = "SSE" & 1000 + rs1.RecordCount + 1rs1.CloseEnd SubPrivate Sub txtMarExID_Click()End Sub

PERSONAL SALES

Dim rs As New ADODB.RecordsetDim rs1 As New ADODB.RecordsetDim piece As DoubleDim remove As BooleanDim ROW As IntegerPrivate Sub cboProductName_Click()On Error Resume Nextpiece = 0txtCarton.text = ""txtPiece.text = ""txtRatePiece.text = ""txtTotalAmount.text = ""rs.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticpiece = rs("CartonPiece")rs.CloseEnd SubPrivate Sub cboProductName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmbEmployeeName_Click()On Error Resume Nexttxtid.text = ""rs.Open "select * from EmployeeInfo where EmpName= '" & Trim(cmbEmployeeName.text) & "'", Cnn, adOpenDynamic, adLockOptimistictxtid.text = rs("EmpId")rs.CloseEnd SubPrivate Sub cmbEmployeeName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf txtPInvoiceNo.text = "" Then MsgBox "Please Enter the Invoice Number.", vbCritical + vbOKOnly txtPInvoiceNo.SetFocus

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 159: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Exit SubElseIf cmbEmployeeName.text = "" Then MsgBox "Please Select the Employee Name.", vbCritical + vbOKOnly cmbEmployeeName.SetFocus Exit SubElseIf cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtPiece.text = "" Then MsgBox "Please Enter the Piece.", vbCritical + vbOKOnly txtPiece.SetFocus Exit SubElseIf txtRatePiece.text = "" Then MsgBox "Please Enter the Rate per Piece.", vbCritical + vbOKOnly txtRatePiece.SetFocus Exit SubElseIf txtTotalAmount.text = "" Then MsgBox "Please Enter the Invoice Number.", vbCritical + vbOKOnly txtTotalAmount.SetFocus Exit Sub End IfDim rs1 As New ADODB.Recordsetrs1.Open "select * from PersonalSalesMaster where PInvoiceNo='" & Trim(txtPInvoiceNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "This Invoice Number is Already Existed. Insert Another Invoice Number. ", vbInformation + vbOKOnly txtPInvoiceNo.SetFocus rs1.Close Exit SubEnd If Dim i As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboProductName.text = hsGrid.TextMatrix(i, 2) Then MsgBox "These Records already exists." & Chr(13) & "You can't add same Record at a time.", vbInformation, "Information" cboProductName.text = "" txtCarton.text = "" txtPiece.text = "" txtRatePiece.text = "" txtTotalAmount.text = "" cboProductName.SetFocus Exit SubEnd IfNext i cmbEmployeeName.Enabled = False PDate.Enabled = False txtPInvoiceNo.Enabled = False Dim introw1 As Integerintrow1 = hsGrid.Rows - 1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtPInvoiceNohsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCartonhsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiecehsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiecehsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmounthsGrid.Rows = hsGrid.Rows + 1txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtTotalAmount.text)cboProductName.text = ""txtCarton = ""txtPiece = ""txtRatePiece = ""txtTotalAmount = ""ROW = hsGrid.RowsEnd SubPrivate Sub cmdRefresh_Click() On Error Resume Next cmbEmployeeName.Enabled = True

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 160: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 PDate.Enabled = True txtPInvoiceNo.Enabled = True txtGrandTotal.text = "" txtPInvoiceNo.text = "" cmbEmployeeName.text = "" cboProductName.text = "" txtCarton.text = "" txtPiece.text = "" txtRatePiece.text = "" txtTotalAmount.text = "" PDate.Value = Date txtid.text = ""ROW = 2 Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGrandTotal.text = Val(txtGrandTotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfROW = hsGrid.RowsEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf ROW = 2 Then MsgBox "Sorry!First Add The Data To The Grid", vbInformation + vbOKOnly Exit SubEnd IfDim i As IntegerCnn.BeginTransrs.Open "select * from PersonalSalesMaster", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("PInvoiceNo") = Trim(txtPInvoiceNo.text)rs("EmpID") = Trim(txtid.text)rs("SalesDate") = PDate.Valuers("InvoiceAmount") = txtGrandTotal.textrs("PaidupAmount") = 0rs("Balance") = txtGrandTotal.textrs.Updaters.Closers.Open "select * from PersonalACstatus where EmpID='" & Trim(txtid.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticrs("InvoiceAmount") = Val(rs("InvoiceAmount")) + Val(txtGrandTotal.text)rs("Balance") = Val(rs("Balance")) + Val(txtGrandTotal.text)rs.Updaters.Closers.Open "select * from PersonalSales", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rs.AddNewrs("EmpID") = Trim(txtid.text)rs("pInvoiceNo") = hsGrid.TextMatrix(i, 1)rs("ProductName") = hsGrid.TextMatrix(i, 2)rs("Carton") = hsGrid.TextMatrix(i, 3)rs("Piece") = hsGrid.TextMatrix(i, 4)rs("RatePerPiece") = hsGrid.TextMatrix(i, 5)rs("TotalAmount") = hsGrid.TextMatrix(i, 6)rs.UpdateNext irs.Close

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 161: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 i = 1For i = 1 To hsGrid.Rows - 2rs.Open "select * from MainStock where productname='" & Trim(hsGrid.TextMatrix(i, 2)) & "' ", Cnn, adOpenDynamic, adLockOptimisticrs("Carton") = Val(rs("Carton")) - Val(hsGrid.TextMatrix(i, 3))rs("piece") = Val(rs("piece")) - Val(hsGrid.TextMatrix(i, 4))rs.Updaters.CloseNext iCnn.CommitTranstxtGrandTotal.text = "" txtPInvoiceNo.text = "" cmbEmployeeName.text = "" cboProductName.text = "" txtCarton.text = "" txtPiece.text = "" txtRatePiece.text = "" txtTotalAmount.text = "" PDate.Value = Date txtid.text = "" Dim k As Integer cmbEmployeeName.Enabled = True PDate.Enabled = True txtPInvoiceNo.Enabled = True For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kROW = 2End SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF cmbEmployeeName.AddItem Trim(rs("EmpName")) rs.MoveNextLooprs.Closers1.Open "select * from Productinfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs1.EOFcboProductName.AddItem Trim(rs1("ProductName"))rs1.MoveNextLooprs1.ClosePDate.Value = DateROW = 2hsGrid.TextMatrix(0, 0) = "NO"hsGrid.TextMatrix(0, 1) = "Invoice No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Carton"hsGrid.TextMatrix(0, 4) = "Pieces"hsGrid.TextMatrix(0, 5) = "Rate"hsGrid.TextMatrix(0, 6) = "Amount(TK)"txtCarton.Enabled = Falseremove = FalseEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_Change()On Error Resume NextEnd SubPrivate Sub txtExit_Click()Unload MeEnd SubPrivate Sub txtPiece_Change()On Error Resume NexttxtCarton.text = Val(txtPiece.text) / Val(piece)txtTotalAmount.text = Val(txtPiece.text) * (txtRatePiece.text)End Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 162: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Private Sub txtPiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtRatePiece_Change()txtTotalAmount.text = Val(txtPiece.text) * Val(txtRatePiece.text)End SubPrivate Sub txtRatePiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

PERSONAL MONEY RECEIPT

Dim rs As New ADODB.RecordsetPrivate Sub cboEmpName_Click()On Error Resume NextDim rs1 As New ADODB.RecordsetDim ID As StringtxtAmount.text = ""txtBalance.text = ""txtInvoiceAmount.text = ""lblID.Caption = ""ID = ""cboInvoice.clearrs.Open "select * from EmployeeInfo where EmpName= '" & Trim(cboEmpName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblID.Caption = Trim(rs("EmpID"))ID = rs("EmpID")rs.Closers1.Open "select pInvoiceNo from PersonalSalesMaster where EmpID= '" & Trim(ID) & If rs1.EOF ThenExit SubElseDo While Not rs1.EOF cboInvoice.AddItem Trim(rs1("pInvoiceNo")) rs1.MoveNextLooprs1.ClosecboInvoice.ListIndex = 0End IfEnd SubPrivate Sub cboEmpName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboInvoice_Click()On Error Resume NexttxtAmount.text = ""txtBalance.text = ""txtInvoiceAmount.text = ""

rs.Open "select * from PersonalSalesMaster where PInvoiceNo= '" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistictxtInvoiceAmount.text = rs("Balance")rs.CloseEnd SubPrivate Sub cboInvoice_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPayType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()On Error Resume NextDim rs1 As New ADODB.RecordsetDim Amount As DoubleAmount = 0If cboEmpName.text = "" Then MsgBox "Please Select An Employee Name.", vbCritical + vbOKOnly cboEmpName.SetFocus

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 163: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Exit SubElseIf cboInvoice.text = "" Then MsgBox "Please Select An Invoice No.", vbCritical + vbOKOnly cboInvoice.SetFocus Exit SubElseIf txtMRNo.text = "" Then MsgBox "Please Enter The Money Receipt No.", vbCritical + vbOKOnly txtMRNo.SetFocus Exit SubElseIf cboPayType.text = "" Then MsgBox "Please Select The Pay Type.", vbCritical + vbOKOnly cboPayType.SetFocus Exit SubElseIf txtAmount.text = "" Or txtAmount.text = 0 Then MsgBox "Please Enter The Paidup Amount.", vbCritical + vbOKOnly txtAmount.SetFocus Exit SubEnd Ifrs1.Open "select * from PersonalMR where MRNo='" & Trim(txtMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF ThenMsgBox "This Money Receipt Is Already Existed.", vbCritical + vbOKOnlyExit SubEnd Ifrs1.CloseScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from PersonalMR", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("EmpID") = Trim(lblID.Caption)rs("PInvoiceNo") = Trim(cboInvoice.text)rs("MRNo") = Trim(txtMRNo.text)rs("PayType") = Trim(cboPayType.text)rs("PayDate") = PayDate.Valuers("Amount") = txtAmount.textrs("Remarks") = Trim(txtRemarks.text)rs.Updaters.Closers.Open "select * from PersonalSalesMaster where PInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticAmount = Val(rs("PaidupAmount")) + Val(txtAmount.text)rs("PaidupAmount") = Amountrs("Balance") = Val(rs("InvoiceAmount")) - Val(Amount)rs.Updaters.Closers.Open "select * from PersonalACstatus where EmpID='" & Trim(lblID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimisticAmount = 0Amount = Val(rs("PaidupAmount")) + Val(txtAmount.text)rs("PaidupAmount") = Amountrs("Balance") = Val(rs("InvoiceAmount")) - Val(Amount)rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormalUnload MeLoad MeEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume Nextrs.CloseSet rs = NothingSet rs1 = NothingEnd SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF cboEmpName.AddItem Trim(rs("EmpName")) rs.MoveNext

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 164: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Looprs.ClosecboPayType.AddItem "CASH", 0cboPayType.AddItem "CHEQUE", 1cboPayType.AddItem "DD", 2cboPayType.AddItem "PAY ORDER", 3cboPayType.AddItem "TT", 4PayDate.Value = DatetxtInvoiceAmount.Enabled = FalsetxtBalance.Enabled = FalseEnd SubPrivate Sub txtAmount_Change()On Error Resume NextIf Val(txtAmount.text) > Val(txtInvoiceAmount.text) Then MsgBox "Paidup Amount Can Not Greater Than Invoice Amount.", vbCritical + vbOKOnly txtAmount.text = "" txtAmount.SetFocus Exit SubEnd IftxtBalance.text = Val(txtInvoiceAmount.text) - Val(txtAmount.text)End SubPrivate Sub txtAmount_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtBalance_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtInvoiceAmount_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubFREE OR GIFT PRODUCTDim rs As New ADODB.RecordsetDim piece As DoublePrivate Sub cboEmpName_Click()On Error Resume NextlblID.Caption = ""rs.Open "select * from EmployeeInfo where EmpName= '" & Trim(cboEmpName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblID.Caption = rs("EmpID")rs.Closers.Open "select * from ProductInfo ", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF CboProName.AddItem Trim(rs("ProductName")) rs.MoveNextLooprs.CloseEnd SubPrivate Sub cboEmpName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboProName_Click()On Error Resume Nextpiece = 0rs.Open "select * from Productinfo where ProductName='" & Trim(CboProName.text) & piece = rs("CartonPiece")rs.ClosetxtCarton.text = ""txtPiece.text = ""End SubPrivate Sub CboProName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf cboEmpName.text = "" Then MsgBox "Please Select An Employee Name.", vbCritical + vbOKOnly cboEmpName.SetFocus Exit Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 165: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 ElseIf CboProName.text = "" Then MsgBox "Please Select The Product Name.", vbCritical + vbOKOnly CboProName.SetFocus Exit SubElseIf txtCarton.text = "" Then MsgBox "Please Enter The Carton Quantity.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtCarton.text = 0 Then MsgBox "Please Enter The Carton of Quantity.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtPiece.text = "" Then MsgBox "Please Enter The Piece of Quantity.", vbCritical + vbOKOnly txtPiece.SetFocus Exit SubElseIf txtPiece.text = 0 Then MsgBox "Please Enter The Piece of Quantity.", vbCritical + vbOKOnly txtPiece.SetFocus Exit SubEnd IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from FreeProduct", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("EmpID") = Trim(lblID.Caption)rs("GiftDate") = PDate.Valuers("ProductName") = Trim(CboProName.text)rs("Carton") = txtCarton.textrs("Piece") = txtPiece.textrs("Remark") = txtRemarks.textrs.Updaters.Closers.Open "select * from MainStock where ProductName='" & Trim(CboProName.text) & rs("Carton") = Val(rs("carton")) - Val(txtCarton.text)rs("Piece") = Val(rs("Piece")) - Val(txtPiece.text)rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormalUnload MeLoad MeEnd SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF cboEmpName.AddItem Trim(rs("EmpName")) rs.MoveNext Looprs.ClosetxtCarton.Enabled = FalsePDate.Value = DateEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume Nextrs.CloseSet rs = nothimgEnd SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtPiece_Change()On Error Resume NexttxtCarton.text = Val(txtPiece.text) / Val(piece)End SubPrivate Sub txtPiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 166: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

SALES EXECUTIVE INFORMATION DETAILS

Dim rs As New ADODB.RecordsetPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRefresh_Click()On Error Resume NexttxtMarExID.text = ""txtMID.text = ""txtMname.text = ""txtDesignation.text = ""txtAddress.text = ""txtphone.text = ""txtMobile.text = ""txtArea.text = ""rs.ClosecmdRefresh.Enabled = FalsecmdSave.Enabled = TruecmdSearch.Enabled = TruecmdUpdate.Enabled = FalsetxtEmployeeId.Locked = FalseEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf Trim(txtMID.text) = "" Then MsgBox "Please Enter The Sales Executive ID.", vbCritical + vbOKOnly txtMID.SetFocus Call GR1 Exit SubElseIf txtMname.text = "" Then MsgBox "Please Enter The Sales Executive Name.", vbCritical + vbOKOnly txtMname.SetFocus Call GR1 Exit SubElseIf txtDesignation.text = "" Then MsgBox "Please Enter The Designation.", vbCritical + vbOKOnly txtDesignation.SetFocus Call GR1 Exit SubElseIf txtAddress.text = "" Then MsgBox "Please Enter The Address.", vbCritical + vbOKOnly txtAddress.SetFocus Call GR1 Exit SubElseIf txtArea.text = "" Then MsgBox "Please Enter The Marketing Executive Area Name.", vbCritical + vbOKOnly txtArea.SetFocus Call GR1 Exit SubEnd IfDim rsIDSearch As New ADODB.RecordsetrsIDSearch.Open "select * from MarketingInfo where MID='" & Trim(txtMID.text) & If Not rsIDSearch.EOF Then MsgBox "This Sales Executive ID is Already Existed,Please Insert Another ID.", vbInformation + vbOKOnly txtMID.text = "" txtMname.text = "" txtDesignation.text = "" txtAddress.text = "" txtphone.text = "" txtMobile.text = "" txtArea.text = "" txtMID.SetFocus rsIDSearch.Close Call GR1 Exit Sub End IfScreen.MousePointer = vbHourglassCnn.BeginTrans

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 167: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("MID") = txtMID.textrs("MName") = Trim(txtMname.text)rs("Designation") = txtDesignation.textrs("Address") = Trim(txtAddress.text)rs("Phone") = txtphone.textrs("Mobile") = txtMobile.textrs("Area") = Trim(txtArea.text)rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormaltxtMID.text = ""txtMname.text = ""txtDesignation.text = ""txtAddress.text = ""txtphone.text = ""txtMobile.text = ""txtArea.text = ""Call GR1cmdSave.Enabled = FalseEnd SubPrivate Sub cmdSearch_Click()On Error Resume Nextrs.Closers.Open "Select * from MarketingInfo where MID='" & Trim(txtMarExID.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf rs.EOF Thenrs.CloseExit SubElsetxtMID.text = Trim(rs("MID"))txtMname.text = Trim(rs("MName"))txtDesignation.text = Trim(rs("Designation"))txtAddress.text = Trim(rs("Address"))txtphone.text = Trim(rs("Phone"))txtMobile.text = Trim(rs("Mobile"))txtArea.text = Trim(rs("Area"))cmdSave.Enabled = FalsecmdSearch.Enabled = FalsetxtEmployeeId.Locked = TruecmdRefresh.Enabled = TruecmdUpdate.Enabled = TrueEnd IfEnd SubPrivate Sub cmdUpdate_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select * from MarketingInfo where MID='" & Trim(txtMarExID.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs1("MID") = txtMID.textrs1("MName") = Trim(txtMname.text)rs1("Designation") = txtDesignation.textrs1("Address") = Trim(txtAddress.text)rs1("Phone") = txtphone.textrs1("Mobile") = txtMobile.textrs1("Area") = Trim(txtArea.text)rs1.Updaters1.ClosetxtMID.text = ""txtMname.text = ""txtDesignation.text = ""txtAddress.text = ""txtphone.text = ""txtMobile.text = ""txtArea.text = ""Call GR1cmdUpdate.Enabled = FalsecmdSave.Enabled = TruecmdSearch.Enabled = True

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 168: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 cmdRefresh.Enabled = FalseEnd SubPrivate Sub Form_Load()On Error Resume NextCall GR1cmdSearch.Enabled = FalsecmdRefresh.Enabled = FalseEnd SubPrivate Sub GR1()On Error Resume Nextrs.Closers.CursorLocation = adUseClientrs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimisticSet ShowAll.DataSource = rsEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume Nextrs.CloseSet rs = NothingEnd SubPrivate Sub txtArea_GotFocus()cmdSave.Enabled = TrueEnd SubPrivate Sub ID()On Error Resume NextDim NewId As DoubleNewId = 1rs.Open "Select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF NewId = Val(NewId) + Val(1) rs.MoveNextLooprs.ClosetxtMID.text = "SSM" & NewIdEnd SubPrivate Sub txtMarExID_GotFocus()cmdSearch.Enabled = TruecmdRefresh.Enabled = TrueEnd Sub

SALES EXECUTIVE ORDER DETAILS

Dim rs As New ADODB.RecordsetDim rs1 As New ADODB.RecordsetDim blnClickStander2 As BooleanDim piece As DoublePrivate Sub cboMarkName_Click()On Error Resume NextLabel1.Caption = ""rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarkName.text) & Label1.Caption = rs("MID")rs.CloseEnd SubPrivate Sub cboMarkName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboProductName_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetpiece = 0rs1.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "' And ProductName='" & Trim(cboProductName.text) & piece = rs1("CartonPiece")txtRatePiece.text = rs1("Price")rs1.ClosetxtCarton.text = ""txtPiece.text = ""End SubPrivate Sub cboProductName_KeyPress(KeyAscii As Integer)KeyAscii = 0End Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 169: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Private Sub cmdAdd_Click()On Error Resume NextIf txtMOrderNo.text = "" Then MsgBox "Please Enter An Order Number.", vbCritical + vbOKOnly txtMOrderNo.SetFocus Exit SubElseIf cboMarkName.text = "" Then MsgBox "Please Select the Marketing Executive Name.", vbCritical + vbOKOnly cboMarkName.SetFocus Exit SubElseIf cboProductName.text = "" Then MsgBox "Please Select the Product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtCarton.text = 0 Or txtCarton = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtPiece.text = 0 Or txtPiece.text = "" Then MsgBox "Please Enter the Piece of a Carton.", vbCritical + vbOKOnly txtPiece.SetFocus Exit SubElseIf txtRatePiece.text = 0 Or txtRatePiece.text = "" Then MsgBox "Please Enter the Rate per Piece.", vbCritical + vbOKOnly txtRatePiece.SetFocus Exit Sub End IfDim rs1 As New ADODB.Recordsetrs1.Open "select * from MarketingOrderMaster where MOrderNo='" & Trim(txtMOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "This Order Number Is Already Saved." & Chr(13) & "Enter Another Order No.", vbInformation + vbOKOnly Exit SubEnd Ifrs1.Close If DTPicker1.Value < PDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly DTPicker1.SetFocus Exit SubEnd IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboProductName.text = hsGrid.TextMatrix(i, 2) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboProductName.SetFocus Exit SubEnd IfNext i txtMOrderNo.Enabled = False cboMarkName.Enabled = False PDate.Enabled = False DTPicker1.Enabled = False Dim introw1 As Integerintrow1 = hsGrid.Rows - 1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtMOrderNohsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductNamehsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCartonhsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiecehsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiecehsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmounthsGrid.Rows = hsGrid.Rows + 1txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtTotalAmount.text)cboProductName.text = ""txtCarton = 0txtPiece = 0txtRatePiece = 0txtTotalAmount = 0

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 170: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 cmdRemove.Enabled = TruecmdSave.Enabled = TrueIf hsGrid.Rows = 2 ThenhsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtMOrderNohsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductNamehsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCartonhsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiecehsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.texthsGrid.Rows = hsGrid.Rows + 1cboMarkName.Locked = TrueEnd IfEnd SubPrivate Sub cmdRefresh_Click()cboMarkName.Enabled = TrueEnd SubPrivate Sub cmdClear_Click()On Error Resume Next Dim k As Integer txtMOrderNo.Enabled = True cboMarkName.Enabled = True PDate.Enabled = True DTPicker1.Enabled = TruetxtMOrderNo.text = ""cboMarkName.text = ""Label1.Caption = ""txtGrandTotal.text = "" For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf blnClickStander2 = True Then If hsGrid.Rows > 2 Then txtGrandTotal.text = Val(txtGrandTotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfCnn.BeginTransDim rs1 As New ADODB.Recordsetrs.Open "select * from MarketingOrderMaster", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("MOrderNo") = Trim(txtMOrderNo.text)rs("OrderDate") = PDate.Valuers("MID") = Trim(Label1.Caption)rs("MName") = Trim(cboMarkName.text)rs("TotalAmount") = txtGrandTotal.textrs("FullOrNot") = "Not"rs("DeleveryDate") = DTPicker1.Valuers.Updaters.Closers.Open "select * from MarketingOrderDetails", Cnn, adOpenDynamic, adLockOptimisticDim i As Integer

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 171: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 For i = 1 To hsGrid.Rows - 2rs.AddNewrs("MOrderNo") = Trim(hsGrid.TextMatrix(i, 1))rs("ProductName") = Trim(hsGrid.TextMatrix(i, 2))rs("Cartoon") = hsGrid.TextMatrix(i, 3)rs("Piece") = hsGrid.TextMatrix(i, 4)rs("Rate") = hsGrid.TextMatrix(i, 5)rs("Total") = hsGrid.TextMatrix(i, 6)rs.UpdateNext irs.CloseCnn.CommitTransDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next k txtMOrderNo.Enabled = True cboMarkName.Enabled = True PDate.Enabled = TrueDTPicker1.Enabled = TruetxtMOrderNo.text = ""cboMarkName.text = ""Label1.Caption = ""txtGrandTotal.text = ""cmdRemove.Enabled = TruecmdSave.Enabled = FalseEnd SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF cboMarkName.AddItem Trim(rs("MName")) rs.MoveNextLooprs.Closers.Open "select * from Productinfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOFcboProductName.AddItem Trim(rs("ProductName"))rs.MoveNextLooprs.ClosecmdSave.Enabled = FalsecmdRemove.Enabled = FalsehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "Order No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Carton"hsGrid.TextMatrix(0, 4) = "Pieces"hsGrid.TextMatrix(0, 5) = "Rate"hsGrid.TextMatrix(0, 6) = "Amount(TK)"PDate.Value = DateDTPicker1.Value = Date

End SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume Nextrs.Closers1.CloseSet rs = NothingSet rs1 = NothingEnd SubPrivate Sub hsGrid_Click()blnClickStander2 = True 'newEnd SubPrivate Sub txtCarton_Change()On Error Resume NexttxtPiece.text = Val(txtCarton.text) * Val(piece)txtTotalAmount.text = Val(txtRatePiece.text) * Val(txtCarton.text)End Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 172: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Private Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtPiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtRatePiece_Change()On Error Resume NextEnd SubPrivate Sub txtRatePiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

SALES EXECUTIVE PRODUCT OUT DETAILS

Dim rs As New ADODB.RecordsetDim piece As IntegerDim remove As BooleanPrivate Sub cboCondition_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboMarketingName_Click()On Error Resume NextlblMID.Caption = ""rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblMID.Caption = rs("MID")rs.ClosecboOrderNo.clearCall cboOrderNo_Clickrs.Open "select * from MarketingOrderMaster where MID='" & Trim(lblMID.Caption) & If Not rs.EOF Then Do While Not rs.EOF cboOrderNo.AddItem Trim(rs("MOrderNo")) rs.MoveNext LoopEnd Ifrs.CloseEnd SubPrivate Sub cboMarketingName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboOrderNo_Click()On Error Resume NextDim rs1 As New ADODB.RecordsetcboProductName.clearrs1.CursorLocation = adUseClientrs1.Open "select * from MarketingOrderDetails where MOrderNo='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticSet OrderGrid.DataSource = rs1Do While Not rs1.EOF cboProductName.AddItem Trim(rs1("ProductName")) rs1.MoveNextLoopEnd SubPrivate Sub cboOrderNo_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboProductName_Click()On Error Resume NexttxtCarton.text = ""txtPiece.text = ""txtRatePiece.text = ""txtTotalAmount.text = ""Dim rs1 As New ADODB.Recordsetpiece = 0rs1.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticpiece = rs1("CartonPiece")txtRatePiece.text = rs1("Price")

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 173: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs1.CloseEnd SubPrivate Sub cboProductName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf txtMInvoice.text = "" Then MsgBox "Please Enter the Gate Pass Number.", vbCritical + vbOKOnly txtMInvoice.SetFocus Exit SubElseIf cboMarketingName.text = "" Then MsgBox "Please Select the Sales Executive Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit SubElseIf cboOrderNo.text = "" Then MsgBox "Please Select An Order Number.", vbCritical + vbOKOnly cboOrderNo.SetFocus Exit SubElseIf txtPlace.text = "" Then MsgBox "Please Enter the Place Name.", vbCritical + vbOKOnly txtPlace.SetFocus Exit SubElseIf txtTrackNo.text = "" Then MsgBox "Please Enter the Truck Number.", vbCritical + vbOKOnly txtTrackNo.SetFocus Exit SubElseIf txtDriverName.text = "" Then MsgBox "Please Enter the Truck Driver Name.", vbCritical + vbOKOnly txtDriverName.SetFocus Exit SubElseIf txtLedgerName.text = "" Then MsgBox "Please Enter the Ledger Name.", vbCritical + vbOKOnly txtLedgerName.SetFocus Exit SubElseIf txtPageNo.text = "" Then MsgBox "Please Enter the Page Number.", vbCritical + vbOKOnly txtPageNo.SetFocus Exit SubElseIf cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtCarton.text = "" Or txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtPiece.text = "" Or txtPiece.text = 0 Then MsgBox "Please Enter the Piece Number.", vbCritical + vbOKOnly txtPiece.SetFocus Exit SubElseIf txtRatePiece.text = "" Or txtRatePiece.text = 0 Then MsgBox "Please Enter the Rate per Carton.", vbCritical + vbOKOnly txtRatePiece.SetFocus Exit Sub End IfDim rs1 As New ADODB.Recordsetrs1.Open "select * from MarketingOrderMaster where MOrderNo='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf rs1("OrderDate") > DDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly DDate.SetFocus Exit SubEnd Ifrs1.CloseDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboProductName.text = hsGrid.TextMatrix(i, 2) Then

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 174: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboProductName.SetFocus Exit SubEnd IfNext irs1.Open "select * from MarketingProductOutMaster Where MInvoiceNo='" & Trim(txtMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "This GatePass Number is Already Existed." & Chr(13) & "Enter Another GatePass No.", vbInformation + vbOKOnly Exit SubEnd Ifrs1.Close cboMarketingName.Enabled = False cboOrderNo.Enabled = False txtPlace.Enabled = False txtTrackNo.Enabled = False txtMInvoice.Enabled = False txtDriverName.Enabled = False txtLedgerName.Enabled = False txtPageNo.Enabled = False DDate.Enabled = False Dim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1

hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtMInvoice.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.texthsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmount.text)cboProductName.text = ""txtCarton = ""txtPiece = ""txtRatePiece = ""txtTotalAmount = ""txtRemarks.text = ""End SubPrivate Sub cmdClear_Click() On Error Resume Next Dim k As Integer cboMarketingName.Enabled = True cboOrderNo.Enabled = True txtPlace.Enabled = True txtTrackNo.Enabled = True txtMInvoice.Enabled = True txtDriverName.Enabled = True txtLedgerName.Enabled = True txtPageNo.Enabled = True DDate.Enabled = True cboCondition.text = "" txtTransportCost.text = "" cboMarketingName.text = "" cboOrderNo.text = "" txtPageNo.text = "" txtPlace.text = "" txtTotalAmount.text = "" txtTrackNo.text = "" txtMInvoice.text = "" txtDriverName.text = "" txtLedgerName.text = "" DDate.Value = Date lblMID.Caption = "" txtRemarks.text = "" For k = hsGrid.Rows - 2 To 1 Step -1

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 175: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next ktxtGtotal.text = ""txtMInvoice.text = ""Call cboOrderNo_ClickEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextDim i, j As IntegerDim rs1 As New ADODB.RecordsetIf txtMInvoice.text = "" Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfIf cboCondition.text = "" Then MsgBox "Please Select The Order Condition.", vbInformation + vbOKOnly cboCondition.SetFocus Exit SubEnd IfDim A As StringA = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo)If Not A = vbYes Then Exit SubEnd IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from MarketingProductOutMaster", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("MInvoiceNo") = Trim(txtMInvoice.text)rs("MOrderNo") = Trim(cboOrderNo.text)rs("MID") = Trim(lblMID.Caption)rs("MName") = Trim(cboMarketingName.text)rs("DeliveryDate") = DDate.Valuers("LagerName") = Trim(txtLedgerName.text)rs("PageNo") = Trim(txtPageNo.text)rs("Place") = Trim(txtPlace.text)rs("TrackNo") = Trim(txtTrackNo.text)rs("DriverName") = Trim(txtDriverName.text)rs("TotalAmount") = txtGtotal.textrs("PaidupAmount") = 0rs("InvoiceAmount") = txtGtotal.textrs("Balance") = txtGtotal.textIf txtTransportCost.text = "" Thenrs("TransPortCost") = 0Elsers("TransPortCost") = txtTransportCost.textEnd Ifrs.Updaters.Closers.Open "select * from MarketingProductOutDetails", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rs.AddNew

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 176: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs("MInvoiceNo") = Trim(hsGrid.TextMatrix(i, 1))rs("ProductName") = Trim(hsGrid.TextMatrix(i, 2))rs("Carton") = hsGrid.TextMatrix(i, 3)rs("Piece") = hsGrid.TextMatrix(i, 4)rs("RatePerCarton") = hsGrid.TextMatrix(i, 5)rs("TotalAmount") = hsGrid.TextMatrix(i, 6)rs("Remarks") = hsGrid.TextMatrix(i, 7)rs.UpdateNext irs.CloseFor j = 1 To hsGrid.Rows - 2rs1.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 2)) & "'", Cnn, adOpenDynamic, adLockOptimisticrs1("Carton") = Val(rs1("Carton")) - Val(hsGrid.TextMatrix(j, 3))rs1("Piece") = Val(rs1("Piece")) - Val(hsGrid.TextMatrix(j, 4))rs1.Updaters1.CloseNext jrs.Open "select * from MarketingOrderMaster where MOrderNo ='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("FullOrNot") = Trim(cboCondition.text)rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormalDim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next k cboMarketingName.Enabled = True cboOrderNo.Enabled = True txtPlace.Enabled = True txtTrackNo.Enabled = True txtMInvoice.Enabled = True txtDriverName.Enabled = True txtLedgerName.Enabled = True txtPageNo.Enabled = True DDate.Enabled = True cboMarketingName.text = "" cboOrderNo.text = "" txtPageNo.text = "" txtPlace.text = "" txtTotalAmount.text = "" txtTrackNo.text = "" txtMInvoice.text = "" txtDriverName.text = "" txtLedgerName.text = "" DDate.Value = Date cboCondition.text = "" txtGtotal.text = "" txtMInvoice.text = "" txtTransportCost.text = "" lblMID.Caption = "" txtRemarks.text = "" Call cboOrderNo_Click End SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF cboMarketingName.AddItem Trim(rs("MName")) rs.MoveNextLooprs.ClosehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "GatePass No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Carton"hsGrid.TextMatrix(0, 4) = "Pieces"

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 177: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 hsGrid.TextMatrix(0, 5) = "Rate"hsGrid.TextMatrix(0, 6) = "Amount(TK)"hsGrid.TextMatrix(0, 7) = "Remarks"remove = FalsecboCondition.AddItem "More"cboCondition.AddItem "Full"cboCondition.AddItem "More Than Half"cboCondition.AddItem "Less Than Half "cboCondition.AddItem "Half"DDate.Value = DateEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_Change()On Error Resume NextDim rs2 As New ADODB.RecordsettxtPiece.text = ""txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text)rs2.Open "select * from MainStock where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs2.EOF ThenIf Val(txtCarton.text) > Val(rs2("Carton")) Then MsgBox "You Have Only " & rs2("Carton") & " Carton In Stock", vbCritical + vbOKOnly txtCarton.text = ""End Ifrs2.ClosetxtPiece.text = Val(txtCarton.text) * Val(piece)End IfEnd SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTransportCost_Change()On Error Resume NextDim k As IntegertxtGtotal.text = ""For k = hsGrid.Rows - 2 To 1 Step -1txtGtotal.text = Val(txtGtotal.text) + hsGrid.TextMatrix(k, 6)Next ktxtGtotal.text = Val(txtGtotal.text) + Val(txtTransportCost.text)End SubPrivate Sub txtTransportCost_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubSALES EXECUTIVE MONEY RECEIPT

Dim rs As New ADODB.RecordsetPrivate Sub cboGatePass_Click()On Error Resume NexttxtAmount.text = ""txtBalance.text = ""txtInvoiceAmount.text = ""rs.Open "select * from MarketingProductOutMaster where MInvoiceNo= '" & Trim(cboGatePass.text) & "' ", Cnn, adOpenDynamic, adLockOptimistictxtInvoiceAmount.text = rs("Balance")rs.CloseEnd SubPrivate Sub cboGatePass_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboMarketingName_Click()lblMID.Caption = ""rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblMID.Caption = rs("MID")rs.ClosecboGatePass.clear

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 178: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs.Open "select * from MarketingProductOutMaster where MID='" & Trim(lblMID.Caption) & "' and Balance >'" & 0 & "' order by DeliveryDate", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF ThenDo While Not rs.EOF cboGatePass.AddItem Trim(rs("MInvoiceNo")) rs.MoveNextLoopEnd Ifrs.Closecmbpartyname.clearDim rsn As New ADODB.Recordsetrsn.Open "select ShopeName from MarketingDistributorInfo where MName='" & Trim(cboMarketingName.text) & "' order by ShopeName", Cnn, adOpenDynamic, adLockOptimisticIf Not rsn.EOF ThenDo While Not rsn.EOF cmbpartyname.AddItem Trim(rsn("ShopeName")) rsn.MoveNextLoopEnd Ifrsn.CloseEnd SubPrivate Sub cboMarketingName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboPayType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmbpartyname_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf cboMarketingName.text = "" Then MsgBox "Please Select The Sales Executive Name.", vbInformation + vbOKOnly cboMarketingName.SetFocus Exit SubElseIf cboGatePass.text = "" Then MsgBox "Please Select The Gatepass Number.", vbInformation + vbOKOnly cboGatePass.SetFocus Exit SubElseIf txtMRNo.text = "" Then MsgBox "Please Enter The Money Receipt Number.", vbInformation + vbOKOnly txtMRNo.SetFocus Exit SubElseIf cboPayType.text = "" Then MsgBox "Please Select The Payment Type.", vbInformation + vbOKOnly cboPayType.SetFocus Exit SubElseIf txtAmount.text = "" Then MsgBox "Please Enter The Amount(TK).", vbInformation + vbOKOnly txtAmount.SetFocus Exit SubElseIf Val(txtAmount.text) = 0 Then MsgBox "Please Enter The Amount(TK).", vbInformation + vbOKOnly txtAmount.SetFocus txtAmount.text = "" Exit Sub End IfDim rs1 As New ADODB.Recordsetrs1.Open "Select * from MarketingMR Where MRNo='" & Trim(txtMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "This Money Receipt is Already exists.Please Enter Another Money Receipt Number.", vbInformation + vbOKOnly txtMRNo.SetFocus Exit SubEnd Ifrs1.Close

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 179: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs1.Open "select DeliveryDate from MarketingProductOutMaster where MID= '" & Trim(lblMID.Caption) & "' and MInvoiceNo='" & Trim(cboGatePass.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticIf rs1("DeliveryDate") > PayDate.Value ThenMsgBox "Payment Date Can Not Be Less Than Delivery Date." & Chr(13) & "Delivary Date Is :" & rs1("DeliveryDate"), vbInformation + vbCriticalPayDate.SetFocusExit SubEnd Ifrs1.CloseScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "Select * from MarketingMR", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewIf cmbpartyname.text = "" Thenrs("MDID") = Trim(lblMID.Caption)rs("MInvoiceNo") = Trim(cboGatePass.text)rs("MRNo") = Trim(txtMRNo.text)rs("PayType") = Trim(cboPayType.text)rs("PayDate") = PayDaters("Amount") = Val(txtAmount.text)rs("Remarks") = Trim(txtRemarks.text)rs("ShopeName") = "NA"rs.UpdateElsers("MDID") = Trim(lblMID.Caption)rs("MInvoiceNo") = Trim(cboGatePass.text)rs("MRNo") = Trim(txtMRNo.text)rs("PayType") = Trim(cboPayType.text)rs("PayDate") = PayDaters("Amount") = Val(txtAmount.text)rs("Remarks") = Trim(txtRemarks.text)rs("ShopeName") = Trim(cmbpartyname.text)rs.UpdateEnd Ifrs.Closers.Open "Select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("PaidupAmount") = Val(rs("PaidupAmount")) + Val(txtAmount.text)rs("Balance") = Val(rs("Balance")) - Val(txtAmount.text)rs.Updaters.Close

Cnn.CommitTransScreen.MousePointer = vbNormalPayDate.Value = DatetxtAmount.text = ""cboPayType.text = ""cboGatePass.text = ""cboMarketingName.text = ""lblMID.Caption = ""txtInvoiceAmount.text = ""txtBalance.text = ""txtRemarks.text = ""txtMRNo.text = ""cmbpartyname.text = ""End SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF cboMarketingName.AddItem Trim(rs("MName")) rs.MoveNextLooprs.ClosecboPayType.AddItem "CASH", 0cboPayType.AddItem "CHEQUE", 1cboPayType.AddItem "DD", 2cboPayType.AddItem "PAY ORDER", 3cboPayType.AddItem "TT", 4

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 180: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 PayDate.Value = DateEnd SubPrivate Sub txtAmount_Change()On Error Resume NexttxtBalance.text = Val(txtInvoiceAmount.text) - Val(txtAmount.text)If Val(txtAmount.text) > Val(txtInvoiceAmount.text) Then MsgBox "Paidup Amount Can Not Be Less Than Gate Pass Amount(TK).", vbInformation + vbOKOnly txtAmount.text = "" txtBalance.text = "" Exit SubEnd IfEnd SubPrivate Sub txtAmount_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubSALES EXECUTIVE PARTY INFORMATION

Dim rs As New ADODB.RecordsetPrivate Sub cboMname_Click()On Error Resume NextlblMID.Caption = ""rs.Open "Select * from MarketingInfo where MName = '" & Trim(cboMname.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblMID.Caption = rs("MID")rs.CloseEnd SubPrivate Sub cboMname_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRefresh_Click()On Error Resume NexttxtMDID.text = ""txtMaExID.text = ""txtDname.text = ""txtPName.text = ""txtAddress.text = ""cboMname.text = ""lblMID.Caption = ""txtPlace.text = ""Call GrcmdRefresh.Enabled = FalsecmdSave.Enabled = TruecmdSearch.Enabled = TruecmdUpdate.Enabled = FalseEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf txtMDID.text = "" Then MsgBox "Please Enter The Sales Executive's Party ID.", vbInformation + vbOKOnly txtMDID.SetFocus Exit SubElseIf txtDname.text = "" Then MsgBox "Please Enter The Distributor Name.", vbInformation + vbOKOnly txtDname.SetFocus Exit SubElseIf txtPName.text = "" Then MsgBox "Please Enter The Proprietor Name.", vbInformation + vbOKOnly txtPName.SetFocus Exit SubElseIf txtAddress.text = "" Then MsgBox "Please Enter The Address.", vbInformation + vbOKOnly txtAddress.SetFocus Exit SubElseIf txtPlace.text = "" Then MsgBox "Please Enter The Place Name.", vbInformation + vbOKOnly txtPlace.SetFocus Exit Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 181: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 ElseIf cboMname.text = "" Then MsgBox "Please Enter The Sales Executive Name.", vbInformation + vbOKOnly cboMname.SetFocus Exit SubEnd IfDim rsMDID As New ADODB.RecordsetrsMDID.Open "select * from MarketingDistributorInfo where MDID='" & Trim(txtMDID.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rsMDID.EOF Then MsgBox "This Sales Executive Distributor ID is Already Existed,Please Insert Another ID.", vbInformation + vbOKOnly txtMID.text = "" txtDname.text = "" txtPName.text = "" txtAddress.text = "" cboMname.text = "" lblMID.Caption = "" txtPlace.text = "" txtMDID.text = "" txtMDID.SetFocus rsMDID.Close Call Gr Exit Sub End IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "Select * from MarketingDistributorInfo", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("MDID") = Trim(txtMDID.text)rs("ShopeName") = Trim(txtDname.text)rs("ProprietorName") = Trim(txtPName.text)rs("Address") = Trim(txtAddress.text)rs("Place") = Trim(txtPlace.text)rs("MID") = Trim(lblMID.Caption)rs("MName") = Trim(cboMname.text)rs.Updaters.Closers.Open "Select * from MDistributorACstutas", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("MDID") = Trim(txtMDID.text)rs("ShopeName") = Trim(txtDname.text)rs("InvoiceAmount") = 0rs("PaidupAmount") = 0rs("ReceivableAmount") = 0rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormaltxtDname.text = ""txtPName.text = ""txtAddress.text = ""cboMname.text = ""lblMID.Caption = ""txtPlace.text = ""txtMDID.text = ""Call GrEnd SubPrivate Sub cmdSearch_Click()On Error Resume Nextrs.Open "Select * from MarketingDistributorInfo where MDID='" & Trim(txtMaExID.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF ThentxtMDID.text = Trim(rs("MDID"))txtDname.text = Trim(rs("ShopeName"))txtPName.text = Trim(rs("ProprietorName"))txtAddress.text = Trim(rs("Address"))txtPlace.text = Trim(rs("Place"))lblMID.Caption = Trim(rs("MID"))cboMname.text = Trim(rs("Mname"))cmdSave.Enabled = False

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 182: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 cmdRefresh.Enabled = TruecmdUpdate.Enabled = TrueEnd Ifrs.ClosecmdSearch.Enabled = FalseEnd SubPrivate Sub cmdUpdate_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "Select * from MarketingDistributorInfo where MDID ='" & Trim(txtMDID.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs1("ShopeName") = Trim(txtDname.text)rs1("ProprietorName") = Trim(txtPName.text)rs1("Address") = Trim(txtAddress.text)rs1("Place") = Trim(txtPlace.text)rs1.Updaters1.ClosetxtMDID.text = ""txtDname.text = ""txtPName.text = ""txtAddress.text = ""cboMname.text = ""lblMID.Caption = ""txtPlace.text = ""Call GrcmdUpdate.Enabled = FalsecmdSave.Enabled = TruecmdSearch.Enabled = TruecmdRefresh.Enabled = FalseEnd SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "Select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF cboMname.AddItem Trim(rs("MName"))rs.MoveNext Looprs.CloseCall GrEnd SubPrivate Sub ID()On Error Resume NextDim NewId As DoubleDim rs1 As New ADODB.RecordsetNewId = 1rs1.Open "Select * from MarketingDistributorInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs1.EOF NewId = Val(NewId) + Val(1) rs1.MoveNextLooprs1.ClosetxtMDID.text = "SMD" & NewIdEnd SubPrivate Sub txtMaExID_Click()End SubPrivate Sub Gr()On Error Resume Nextrs.Closers.CursorLocation = adUseClientrs.Open "select * from MarketingDistributorInfo", Cnn, adOpenDynamic, adLockOptimisticSet DataGrid.DataSource = rsEnd Sub

SALES EXECUTIVE PARTY SALES

Dim rs As New ADODB.RecordsetDim remove As BooleanDim piece As IntegerPrivate Sub cboDname_Click()

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 183: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 On Error Resume NextDim rs1 As New ADODB.RecordsetlblPID.Caption = ""rs.Open "select * from MarketingDistributorInfo where ShopeName= '" & Trim(cboDname.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblPID.Caption = rs("MDID")rs.ClosecboOrderNo.clearrs1.Open "select * from MarketingDistributorOrderMaster where MDID='" & Trim(lblPID.Caption) & "' and FullorNot <> 'Full' order by orderdate", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then Do While Not rs1.EOF cboOrderNo.AddItem Trim(rs1("MSOrderNo")) rs1.MoveNext LoopEnd Ifrs1.ClosecboOrderNo_ClickEnd SubPrivate Sub cboDname_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboMarketingName_Click()On Error Resume NextlblMID.Caption = ""cboDname.clearrs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblMID.Caption = rs("MID")rs.Closers.Open "select * from MarketingDistributorInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF Then Do While Not rs.EOF cboDname.AddItem Trim(rs("ShopeName")) rs.MoveNext LoopEnd Ifrs.ClosecboOrderNo.text = ""Call cboOrderNo_ClickEnd SubPrivate Sub cboMarketingName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboOrderNo_Click()On Error Resume NextcboProductName.clearDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "select ProductName,Carton,Piece from MarketingDistributorOrderDetails where MSOrderNo='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticSet OrderGrid.DataSource = rs1Do While Not rs1.EOF cboProductName.AddItem Trim(rs1("ProductName")) rs1.MoveNextLoopEnd SubPrivate Sub cboOrderNo_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboProductName_Click()On Error Resume NexttxtCarton.text = ""txtPiece.text = ""txtRatePiece.text = ""txtTotalAmount.text = ""piece = 0rs.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 184: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 piece = rs("CartonPiece")txtRatePiece.text = rs("Price")rs.CloseEnd SubPrivate Sub cboProductName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume Next

If txtMInvoice.text = "" Then MsgBox "Please Enter An Invoice Number.", vbCritical + vbOKOnly txtMInvoice.SetFocus Exit SubElseIf cboMarketingName.text = "" Then MsgBox "Please Select the Sales Executive Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit SubElseIf cboDname.text = "" Then MsgBox "Please Select the Sales Executive Party Name.", vbCritical + vbOKOnly cboDname.SetFocus Exit SubElseIf cboOrderNo.text = "" Then MsgBox "Please Select the Order Number.", vbCritical + vbOKOnly cboOrderNo.SetFocus Exit SubElseIf cboProductName.text = "" Then MsgBox "Please Select the Product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtCarton.text = "" Or txtCarton.text = 0 Then MsgBox "Please Enter the Carton Number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubEnd IfDim rs1 As New ADODB.Recordsetrs1.Open "select * from MarketingDistributorOrderMaster where MSOrderNo='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf rs1("OrderDate") > DDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly DDate.SetFocus Exit SubEnd Ifrs1.CloseDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboProductName.text = hsGrid.TextMatrix(i, 1) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboProductName.SetFocus Exit SubEnd If

Next irs1.Open "select * from MarketingSalesMaster Where MSInvoiceNo='" & Trim(txtMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "This Invoice Number Is Already existed." & Chr(13) & "Enter Another GatePass No.", vbInformation + vbOKOnly Exit SubEnd Ifrs1.Close Frame1.Enabled = False Dim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboProductName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtPiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtRatePiece.text

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 185: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtTotalAmount.texthsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmount.text)cboProductName.text = ""txtCarton = ""txtPiece = ""txtRatePiece = ""txtTotalAmount = ""End SubPrivate Sub cmdClear_Click()On Error Resume NextFrame1.Enabled = TrueDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboProductName.text = ""txtCarton = ""txtPiece = ""txtRatePiece = ""txtTotalAmount = ""DDate.Value = DatetxtMInvoice.text = ""cboDname.text = ""lblMID.Caption = ""lblPID.Caption = ""cboMarketingName.text = ""cboOrderNo.text = ""txtGtotal.text = ""Call cboOrderNo_ClickEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 5)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextDim i, j As IntegerDim rs1 As New ADODB.RecordsetIf Frame1.Enabled = True Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfIf cboCondition.text = "" Then MsgBox "Please Select An Order Condition.", vbInformation + vbOKOnly cboCondition.SetFocus Exit SubEnd IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from MarketingSalesMaster", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("MSInvoiceNo") = Trim(txtMInvoice.text)rs("MSOrderNo") = Trim(cboOrderNo.text)rs("MID") = Trim(lblMID.Caption)rs("MDID") = Trim(lblPID.Caption)

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 186: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs("DeliveryDate") = DDate.Valuers("InvoiceAmount") = txtGtotal.textrs("PaidupAmount") = 0rs("Balance") = txtGtotal.textrs.Updaters.Closers.Open "select * from MDistributorACstutas where MDID='" & Trim(lblPID.Caption) & "' and ShopeName='" & Trim(cboDname.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("InvoiceAmount") = rs("InvoiceAmount") + Val(txtGtotal.text)rs("ReceivableAmount") = rs("ReceivableAmount") + Val(txtGtotal.text)rs.Updaters.Closers.Open "select * from MarketingSalesDetails", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rs.AddNewrs("MSInvoiceNo") = Trim(txtMInvoice.text)rs("ProductName") = Trim(hsGrid.TextMatrix(i, 1))rs("Carton") = hsGrid.TextMatrix(i, 2)rs("Piece") = hsGrid.TextMatrix(i, 3)rs("RatePiece") = hsGrid.TextMatrix(i, 4)rs("TotalAmount") = hsGrid.TextMatrix(i, 5)rs.UpdateNext irs.CloseTrim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimisticrs.Open "select * from MarketingDistributorOrderMaster where MSOrderNo='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("FullorNot") = Trim(cboCondition.text)rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormalCall cmdClear_ClickcboCondition.text = ""End SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF cboMarketingName.AddItem Trim(rs("MName")) rs.MoveNextLooprs.ClosehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "Product Name"hsGrid.TextMatrix(0, 2) = "Carton"hsGrid.TextMatrix(0, 3) = "Pieces"hsGrid.TextMatrix(0, 4) = "Rate"hsGrid.TextMatrix(0, 5) = "Amount(TK)"remove = FalseDDate.Value = DatecboCondition.AddItem "More"cboCondition.AddItem "Full"cboCondition.AddItem "More Than Half"cboCondition.AddItem "Less Than Half "cboCondition.AddItem "Half"End SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_Change()On Error Resume NexttxtPiece.text = Val(txtCarton.text) * Val(piece)txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text)End SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtPiece_Change()

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 187: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 End SubPrivate Sub txtRatePiece_Change()On Error Resume NexttxtTotalAmount.text = Val(txtPiece.text) * Val(txtRatePiece.text)End Sub

SALES EXECUTIVE PRODUCT RETURN

Dim rs As New ADODB.RecordsetDim remove As BooleanDim piece As IntegerDim Carton As DoublePrivate Sub cboGatePass_Click()On Error Resume NextDim rs2 As New ADODB.RecordsetcboProductName.clearrs2.Open "select * from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs2.EOF ThenDo While Not rs2.EOFcboProductName.AddItem Trim(rs2("ProductName"))rs2.MoveNextLooprs2.CloseDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "Select ProductName,Carton,Piece from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimisticSet MReturnGrid.DataSource = rs1End IfEnd SubPrivate Sub cboGatePass_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboMarketingName_Click()On Error Resume NextLabel1.Caption = ""rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticLabel1.Caption = rs("MID")rs.ClosecboGatePass.clearCall cboGatePass_ClickcboProductName.clearrs.Open "select * from MarketingProductOutMaster where MID='" & Trim(Label1.Caption) & "' order by DeliveryDate", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF ThenDo While Not rs.EOF cboGatePass.AddItem Trim(rs("MInvoiceNo")) rs.MoveNextLoopEnd Ifrs.CloseEnd SubPrivate Sub cboMarketingName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboProductName_Click()On Error Resume Nextpiece = 0rs.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticpiece = rs("CartonPiece")rs.ClosetxtRatePiece.text = ""rs.Open "select * from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboGatePass.text) & "' and ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticCarton = rs("Carton")txtRatePiece.text = rs("RatePerCarton")rs.Close

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 188: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 txtCarton.text = ""txtPiece.text = ""End SubPrivate Sub cboProductName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextDim introw1 As IntegerDim ROW As IntegerIf cboMarketingName.text = "" Then MsgBox "Please Select The Sales Executive Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit SubElseIf cboGatePass.text = "" Then MsgBox "Please Enter the Gate Pass Number.", vbCritical + vbOKOnly cboGatePass.SetFocus Exit SubElseIf cboMarketingName.text = "" Then MsgBox "Please Select the Marketing Executive Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit SubElseIf cboProductName.text = "" Then MsgBox "Please Select the Product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtCarton = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubEnd IfDim rs1 As New ADODB.Recordsetrs1.Open "Select Carton from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Val(txtCarton.text) > Val(rs1("Carton")) ThenMsgBox "Return Carton Quantity Can Not Be Greater Than Delivery Quantity.", vbCritical + vbOKOnlytxtCarton.SetFocusExit SubEnd Ifrs1.Closers1.Open "select * from MarketingReturn where MInvoiceNo='" & Trim(cboGatePass.text) & "' and ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "These Records are Already Existed,please Insert Another InvoiceNo", vbCritical + vbOKOnly rs1.Close Exit SubEnd Ifrs1.Closers1.Open "select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf PDate.Value < rs1("DeliveryDate") Then MsgBox "Return Date Can Not Be Less Than Delivery Date. Delivery Date IS :" & rs1("DeliveryDate"), vbInformation + vbOKOnly Exit SubEnd Ifrs1.CloseROW = hsGrid.RowsFor i = 1 To ROW - 1 If Me.cboProductName = hsGrid.TextMatrix(i, 1) Then MsgBox "These Records Already Existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboProductName.SetFocus Exit SubEnd IfNextintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 189: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboProductName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtPiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtRatePiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtTotalAmount.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtTotalAmount.text)cboProductName.text = ""txtCarton = ""txtPiece = ""txtRatePiece.text = ""txtTotalAmount.text = ""cboGatePass.Enabled = FalsecboMarketingName.Enabled = FalsePDate.Enabled = FalseEnd Sub

Private Sub cmdClear_Click()On Error Resume NextDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboGatePass.Enabled = TruecboGatePass.text = ""cboMarketingName.Enabled = TruecboMarketingName.text = ""PDate.Enabled = TruetxtGrandTotal.text = ""PDate.Value = DatecboProductName.text = ""txtCarton = ""txtPiece = ""txtRatePiece.text = ""txtTotalAmount.text = ""Label1.Caption = ""cboGatePass.text = ""txtRemarks.text = ""Dim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "Select ProductName,Carton,Piece from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimisticSet MReturnGrid.DataSource = rs1End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGrandTotal.text = Val(txtGrandTotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 5)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select The Row Then Click The Remove Button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfDim k As Integer

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 190: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Dim i, j As IntegerDim rs1 As New ADODB.RecordsetIf rs.State = adStateOpen Then rs.Close Set rs = NothingEnd IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from MarketingReturn ", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rs.AddNewrs("MID") = Trim(Label1.Caption)rs("MInvoiceNo") = Trim(cboGatePass.text)rs("ReturnDate") = PDate.Valuers("ProductName") = Trim(hsGrid.TextMatrix(i, 1))rs("Carton") = hsGrid.TextMatrix(i, 2)rs("Piece") = hsGrid.TextMatrix(i, 3)rs("RateCarton") = hsGrid.TextMatrix(i, 4)rs("TotalAmount") = hsGrid.TextMatrix(i, 5)rs("Remarks") = hsGrid.TextMatrix(i, 6)rs.UpdateNext irs.Closers.Open "select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(cboGatePass.text) & "' and MID='" & Trim(Label1.Caption) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("InvoiceAmount") = Val(rs("InvoiceAmount")) - Val(txtGrandTotal.text)rs("Balance") = Val(rs("Balance")) - Val(txtGrandTotal.text)rs.Updaters.CloseFor j = 1 To hsGrid.Rows - 2rs.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("Carton") = Val(rs("Carton")) + Val(hsGrid.TextMatrix(j, 2))rs("Piece") = Val(rs("Piece")) + Val(hsGrid.TextMatrix(j, 3))rs.Updaters.CloseNext jCnn.CommitTransScreen.MousePointer = vbNormalCall cmdClear_ClickEnd SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select MName from MarketingInfo order by MName", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOF cboMarketingName.AddItem Trim(rs("MName")) rs.MoveNextLooprs.ClosehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "Product Name"hsGrid.TextMatrix(0, 2) = "Carton"hsGrid.TextMatrix(0, 3) = "Pieces"hsGrid.TextMatrix(0, 4) = "Rate Carton"hsGrid.TextMatrix(0, 5) = "Amount(TK)"hsGrid.TextMatrix(0, 6) = "Remarks"remove = FalsePDate.Value = DateEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume NextSet rs = NothingEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_Change()On Error Resume NexttxtPiece.text = Val(txtCarton.text) * Val(piece)

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 191: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text)End SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

CARTON WISE SALES EXECUTIVE COMMISION

Dim rs1 As New ADODB.RecordsetDim rs2 As New ADODB.RecordsetDim rs3 As New ADODB.RecordsetDim remove As BooleanPrivate Sub cboMarketingName_Click()lblMID.Caption = ""rs3.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblMID.Caption = rs3("MID")rs3.CloseEnd SubPrivate Sub cboMarketingName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub CboProName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf cboMarketingName.text = "" Then MsgBox "Please Select the Marketing Executive Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit SubElseIf CboProName.text = "" Then MsgBox "Please Select the Product(Soap) Name.", vbCritical + vbOKOnly CboProName.SetFocus Exit SubElseIf Val(txtCarton.text) = 0 Then MsgBox "Please enter total carton number;Zero will not be accepted.", vbCritical + vbOKOnly txtCarton.text = "" txtCarton.SetFocus Exit SubElseIf Val(txtRatePerCarton.text) = 0 Then MsgBox "Please Enter Rate per Carton;Zero will not be accepted.", vbCritical + vbOKOnly txtRatePerCarton.text = "" txtRatePerCarton.SetFocus Exit Sub End If Dim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboMarketingName.text = hsGrid.TextMatrix(i, 2) And Me.CboProName.text = hsGrid.TextMatrix(i, 3) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboMarketingName.text = "" lblMID.Caption = "" CboProName.text = "" txtCarton.text = "" txtRatePerCarton.text = "" txtTotalAmount.text = "" CboProName.SetFocus Exit SubEnd IfNext iDim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = ComDate.ValuehsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboMarketingName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = CboProName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePerCarton.text

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 192: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.texthsGrid.Rows = hsGrid.Rows + 1txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtTotalAmount.text)cboMarketingName.text = ""lblMID.Caption = ""CboProName.text = ""txtCarton.text = ""txtRatePerCarton.text = ""txtTotalAmount.text = ""cmdSave.Enabled = True End SubPrivate Sub cmdClear_Click()On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboMarketingName.text = ""lblMID.Caption = ""CboProName.text = ""txtCarton.text = ""txtRatePerCarton.text = ""txtTotalAmount.text = ""ComDate.Value = DatetxtGrandTotal.text = ""End SubPrivate Sub cmdClose_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGrandTotal.text = Val(txtGrandTotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()Dim A As StringA = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo)If Not A = vbYes Then Exit SubEnd IfScreen.MousePointer = vbHourglassCnn.BeginTransDim rsnew As New ADODB.Recordsetrsnew.Open "Select * from SalesExeDistrCommision", Cnn, adOpenDynamic, adLockOptimisticDim i As IntegerFor i = 1 To hsGrid.Rows - 2rsnew.AddNewrsnew("CommissionDate") = hsGrid.TextMatrix(i, 1)rsnew("SalesExeName") = Trim(hsGrid.TextMatrix(i, 2))rsnew("ProductName") = Trim(hsGrid.TextMatrix(i, 3))rsnew("TotCartonNumber") = Val(hsGrid.TextMatrix(i, 4))rsnew("RatePerCartoon") = hsGrid.TextMatrix(i, 5)rsnew("TotAmount") = Val(hsGrid.TextMatrix(i, 6))rsnew.UpdateNext irsnew.CloseCnn.CommitTransScreen.MousePointer = vbNormalCall clearcmdSave.Enabled = False

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 193: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 End SubPrivate Sub Form_Load()ComDate.Value = DatecmdSave.Enabled = Falsers1.Open "select distinct MName from MarketingInfo order by MName", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs1.EOF cboMarketingName.AddItem Trim(rs1("MName")) rs1.MoveNextLooprs1.Closers2.Open "select Distinct ProductName from Productinfo order by ProductName", Cnn, adOpenDynamic, adLockOptimisticrs2.MoveFirstDo While Not rs2.EOFCboProName.AddItem Trim(rs2("ProductName"))rs2.MoveNextLooprs2.ClosehsGrid.TextMatrix(0, 0) = "Serial"hsGrid.TextMatrix(0, 1) = "Comm.Date"hsGrid.TextMatrix(0, 2) = "Sales Exe. Name"hsGrid.TextMatrix(0, 3) = "Product Name"hsGrid.TextMatrix(0, 4) = "Total Carton No"hsGrid.TextMatrix(0, 5) = "Carton Rate"hsGrid.TextMatrix(0, 6) = "Total Amount"hsGrid.ColWidth(1) = hsGrid.ColWidth(1) + 200hsGrid.ColWidth(2) = hsGrid.ColWidth(2) + 700hsGrid.ColWidth(3) = hsGrid.ColWidth(3) + 350hsGrid.ColWidth(4) = hsGrid.ColWidth(4) + 500hsGrid.ColWidth(5) = hsGrid.ColWidth(5) + 250hsGrid.ColWidth(6) = hsGrid.ColWidth(6) + 500End SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call ValidationNotPoint(KeyAscii)End SubPrivate Sub txtRatePerCarton_Change()Dim AA As DoubleAA = FormatNumber(Val(txtCarton.text) * Val(txtRatePerCarton.text), 0)txtTotalAmount.text = Val(AA)End SubPrivate Sub txtRatePerCarton_KeyPress(KeyAscii As Integer)Call Validationwithpoint(KeyAscii)End SubPrivate Sub txtTotalAmount_KeyPress(KeyAscii As Integer)Call ValidationNotPoint(KeyAscii)End SubPublic Sub clear()On Error Resume Next Dim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboMarketingName.text = ""lblMID.Caption = ""CboProName.text = ""txtCarton.text = ""txtRatePerCarton.text = ""txtTotalAmount.text = ""ComDate.Value = DatetxtGrandTotal.text = ""End Sub

BANK INFORMATION

Dim rs As New ADODB.RecordsetDim rsac As New ADODB.RecordsetPrivate Sub cmdClear_Click()

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 194: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Call clearcmdSave.Enabled = TrueEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdClose_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()If txtBankName.text = "" Then MsgBox " Please Enter The Bank Name", vbCritical + vbOKOnly, "Equipment Repare and Sells Billing System" txtBankName.SetFocus Exit SubElseIf txtAccountholder.text = "" Then MsgBox " Please Enter The Account Holder Name", vbCritical + vbOKOnly, txtAccountholder.SetFocus Exit SubElseIf txtAccountNumber.text = "" Then MsgBox "Please Enter The Account Number", vbCritical + vbOKOnly, "Equipment Repare and Sells Billing System" txtAccountNumber.SetFocus Exit SubEnd IfCnn.BeginTransrs.Open "select * from NewBankInfo", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("BankName") = Trim(txtBankName.text)rs("BranchName") = Trim(txtbranceName.text)rs("AccountHolderName") = Trim(txtAccountholder.text)rs("AccountNumber") = Trim(txtAccountNumber.text)rs("OpeningDate") = openingDate.Valuers("BankAddress") = txtbankAddress.textrs("Phone") = txtphone.textrs.Updaters.CloseCnn.CommitTransCall clearEnd SubPrivate Sub DGrid()Dim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "select * from NewBankInfo", Cnn, adOpenDynamic, adLockOptimisticSet Grid.DataSource = rs1End SubPrivate Sub Form_Load()Call DGridEnd SubPrivate Sub txtSizeDimension_Change()Call Validation(KeyAscii)End SubPublic Sub clear()txtAccountholder.text = ""txtAccountNumber.text = ""txtbankAddress.text = ""txtphone.text = ""openingDate.Value = DatetxtBankName.text = ""txtbranceName.text = ""End Sub

DISTRIBUTOR DEALER INFORMATION

Dim rs As New ADODB.RecordsetPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdInsert_Click()On Error Resume NexttxtDname.text = ""txtPName.text = ""

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 195: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 txtAddress.text = ""txtTel.text = ""txtMobile.text = ""txtCredit.text = ""cmdSave.Enabled = TruecmdInsert.Enabled = FalsecmdUpdate.Enabled = FalsecmdRefresh.Enabled = TruecmdSearch.Enabled = TrueEnd SubPrivate Sub cmdRef1_Click()On Error Resume NexttxtDname.text = ""txtPName.text = ""txtAddress.text = ""txtTel.text = ""txtMobile.text = ""txtCredit.text = ""txtSearch.text = ""cmdSave.Enabled = TruecmdInsert.Enabled = TruecmdUpdate.Enabled = FalsecmdSearch.Enabled = TruecmdRefresh.Enabled = FalseEnd SubPrivate Sub cmdRefresh_Click()On Error Resume NexttxtMobile.text = ""txtCredit.text = ""txtSearch.text = ""cmdSave.Enabled = TruecmdInsert.Enabled = TruecmdUpdate.Enabled = FalsecmdSearch.Enabled = TruecmdRefresh.Enabled = FalseEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf txtDid.text = "" Then MsgBox "Please Enter The Distributor ID.", vbCritical + vbOKOnly txtDid.SetFocus Call Gd Exit SubElseIf txtDname.text = "" Then MsgBox "Please Enter The Distributor Name.", vbCritical + vbOKOnly txtDname.SetFocus Call Gd Exit SubElseIf txtPName.text = "" Then MsgBox "Please Enter The Distributor Proprietor Name.", vbCritical + vbOKOnly txtPName.SetFocus Call Gd Exit Sub Exit SubEnd Ifrs.CloseDim rsdidsearch As New ADODB.Recordsetrsdidsearch.Open "Select * from DistributorInfo where DID='" & Trim(txtDid.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rsdidsearch.EOF ThenMsgBox "This Distributor ID is already existed,Please insert another Distributor ID.", vbCritical + vbOKOnlytxtTel.text = ""txtMobile.text = ""txtCredit.text = ""txtDid.SetFocusrsdidsearch.CloseCall GdExit SubEnd IfScreen.MousePointer = vbHourglass

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 196: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Cnn.BeginTransrs.Open "Select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("DID") = Trim(txtDid.text)rs("ShopName") = Trim(txtDname.text)rs("PropreitorName") = Trim(txtPName.text)rs("JoinDate") = DDate.Valuers("Address") = Trim(txtAddress.text)rs("TelNo") = txtTel.textrs("MobNumber") = txtMobile.textrs("CreditLimit") = txtCredit.textrs.Updaters.Closers.Open "Select * from DistributorACStatus", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("DID") = Trim(txtDid.text)rs("ShopName") = Trim(txtDname.text)rs("InvoiceAmount") = 0rs("PaidupAmount") = 0rs("RecevalAmount") = 0rs.Updaters.Closers.Open "Select * from DistributorAdvanceAC", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("DID") = Trim(txtDid.text)rs("ShopName") = Trim(txtDname.text)rs("Amount") = 0rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormalCall GdtxtDid.text = ""txtDname.text = ""txtPName.text = ""txtAddress.text = ""txtTel.text = ""txtMobile.text = ""txtCredit.text = ""cmdInsert.Enabled = FalseEnd SubPrivate Sub cmdSearch_Click()On Error Resume NextIf txtSearch.text = "" ThenMsgBox "Please Write down the correct distributor ID No."End Ifrs.Closers.Open "Select * from DistributorInfo where DID='" & Trim(txtSearch.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf rs.EOF Thenrs.CloseExit SubElsetxtDid.text = Trim(rs("DID"))txtDname.text = Trim(rs("ShopName"))txtPName.text = Trim(rs("PropreitorName"))DDate.Value = Trim(rs("JoinDate"))txtAddress.text = Trim(rs("Address"))txtTel.text = Trim(rs("TelNo"))txtMobile.text = Trim(rs("MobNumber"))txtCredit.text = Trim(rs("CreditLimit"))cmdSave.Enabled = FalsecmdInsert.Enabled = TruecmdUpdate.Enabled = TruecmdSearch.Enabled = FalsecmdRefresh.Enabled = TrueEnd IfEnd SubPrivate Sub cmdUpdate_Click()On Error Resume Next

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 197: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs.Open "Select * from DistributorInfo where DID='" & Trim(txtDid.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("PropreitorName") = Trim(txtPName.text)rs("JoinDate") = DDate.Valuers("Address") = Trim(txtAddress.text)rs("TelNo") = txtTel.textrs("MobNumber") = txtMobile.textrs("CreditLimit") = txtCredit.textrs.Updaters.CloseCall cmdInsert_Clickrs.CloseCall GdEnd SubPrivate Sub Form_Load()On Error Resume NextCall GdcmdUpdate.Enabled = FalseDDate.Value = DateEnd SubPrivate Sub ID()On Error Resume NextDim NewId As DoubleDim rs1 As New ADODB.RecordsetNewId = 1rs1.Open "Select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs1.EOF NewId = Val(NewId) + Val(1) rs1.MoveNextLooprs1.ClosetxtDid.text = "SD" & NewIdEnd SubPrivate Sub Gd()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "Select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimisticSet Grid.DataSource = rs1End SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume Nextrs.CloseSet rs = NothingEnd SubPrivate Sub txtCredit_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtSearch_GotFocus()End Sub

DISTRIBUTOR ORDER FORM

Dim rs As New ADODB.RecordsetDim remove As BooleanDim piece As DoublePrivate Sub cboDname_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select DID from DistributorInfo where ShopName='" & cboDname.text & "' ", Cnn, adOpenDynamic, adLockOptimisticlblDID.Caption = rs1(0)rs1.CloseEnd SubPrivate Sub cboDname_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboProName_Click()On Error Resume Nextpiece = 0rs.Open "select * from Productinfo where ProductName='" & Trim(CboProName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 198: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 piece = rs("CartonPiece")rs.CloseEnd SubPrivate Sub CboProName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf txtOrderno.text = "" Then MsgBox "Please Enter the Order Number.", vbCritical + vbOKOnly txtOrderno.SetFocus Exit SubElseIf cboDname.text = "" Then MsgBox "Please Select the Dealer Name.", vbCritical + vbOKOnly cboDname.SetFocus Exit SubElseIf CboProName.text = "" Then MsgBox "Please Select the Product Name.", vbCritical + vbOKOnly CboProName.SetFocus Exit SubElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtCarton.text = 0 Then MsgBox "Please Enter the Carton.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub End IfDim rs1 As New ADODB.Recordsetrs1.Open "select * from DistributorOrderMaster where DOrdeNo ='" & Trim(txtOrderno.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "This Order Number is Already Saved." & Chr(13) & "Enter Another Order No.", vbInformation + vbOKOnly txtOrderno.SetFocusExit SubEnd Ifrs1.CloseIf ODate.Value > DDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly DDate.SetFocus Exit SubEnd IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.CboProName.text = hsGrid.TextMatrix(i, 3) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" CboProName.SetFocus Exit SubEnd IfNext iDim introw1 As IntegerFrame1.Enabled = Falseintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtOrdernohsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboDnamehsGrid.TextMatrix(hsGrid.Rows - 1, 3) = CboProNamehsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtCartonhsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtPiecehsGrid.Rows = hsGrid.Rows + 1CboProName.text = ""txtCarton.text = ""txtPiece.text = ""End SubPrivate Sub cmdClear_Click()On Error Resume Next Dim k As Integer

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 199: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Frame1.Enabled = TrueFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kDDate.Value = DateCboProName.text = ""txtCarton.text = ""txtPiece.text = ""lblDID.Caption = ""End SubPrivate Sub cmdClose_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next Else MsgBox "Select the row then click the remove button.", vbInformation, "Information" End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf Frame1.Enabled = True Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfDim i As IntegerScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from DistributorOrderMaster", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("DOrdeNo") = Trim(txtOrderno.text)rs("DID") = Trim(lblDID.Caption)rs("ShopName") = Trim(cboDname.text)rs("OrderDate") = ODate.Valuers("DeliveryDate") = DDate.Valuers("FullOrNot") = "No"rs.Updaters.Closers.Open "select * from DistributorOrderDetails", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rs.AddNewrs("DOrderNo") = Trim(hsGrid.TextMatrix(i, 1))rs("ProductName") = Trim(hsGrid.TextMatrix(i, 3))rs("Cartoon") = hsGrid.TextMatrix(i, 4)rs("Piece") = hsGrid.TextMatrix(i, 5)rs.UpdateNext iCnn.CommitTransScreen.MousePointer = vbNormalrs.CloseCall cmdClear_ClickEnd SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFcboDname.AddItem Trim(rs(1))rs.MoveNextLooprs.Closers.Open "select * from Productinfo", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOF

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 200: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 CboProName.AddItem Trim(rs(0))rs.MoveNextLooprs.ClosehsGrid.TextMatrix(0, 0) = "SRNo"hsGrid.TextMatrix(0, 1) = "Order No"hsGrid.TextMatrix(0, 2) = "Distributor Name"hsGrid.TextMatrix(0, 3) = "Product Name"hsGrid.TextMatrix(0, 4) = "Carton"hsGrid.TextMatrix(0, 5) = "Pieces"remove = False

ODate.Value = DateDDate.Value = DateEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume Nextrs.CloseSet rs = NothingEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_Change()On Error Resume NexttxtPiece.text = Val(txtCarton.text) * Val(piece)End SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

DISTRIBUTOR PRODUCT OUT DETAILS

Dim rs As New ADODB.RecordsetDim remove As BooleanDim piece As DoublePrivate Sub cboCondition_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboDistributorName_Click()On Error Resume NextlblDID.Caption = ""cboDistributorOrderNo.clearcboDistributorOrderNo_Clickrs.Open "select * from DistributorInfo where ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblDID.Caption = rs("DID")rs.Closers.Open "select * from DistributorOrderMaster where ShopName='" & Trim(cboDistributorName.text) & "' and FullOrNot <> 'Full'", Cnn, adOpenDynamic, adLockOptimisticIf rs.EOF Then rs.Close Exit SubElse Do While Not rs.EOF cboDistributorOrderNo.AddItem Trim(rs("DOrdeNo")) rs.MoveNextLoopEnd Ifrs.CloseEnd SubPrivate Sub cboDistributorName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboDistributorOrderNo_Click()On Error Resume NextcboProductName.clearDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClient

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 201: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs1.Open "select ProductName,Cartoon,Piece from DistributorOrderDetails where DOrderNo='" & Trim(cboDistributorOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticSet OrderGrid.DataSource = rs1Do While Not rs1.EOF cboProductName.AddItem Trim(rs1("ProductName")) rs1.MoveNextLoopEnd SubPrivate Sub cboDistributorOrderNo_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboProductName_Click()On Error Resume NexttxtCarton.text = ""txtPiece.text = ""txtRatePiece.text = ""txtTotalAmount.text = ""piece = 0rs.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticpiece = rs("CartonPiece")txtRatePiece.text = rs("Price")rs.CloseEnd SubPrivate Sub cboProductName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf txtDInvoice.text = "" Then MsgBox "Please Enter An Invoice Number.", vbCritical + vbOKOnly txtDInvoice.SetFocus Exit SubElseIf cboDistributorName.text = "" Then MsgBox "Please Select the Distributor Name.", vbCritical + vbOKOnly cboDistributorName.SetFocus Exit SubElseIf cboDistributorOrderNo.text = "" Then MsgBox "Please Select An Order Number.", vbCritical + vbOKOnly cboDistributorOrderNo.SetFocus Exit SubElseIf txtPlace.text = "" Then MsgBox "Please Enter the Place Name.", vbCritical + vbOKOnly txtPlace.SetFocus Exit SubElseIf txtPageNo.text = "" Then MsgBox "Please Enter the Page Number.", vbCritical + vbOKOnly txtPageNo.SetFocus Exit Sub

ElseIf cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubEnd If Dim rs1 As New ADODB.Recordsetrs1.Open "select * from DistributorProductOutMaster where DInvoiceNo='" & Trim(txtDInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "This Gatepass Number Is Already Saved." & Chr(13) & "Enter Another GatePass No.", vbInformation + vbOKOnly txtDInvoice.SetFocusExit Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 202: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 End Ifrs1.Closers1.Open "select * from DistributorOrderMaster where DOrdeNo='" & Trim(cboDistributorOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf rs1("OrderDate") > DDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly DDate.SetFocus Exit SubEnd IfDim rs2 As New ADODB.Recordsetrs2.Open "select * from MainStock where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Val(txtCarton.text) > Val(rs2("Carton")) Then MsgBox "You Have Only " & rs2("Carton") & " Carton In Stock", vbCritical + vbOKOnly txtCarton.text = "" Exit Sub End Ifrs2.Close Dim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboProductName.text = hsGrid.TextMatrix(i, 2) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboProductName.SetFocus Exit SubEnd IfNext i cboDistributorName.Enabled = False cboDistributorOrderNo.Enabled = False txtPlace.Enabled = False txtTrackNo.Enabled = False txtDInvoice.Enabled = False txtDriverName.Enabled = False txtLedgerName.Enabled = False txtPageNo.Enabled = False DDate.Enabled = False Dim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtDInvoice.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.texthsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmount.text)cboProductName.text = ""txtCarton = ""txtPiece = ""txtRatePiece = ""txtTotalAmount = ""txtRemarks.text = ""End SubPrivate Sub cmdClear_Click()On Error Resume Next Dim k As Integer cboDistributorName.Enabled = True cboDistributorOrderNo.Enabled = True txtPlace.Enabled = True txtTrackNo.Enabled = True txtDInvoice.Enabled = True txtDriverName.Enabled = True txtLedgerName.Enabled = True txtPageNo.Enabled = True DDate.Enabled = True txtTransportCost.text = "" For k = hsGrid.Rows - 2 To 1 Step -1

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 203: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next ktxtGtotal.text = ""cboDistributorName.text = ""cboDistributorOrderNo.text = ""txtPlace.text = ""txtTrackNo.text = ""txtDInvoice.text = ""txtDriverName.text = ""txtLedgerName.text = ""txtPageNo.text = ""txtTransportCost.text = ""txtRemarks.text = ""lblDID.Caption = ""DDate.Value = DatecboDistributorOrderNo_ClickcboProductName.clearEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextDim i, j As IntegerDim rs1 As New ADODB.RecordsetIf Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfIf cboCondition.text = "" Then MsgBox "Please Select An Order Condition.", vbInformation + vbOKOnly cboCondition.SetFocus Exit SubEnd IfDim A As StringA = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo)If Not A = vbYes Then Exit SubEnd IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from DistributorProductOutMaster", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("DInvoiceNo") = Trim(txtDInvoice.text)rs("DeliveryDate") = DDate.Valuers("LagerName") = Trim(txtLedgerName.text)rs("PageNo") = Trim(txtPageNo.text)rs("DID") = Trim(lblDID.Caption)rs("OrderNo") = Trim(cboDistributorOrderNo.text)rs("Place") = Trim(txtPlace.text)rs("TrackNo") = Trim(txtTrackNo.text)rs("DriverName") = Trim(txtDriverName.text)rs("InvoiceAmount") = txtGtotal.textrs("PaidupAmount") = 0

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 204: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs("Balance") = txtGtotal.textrs("Total") = txtGtotal.textIf txtTransportCost.text = "" Thenrs("TransPortCost") = 0Elsers("TransPortCost") = txtTransportCost.textEnd Ifrs.Updaters.Closers.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("InvoiceAmount") = Val(rs("InvoiceAmount")) + Val(txtGtotal.text)rs("RecevalAmount") = Val(rs("RecevalAmount")) + Val(txtGtotal.text)rs.Updaters.Closers.Open "select * from DistributorProductOutDetails", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rs.AddNewrs("DInvoiceNo") = Trim(hsGrid.TextMatrix(i, 1))rs("ProductName") = Trim(hsGrid.TextMatrix(i, 2))rs("Cartoon") = hsGrid.TextMatrix(i, 3)rs("Piece") = hsGrid.TextMatrix(i, 4)rs("RatePerCartoon") = hsGrid.TextMatrix(i, 5)rs("TotalAmount") = hsGrid.TextMatrix(i, 6)rs("Remark") = hsGrid.TextMatrix(i, 7)rs.UpdateNext irs.CloseFor j = 1 To hsGrid.Rows - 2rs1.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 2)) & "'", Cnn, adOpenDynamic, adLockOptimisticrs1("Carton") = Val(rs1("Carton")) - Val(hsGrid.TextMatrix(j, 3))rs1("Piece") = Val(rs1("Piece")) - Val(hsGrid.TextMatrix(j, 4))rs1.Updaters1.CloseNext jrs.Open "select * from DistributorOrderMaster where DOrdeNo='" & Trim(cboDistributorOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("FullOrNot") = Trim(cboCondition.text)rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormalcboCondition.text = ""Call cmdClear_ClickEnd SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOFcboDistributorName.AddItem Trim(rs("ShopName"))rs.MoveNextLooprs.ClosehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "Invoice No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Carton"hsGrid.TextMatrix(0, 4) = "Pieces"hsGrid.TextMatrix(0, 5) = "Rate"hsGrid.TextMatrix(0, 6) = "Amount(TK)"hsGrid.TextMatrix(0, 7) = "Remarks"remove = FalsecboCondition.AddItem "More"cboCondition.AddItem "Full"cboCondition.AddItem "More Than Half"cboCondition.AddItem "Less Than Half "cboCondition.AddItem "Half"DDate.Value = DateEnd Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 205: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Private Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_Change()On Error Resume NexttxtPiece.text = ""txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text)txtPiece.text = Val(txtCarton.text) * Val(piece)End SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtPiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtRatePiece_Change()On Error Resume NexttxtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text)End SubPrivate Sub txtRatePiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtTransportCost_Change()On Error Resume NextDim k As IntegertxtGtotal.text = ""For k = hsGrid.Rows - 2 To 1 Step -1txtGtotal.text = Val(txtGtotal.text) + hsGrid.TextMatrix(k, 6)Next ktxtGtotal.text = Val(txtGtotal.text) + Val(txtTransportCost.text)End SubPrivate Sub txtTransportCost_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

Distributor Advance Payment

Dim rs As New ADODB.RecordsetPrivate Sub cboDistributorName_Click()On Error Resume NextDim rs1 As New ADODB.RecordsetlblDID.Caption = ""txtAmount.text = ""rs1.Open "select DID from DistributorInfo where ShopName='" & Trim(cboDistributorName.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticlblDID.Caption = Trim(rs1(0))rs1.CloseCall GdEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf cboDistributorName.text = "" ThenMsgBox "Please Select the Distributor Name", vbCritical + vbOKOnlycboDistributorName.SetFocusCall GdExit SubElseIf txtMRNo.text = "" ThenMsgBox "please Enter Money Receit No.", vbCritical + vbOKOnlytxtMRNo.SetFocusCall GdExit SubElseIf cboPayType.text = "" ThenMsgBox "please Select pay type.", vbCritical + vbOKOnlycboPayType.SetFocusCall GdExit Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 206: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 ElseIf txtAmount.text = "" ThenMsgBox "Please Enter amount.", vbCritical + vbOKOnlytxtAmount.SetFocusCall GdExit SubElseIf txtAmount.text = 0 ThenMsgBox "Please Enter amount.", vbCritical + vbOKOnlytxtAmount.SetFocusExit SubCall GdEnd IfScreen.MousePointer = vbHourglassrs.Open "select * from DistributorAdvancePayment", Cnn, adOpenDynamic, adLockOptimisticrs.AddNewrs("DID") = Trim(lblDID.Caption)rs("Shopname") = Trim(cboDistributorName.text)rs("PayDate") = PayDate.Valuers("Mrno") = Trim(txtMRNo.text)rs("PayType") = Trim(cboPayType.text)rs("Amount") = txtAmount.textrs.Updaters.CloseCall Gdrs.Open "select * from DistributorAdvanceAC where DID='" & Trim(lblDID.Caption) & "' and ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("Amount") = Val(rs("Amount")) + Val(txtAmount.text)rs.Updaters.CloseCall Gdrs.Open "select * from DistributorACStatus where DID='" & Trim(lblDID.Caption) & "' and ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("Paidupamount") = Val(rs("Paidupamount")) + Val(txtAmount.text)rs("RecevalAmount") = Val(rs("RecevalAmount")) - Val(txtAmount.text)rs.Updaters.CloseCall GdScreen.MousePointer = vbNormalUnload MeLoad MeEnd SubPrivate Sub Form_Load()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF ThenDo While Not rs1.EOF cboDistributorName.AddItem Trim(rs1("ShopName")) rs1.MoveNextLoopEnd Ifrs1.CloseCall GdcboPayType.AddItem "CASH", 0cboPayType.AddItem "CHEQUE", 1cboPayType.AddItem "DD", 2cboPayType.AddItem "PAY ORDER", 3cboPayType.AddItem "TT", 4PayDate.Value = DateEnd SubPrivate Sub Gd()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "Select * from DistributorAdvancePayment", Cnn, adOpenDynamic, adLockOptimisticSet DataGrid.DataSource = rs1End Sub

DISTRIBUTOR MONEY RECEIPT

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 207: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Dim rs As New ADODB.RecordsetDim remove As BooleanPrivate Sub cboBankName_Click() Dim rsB As New ADODB.Recordset rsB.Open "select BranchName from NewBankInfo where BankName='" & Trim(cboBankName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic Do While Not rsB.EOF cboBranchName.AddItem rsB("BranchName") rsB.MoveNext Loop rsB.CloseEnd SubPrivate Sub cboBranchName_Click() cboAccNumber.clear Dim rsA As New ADODB.Recordset rsA.Open "select AccountNumber from NewBankInfo where BankName='" & Trim(cboBankName.text) & "' And BranchName='" & Trim(cboBranchName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic Do While Not rsA.EOF cboAccNumber.AddItem rsA("AccountNumber") rsA.MoveNext Loop rsA.CloseEnd SubPrivate Sub cboDInvoice_Click()On Error Resume NexttxtAmount.text = ""txtBalance.text = ""txtInvoiceAmount.text = ""rs.Open "select * from DistributorProductOutMaster where DInvoiceNo= '" & Trim(cboDInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistictxtInvoiceAmount.text = rs("Balance")rs.CloseEnd SubPrivate Sub cboDInvoice_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboDistributorName_Click()On Error Resume NexttxtAdvanceMoney.text = ""txtTotalBalance.text = ""txtBalanceAdvance.text = ""txtBalance.text = ""txtInvoiceAmount.text = ""cboDInvoice.clearlblDID.Caption = ""txtAmount.text = ""rs.Open "select DID from DistributorInfo where ShopName='" & Trim(cboDistributorName.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticlblDID.Caption = Trim(rs(0))rs.Closers.Open "select DInvoiceNo from DistributorProductOutMaster where DID= '" & Trim(lblDID.Caption) & "' and Balance > '" & 0 & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF ThenDo While Not rs.EOF cboDInvoice.AddItem Trim(rs("DInvoiceNo")) rs.MoveNextLooprs.ClosecboDInvoice.ListIndex = 0End IfDim rs1 As New ADODB.Recordsetrs1.Open "select * from DistributorAdvanceAC where DID='" & Trim(lblDID.Caption) & "' and ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF ThentxtAdvanceMoney.text = rs1("Amount")End IfEnd SubPrivate Sub cboDistributorName_KeyPress(KeyAscii As Integer)KeyAscii = 0

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 208: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 End SubPrivate Sub cboPayType_Click()If cboPayType.text = "BY BANK" ThentxtCheckNo.Visible = TruecboAccNumber.Visible = TruecboBankName.Visible = TruecboBranchName.Visible = TrueLabel15.Visible = TrueLabel19.Visible = TrueLabel20.Visible = TrueLabel14.Visible = TrueElsetxtCheckNo.Visible = FalsecboAccNumber.Visible = FalsecboBankName.Visible = FalsecboBranchName.Visible = FalseLabel15.Visible = FalseLabel19.Visible = FalseLabel20.Visible = FalseLabel14.Visible = FalseEnd IfEnd SubPrivate Sub cboPayType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextDim rs1 As New ADODB.RecordsetDim Amount As DoubleAmount = 0If cboDistributorName.text = "" Then MsgBox "Please Select The Distributor Name.", vbCritical + vbOKOnly cboDistributorName.SetFocus Exit SubElseIf cboDInvoice.text = "" Then MsgBox "Please Select An Invoice No.", vbCritical + vbOKOnly cboDInvoice.SetFocus Exit SubElseIf txtMRNo.text = "" Then MsgBox "Please Enter The Money Receipt No.", vbCritical + vbOKOnly txtMRNo.SetFocus Exit SubElseIf cboPayType.text = "" Then MsgBox "Please Select The Payment Type.", vbCritical + vbOKOnly cboPayType.SetFocus Exit SubElseIf txtAmount.text = "" Then MsgBox "Please Enter The Paidup Amount.", vbCritical + vbOKOnly txtAmount.SetFocus Exit SubElseIf txtAmount.text = 0 Then MsgBox "Please Enter The Paidup Amount.", vbCritical + vbOKOnly txtAmount.SetFocus Exit SubEnd Ifrs1.Open "select * from DistributorMR where MRNo='" & Trim(txtMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF ThenMsgBox "This Money Receipt Is Already Existed", vbCritical + vbOKOnlytxtMRNo.SetFocustxtCashPay.text = ""Exit SubEnd Ifrs1.Closers1.Open "select DeliveryDate from DistributorProductOutMaster where DID= '" & Trim(lblDID.Caption) & "' and DInvoiceNo='" & Trim(cboDInvoice.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticIf rs1("DeliveryDate") > PayDate.Value ThenMsgBox "Payment Date Can Not Be Less Than Delivery Date." & Chr(13) & "Delivary Date Is :" & rs1("DeliveryDate"), vbInformation + vbCriticalPayDate.SetFocus

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 209: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Exit SubEnd Ifrs1.Closers1.Open "select * from DistributorMR where MRNo='" & Trim(txtMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF ThenMsgBox "This Money Receipt is Already Existed.", vbCritical + vbOKOnlytxtMRNo.SetFocusrs1.CloseExit SubEnd IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboDInvoice.text = hsGrid.TextMatrix(i, 1) Then MsgBox "This Information already exists." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboDInvoice.SetFocus Exit SubEnd IfNext iintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboDInvoice.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = txtAmount.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtBalanceAdvance.text 'ahsGrid.TextMatrix(hsGrid.Rows - 1, 4) = cboBankName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = cboBranchName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = cboAccNumber.texthsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtCheckNo.texthsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtCashPay.text)txtTotalBalance.text = Val(txtTotalBalance.text) + Val(txtBalanceAdvance.text)cboDistributorName.Enabled = FalsetxtMRNo.Enabled = FalsePayDate.Enabled = FalsecboPayType.Enabled = FalsetxtBalance.text = ""txtCashPay.text = ""txtInvoiceAmount.text = ""txtAmount.text = ""cboDInvoice.text = ""txtBalanceAdvance.text = ""End SubPrivate Sub cmdClear_Click()On Error Resume NextDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboDistributorName.Enabled = TruetxtMRNo.Enabled = TruePayDate.Enabled = TruecboPayType.Enabled = TruecboDistributorName.text = ""txtMRNo.text = ""PayDate.Value = DatecboPayType.text = ""txtAmount.text = ""cboDInvoice.text = ""txtInvoiceAmount.text = ""txtBalance.text = ""txtGtotal.text = ""lblDID.Caption = ""txtAdvanceMoney.text = "" 'atxtBalanceAdvance.text = "" 'atxtTotalBalance.text = "" 'aEnd SubPrivate Sub cmdexit_Click()Unload MeEnd Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 210: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Private Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 2)) txtTotalBalance.text = Val(txtTotalBalance.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 3)) 'a hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()On Error Resume NextIf Not hsGrid.GridColor > 2 Then MsgBox "Sorry! You First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfDim A As StringA = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo)If Not A = vbYes Then Exit SubEnd IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from DistributorMR", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rs.AddNewrs("DID") = Trim(lblDID.Caption)rs("DInvoiceNo") = Trim(hsGrid.TextMatrix(i, 1))rs("MRNo") = Trim(txtMRNo.text)rs("PayType") = Trim(cboPayType.text)rs("PayDate") = PayDate.Valuers("TotalAmount") = Trim(hsGrid.TextMatrix(i, 2))rs("BankName") = Trim(hsGrid.TextMatrix(i, 4))rs("Branchname") = Trim(hsGrid.TextMatrix(i, 5))rs("AccountNo") = Trim(hsGrid.TextMatrix(i, 6))rs("CheckNo") = Trim(hsGrid.TextMatrix(i, 7))rs.UpdateNext irs.CloseFor i = 1 To hsGrid.Rows - 2rs.Open "select * from DistributorProductOutMaster where DInvoiceNo='" & Trim(hsGrid.TextMatrix(i, 1)) & "'", Cnn, adOpenDynamic, adLockOptimisticAmount = Val(rs("PaidupAmount")) + Val(hsGrid.TextMatrix(i, 2)) ' + Val(hsGrid.TextMatrix(i, 3)) 'ars("PaidupAmount") = Amountrs("Balance") = Val(rs("InvoiceAmount")) - Val(Amount)rs.Updaters.CloseNext irs.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimisticAmount = 0Amount = Val(rs("PaidupAmount")) + Val(txtGtotal.text)rs("PaidupAmount") = Amountrs("RecevalAmount") = Val(rs("InvoiceAmount")) - Val(Amount)rs.Updaters.Closers.Open "select * from DistributorAdvanceAC where DID='" & Trim(lblDID.Caption) & adLockOptimisticrs("Amount") = Val(rs("Amount")) - Val(txtTotalBalance.text)rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormalCall cmdClear_ClickEnd SubPrivate Sub Form_Load()

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 211: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 On Error Resume Nextrs.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF ThenDo While Not rs.EOF cboDistributorName.AddItem Trim(rs("ShopName")) rs.MoveNextLoopEnd Ifrs.Close

cboPayType.AddItem "CASH", 0cboPayType.AddItem "BY BANK", 1PayDate.Value = DatehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "Invoice No"hsGrid.TextMatrix(0, 2) = "Amount"hsGrid.TextMatrix(0, 3) = "Advance"remove = FalsetxtCheckNo.Visible = FalsecboAccNumber.Visible = FalsecboBankName.Visible = FalsecboBranchName.Visible = FalseLabel15.Visible = FalseLabel19.Visible = FalseLabel20.Visible = FalseLabel14.Visible = FalseDim rsB As New ADODB.RecordsetrsB.Open "select * from NewBankInfo", Cnn, adOpenDynamic, adLockOptimisticIf Not rsB.EOF ThenDo While Not rsB.EOF cboBankName.AddItem Trim(rsB("BankName")) rsB.MoveNextLoopEnd IfrsB.CloseEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume NextSet rs = NothingEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtAmount_Change()On Error Resume NextIf Val(txtAmount.text) > Val(txtInvoiceAmount.text) Then 'txtAmount.text MsgBox "Paidup Amount Can Not be Greater Than Invoice Amount.", vbCritical + vbOKOnly txtAmount.text = "" txtBalanceAdvance.text = "" txtCashPay.text = "" txtBalance.text = "" txtBalanceAdvance.SetFocus Exit SubEnd IftxtBalance.text = Val(txtInvoiceAmount.text) - Val(txtAmount.text) End SubPrivate Sub txtAmount_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtBalanceAdvance_Change()On Error Resume NextIf Val(txtBalanceAdvance.text) > Val(txtAdvanceMoney) ThenMsgBox "This Amount Can not be grater than Advance Amount.", vbInformation + vbOKOnlytxtBalanceAdvance.text = 0txtBalance.text = ""txtAmount.text = txtCashPay.textElsetxtAmount.text = Val(txtCashPay.text) + Val(txtBalanceAdvance.text)End If

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 212: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 End SubPrivate Sub txtBalanceAdvance_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtCashPay_Change()On Error Resume NextIf Val(txtCashPay.text) > Val(txtInvoiceAmount.text) ThenMsgBox "This Amount Can not be grater than Invoice Amount.", vbInformation + vbOKOnlytxtCashPay.text = 0txtAmount.text = txtBalanceAdvance.textElsetxtAmount.text = Val(txtCashPay.text) + Val(txtBalanceAdvance.text)End IfEnd Sub

DISTRIBUTOR PRODUCT RETURN

Dim rs As New ADODB.RecordsetDim remove As BooleanDim piece As DoublePrivate Sub cboCondition_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboDistributorName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboInvoice_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.CursorLocation = adUseClientrs1.Open "select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticSet ReturnGrid.DataSource = rs1cboProductName.clearrs.Open "select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOFcboProductName.AddItem Trim(rs("ProductName"))rs.MoveNextLooprs.CloseEnd SubPrivate Sub cboInvoice_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboProductName_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetrs1.Open "select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboInvoice.text) & "' And ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistictxtRateCarton.text = rs1("RatePerCartoon")rs1.Closepiece = 0rs1.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticpiece = rs1("CartonPiece")rs1.ClosetxtCarton.text = ""txtPiece.text = ""End SubPrivate Sub cboProductName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextDim ROW As IntegerIf cboInvoice.text = "" Then MsgBox "Please Select An Invoice Number.", vbCritical + vbOKOnly cboInvoice.SetFocus

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 213: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Exit SubElseIf cboDistributorName.text = "" Then MsgBox "Please Select the Distributor Name.", vbCritical + vbOKOnly cboDistributorName.SetFocus Exit SubElseIf cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubEnd If Dim rs1 As New ADODB.Recordset rs1.Open "select * from DistributorReturn where DInvoice='" & Trim(cboInvoice.text) & "' and ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "These Records are Already Existed Insert Another Invoice No.", vbCritical + vbOKOnly rs1.Close Exit SubEnd Ifrs1.Closers1.Open "select DeliveryDate from DistributorProductOutMaster where DInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf RDate.Value < rs1("DeliveryDate") Then MsgBox "Return Date Can Not Be Less Than Delivery Date." & Chr(13) & "Delivery Date Was " & rs1("DeliveryDate") & ".", vbInformation + vbOKOnly RDate.SetFocus Exit SubEnd Ifrs1.Closers1.Open "select Cartoon from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboInvoice.text) & "' And ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Val(txtCarton.text) > Val(rs1("Cartoon")) Then MsgBox "Return Carton Quantity Must Be Less Than Delivered Quantity." & Chr(13) & "Delivered Carton Quantity Was " & rs1("Cartoon"), vbInformation + vbOKOnly txtCarton.SetFocus Exit SubEnd Ifrs1.CloseROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboProductName = hsGrid.TextMatrix(i, 1) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboProductName.SetFocus Exit SubEnd IfNext i cboDistributorName.Enabled = False cboInvoice.Enabled = False cboCondition.Enabled = False RDate.Enabled = False Dim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboProductName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtPiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtRateCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtTotalAmount.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmount.text)cboProductName.text = ""

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 214: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 txtCarton = ""txtPiece = ""txtRateCarton = ""txtTotalAmount = ""txtRemarks.text = ""End SubPrivate Sub cmdClear_Click() On Error Resume Next Dim k As Integer cboDistributorName.Enabled = True cboInvoice.Enabled = True cboCondition.Enabled = True RDate.Enabled = True For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboProductName.text = ""txtCarton = ""txtPiece = ""txtRatePiece = ""txtTotalAmount = ""txtRemarks.text = "" cboDistributorName.text = "" cboInvoice.text = "" cboCondition.text = "" RDate.Value = DatetxtGtotal.text = ""Call cboInvoice_ClicklblDID.Caption = ""cboProductName.clearEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGtotal.text = Val(txtGtotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 5)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cboDistributorName_Click()On Error Resume NextlblDID.Caption = ""cboInvoice.clearrs.Open "select * from DistributorInfo where ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblDID.Caption = rs("DID")rs.CloseCall cboInvoice_Clickrs.Open "select DInvoiceNo from DistributorProductOutMaster where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimisticIf rs.EOF Then rs.Close Exit SubElse Do While Not rs.EOF cboInvoice.AddItem Trim(rs("DInvoiceNO")) rs.MoveNextLoopEnd Ifrs.Close

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 215: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

End SubPrivate Sub cmdSave_Click()On Error Resume NextDim k As IntegerDim i, j As IntegerDim rs1 As New ADODB.RecordsetIf Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfIf rs.State = adStateOpen Then rs.Close Set rs = NothingEnd IfDim A As StringA = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo)If Not A = vbYes Then Exit SubEnd IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "select * from DistributorProductOutMaster where DInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("InvoiceAmount") = Val(rs("InvoiceAmount")) - Val(txtGtotal.text)rs("Balance") = rs("Balance") - Val(txtGtotal.text)rs.Updaters.Closers.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("InvoiceAmount") = Val(rs("InvoiceAmount")) - Val(txtGtotal.text)rs("RecevalAmount") = Val(rs("RecevalAmount")) - Val(txtGtotal.text)rs.Updaters.Closers.Open "select * from DistributorReturn ", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rs.AddNewrs("DID") = Trim(lblDID.Caption)rs("DInvoice") = Trim(cboInvoice.text)rs("Condition") = Trim(cboCondition.text)rs("ReturnDate") = RDate.Valuers("ProductName") = Trim(hsGrid.TextMatrix(i, 1))rs("Carton") = hsGrid.TextMatrix(i, 2)rs("Piece") = hsGrid.TextMatrix(i, 3)rs("RateCarton") = hsGrid.TextMatrix(i, 4)rs("TotalAmount") = hsGrid.TextMatrix(i, 5)If Not hsGrid.TextMatrix(i, 6) = "" Thenrs("Remarks") = Trim(hsGrid.TextMatrix(i, 6))Elsers("Remarks") = " "End Ifrs.UpdateNext irs.CloseIf cboCondition.text = "Good" ThenFor j = 1 To hsGrid.Rows - 2rs.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("Carton") = Val(rs("Carton")) + Val(hsGrid.TextMatrix(j, 2))rs("Piece") = Val(rs("Piece")) + Val(hsGrid.TextMatrix(j, 3))rs.Updaters.CloseNext jElseIf cboCondition.text = "Bad" ThenFor j = 1 To hsGrid.Rows - 2rs.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("BadCarton") = Val(rs("BadCarton")) + Val(hsGrid.TextMatrix(j, 2))rs("BadPiece") = Val(rs("BadPiece")) + Val(hsGrid.TextMatrix(j, 3))rs.Update

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 216: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs.CloseNext jEnd IfCnn.CommitTransScreen.MousePointer = vbNormalCall cmdClear_Click End SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs.EOFcboDistributorName.AddItem Trim(rs("ShopName"))rs.MoveNextLooprs.ClosehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "Product Name"hsGrid.TextMatrix(0, 2) = "Carton"hsGrid.TextMatrix(0, 3) = "Pieces"hsGrid.TextMatrix(0, 4) = "Rate"hsGrid.TextMatrix(0, 5) = "Amount(TK)"hsGrid.TextMatrix(0, 6) = "Remarks"remove = False

cboCondition.AddItem "Good", 0cboCondition.AddItem "Bad", 1cboCondition.ListIndex = 0RDate.Value = DateEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume NextSet rs = NothingEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_Change()On Error Resume NexttxtPiece.text = Val(txtCarton.text) * Val(piece)txtTotalAmount.text = Val(txtCarton.text) * Val(txtRateCarton.text)End SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

DISTRIBUTOR PRODUCT LOSS ADJUST(Yearly)

Dim rs As New ADODB.RecordsetDim remove As BooleanDim piece As DoublePrivate Sub cboDInvoice_Click()On Error Resume NextDim rs1 As New ADODB.RecordsettxtAmount.text = ""txtBalance.text = ""txtInvoiceAmount.text = ""cboProductName.clearrs1.Open "select * from DistributorProductOutMaster where DInvoiceNo= '" & Trim(cboDInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF ThentxtInvoiceAmount.text = rs1("Balance")End Ifrs1.Closers1.CursorLocation = adUseClientrs1.Open "Select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboDInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs1.EOF cboProductName.AddItem Trim(rs1("ProductName")) rs1.MoveNext

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 217: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 LoopSet LossGrid.DataSource = rs1End SubPrivate Sub cboDInvoice_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboDistributorName_Click()On Error Resume NextDim rs1 As New ADODB.RecordsetcboDInvoice.clearrs1.Open "select DID from DistributorInfo where ShopName='" & Trim(cboDistributorName.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticlblDID.Caption = Trim(rs1(0))rs1.Closers1.Open "select DInvoiceNo from DistributorProductOutMaster where DID= '" & Trim(lblDID.Caption) & "' and Balance > '" & 0 & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF ThenDo While Not rs1.EOF cboDInvoice.AddItem Trim(rs1("DInvoiceNo")) rs1.MoveNextLooprs1.ClosecboDInvoice.ListIndex = 0End IfEnd SubPrivate Sub cboDistributorName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboProductName_Click()On Error Resume NextDim rs1 As New ADODB.Recordsetpiece = 0rs1.Open "select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboDInvoice.text) & "' And ProductName='" & Trim(cboProductName.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticpiece = rs1("Piece")rs1.CloseEnd SubPrivate Sub cboProductName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdClear_Click() On Error Resume Next Dim k As Integer cboDistributorName.Enabled = True AdjustDate.Enabled = True cboDInvoice.Enabled = True For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboProductName.text = ""txtAmount.text = ""txtPiece.text = ""cboDInvoice.text = ""txtBalance.text = ""txtInvoiceAmount.text = ""txtGrandTotal.text = ""cboDistributorName.text = ""AdjustDate.Value = DatecboDInvoice.text = ""txtRemarks.text = ""lblDID.Caption = ""Call cboDInvoice_ClickEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGrandTotal.text = Val(txtGrandTotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 4)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0))

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 218: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information" End IfEnd SubPrivate Sub cmdAdd_Click()On Error Resume NextIf cboDistributorName.text = "" Then MsgBox "Please Select the Distributor Name.", vbCritical + vbOKOnly cboDistributorName.SetFocus Exit SubElseIf cboDInvoice.text = "" Then MsgBox "Please Select the Invoice Number.", vbCritical + vbOKOnly cboDInvoice.SetFocus Exit SubElseIf cboProductName.text = "" Then MsgBox "Please Select the Product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtAmount.text = 0 Then MsgBox "Please Enter Amount.", vbCritical + vbOKOnly txtAmount.SetFocus Exit SubEnd IfDim rs1 As New ADODB.Recordsetrs1.Open "select * from DistributorProductLossAdjust where DInvoiceNo='" & Trim(cboDInvoice.text) & "' And ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs1.EOF Then MsgBox "This Product name is Already Saved." & Chr(13) & "Insert Information for Another Product .", vbInformation + vbOKOnly cboProductName.SetFocus Exit SubEnd Ifrs1.CloseDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboProductName.text = hsGrid.TextMatrix(i, 2) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboProductName.SetFocus Exit SubEnd IfNext iDim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboDInvoice.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtPiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtAmount.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtAmount.text)cboDistributorName.Enabled = FalseAdjustDate.Enabled = FalsecboDInvoice.Enabled = FalsecboProductName.text = ""txtAmount.text = ""txtPiece.text = ""End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSave_Click()On Error Resume NextDim i, j As IntegerIf Not hsGrid.Rows > 2 Then

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 219: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit SubEnd IfIf rs.State = adStateOpen Then rs.Close Set rs = NothingEnd IfCnn.BeginTransScreen.MousePointer = vbHourglassrs.Open "select * from DistributorProductLossAdjust", Cnn, adOpenDynamic, adLockOptimisticFor i = 1 To hsGrid.Rows - 2rs.AddNewrs("DID") = Trim(lblDID.Caption)rs("DInvoiceNo") = Trim(hsGrid.TextMatrix(i, 1))rs("ProductName") = Trim(hsGrid.TextMatrix(i, 2))rs("LostPiece") = hsGrid.TextMatrix(i, 3)rs("Amount") = hsGrid.TextMatrix(i, 4)rs("Remarks") = hsGrid.TextMatrix(i, 5)rs("AdjustDate") = AdjustDate.Valuers.UpdateNext irs.CloseFor j = 1 To hsGrid.Rows - 2rs.Open "select * from DistributorProductOutMaster where DInvoiceNo='" & Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("InvoiceAmount") = Val(rs("InvoiceAmount")) - Val(hsGrid.TextMatrix(j, 4))rs("Balance") = Val(rs("Balance")) - Val(hsGrid.TextMatrix(j, 4))rs.Updaters.CloseNext jrs.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("InvoiceAmount") = Val(rs("InvoiceAmount")) - Val(txtGrandTotal.text)rs("RecevalAmount") = Val(rs("RecevalAmount")) - Val(txtGrandTotal.text)rs.Updaters.CloseCnn.CommitTransScreen.MousePointer = vbNormalCall cmdClear_ClickAdjustDate.Value = DateEnd SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF ThenDo While Not rs.EOF cboDistributorName.AddItem Trim(rs("ShopName")) rs.MoveNextLoopEnd Ifrs.ClosehsGrid.TextMatrix(0, 0) = "SRNo"hsGrid.TextMatrix(0, 1) = "Invoice No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Pieces"hsGrid.TextMatrix(0, 4) = "Amount(TK)"hsGrid.TextMatrix(0, 5) = "Remarks"remove = FalseAdjustDate.Value = DateEnd SubPrivate Sub Form_Unload(Cancel As Integer)On Error Resume NextSet rs = NothingEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtAmount_Change()On Error Resume NextIf Val(txtAmount.text) > Val(txtInvoiceAmount.text) Then

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 220: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 MsgBox "Adjust Amount Can Not Greater Than Invoice Amount.", vbCritical + vbOKOnly txtAmount.text = "" txtAmount.SetFocus Exit SubEnd IfEnd SubPrivate Sub txtAmount_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtGrandTotal_Change()On Error Resume NexttxtBalance.text = Val(txtInvoiceAmount.text) - Val(txtGrandTotal.text)End Sub

Private Sub txtPiece_Change()On Error Resume NextIf Val(piece) <= Val(txtPiece.text) Then MsgBox "Adjust Piece Can Not Be Greater Than Delivery Product Piece Quantity.", vbCritical + vbOKOnly txtPiece.text = ""End IfEnd SubPrivate Sub txtPiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

CARTON WISE DISTRIBUTOR EXECUTIVE COMMISION

Dim rs1 As New ADODB.RecordsetDim rs2 As New ADODB.RecordsetDim rs3 As New ADODB.RecordsetDim remove As BooleanPrivate Sub cboMarketingName_Click()lblMID.Caption = ""rs3.Open "select * from DistributorInfo where ShopName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblMID.Caption = rs3("DID")rs3.CloseEnd SubPrivate Sub cboMarketingName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub CboProName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdAdd_Click()On Error Resume NextIf cboMarketingName.text = "" Then MsgBox "Please Select the Distributor Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit SubElseIf CboProName.text = "" Then MsgBox "Please Select the Product(Soap) Name.", vbCritical + vbOKOnly CboProName.SetFocus Exit SubElseIf Val(txtCarton.text) = 0 Then MsgBox "Please enter total carton number;Zero will not be accepted.", vbCritical + vbOKOnly txtCarton.text = "" txtCarton.SetFocus Exit SubElseIf Val(txtRatePerCarton.text) = 0 Then MsgBox "Please Enter Rate per Carton;Zero will not be accepted.", vbCritical + vbOKOnly txtRatePerCarton.text = "" txtRatePerCarton.SetFocus Exit Sub End If Dim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboMarketingName.text = hsGrid.TextMatrix(i, 2) And Me.CboProName.text = hsGrid.TextMatrix(i, 3) Then

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 221: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboMarketingName.text = "" lblMID.Caption = "" CboProName.text = "" txtCarton.text = "" txtRatePerCarton.text = "" txtTotalAmount.text = "" CboProName.SetFocus Exit SubEnd IfNext iDim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = ComDate.ValuehsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboMarketingName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = CboProName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePerCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.texthsGrid.Rows = hsGrid.Rows + 1txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtTotalAmount.text)cboMarketingName.text = ""lblMID.Caption = ""CboProName.text = ""txtCarton.text = ""txtRatePerCarton.text = ""txtTotalAmount.text = ""cmdSave.Enabled = TrueEnd SubPrivate Sub cmdClear_Click()On Error Resume NextDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboMarketingName.text = ""lblMID.Caption = ""CboProName.text = ""txtCarton.text = ""txtRatePerCarton.text = ""txtTotalAmount.text = ""ComDate.Value = DatetxtGrandTotal.text = ""End SubPrivate Sub cmdClose_Click()Unload MeEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then txtGrandTotal.text = Val(txtGrandTotal.text) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()Dim A As StringA = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo)If Not A = vbYes Then Exit SubEnd If

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 222: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Screen.MousePointer = vbHourglassCnn.BeginTransDim rsnew As New ADODB.Recordsetrsnew.Open "Select * from DistributorCommission", Cnn, adOpenDynamic, adLockOptimisticDim i As IntegerFor i = 1 To hsGrid.Rows - 2rsnew.AddNewrsnew("CommissionDate") = hsGrid.TextMatrix(i, 1)rsnew("ShopName") = Trim(hsGrid.TextMatrix(i, 2))rsnew("ProductName") = Trim(hsGrid.TextMatrix(i, 3))rsnew("TotCartonNumber") = Val(hsGrid.TextMatrix(i, 4))rsnew("RatePerCartoon") = hsGrid.TextMatrix(i, 5)rsnew("TotAmount") = Val(hsGrid.TextMatrix(i, 6))rsnew.UpdateNext irsnew.CloseCnn.CommitTransScreen.MousePointer = vbNormalCall clearcmdSave.Enabled = FalseEnd SubPrivate Sub Form_Load()ComDate.Value = DatecmdSave.Enabled = Falsers1.Open "select distinct ShopName from DistributorInfo order by ShopName", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs1.EOF cboMarketingName.AddItem Trim(rs1("ShopName")) rs1.MoveNextLooprs1.Closers2.Open "select Distinct ProductName from Productinfo order by ProductName", Cnn, adOpenDynamic, adLockOptimisticrs2.MoveFirstDo While Not rs2.EOFCboProName.AddItem Trim(rs2("ProductName"))rs2.MoveNextLooprs2.ClosehsGrid.TextMatrix(0, 0) = "Serial"hsGrid.TextMatrix(0, 1) = "Comm.Date"hsGrid.TextMatrix(0, 2) = "Distributor Name"hsGrid.TextMatrix(0, 3) = "Product Name"hsGrid.TextMatrix(0, 4) = "Total Carton No"hsGrid.TextMatrix(0, 5) = "Carton Rate"hsGrid.TextMatrix(0, 6) = "Total Amount"hsGrid.ColWidth(1) = hsGrid.ColWidth(1) + 200hsGrid.ColWidth(2) = hsGrid.ColWidth(2) + 700hsGrid.ColWidth(3) = hsGrid.ColWidth(3) + 350hsGrid.ColWidth(4) = hsGrid.ColWidth(4) + 500hsGrid.ColWidth(5) = hsGrid.ColWidth(5) + 250hsGrid.ColWidth(6) = hsGrid.ColWidth(6) + 500

End SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call ValidationNotPoint(KeyAscii)End SubPrivate Sub txtRatePerCarton_Change()Dim AA As DoubleAA = FormatNumber(Val(txtCarton.text) * Val(txtRatePerCarton.text), 0)txtTotalAmount.text = Val(AA)End SubPrivate Sub txtRatePerCarton_KeyPress(KeyAscii As Integer)Call Validationwithpoint(KeyAscii)End SubPrivate Sub txtTotalAmount_KeyPress(KeyAscii As Integer)Call ValidationNotPoint(KeyAscii)End Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 223: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Public Sub clear()On Error Resume NextDim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboMarketingName.text = ""lblMID.Caption = ""CboProName.text = ""txtCarton.text = ""txtRatePerCarton.text = ""txtTotalAmount.text = ""ComDate.Value = DatetxtGrandTotal.text = ""End Sub

UpdateSales Executive Product Out Update

Dim piece As IntegerDim remove As BooleanPrivate Sub cboMarketingName_Click()On Error Resume NextlblMID.Caption = ""rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblMID.Caption = rs("MID")rs.ClosecboMInvoice.clearrs.Open "select * from MarketingProductOutMaster where MName='" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF Then Do While Not rs.EOF cboMInvoice.AddItem Trim(rs("MInvoiceNo")) rs.MoveNext LoopEnd Ifrs.CloseEnd SubPrivate Sub cboMInvoice_Click()On Error Resume NextlblOrderno.Caption = ""lblDate.Caption = ""rs1.Open "select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(cboMInvoice.text) & "' order by DeliveryDate", Cnn, adOpenDynamic, adLockOptimisticlblOrderno.Caption = rs1("MOrderNo")lblDate.Caption = rs1("DeliveryDate")rs1.CloseEnd SubPrivate Sub cboProductName_Click()On Error Resume NexttxtCarton.text = ""txtPiece.text = ""txtRatePiece.text = ""txtTotalAmount.text = ""Dim rs1 As New ADODB.Recordsetpiece = 0rs1.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticpiece = rs1("CartonPiece")txtRatePiece.text = rs1("Price")rs1.CloseEnd SubPrivate Sub cmdAdd_Click()On Error Resume NextIf cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 224: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 ElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtRatePiece.text = "" Then MsgBox "Please Enter the Rate per Carton.", vbCritical + vbOKOnly txtRatePiece.SetFocus Exit Sub End IfDim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboProductName.text = hsGrid.TextMatrix(i, 2) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboProductName.SetFocus Exit SubEnd IfNext iDim A As StringA = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo)If Not A = vbYes Then Exit SubEnd IfDim rsUp As New ADODB.RecordsetScreen.MousePointer = vbHourglasCnn.BeginTransrsUp.Open "select * from MarketingProductOutMaster where MInvoiceNo ='" & Trim(cboMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrsUp("InvoiceAmount") = Val(rsUp("InvoiceAmount")) + Val(txtTotalAmount.text)rsUp("Balance") = Val(rsUp("Balance")) + Val(txtTotalAmount.text)rsUp.UpdatersUp.ClosersUp.Open "select * from MarketingProductOutDetails", Cnn, adOpenDynamic, adLockOptimisticrsUp.AddNewrsUp("MInvoiceNo") = Trim(cboMInvoice.text)rsUp("ProductName") = Trim(cboProductName.text)rsUp("Carton") = txtCarton.textrsUp("Piece") = txtPiece.textrsUp("RatePerCarton") = txtRatePiece.textrsUp("TotalAmount") = txtTotalAmount.textrsUp("Remarks") = Trim(txtRemarks.text)rsUp.UpdatersUp.ClosersUp.Open "select * from MainStock where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrsUp("Carton") = Val(rsUp("Carton")) - Val(txtCarton.text)rsUp("Piece") = Val(rsUp("Piece")) - Val(txtPiece.text)rsUp.UpdatersUp.CloseCnn.CommitTransScreen.MousePointer = vbNormalDim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtMInvoice.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.texthsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1cboProductName.text = ""txtCarton = ""txtPiece = ""

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 225: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 txtRatePiece = ""txtTotalAmount = ""txtRemarks.text = ""End SubPrivate Sub cmdClear_Click()On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next kcboMarketingName.text = ""lblMID.Caption = ""cboMInvoice.text = ""lblOrderno.Caption = ""lblDate.Caption = ""cboProductName.text = ""txtCarton.text = ""txtRatePiece.text = ""txtTotalAmount.text = ""txtPiece.text = ""lblName.Caption = ""txtPlace.text = ""txtPageNo.text = ""txtLedgerName.text = ""txtDriverName.text = ""txtTrackNo.text = ""DDate.Value = DatecboMInvoice.Enabled = TrueEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSearch_Click()End SubPrivate Sub cmdFresh_Click()Call cmdClear_ClickEnd SubPrivate Sub cmdGo_Click()Dim rsSearch As New ADODB.RecordsetrsSearch.Open "select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(cboMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblOrderno.Caption = Trim(rsSearch("MOrderNo"))lblMID.Caption = Trim(rsSearch("MID"))lblName.Caption = Trim(rsSearch("MName"))DDate.Value = CDate(rsSearch("DeliveryDate"))txtLedgerName.text = Trim(rsSearch("LagerName"))txtPageNo.text = Trim(rsSearch("PageNo"))txtPlace.text = Trim(rsSearch("Place"))txtTrackNo.text = Trim(rsSearch("TrackNo"))txtDriverName.text = Trim(rsSearch("DriverName"))rsSearch.ClosersSearch.Open "Select * from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticDo While Not rsSearch.EOFintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = rsSearch("MInvoiceNo")hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = rsSearch("ProductName")hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = rsSearch("Carton")hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = rsSearch("Piece")hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = rsSearch("RatePerCarton")hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = rsSearch("TotalAmount")hsGrid.Rows = hsGrid.Rows + 1rsSearch.MoveNextLoopcboMInvoice.Enabled = FalseEnd SubPrivate Sub cmdGo_KeyPress(KeyAscii As Integer)KeyAscii = 0

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 226: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 End SubPrivate Sub cmdRemove_Click()Dim A As StringA = MsgBox("Do You Want To Delete ?", vbQuestion + vbYesNo)If Not A = vbYes Then Exit SubEnd IfIf remove = True Then If hsGrid.Rows > 2 Then Dim rsUp As New ADODB.RecordsetScreen.MousePointer = vbHourglassCnn.BeginTransDim rr As New ADODB.Recordsetrr.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(hsGrid.ROW, 2)) & "'", Cnn, adOpenDynamic, adLockOptimisticMsgBox rr("Carton")rr("Carton") = Val(rr("Carton")) + Val(hsGrid.TextMatrix(hsGrid.ROW, 3))rr("Piece") = Val(rr("Piece")) + Val(hsGrid.TextMatrix(hsGrid.ROW, 4))rr.Updaterr.ClosersUp.Open "select * from MarketingProductOutMaster where MInvoiceNo ='" & Trim(cboMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrsUp("InvoiceAmount") = Val(rsUp("InvoiceAmount")) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6))rsUp("Balance") = Val(rsUp("Balance")) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6))rsUp.UpdatersUp.ClosersUp.Open "Delete from MarketingProductOutDetails where MInvoiceNo ='" & Trim(cboMInvoice.text) & "' and ProductName ='" & Trim(hsGrid.TextMatrix(hsGrid.ROW, 2)) & "'", Cnn, adOpenDynamic, adLockOptimisticTrim(hsGrid.TextMatrix(hsGrid.ROW, 2)) & "'", Cnn ', adOpenDynamic, adLockOptimisticCnn.CommitTransScreen.MousePointer = vbNormal hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()End SubPrivate Sub cmdUpdate_Click()Dim rsUp As New ADODB.RecordsetrsUp.Open "select * from MarketingProductOutMaster where MInvoiceNo ='" & Trim(cboMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrsUp("DeliveryDate") = DDate.ValuersUp("LagerName") = Trim(txtLedgerName.text)rsUp("PageNo") = Trim(txtPageNo.text)rsUp("Place") = Trim(txtPlace.text)rsUp("TrackNo") = Trim(txtTrackNo.text)rsUp("DriverName") = Trim(txtDriverName.text)rsUp.UpdatersUp.CloseEnd SubPrivate Sub Form_Load()On Error Resume NextDim rs3 As New ADODB.Recordsetrs3.Open "select distinct ProductName from Productinfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs3.EOF cboProductName.AddItem Trim(rs3("ProductName")) rs3.MoveNextLooprs3.Closers3.Open "select MInvoiceNo from MarketingProductOutMaster", Cnn, adOpenDynamic, adLockOptimisticIf Not rs3.EOF ThenDo While Not rs3.EOFcboMInvoice.AddItem Trim(rs3("MInvoiceNo"))rs3.MoveNext

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 227: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 Looprs3.CloseEnd IfhsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "GatePass No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Carton"hsGrid.TextMatrix(0, 4) = "Pieces"hsGrid.TextMatrix(0, 5) = "Rate"hsGrid.TextMatrix(0, 6) = "Amount(TK)"hsGrid.TextMatrix(0, 7) = "Remarks"blnClickStander2 = Falseremove = FalseEnd SubPrivate Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_Change()On Error Resume NextDim rs2 As New ADODB.RecordsettxtPiece.text = ""txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text)txtPiece.text = Val(txtCarton.text) * Val(piece)End SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

SALES EXECUTIVE MONEY RECEIPT UPDATE

Dim rs As New ADODB.RecordsetPrivate Sub cboGatePass_Click()On Error Resume NexttxtAmount.text = ""txtBalance.text = ""txtInvoiceAmount.text = ""rs.Open "select * from MarketingProductOutMaster where MInvoiceNo= '" & Trim(cboGatePass.text) & "' ", Cnn, adOpenDynamic, adLockOptimistictxtInvoiceAmount.text = rs("Balance")rs.CloseEnd SubPrivate Sub cboGatePass_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboMarketingName_Click()On Error Resume NextlblMID.Caption = ""PayDate.Value = DatetxtAmount.text = ""cboPayType.text = ""lblPassNo.Caption = ""lblMID.Caption = ""txtInvoiceAmount.text = ""txtBalance.text = ""lblAmount.Caption = ""cboMRNo.text = ""rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblMID.Caption = rs("MID")rs.ClosecboMRNo.clearrs.Open "select * from MarketingMR where MDID='" & Trim(lblMID.Caption) & "' order by paydate", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF ThenDo While Not rs.EOF cboMRNo.AddItem Trim(rs("MRNO")) rs.MoveNextLoopEnd If

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 228: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs.CloseEnd SubPrivate Sub cboMarketingName_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cboMRNo_Click()On Error Resume NextlblPassNo.Caption = ""Dim rr As New ADODB.Recordsetrr.Open "select * from MarketingMR where MRNo='" & Trim(cboMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblPassNo.Caption = Trim(rr(1))PayDate.Value = CDate(rr("PayDate"))lblAmount.Caption = rr("Amount")cboPayType.text = Trim(rr("PayType"))rr.Closerr.Open "Select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(lblPassNo.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistictxtInvoiceAmount.text = Val(rr("Balance")) + Val(lblAmount.Caption)rr.CloseEnd SubPrivate Sub cboPayType_KeyPress(KeyAscii As Integer)KeyAscii = 0End SubPrivate Sub cmdClear_Click()PayDate.Value = DatetxtBalance.text = ""lblAmount.Caption = ""cboMRNo.text = ""End SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdUpdate_Click()'On Error Resume NextIf cboMarketingName.text = "" Then MsgBox "Please Select The Sales Executive Name.", vbInformation + vbOKOnly cboMarketingName.SetFocus Exit SubElseIf cboMRNo.text = "" Then MsgBox "Please Enter The Money Receipt Number.", vbInformation + vbOKOnly txtMRNo.SetFocus Exit SubElseIf cboPayType.text = "" Then MsgBox "Please Select The Payment Type.", vbInformation + vbOKOnly cboPayType.SetFocus Exit SubElseIf txtAmount.text = "" Then MsgBox "Please Enter The Amount(TK).", vbInformation + vbOKOnly txtAmount.SetFocus Exit SubElseIf txtAmount.text = 0 Then MsgBox "Please Enter The Amount(TK).", vbInformation + vbOKOnly txtAmount.SetFocus txtAmount.text = "" Exit Sub End IfScreen.MousePointer = vbHourglassCnn.BeginTransrs.Open "Select * from MarketingMR where MRNo='" & Trim(cboMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("PayType") = Trim(cboPayType.text)rs("PayDate") = PayDaters("Amount") = Val(txtAmount.text)rs.Updaters.Closers.Open "Select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(lblPassNo.Caption) & "'", Cnn, adOpenDynamic, adLockOptimisticrs("PaidupAmount") = Val(rs("PaidupAmount")) - Val(lblAmount.Caption)rs("Balance") = Val(rs("Balance")) + Val(lblAmount.Caption)rs.Update

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 229: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rs.CloseDim rc As New ADODB.Recordsetrc.Open "Select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(lblPassNo.Caption) & "'", Cnn, adOpenDynamic, adLockOptimisticrc("PaidupAmount") = Val(rc("PaidupAmount")) + Val(txtAmount.text)rc("Balance") = Val(rc("Balance")) - Val(txtAmount.text)rc.Updaterc.CloseCnn.CommitTransScreen.MousePointer = vbNormalPayDate.Value = DatetxtAmount.text = ""cboPayType.text = ""lblPassNo.Caption = ""cboMarketingName.text = ""lblMID.Caption = ""txtInvoiceAmount.text = ""txtBalance.text = ""lblAmount.Caption = ""cboMRNo.text = ""End SubPrivate Sub Form_Load()On Error Resume Nextrs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF ThenDo While Not rs.EOF cboMarketingName.AddItem Trim(rs("MName")) rs.MoveNextLoopEnd Ifrs.ClosecboPayType.AddItem "CASH", 0cboPayType.AddItem "CHEQUE", 1cboPayType.AddItem "DD", 2cboPayType.AddItem "PAY ORDER", 3cboPayType.AddItem "TT", 4PayDate.Value = DateEnd SubPrivate Sub txtAmount_Change()On Error Resume NexttxtBalance.text = Val(txtInvoiceAmount.text) - Val(txtAmount.text)If Val(txtBalance.text) < 0 Then MsgBox "Balance Can Not Be Less Than 0(Zero).", vbInformation + vbOKOnly txtAmount.text = "" txtBalance.text = "" Exit SubEnd IfEnd SubPrivate Sub txtAmount_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End Sub

Distributor Product Out Update

Dim rs As New ADODB.RecordsetDim remove As BooleanDim piece As DoublePrivate Sub cboDistributorName_Click()On Error Resume NextlblDID.Caption = ""rs.Open "select * from DistributorInfo where ShopName= '" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticlblDID.Caption = rs("DID")rs.ClosecboDInvoice.clearrs.Open "select * from QryDistributorProductOut where ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rs.EOF Then Do While Not rs.EOF

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 230: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 cboDInvoice.AddItem Trim(rs("DInvoiceNo")) rs.MoveNext LoopEnd Ifrs.CloseEnd SubPrivate Sub cboProductName_Click()On Error Resume NextDim rsP As New ADODB.RecordsettxtCarton.text = ""txtPiece.text = ""txtRatePiece.text = ""txtTotalAmount.text = ""piece = 0rsP.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticpiece = rsP("CartonPiece")txtRatePiece.text = rsP("Price")rsP.CloseEnd SubPrivate Sub cmdClear_Click()On Error Resume Next Dim k As IntegerFor k = hsGrid.Rows - 2 To 1 Step -1hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))Next ktxtGtotal.text = ""lblName.Caption = ""txtPlace.text = ""txtRemarks.text = ""lblDID.Caption = ""cboProductName.text = ""txtTotalAmount.text = ""txtRemarks.text = ""cboInvoice.text = ""DDate.Value = Date

cboInvoice.Enabled = TrueEnd SubPrivate Sub cmdexit_Click()Unload MeEnd SubPrivate Sub cmdSearch_Click()On Error Resume Nextrs.Closers.Open "select * from DistributorProductOutDetails where DInvoiceNo='" & cboDInvoice.text & "'", Cnn, adOpenDynamic, adLockOptimisticrs.MoveFirstDo While Not rs.EOFintrow1 = hsGrid.Rows - 1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'newhsGrid.TextMatrix(hsGrid.Rows - 1, 1) = rs(1)hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = rs(2)hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = rs(3)hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = rs(4)hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = rs(5)hsGrid.Rows = hsGrid.Rows + 1rs.MoveNextLooprs.CloseEnd SubPrivate Sub cmdFresh_Click()Call cmdClear_ClickEnd SubPrivate Sub cmdGo_Click()Dim rsSearch As New ADODB.RecordsetDim rsName As New ADODB.RecordsetrsSearch.Open "select * from DistributorProductOutMaster where DInvoiceNo ='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 231: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 If Not rsSearch.EOF ThenlblDID.Caption = Trim(rsSearch("DID"))txtPlace.text = Trim(rsSearch("Place"))txtTrackNo.text = Trim(rsSearch("TrackNo"))txtDriverName.text = Trim(rsSearch("DriverName"))txtLedgerName.text = Trim(rsSearch("LagerName"))DDate.Value = CDate(rsSearch("DeliveryDate"))txtPageNo.text = Trim(rsSearch("PageNO"))rsSearch.ClosersName.Open "select * from QRYDISTRIBUTORNAME where DInvoiceNo ='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticIf Not rsName.EOF ThenlblName.Caption = Trim(rsName("ShopName"))rsName.Close

rsSearch.Open "Select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimisticDo While Not rsSearch.EOFintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = rsSearch("DInvoiceNo")hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = rsSearch("ProductName")hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = rsSearch("Cartoon")hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = rsSearch("Piece")hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = rsSearch("RatePerCartoon")hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = rsSearch("TotalAmount")hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = rsSearch("Remark")hsGrid.Rows = hsGrid.Rows + 1rsSearch.MoveNextLooprsSearch.ClosecboInvoice.Enabled = FalseEnd IfEnd IfEnd SubPrivate Sub cmdHSave_Click()Dim rsH As New ADODB.RecordsetrsH.Open "select * from DistributorProductOutMaster", Cnn, adOpenDynamic, adLockOptimisticrsH("DInvoiceNo") = Trim(cboInvoice.text)rsH("DeliveryDate") = DDate.ValuersH("LagerName") = Trim(txtLedgerName.text)rsH("PageNo") = Trim(txtPageNo.text)rsH("Place") = Trim(txtPlace.text)rsH("TrackNo") = Trim(txtTrackNo.text)rsH("DriverName") = Trim(txtDriverName.text)rsH.UpdatersH.CloseEnd SubPrivate Sub cmdRemove_Click()On Error Resume NextIf remove = True Then If hsGrid.Rows > 2 Then Dim rsUp As New ADODB.Recordset rsUp.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic rsUp("InvoiceAmount") = rsUp("InvoiceAmount") - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) rsUp("RecevalAmount") = rsUp("RecevalAmount") - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) rsUp.Update rsUp.Close rsUp.Open "select * from DistributorProductOutMaster where DInvoiceNo ='" & Trim(cboInvoice.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticrsUp("InvoiceAmount") = Val(rsUp("InvoiceAmount")) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6))rsUp("Balance") = Val(rsUp("Balance")) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6))rsUp.UpdatersUp.ClosersUp.Open "Delete from DistributorProductOutDetails where DInvoiceNo='" & Trim(hsGrid.TextMatrix(hsGrid.ROW, 1)) & "' and ProductName='" & Trim(hsGrid.TextMatrix(hsGrid.ROW, 2)) & "'", Cnn, adOpenDynamic, adLockOptimisticrsUp.ClosersUp.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(hsGrid.ROW, 2)) & "'", Cnn, adOpenDynamic, adLockOptimistic

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 232: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rsUp("Carton") = Val(rsUp("Carton")) + Val(hsGrid.TextMatrix(hsGrid.ROW, 3))rsUp("Piece") = Val(rsUp("Piece")) + Val(hsGrid.TextMatrix(hsGrid.ROW, 4))rsUp.UpdatersUp.Close hsGrid.RemoveItem (hsGrid.TextMatrix(hsGrid.ROW, 0)) For i = 1 To hsGrid.Rows - 1 hsGrid.TextMatrix(i, 0) = i Next End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information"End IfEnd SubPrivate Sub cmdSave_Click()If cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit SubElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubElseIf txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit SubEnd If Dim ROW As IntegerROW = hsGrid.RowsFor i = 1 To ROW - 1If Me.cboProductName.text = hsGrid.TextMatrix(i, 2) Then MsgBox "These Records are already existed." & Chr(13) & "You can't add same Record", vbInformation, "Information" cboProductName.SetFocus Exit SubEnd IfNext i Dim introw1 As Integerintrow1 = hsGrid.Rows - 1hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboInvoice.texthsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.texthsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton.texthsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece.texthsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.texthsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtRemarks.texthsGrid.Rows = hsGrid.Rows + 1Dim rsUp As New ADODB.RecordsetScreen.MousePointer = vbHourglassCnn.BeginTransrsUp.Open "select * from DistributorProductOutMaster where DInvoiceNo ='" & Trim(cboInvoice.text) & "' ", Cnn, adOpenDynamic, adLockOptimisticrsUp("InvoiceAmount") = Val(rsUp("InvoiceAmount")) + Val(txtTotalAmount.text)rsUp("Balance") = Val(rsUp("Balance")) + Val(txtTotalAmount.text)rsUp.UpdatersUp.ClosersUp.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimisticrsUp("InvoiceAmount") = Val(rsUp("InvoiceAmount")) + Val(txtTotalAmount.text)rsUp("RecevalAmount") = Val(rsUp("RecevalAmount")) + Val(txtTotalAmount.text)rsUp.UpdatersUp.ClosersUp.Open "select * from DistributorProductOutDetails", Cnn, adOpenDynamic, adLockOptimisticrsUp.AddNewrsUp("DInvoiceNo") = Trim(cboInvoice.text)rsUp("ProductName") = Trim(cboProductName.text)rsUp("Cartoon") = txtCarton.textrsUp("Piece") = txtPiece.textrsUp("RatePerCartoon") = txtRatePiece.textrsUp("TotalAmount") = txtTotalAmount.text

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 233: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13 rsUp("Remark") = txtRemarks.textrsUp.Update

rsUp.CloseDim rs1 As New ADODB.Recordsetrs1.Open "select * from MainStock where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimisticrs1("Carton") = Val(rs1("Carton")) - Val(txtCarton.text)rs1("Piece") = Val(rs1("Piece")) - Val(txtPiece.text)rs1.Updaters1.CloseCnn.CommitTransScreen.MousePointer = vbNormalcboProductName.text = ""txtCarton = ""txtPiece = ""txtRatePiece = ""txtTotalAmount = ""txtRemarks.text = ""End SubPrivate Sub Form_Load()On Error Resume NextDim rsInv As New ADODB.RecordsetrsInv.Open "Select DInvoiceNo from DistributorProductOutMaster order by DeliveryDate ", Cnn, adOpenDynamic, adLockOptimisticDo While Not rsInv.EOF cboInvoice.AddItem Trim(rsInv("DInvoiceNo")) rsInv.MoveNextLooprsInv.CloseDim rs3 As New ADODB.Recordsetrs3.Open "select distinct ProductName from Productinfo", Cnn, adOpenDynamic, adLockOptimisticDo While Not rs3.EOF cboProductName.AddItem Trim(rs3("ProductName")) rs3.MoveNextLooprs3.ClosehsGrid.TextMatrix(0, 0) = "Serial No"hsGrid.TextMatrix(0, 1) = "Invoice No"hsGrid.TextMatrix(0, 2) = "Product Name"hsGrid.TextMatrix(0, 3) = "Carton"hsGrid.TextMatrix(0, 4) = "Pieces"hsGrid.TextMatrix(0, 5) = "Rate"hsGrid.TextMatrix(0, 6) = "Amount(TK)"hsGrid.TextMatrix(0, 7) = "Remarks"remove = FalseEnd Sub

Private Sub hsGrid_Click()remove = TrueEnd SubPrivate Sub txtCarton_Change()On Error Resume NexttxtPiece.text = ""txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text)txtPiece.text = Val(txtCarton.text) * Val(piece)End SubPrivate Sub txtCarton_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtPiece_KeyPress(KeyAscii As Integer)Call Validation(KeyAscii)End SubPrivate Sub txtRatePiece_Change()On Error Resume NexttxtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text)End Sub

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 234: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 235: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

[8] O[8] OPERATINGPERATING I INSTRUCTIONSNSTRUCTIONS

[

8.1 HARDWARE AND SOFTWARE REQUIREMENTS:

SOFTWARE

Operating System: Windows 98/Windows Millennium/Windows 2000/WindowsXP

Microsoft Office 97/Microsoft Office 2000/ Microsoft Office XP

HARDWARE

Pentium II (440 MHz Processor) or greater 32 MB RAM (Recommended 64MB) Free storage space 650MB + Capacity of database requirement Standard Input/Output devices.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

8

Page 236: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Platform Used

SOFTWARE

Operating System: Windows 2000/ Windows XP Visual Basic 6.0 SQL Server

HARDWARE

Processor : Pentium III ( 1.1 GHz ) RAM : 128 MB AGP resolution(32 MB)

===============================================

MaintainabilityMaintainability

This application is easily maintainable for its centralized location. On the basis of requirement further enhancement of the application is also possible.

Performance:For faster performance we have used compiled native code and favor Pentium pro features to

compile the application. We use maximum resources from the database so that access will be very fast.Security

For best security, system services should be centralized in a single physical location. According to this concept we have designed the application components, which will automatically reside on a folder called

Shah Sultan Soap Inventory Control Systemin “Drive C” after the installation. Users are also divided into four categories for better security.

These are as follows:

Authority Administrator User Guest

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 237: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Authority:

Only Authority can use all facilities by using this application. This group can do everything possible in this software i.e. Data Entry, View Data, Modify Data, New User Add, View Reports, Database Backup and others.

Administrator:

Administrator can use this application except some limitations of forms(Administrators can not use/modify/see the those forms) which are LC related all dealings, Product Information, Product Price, Free or Gift Product, Distributor Purposes Loss Adjust(Yearly), New User Add and Update any Forms. Except this, this group can do everything possible in this software i.e. Data Entry, View Data, View Reports, Database Backup etc.

Normal User:

Normal User can not use or see the Purchase menu (LC Related dealings), Product Information, Product Price, Free or gift Product, Sales Executive Product return, Distributor Product return, Distributor Loss Adjust, All kinds of Reports, Add User, Update any forms, Database Backup etc. Some limited forms, calculator, can see help files to use this software and the about form. This group cannot use this application except the above things.

Guest:

Guest type user can use only calculator, help file about the software and the about form. They cannot use any form for data entry and cannot see any reports for printing.

Forms Description

In this software to go different forms you have to use the menu. For Data manipulation different button is used in every form. Following operations are validating for all forms:

Validation:

Date format is dd/ mm/ yyyy basis i.e. First day then month then year.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 238: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Conclusion and suggestions

It’s a matter of good news we hereby declare that we developed the project entitle “Shah Sultan Soap Inventory Controol System-(Ver-2.1)” Under the Sudan University of Science and Technology, group together.

During the project developing period we should mention that in the demo version we had tried to develop this by our best not with standing we should say that there are some limitation in this demo version that will be Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

9

Page 239: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

removable in the next time.

Finally , we can say bring to a close that as we have developed the Demo version successfully, So by using this project end user and the types of Institutions can get the help from this project that we told in developed module. Now it that case we can say that by using this software if any Institution can get some benefits then we will be satisfied and if any problems may come don’t heisted just send us the information and your advise we are ready to provide our service and we will be satisfied.

----------------------------------------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 240: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

LMITATIONS=========xxxxxxxxx=========

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

10

Page 241: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

This program will not run without WindowsNT, Windows 2000,and Windows XP environment

This software is not hosted on Internet by hosting service provider.

This software is not in on line so can not received, posted email, Fax, SMS (Short Message Service) etc.

Date should be entered in dd/mm/yyyy format.

So far during developing the software it do not support till then Contact less Card or PDA (Personal Digital Assistant).

This System is not integrated with the institute web site.

Payment module is not linked with the General ledger, Accounts Receivable, Accounts payable and Asset Management.

Resource Booking module and Finance (Account) module is not developed till then.

-------------------------------------

BIBLIOGRAPHYCopyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 242: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

========xxxxxxxxx=========

The number of books are recommended and being used to develop this project given bellow :

Book’s Name Author’s Name=========================== ===================1. Visual Basic Database Programming Mahabubur Rahman(Bd)

2. Learning Visual basics Aptech Book

3. Mastering Visual Basic 6 Petroutsos

4. Computing Programming in VB Tariqul Islam Chow & Lutfur Rahman Vhu

4. Database Developer’s Guide with Visual Basic 6 Roger Jennings

5. Hitchhiker Guide to Visual Basic and SQL Sever William R. Vaughn

6. Database Developer’s Guide with visual Basic 6 Roger Jennings

7. Hitchhiker’s Guide to Visual Basic and SQL Sever William R. Vaughn

8. MSDN Microsoft Co

9. Microsoft SQL Sever 2000 Unleashed (2nd Edition) Ray Rankins, Paul Jensen,

Paul Bertucci .

------------ O ------------

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

11

Page 243: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

AAbstract class : Antraction Class is a a class that can be Used only as a base class of some other class. No objects of the class can be created.Contain one or more pure virtual functions.

Abstract data types : A class of data objects with a diffident set of properties and a set to operations that process the data objects while maintaining the properties .

Abstract step : An algorithmic for which some implementation details remain unspecified .

Actual parameter : A variable, constant , or expression listed in the call to a procedure .

Address: The identification of a location is storage.

Aggregate: A grouping of collection of two or more data items that can be referenced individually of together , like array, structures and unions; the opposite of a scalar.

Algorithm: A step-by-stem procedure for solving a problem in a finite amount of time. A verbal of written description of a logical sequence of action.

Algorithm walk-through : A process for verifying an algorithm by establishing a set of preconditions and post conditions are preserved

Allocate: To grant (assign) storage.

Alphanumeric : Pertaining to an alphabetic or numeric character .

Argument : A parameter; a data item that is passed to a function .

ANSI : American National Standards Institute.

Arithmetic/Logic Unit (ALU) : The component of the central processing unit that perform arithmetic and logical operations.

Array : a collection of components, all of the same type, ordered on N dimensions (n.1 ); each of which represents the component’s positions within that translates an assembly language in machine code.

ASCII :American Standard Code for information interchange. All character in microcomputer and most in minicomputers are understood by the computer ASCII, a series or consecutive integers assigned one to each character or control code.

Assembler : A utility to translate symbolic instructions (Assembly language) into binary code.

Assembly language : A low level programming language in which a numeric represents each of the machine language instructions for a particular computer.

Assignment : The action that gives the value of an expression to a variable.

Assignment Compatible: Condition in which the data types are compatible and the value being assigned is within the variable’s sub range.

Assignment Statement: A statement that given the value of an expression to variable.

Atomic Data Type: A data type that allows only a single value to be associated with and identifier of that type.

Auxiliary Storage Device: A device that stores data in encoded form outside the computers memory.

BBinary : Expressed in terms of combinations of the number 1 and 0 only.

A number system of two numbers.A condition with two possible actions.An operation involving two data values.Binary search: A search algorithm for sorted lists that involves dividing the list in half and determining, by value comparison, whether the item would be in the upper or lower half, the process is performed repeatedly until either the item is found or it is determined that an item is not in the list.

Binary tree : A linked data structure whose nodes each contain more than one pointer field.

Bit : A binary digit (may have the value 0 or 1). Short for binary digit . A single 1or 0.

Boolean : (named after George Boole) a construct that returns a logical relationship (i.e. true or false).

Buffer : An area of intermediate storage associated with input/output.

Byte : Eight contiguous bits, a half word.

C

Class : A class ia a grouping of object that have the same properties,common behaviour and common relationship.

Coding : Translation an algorithm into a programming language, the process of assigning bit patterns to pieces of information.

Command: A portion of the executable code that causes an operation to be performed.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 244: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Command line : A line of code entered at the console to cause the one or more operations to be performed by the system.

Compiler: a utility to generate an assembled program from a programmer’s source code.

Computer : A programmable device that can store, retrieve and process data.Computer program a list of instructions to be performed by a computer.

Computer Programming: The process of planning a sequence of steps for a computer to follow.Constant: A data scalar that has a fixed value for the entirety of a program, as opposed to a variable and cannot be changed during execution.

Control unit: The component of the central processing unit that controls actions of other components so that instructions (The program) are executed in sequence.

Counter: A variable is whose value is incremented to keep track of the number of times a process or even occurs.

CPU: The part of the computer that executes the instructions(Program)stored in memory, consists of the arithmetic/logic unit and the control unit.

D Data : Information that has been put into from a computer can use.

Data type: The general form of a class of data items a formal description of the set of values (called the domain ) and the basic set of operations that can be applied to it.

Debug: To locate and remove programming errors.

Debugging: The process by which errors are removed form a program so that it does exactly what it is supposed to do.Decision: A form of program structure allowing the computer to select one among possible actions to perform based on given circumstances, also called a branching control structure.

Decimal Integer: A fraction less or whole number is base 10,usally in the range of -32768 to +32767 on microcomputers.Declaration: The establishment of an identifier as a name; the construction of a set of attributes for a specific variable or constant.

Documentation: The written text and comments that make a program easier for other to understands, use and modify.

E

Event Counter: A variable that is incremented each time a particular event occurs.EOF: End-of-file mark.End-of-file mark: A code returned by the system indicating that the end of the file has been reached.End-of-text mark: A code indicating that the physical end of the file has been read. A control Z (^Z) in CP/M. A control Z followed by a carriage return.Execute: To carry out the program’s instruction.Expression: A notation (within a program) that represents a value; a constant appearing alone; a combination of constant and or variables and or operator.

FField: A section of a record separated either by format or delimiters; a logically distinct part of a record.File: A (named) data set consisting of records.Floating point number: The value stored in a type float variable, so called because part of the memory location the mantissa, with the decimal point floating as necessary among the significant digits.Function: A subprogram that is called from within a expression, and in which a single value (for example, the square root of a number ) is computed and returned to the main program through the subprogram.Function call: An expression in the main program requiring the computer to execute a function subprogram.Function type: The value computer by the function subprogram and then returned to the main program; often called just the result.

G

Global: A descriptive term applied to any identifier declared in the main program, so called because it is accessible to everything that follows it.

Global Variable: A variable known to the entire Program or blocks

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 245: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

H

Hardware: The physical components of a computer.

High level programming language:Any programming language in which a single statement translates into one or more machine language instructions.

Header file: A file write to be included in a C program during recompilation that defines programs and system constants and contains macro definitions of functions.

I

Identifier: A name; a group of characters the first being alphabetic, used to identify a variable, constant aggregate, etc.

Information: Any knowledge that can be communicated.Initialize: To set variables, flags, switches, aggregates, etc. To predetermined value (s). Integer: A no fractional number no greater that the machine word, for example, -32768 to +32767 for a signed 16 bit word.Instruction: A statement that call for a specific action or operation.Interface: A connecting linked (such as the user and the computer) to meet and act on of communicate with each other, the formal and the mechanism for communication with it.Internal file: A file that is created but not saves; also called a scratch file.Interpreter: A language that operates directly on a program that is stored in memory, generation object code from the source code on a line-by-line basis, as opposed to a compiler.

K

Key: data that identifies a file record, an index.Keyword: An identifier that, when used syntactically, has a meaning to the program.

LLength: The actual number of values stored in an array, list, or string.Listing: A copy of a such program, output by a compiler, containing message to the programmer.Library function: A special-purpose function or program that is kept in memory for a specific purpose.Local variable: A variable that is known only within a program block.Long integer: An integer of longer length than a short integer, usually four bytes in length, 4.295E9, a very long and accurate non fractional number.Loop: The repeated execution of statements within the defined scope of the iterating block.

M

Machine language: The language, made up of binary-coded instructions, that is directly by the computer.Mainframe: A large computing system designed for high-volume processing of for use by many people at once.Mantissa: With respect of floating point representing a number itself and not its exponent.Memory unit: Internal data storage in a computer.Microcomputer: A small computer system (usually intended to fit on a desk-top) that is designed to be used primarily by a single person.Minicomputer: A computer system larger than a personal computer but smaller that a mainframe; sometimes called an entry level mainframe.Module: A self-contained collection of steps that solves a problem of sub problem; can contain both concrete and abstract steps.

NsNesting: A block within a block any group within a group. An if statement within an if or else, or a while within a while, etc.Nested If: An if that is within another if.Nested loop: A loop that is within another loop.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 246: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

Nodes: The building blocks of dynamic structures, each made up of a component (the data) and a pointer (the link) to the next node.Null statement: A semicolon places within the program that causes no action, sometimes used to balance if-then-if nests.

O

Octal: A number expressed in base eight, consisting of the digits 0 through7.Operating System: A collection of processes, utilities, procedures, function, routines, etc. That are organized into a program that directs the computer’s operations.Operator: A symbol that specifies an operation to be performed, e.g. the arithmetic operators + - * / .Overflow: The result of a calculation or output that exceeds the language’s capability to hold the result.

P

Pointer: A locator variable with the pointer attribute that identifies an exact or absolute location within memory; can also mean an address.Processor: A hardware data processing device. The term frequently refers to the central processing Unite or CPU, which controls all the computer’s functions.Pseudo cede: A non-executable, non-comparable language that emulates a computer language, used for algorithm and program development. It can be transported from language to language.Programming: Planning, scheduling or performing a task or an event.Programming Language: A set of rules, symbol, and special words used to construct a program.

R

Range: The interval within which values must fall, specified in terms of the largest and smallest allowable values.Record: A structured data type with a fixed number of components that are accessed by name, not by an index; the components may be of different types.Register: A storage area within the processor (the ultimate in high-speed storage).Reserved word: A word that has special meaning in C language; it cannot be used as an identifier.Robust: A descriptive term for a program that can recover from errorless inputs and keep running. Root: Interference to a binary tree structure, the node which is not it self the child of any other node, the tree is referenced by an external pointer to the root.

S

Scalar: A single data item, an element, as opposed to an aggregate.Sequence: A structure in which statements are executed one after another.Short integer: A non-fractional numbers of short length, usually the length of a machine word. A 16 bit unsigned integer has the range of 0 through 65535.Sorting: Arraying the components of a list in order (for instance, words in a alphabetical order, numbers in ascending of descending order).Source code: The primary position of a program created by a programmer, which will eventually produce object code when compiled or interpreted.Statement: A basic element of a program that describes, names, declares, and species actions to be taker; always terminated with a semicolon in C.Syntax: The formal rules governing how valid instructions (construct) are written a programming language.System software: A set of programs including the compiler, the operation system, and the editor that improves the efficiency and convenience of the computer’s processing.

U Underflow: The condition that arises when the value of a calculation is too small to be represented.Universal set: The set containing all the value of the component type.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Page 247: ShahSoap Project Documentation (BSc)

Industrial Project-2006 Shah Sultan Soap Inventory Control System Ver: -2.1 Page13

V

Variable: A location in memory, referenced by an identifier, in which a data value that can be changed is stored.

WWord: Groups of 16,32 or 64 bites; a group bits processed b the arithmetic-logic until a single instruction.

Copyright by © MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.