You are on page 1of 244

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 Control Systems (SSIC)


This project is submitted in partial fulfillment for the B.Sc (Hons) degree in Computer and Information Systems.
Developed by the Student given bellow: 1. Project Leader MIZANUR RAHMAN 2. Project Members MUHAMMAD FAKHRUL ISLAM MD. ATIKUZZAMAN LIMON REG. NO: 0310-081-0008 REG. NO: 0310-071-0016 REG. NO: 0310-061-0017

3.

Project Supervisor: DR. SHAFIQUR RAHMAN

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Submitted On: June 2006

Project Title
Shah Sultan Soap Inventory Control Systems.(SSIC)
(Version: 2.1)

Using Visual Basic 6.0 as Front End, MS SQL Server 2000 as Back End & Crystal Report 8.5 for Report Generet

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

This project

Shah Sultan Soap Inventory Control System (SSIC)


Is dedicated ToThe Parents Of all helpful memebers..

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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 (Hons) 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.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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

Firstly We are thanking to the Sudan University of science & Technology, Sudan for proposal to devloping this project Shah Sultan Soap Inventory

Control Systems
Systems degree.

which is leading to B.Sc (Hons) in omputer and Information

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.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

NO 01
1

PROJECT CONTENTS
1.

PAGE

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

2 02

2.

SOFTWARE SPECIFICATION
2.1 Software Identification 2.2 Software Description

03

3.

SOFTWARE DESIGN
3.1 Decision Table 3.2 Data Dictionary

04

4.

DATABASE DESIGN
4.1 Relationship Diagram 4.2 Database Structure

05 06 07 08

5. 6. 7.

INPUT SCREEN OUTPUT SCREEN

CODING 8. OPERATING INSTRUCTION


8.1 Hardware and Software Requirements 8.2 Operating Instruction

09 10 11

9. CONCLUSION AND SUGGESTION 10. 11.

LIMITATIONS

GLOSSARY

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

[1.1] Scenario
-----------------------------------1.Main Form (MDI Form):
----------------------------------

and Question Paper

When you run the application, first you will be seen a login form. After inputting the Login form to the selective control then it will be verified by the related database Then show a form, which is to be called as MDI form. By using this main form you can go 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. --------------2.Purchase: ---------------

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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, Product Price 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 are inputted 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 report, distributor information report, distributor advance report, sales report, Login/Logout report, LC report, verbal order report, raw materials report.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006
--------------9.Calculator: ---------------

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

[1.2]

Data Flow Diagram- DFD

DFD of User Login

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

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.

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.

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.

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.

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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

[1.3] System

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, employees information, distributor information, lose & profit information, payment and queries etc. The administrator, sales executive, distributo and employees 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 todays success. In the first time man would keep accounting by sticks and fingers. But through the passage of time and mens 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 systems 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 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.
Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

[2.1]
T HIS

Software Identification
IS THE

SHAH SOAP INVENTORY CONTROL SYSTEMS(V ERSION-2.1) I NDUSTRIAL P ROJECT, 2006

Project name Duration language/Tools Front-end Back-end Report

: Shah Soap Inventory Control Systems-(Ver2.1) : 6 Months : Visual Basic-6 : Ms SQL Server-7.0 : Crystal Report8.5

Last Compiled on : 30th May, 2006 File Size Created On : 100 MB : 11th January, 2006
GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Submitted On

5th June, 2006

Developed by the Student given bellow: 3. Project Leader Project Leader MIZANUR RAHMAN 4. Project Members MUHAMMAD FAKHRUL ISLAM MD. ATIKUZZAMAN LIMON REG. NO: 0310-081-0008 REG. NO: 0310-071-0016 REG. NO: 0310-061-0017

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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

[2.2] SYSTEM 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 reference 2.Intial study 3.Detailed study 4.Detailed design 5.Implementation 6.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:
OVER ALL PLAN

ANALYSIS AND DESIGN

ANALYSIS AND DESIGN

ANALYSIS AND DESIGN

SUB SYSTEMS

SUB SYSTEMS

SUB SYSTEMS

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

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. 2. General problem area 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. 2. 3. 4. In the manual system labor spent is huge and in some cases it is troublesome. The administration/authority may have to face problem with verbal assurance Problems of keeping track with a wide variety of processes like Collect order, Invoicing And maintain stock etc. 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 strictly 2. Waste of time and manpower in clerical works 3. 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.

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. 2. 3. 4. 5. Retrieving information in minimum time with minimum efforts Ensuring accurate and speedy processing of information. Trying to avoid human errors and inconsistencies. To provide error free, reliable and faster service. 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 maintainable 3. 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.3Analysis 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, employees 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. 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, customers 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.
Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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 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. 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.
Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Condition Stub Action Stub

Condition Entries Action Entries 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


1. Check correct username/password

Condition Entries
Y N X

Action Stub
1.Successfully login 2. Display error message -

Action Entries
X

Decision Table for Add Employee Record: Condition


1. check all required field values not empty and valid data 2. check unique username 3. confirmation Y Y Y X Y Y N X Y N Y X RULES Y N N Y N Y X X N Y N X N N Y X N N N X -

Action
1. Add record 2. Error massage for invalid data or blanks files 3. Error massage for username 4. Do nothing

Decision Table for Update Employee Record: Conditions


1. check existence of employee ID from database 2. check all required field values not empty and valid data 3. confirmation Y Y Y Y Y N Y N Y RULES Y N N N Y Y N Y N N N Y N N N -

Actions
1. Add record X

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1


X X X X X X X -

Page13
X X -

2. Error massage ( Not found ) 3. Error massage for invalid data or blanks files 4. Do nothing

Decision Table for Remove Employee Record: Conditions


1. Check existence of employee ID from database 2. Confirmation Y Y Y N X RULES N Y X N N X -

Actions
1. Remove record 2. Error massage ( Not found ) 3. Do nothing X -

Decision Table for Add Product Purchase Record: Conditions


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

Actions
1. Add purchase record and increase stock on hand 2. Error massage for invalid data or blanks files X X

Decision Table for Remove Product Purchase Record: Conditions 1. Confirmation Y RULES N

Actions
1. Remove product and decrease stock on hand form database. 2. Do nothing X X

Decision Table for Remove Purchase Voucher Record: Conditions 1.. Check existence of Purchase voucher ID from database 2.. Confirmation Actions 1. Remove Purchase voucher and decrease stock on hand form database. 2. Error massage ( Not found ) 3. Do nothing Y Y X RULES Y N N Y X X N N X -

Decision Table for LC Record: Conditions 1. check all required field values not empty and valid data RULES Y N

Actions
1. Add LC opening record and unload form X 2. Continue LC form X Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Decision Table for Sales (Sales Executive & Dealer) Record: Conditions 1. check all required field values not empty and valid data 2. . Check product stock on hand from database Actions 1. Add sales record and decrease product stock on hand to database. 2.Error massage for invalid data or blanks files 3. Error massage for insufficient stock Y Y X RULES Y N N Y X X N N X -

Decision Table for Remove Sales Invoice Record: Conditions 1. Confirmation Y RULES N

Actions
1. Remove product sales record and increase stock on hand form database. 2. Do nothing X X

Decision Table for Remove sales invoices Record: Conditions 1.. Check existence of sales invoice ID from database 2.. Confirmation Actions 1. Remove sales invoice record and increase stock on hand form database. 2. Error massage ( Not found ) 3. Do nothing Y Y X RULES Y N N Y X X N N X -

Decision Table for Dealer/Sales Exe. Information:


Conditions 1. Select Dealer/Sales Exe. ID, and check validity of ID 2. Check Address 3. Opening Balance Actions 1. Error Massage for invalid ID, 2. . Get A/C status as Present 3. Get A/C status as Late-Present 4. Area wise information Y Y Y X Y Y N X Y N Y X RULES Y N N Y N Y X X N Y N X N N Y X N N N X -

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Decision Table for Order Information:


Conditions 1. Select Dealer/Sales Exe. ID 2. Check valid date range 3. Check duplicate product entry Actions 1. Error Massage for invalid ID 2. For zero amount Y Y Y X Y Y N Y N Y X RULES Y N N Y N Y X X N Y N X N N Y X N N N X -

Decision Table for Invoice Information:


Conditions 1. Select Dealer /Sales Exe. ID 2. Check valid date range 3. Check duplicate Invoice number Actions 1. Error Massage for invalid ID 2. Submit Invalid Invoice no. 3. Update Invoice Number Y Y Y X X Y Y N Y N Y X RULES Y N N X N Y Y X N Y N X N N Y X N N N X -

Decision Table for Sales Payment Information:


Conditions 1. Select employee/dealer/sales exe. ID 2. Select date for payment 3. Check all fields are not blank and valid. 4. Confirmation RULES Y Y Y Y Y Y Y N Y Y N Y Y Y N N Y N Y Y Y N Y N Y N N Y Y N N N N Y Y Y N Y Y N N Y N Y N Y N N N N Y Y N N Y N N N N Y N N N N

Actions
1. Error message for Zero balance 2. Show all due Invoice for payment. 3. Show all payment information. 4. Error message for blank /invalid fields. 5. Update Payment Record. 6. Do nothing X X X X X X X X X X X X X X X X X X X X X X X X X X X -

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

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 DD MM YYYY DGRID NAM OPT CH NAME ADD PH FAX QNT PP VAT TOTAL GT TAKA RETURN TEMP DAY Data type Integer Integer Integer String Char Char String String String String Real Real Real Real Real Real Real Real Integer Data range 1-31 1-12 1-3000 A-Z/ 0-9 A-Z/ 0-5 press any key A-Z/ 0-9 A-Z/ 0-9 9999999 A-Z/ 0-9 O-999 0-9999.99 0-9999999.99 0-999999.99 0-9999999.99 0-9999999.99 0-9999999.99 9999 name of seven days Description Accept a number as a day and check its validity Accept a number as a month and check its validity Accept a number as a day and check its validity Accept a short name form user by assign this variable for further use. A variable assigned to accept option from user what he choose. To escape one window form another window or menu. Accept customers full name by assign this variable. Accept customers address by assign this variable. Accept customers phone number. Phone number has fixed limit. Not more or less than 7 digits. Accept users fax number by assign this variable. For further use. Accept quantity form user. How many he/she wants to buy? A unique numeric value assigned the product price. a value will come out after calculation and store in this variable. Vat charge is 15%. by calculation QNT *PP , comes out total amount and store in this variable TOTAL. By calculation TOT +VAT , comes out grand total and store in this variable GT. After calculation by and watching the GT, whatever the customer pays through this variable. If customer pays more than GT, then rest of the amount store in this variable. When any quantity sale for lot then the change value store is this variable to indicate at update section This variable content seven days is an array. To check the validation of the date.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

PRESS Data name HLP I XI X2 Y1 Y2 NA AN TEMP1 TEMP2 TEMP3 Name

char Data type char integer integer integer integer integer integer integer integer integer integer nvarchar

A-Z/ 0-9 Data range A-Z 0-9 0-99 0-99 0-99 0-99 0-99 0-99 0-99 0-99 0-99 A-Z/ 0-9

A variable assigned to accept option from user what he choose. Description A variable which accept Y, Yes for help or N, No for no need of any help. This variable is used to increment the line of a box as row or column wise as counter. This variable is used to hold a numeric value to draw about it represents a point by row wise. This variable represents another point by row wise to draw a box. This variable represents a point by column wise to draw a box. This variable represents another point by column wise to draw a box. To read the length of customers nick name, for changing up case. A variable as a counter, which count the name by using For loop. It holds the massage of THANK YOU as integer. Read the length of the massage of THANK YOU. A variable as a counter, which count the massage using for loop. 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.

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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

SYSTEM DEVELOPMENT ACTIVITIES:


Establishment of Turns Reference

Initial Study to Test Feasibility

Management
Decision

Detailed Study

Management
Decision

Detail Design of Physical System Software Developing

Implementation
System Maintenance and Review

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

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. 2. 3. Current system reviews The out put specification The input specification. This phase of design involves the following: 1. Database 2. Information flow design Design the project: Here a complete database system is developed. The files included in this project are: 1. 2. 3. 4. 5. Tables Database entry forms Queries Report Menu etc

* Physical design:

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. The project manager males easier design, help to modify and run the individual components of the application. In the library system project, the project names. 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. Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON
GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

The designing of a database involves the followings: 1. 2. 3. 4. 5. 3.4 Determine the purpose of the database Determine the tables required Determine the fields, their types and width required Determine the relation ships between the tables required Refine the design 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 Menu Menus 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 performs 3.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 application The 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 2. Setting the user environment 3. Displaying the interface 4. Controlling the event loop 5. 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.
Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

3.8

Testing the Project Program 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. 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.

3.9

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 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 maintenance
Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

3. 4. 5. 3.11

Accurate and easier processing Higher data security Less manual labor

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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

[4.2]
1. Lc Product Information: ProductName ProductType Origine WeightType QtyPerDrum 2. LC Information nvarchar nvarchar nvarchar nvarchar float

Database Structure
25 25 40 7 8 0 Pk 0 PK 1 1 1

ProformaInvoiceNo nvarchar ProformaDate datetime LCANo nvarchar LCADate datetime LCNo nvarchar LCDate datetime 8 HSCode nvarchar ExporterName nvarchar ImporterName nvarchar CNFAgentName nvarchar CNFAgentAddress nvarchar BankName nvarchar Branch nvarchar PreferredBank nvarchar CountryBranch nvarchar 3. LC Details LcNo ProductName ProductType ValueDoller RateOfCurrency Quantity CurrencyType Total 4. LC Product Received nvarchar nvarchar nvarchar float float float nvarchar float

100 8 50 8 50 1 50 50 50 50 100 50 50 50 50

0 1 1 1 1 1 1 1 1 1 1 1 1 1

50 50 50 8 8 8 50 8

0 1 1 1 1 1 1 1

LCNo nvarchar 50 0 Pk ConsignDate datetime 8 0 Pk InvoiceNo nvarchar 50 1 InvoiceDate datetime 8 1 ProductName nvarchar 50 0 Pk ProductType nvarchar 50 1 Quantity float 8 1 TotalLiterKg float 8 1 Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON
GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Rate float TotalAmount float Remarks nvarchar 5. Party Information PartyName ProperitorName District Address Phone Division 6. Verbal Order Details OrderNo ProductName ProductType Rate Qty TotalLiterKg Amount 7. Verbal Order Master OrderNo OrderDate OrderTime Delivary PartName ContactPerson TotalAmount OFull

8 8 100

1 1 1

nvarchar nvarchar nvarchar nvarchar nvarchar nvarchar

50 50 50 100 50 50

0 Pk 0 1 1 1 1

nvarchar nvarchar nvarchar float float float float

50 50 50 8 8 8 8

0 0 1 0 0 0 1

nvarchar datetime datetime datetime nvarchar nvarchar float varchar

50 8 8 8 50 50 8 4

0 Pk 1 1 1 1 1 1 1

8. Verbal Raw Material Received Detail OrderNo ProductName ProductType Qty TotalLiterKg Rate DrumValue TotalAmt remarks nvarchar nvarchar nvarchar float float float float float nvarchar 50 50 50 8 8 8 8 8 100 1 1 1 1 1 1 1 1 1

9. Verbal Raw Material Received Master OrderNo OrderDate ReceivedDate ReceivedTime PartyName Conveyance nvarchar datetime datetime datetime nvarchar float 50 8 8 8 50 8 0 Pk 1 1 1 1 1

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

LabourCost DriverName TruckNo OtherExp TotalAmount

float nvarchar nvarchar float float

8 50 15 8 8

1 1 1 1 1

10. Verbal Raw Material MR PartyName MRNo PayDate PayType DDTTCheckNo BankName Branch PayAmount LeftAmount 11. LC Main Stock ProductName ProductType Qty LiterKg float 12. LC Other Cost LCNo ConsignDate CNFAgentCost MiscelleniousCost Tax LoadingCost UnloadingCost OtherCost 13. Product Information ProductName CartonPiece Price 14. Product Price] PDate ProductName NewPrice OldPrice 15. Main Stock
Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

nvarchar nvarchar datetime nvarchar nvarchar nvarchar nvarchar float float

50 50 8 15 50 50 50 8 8

1 0 Pk 0 Pk 1 1 1 1 1 1

nvarchar nvarchar float 8

25 25 8 1

0 Pk 0 Pk 1

nvarchar datetime float float float float float float

50 8 8 8 8 8 8 8

0 0 1 1 1 1 1 1

nvarchar float float

50 8 8

0 Pk 0 1

datetime nvarchar float float

8 50 8 8

0 0 1 1

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

ProductName Carton Piece BadCarton BadPiece 16. Employee Information EmpId EmpName Designation Address Phone

nvarchar float float float float

50 8 8 8 8

0 Pk 1 1 1 1

nvarchar nvarchar nvarchar nvarchar nvarchar

50 50 50 100 50

0 Pk 1 1 1 1

17. Personal Sales Detail EmpID pInvoiceNo ProductName Carton Piece RatePerPiece TotalAmount 18. Personal Sales Master EmpID pInvoiceNo ProductName Carton Piece RatePerPiece TotalAmount 19. Personal Slaes MR EmpID PInvoiceNo MRNo PayType PayDate Amount Remarks 20. Free Product EmpID nvarchar GiftDate datetime ProductName nvarchar Carton float Piece float Remark nvarchar 100 50 8 50 8 8 1 1 1 1 1 1 nvarchar nvarchar nvarchar nvarchar datetime float nvarchar 50 50 50 50 8 8 50 1 1 0 Pk 1 1 1 1 nvarchar nvarchar nvarchar float float float float 50 50 50 8 8 8 8 1Pk 1 1 1 1 1 1 nvarchar nvarchar nvarchar float float float float 50 50 50 8 8 8 8 1 1 1 1 1 1 1

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

21. Bank Information BankName BranchName AccountHolderName AccountNumber OpeningDate BankAddress Phone 22. Daily Stock SDate ProductName Carton Piece BadCarton BadPiece datetime nvarchar float float float float 8 50 8 8 8 8 0 Pk 0 Pk 1 1 1 1 nvarchar nvarchar nvarchar nvarchar datetime nvarchar nvarchar 50 50 50 50 8 80 50 1 0 Pk 1 0 Pk 1 1 1

23. Sales Executive Information MID MName Designation Address Phone Mobile Area nvarchar nvarchar nvarchar nvarchar nvarchar nvarchar nvarchar 50 50 50 100 50 50 100 0 Pk 1 1 1 1 1 1

24. Sales Executive Order Details MOrderNo ProductName Cartoon Piece Rate Total nvarchar nvarchar float float float float 50 50 8 8 8 8 1 1 1 1 1 1

25. Sales Executive Order Master MOrderNo OrderDate DeleveryDate MID MName TotalAmount FullOrNot nvarchar datetime datetime nvarchar nvarchar float 8 nvarchar 50 8 8 50 50 1 50 0Pk 1 1 1 1 1

26. Sales Executive Product Sales Details MSInvoiceNo ProductName Carton nvarchar nvarchar float 50 50 8 1 1 1

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Piece RatePiece TotalAmount

float float float

8 8 8

1 1 1

27. Sales Executive product Sales Master MSInvoiceNo MSOrderNo MID MDID DeliveryDate InvoiceAmountfloat PaidupAmoun Balance 28. Sales Executive MR MDID MInvoiceNo MRNo PayType PayDate Amount Remarks ShopeName nvarchar nvarchar nvarchar nvarchar datetime float nvarchar nvarchar 50 50 50 50 8 8 100 50 1 1 0Pk 1 1 1 1 1 nvarchar nvarchar nvarchar nvarchar datetime 8 float float 50 50 50 50 8 1 8 8 0Pk 1 1 1 1 1 1

29. Sales Executive Product Return MID MInvoiceNo ReturnDate ProductName Carton Piece RateCarton TotalAmount Remarks nvarchar nvarchar datetime nvarchar float float float float nvarchar 50 50 8 50 8 8 8 8 100 1 1 1 1 1 1 1 1 1

30. Sales Executive Account Status MID MName TotalGatePassAmt TotalPaidupAmt Balance nvarchar nvarchar numeric numeric numeric 50 50 9 9 9 1 1 1 1 1

31. Sales Executive Advance Payment MID MName MrNo PayDate PayType varchar varchar varchar datetime varchar 50 60 50 8 20 0Pk 0Pk 0Pk 1 1

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Amount Balance 32. Distributor Information DID ShopName PropreitorName JoinDate Address TelNo MobNumber CreditLimit

float numeric

8 9

1 1

nvarchar nvarchar nvarchar datetime nvarchar nvarchar nvarchar float

50 50 50 8 100 50 25 8

0Pk 1 1 1 1 1 1 1

33. Distributor Order Details DOrderNo ProductName Cartoon Piece nvarchar nvarchar float float 50 50 8 8 1 1 1 1

34. Distributor Order Master DOrdeNo DID ShopName OrderDate DeliveryDate FullOrNot nvarchar nvarchar nvarchar datetime datetime nvarchar 50 50 50 8 8 50 0Pk 1 1 1 1 1

35. Distributor Product Sales Details DInvoiceNo nvarchar ProductName nvarchar Cartoon float Piece float RatePerCartoon float TotalAmount float Remark nvarchar 100 36. Distributor product Sales Master DInvoiceNo nvarchar DeliveryDate datetime LagerName nvarchar PageNo nvarchar 50 DID nvarchar OrderNo nvarchar Place nvarchar TrackNo nvarchar DriverName nvarchar InvoiceAmountfloat 8 PaidupAmount float 50 8 50 1 50 50 50 50 50 1 8 0 0 1 1 1 1 1 1 1 50 50 8 8 8 8 1 1 1 1 1 1 1

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Balance Total TransPortCost 37. Distributor MR DID DInvoiceNo MRNo PayType PayDate TotalAmount BankName Branchname AccountNo CheckNo

float float float

8 8 8

1 1 1

nvarchar nvarchar nvarchar nvarchar datetime float nvarchar nvarchar nvarchar nvarchar

50 50 50 50 8 8 50 50 50 50

0 1 0 1 1 1 1 1 1 1

38. Distributor Product Return DID DInvoice Condition ReturnDate ProductName Carton Piece RateCarton TotalAmount Remarks nvarchar nvarchar nvarchar datetime nvarchar float float float float nvarchar 50 50 50 8 50 8 8 8 8 100 1 0Pk 1 1 0Pk 1 1 1 1 1

39. Distributor Account Status DID ShopName NvoiceAmount Paidupamount RecevalAmount nvarchar nvarchar float float 8 float 8 50 50 8 1 1 0Pk 0 1

40. Distributor Advance Payment DID ShopName MRNo PayDate PayType Amount BalanceAmount 41. User Information UserName Password [Group] nvarchar nvarchar nvarchar 50 50 50 0 1 1 varchar varchar varchar datetime varchar float float 50 60 50 8 20 8 8 0Pk 0 0 1 1 1 1

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

42. Loging Time UserID PDate LoginTime LogOuttime [Group] char datetime datetime datetime nvarchar 50 8 8 8 50 1 1 1 1 1

5
Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

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.

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.

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.

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:

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Click the exit button to close the form permanently.

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 amounts (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:

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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.

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:

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Click the Exit button to close the form permanently. Lc Other Cost: -------------------

This is the form where Lc related secondary expenses occurs.CNF agent charge, miscellaneous cost, tax for different purposes, loading cost, 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 the exit button.

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

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

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 combo box. All inputted data will be added to the flex grid which is under the Lc damage product Loss form. 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 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.

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. Partys 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.

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.

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 amountss (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 not be 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:

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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.

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 which are received from LC or verbal raw materials order purposes. Damage or loss product amount will be realized by this form.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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. Grand total amount will be showed below the grid. All Total amounts taka of the grid will be added of the grand total text box. After inputting all data to the grid then click the save button to restore the 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 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 in Factory:


------------------------------

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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, Product in date, and Product in time should be selected from the combo box or the DTPicker box. After inputting all data to the grid click the save button to restore the data in 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. Product Information: --------------------------

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

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 not be 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 below the 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.

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 to be used to fix up the price of the product. If you change the price of the product of a particular date then you can also use this form. Firstly select the product name from the combo box and input the present price per carton and updated price to the text box and also input the date to 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 the grid 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, Sales executive 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 box or the DTPicker box. After inputting all data to the grid click the save button to restore the data in the 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.

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 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.

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.

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 information from company employee. Invoice no, carton, piece, rate per piece, and total amount which will be inputted to the required text box. Select the employee name(when employee name selected employee code will 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 button to 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.

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 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. 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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Company employee's transaction purposes their payment should be realized from this form. When employee name selected from the combo, outstanding invoice amount will be showed in a text box. After entering the amount to the 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, and remarks will be written to the required text box. After entering all data in this form click the save button to restore the data in 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.

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 form is 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 and to 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.

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.

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 taka of 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 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 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.

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 taka of 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 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 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.

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 client against 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 the required combo box. After selecting gate pass no from the combo balance 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.

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 store against 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 executive ID will be showed beside the sales executive name text box). After all data input click the save button and to close the form click the exit 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. Partys 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.

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 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 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.

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 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 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

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

grid box), mention the return date and product name from the required combo 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 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 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.

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 the search 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.

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 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 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.

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 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 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.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

After inputting all data of the required controls click the save button to restore the data in the database permanently. 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 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 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.

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.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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. 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.

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 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 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.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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 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 data of 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 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 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.

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. ---------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 Executive Product 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 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 the first phase to save and update data in the database. There are some procedures for updating of this form. These are as follows:

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006
GO:

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 datas 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 remarks then 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 updated permanently and show it in the grid.
Remove:

--------

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

-----

If you want to clear all data from all of the controls and the grid then click the clear button 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.

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 Distributor Product 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 the first 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.

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 datas 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 remarks then 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 updated permanently and show it in the grid.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006
Remove:

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

--------

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

-----If you want to clear all data from all of the controls and the grid then click the clear button 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.

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. b.
c.

d.

First click the Add button. Type the User Name and Password in the respective box. Select the user Group from the list. Click the Save button. Then it will be added in the left box. To Delete User: Select the User Name from the left box. Click the Delete button. When you make a mistake to select in the left box click the Cancel button.

a. b. c.

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.

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. select any topic and clicking the display button.

Search for Help: From clicking the submenu from the help menu you can search a specific topic after

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.

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.

Industrial Project-2006
-------------Report Caption.

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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.

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.

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.

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)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

16. Caption: Individual Sales executive and individual date wise product sales or product out details report (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.

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.

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.

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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1


LOGIN/LOGOUT REPORT

Page13

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.

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.

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.

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 status 3. 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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Code for the FFscm


Main Form: Option Explicit Dim PixelX As Integer Dim PixelY As Integer Dim ReturnToStart As Long Dim NewMess As String

Private Sub MDIForm_Load() On Error Resume Next Unload frmSplash Unload frmUserLogin Dim rs As New ADODB.Recordset Dim A(100) As String Dim i As Integer Dim Count As Integer i=0 Count = 0 Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.Open "select * from MainStock", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF Count = Count + 1 rs.MoveNext Loop rs.MoveFirst Do While Not i = Count A(i) = Trim(UCase(rs(0))) & "= " & Val(rs(1)) i=i+1 rs.MoveNext Loop rs.Close Dim Temp$ For i = 0 To Count Temp$ = Temp$ + Space(1) + A(i) + Space(1) Next i

PixelX = Screen.TwipsPerPixelX PixelY = Screen.TwipsPerPixelY FixMessage Temp$ InitImages Temp$ ScrollImage.Enabled = True NewMess = 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 mnuLog End If End Sub Private Sub MDIForm_Unload(Cancel As Integer) On Error Resume Next Dim rs As New ADODB.Recordset rs.Open "select * from LoginInformation ", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs(0) = User rs(1) = Date rs(2) = PTime rs(3) = Time() rs.Update rs.Close End Sub Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer) Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006 Dim A As String

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

If UnloadMode = 0 Then A = MsgBox("Do You Want To Close The Application ?", vbYesNo + vbQuestion) If A = vbYes Then Unload Me Else Cancel = 1 Exit Sub End If End If End Sub

Private Sub mnuabout_Click() frmaboutpro.Show End Sub Private Sub mnuAdvance_Click() frmDistributorAdvance.Show End Sub Private Sub mnuBackUp_Click() On Error Resume Next Dim ComDate As Date Dim A As String Dim strDBPath As String A = MsgBox("Do You Want To Backup DataBase ?", vbQuestion + vbYesNo) If A = vbYes Then Screen.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 strSQLDataBackup Screen.MousePointer = vbNormal End If End Sub Private Sub mnubankinformation_Click() frmBankInfo.Show End Sub Private Sub mnuCalculator_Click() Calculator.Show End Sub Private Sub mnuDistributorAdvance_Click() frm_rptDistributorAdvance.Show End Sub Private Sub mnuDistributorCommissionCartoonWise_Click() Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

frmDistributorCommission.Show End Sub Private Sub mnuDistributorInfo_Click() frmDistributorInfo.Show End Sub Private Sub mnuDistributorinfoR_Click() frm_rptDistributor.Show End Sub Private Sub mnuDistributorMR_Click() frmDistributorMR.Show End Sub Private Sub mnuDistributorMRUpdate_Click() frmDistributorMRUpdate.Show End Sub Private Sub mnuDistributorOrder_Click() frmDistributorOrder.Show End Sub Private Sub mnuDistributorOut_Click() frmDistributorProductOut.Show End Sub Private Sub mnudistributorproductout_Click() frmDistributorProductOutUpdate.Show End Sub Private Sub mnuDistributorReturn_Click() frmDistributorReturn.Show End Sub Private Sub mnuDlostAdjust_Click() frmDistributorProductLossAdjust.Show End Sub Private Sub mnuEmployee_Click() End Sub Private Sub Marquee_Timer() On Error Resume Next Dim t As Double For t = 2 To Len(Trim(NewMess)) Unload imgChar(t) Next Dim rs As New ADODB.Recordset Dim A(100) As String Dim i As Integer Dim Count As Integer i=0 Count = 0 rs.Open "select * from MainStock", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF Count = Count + 1 rs.MoveNext Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006 Loop rs.MoveFirst Do While Not i = Count

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

A(i) = Trim(UCase(rs(0))) & "= " & CInt(rs(1)) i=i+1 rs.MoveNext Loop rs.Close Dim Temp$ For i = 0 To Count Temp$ = Temp$ + Space(1) + A(i) + Space(1) Next i PixelX = Screen.TwipsPerPixelX PixelY = Screen.TwipsPerPixelY FixMessage Temp$ InitImages Temp$ ScrollImage.Enabled = True End Sub Private Sub mnuEmployeeinf_Click() frm_rptEmployee.Show End Sub Private Sub mnuEmployeeInfo_Click() frmEmployeeInfo.Show End Sub Private Sub mnuFreeProduct_Click() frmFreeProduct.Show End 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) Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006 End Sub

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Private Sub mnulcdamageproduct_Click() frmLCDamageProduct.Show End Sub Private Sub mnulcdetails_Click() frmLcDetails.Show End Sub Private Sub mnulcinformation_Click() frmLcInformation.Show End Sub Private Sub mnulcothercost_Click() frmLCOtherCost.Show End Sub Private Sub mnulcprodinfo_Click() frmLcProductinfo.Show End Sub Private Sub mnulcproductreceived_Click() frmLcProductReceived.Show End Sub Private Sub mnulcreport_Click() frm_rptLcProductInfo.Show End Sub Private Sub mnuLoginReport_Click() frm_rptLogin.Show End Sub Private Sub mnuLogoff_Click() Unload Me frmUserLogin.Show frmSplash.Show End Sub Private Sub mnuMaketingProductReturn_Click() frmMarketingReturn.Show End Sub Private Sub mnuMarketingexepartyReport_Click() frm_rptMarketingPartyReport.Show End Sub Private Sub mnuMarketingInfo_Click() frmMarketingInfo.Show End Sub Private Sub mnuMarketingMR_Click() frmMarketingMR.Show End Sub Private Sub mnuMarketingOrer_Click() frmMarketingOrderMaster.Show End Sub Private Sub mnuMarketingReport_Click() frm_rptMarketingReport.Show Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006 End Sub

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Private Sub mnuMDistributor_Click() frmMarketingDistributorInfo.Show End Sub Private Sub mnupartyinformation_Click() frmPartyInformation.Show End Sub Private Sub mnuPartyOrder_Click() frmMarketingPartyOrder.Show End Sub Private Sub mnuPartySales_Click() frmMarketingPartySales.Show End Sub Private Sub mnuPersonalMR_Click() frmPersonalMR.Show End Sub Private Sub mnuPersonalSales_Click() frmPersonalSales.Show End Sub Private Sub FixMessage(Mess$) Mess$ = Space(60) + Trim(Mess$) + Space(25) 'OLD End Sub Private Sub mnuProductInfo_Click() frmProductInfo.Show End Sub Private Sub mnuProductionIn_Click() frmProductionIn.Show End Sub Private Sub mnuproductout_Click() frmMarketingProductOutUpdate.Show End Sub Private Sub mnuProductPrice_Click() frmProductPrice.Show End Sub Private Sub mnuproductreport_Click() frm_rptProduct.Show End Sub Private Sub mnuramainfactory_Click() frmPurchaseProductIn.Show End Sub Private Sub mnuRaw_Click() frm_rptRawInFactory.Show End Sub Private Sub mnuSales_Click() frm_rptSalesReport.Show Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006 End Sub

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Private Sub mnuSalesExecutiveMRUpdate_Click() frmMarketingMRUpdate.Show End Sub Private Sub mnuSEPO_Click() frmMarketingProductOut.Show End Sub Private Sub mnuSEXCarComm_Click() frmMarketingCommision.Show End Sub Private Sub mnuShutdown_Click() 'Unload Me Call MDIForm_QueryUnload(0, 0) End Sub Private Sub mnuStock_Click() frm_rptStock.Show End Sub Private Sub mnuUser_Click() frmNewUser.Show End Sub Private Sub mnuVerbal_Click() frm_rptVarbalReport.Show End Sub Private Sub mnuverbalorder_Click() frmVerbalRawMaterialOrder.Show End Sub Private Sub mnuverbalrawmaterislsmr_Click() frmVerbalRawMaterialMR.Show End Sub Private Sub mnuverbalrmdamageproduct_Click() frmVerbalRawMaterialDamage.Show End Sub Private Sub mnuverbalrmreceived_Click() frmVerbalRawMaterialReceived.Show End Sub Private Sub ScrollImage_Timer() picMessage.Left = picMessage.Left - 3 * PixelX If picMessage.Left < ReturnToStart Then picMessage.Left = 0 End If End Sub Private Sub InitImages(Mess$) On Error Resume Next Dim t As Integer Dim LeftLoc As Long Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

LeftLoc = 0 picMessage.Top = 0 picMessage.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 + 18 Next End Sub Private Sub imgChar_Click(Index As Integer) 'End End Sub

Module for the connection of Database: Public Cnn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim Dayrs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Public PTime, User As String Public IndividualEmp, LcProductReceived, LcProductReceivedall, LcDamage, LcDamagePro As String Public PDate1, PDate2, Raw, IndividualEmpSales, Verbal, VerbalOrder, AllEmpSales, DateFree, Free As String Public AllEmpSalesMR, IndividualEmpSalesMR, ProductPrice, MarketingOrderList, IndividualMarketing As String Public MarketingOut, Stock, MarketingReturn, PartyPay, IndividualDistributor As String Public DistributorOrderList, DistributorOut, DistributorReturn, DistributorAdvance, DistributorAdvance1 As String Public EmployeeMR, DistributorMR, MarketingMR, LoginData, ProductOut, ProductOrderList As String Public MarketingDistributorOrder, Distributorcommission, commission As String Public IndLcno As String Sub main() On Error Resume Next Cnn.ConnectionString = "dsn=ShahSoapS" Cnn.Open rs.Open "select * from DailyStock where SDate='" & Date & "'", Cnn, adOpenDynamic, adLockOptimistic If rs.EOF Then rs.Close rs.Open "select * from MainStock", Cnn, adOpenDynamic, adLockOptimistic Dayrs.Open "select * from DailyStock", Cnn, adOpenDynamic, adLockOptimistic Do 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") Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Dayrs("BadPiece") = rs("BadPiece") Dayrs.Update rs.MoveNext Loop rs.Close Dayrs.Close Set rs = Nothing Set Dayrs = Nothing Else rs.Close Set rs = Nothing End If frmMain.Show End Sub Public Sub Validation(KeyAscii As Integer) On Error Resume Next If KeyAscii = 8 Or KeyAscii = 46 Then Exit Sub If KeyAscii >= 48 And KeyAscii <= 58 Then Exit Sub Else 'MsgBox "Enter An Enteger Value", vbCritical + vbOKOnly KeyAscii = 0 End If End Sub Public Sub SS(Usr As String) On Error Resume Next Dim R As New ADODB.Recordset R.Open "select * from Users where UserName='" & Usr & "' ;", Cnn, adOpenDynamic, adLockOptimistic If R(2) = "Normal Users" Then frmMain.Show frmMain.mnupurchase.Enabled = False frmMain.mnuProductInfo.Enabled = False frmMain.mnuProductPrice.Enabled = False frmMain.mnuFreeProduct.Enabled = False frmMain.mnuMaketingProductReturn.Enabled = False frmMain.mnuDistributorReturn.Enabled = False frmMain.mnuDlostAdjust.Enabled = False frmMain.mnuReport.Enabled = False frmMain.mnuUser.Enabled = False frmMain.mnuBackUp.Enabled = False frmMain.mnuUpdat.Enabled = False Call Login(Usr) frmMain.Show Exit Sub End If If R(2) = "Guest" Then frmMain.Show frmMain.mnupurchase.Enabled = False frmMain.mnuproduct.Enabled = False frmMain.mnuPersonal.Enabled = False frmMain.mnuMarketing.Enabled = False frmMain.mnuDistributor.Enabled = False frmMain.mnuReport.Enabled = False frmMain.mnuUser.Enabled = False frmMain.mnuBackUp.Enabled = False frmMain.mnuUpdat.Enabled = False frmMain.mnuHelp.Enabled = False Exit Sub Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

End If If R(2) = "Administrators" Then frmMain.Show frmMain.mnulcprodinfo.Enabled = False frmMain.mnuProductInfo.Enabled = False frmMain.mnuProductPrice.Enabled = False frmMain.mnuFreeProduct.Enabled = False frmMain.mnuDlostAdjust.Enabled = False frmMain.mnuUser.Enabled = False frmMain.mnuUpdat.Enabled = False Call Login(Usr) frmMain.Show Exit Sub End If If R(2) = "Authority" Then frmMain.Show Call Login(Usr) frmMain.Show Exit Sub End If End Sub Public Sub Validationwithpoint(KeyAscii As Integer) On Error Resume Next If KeyAscii = 8 Or KeyAscii = 46 Then Exit Sub If KeyAscii >= 48 And KeyAscii <= 58 Then Exit Sub Else 'MsgBox "Enter An Enteger Value", vbCritical + vbOKOnly KeyAscii = 0 End If End Sub Public Sub ValidationNotPoint(KeyAscii As Integer) On Error Resume Next If KeyAscii = 8 Or KeyAscii = 32 Then Exit Sub If KeyAscii >= 48 And KeyAscii <= 57 Then Exit Sub Else KeyAscii = 0 End If End Sub Private Sub Login(Name As String) PTime = Time() User = Name End Sub Module for the Help: Option Explicit Global Const HELP_CONTEXT = &H1 ' Display topic in ulTopic Global Const HELP_QUIT = &H2 ' Terminate help Global Const HELP_INDEX = &H3 ' Display index Global Const HELP_CONTENTS = &H3 Global Const HELP_HELPONHELP = &H4 ' Display help on using help Global Const HELP_SETINDEX = &H5 ' Set the current Index for multi index help Global Const HELP_SETCONTENTS = &H5 Global Const HELP_CONTEXTPOPUP = &H8 Global Const HELP_FORCEFILE = &H9 Global Const HELP_KEY = &H101 ' Display topic for keyword in dwData Global Const HELP_COMMAND = &H102 Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Global Const HELP_POPUPID = &H104 Global Const HELP_PARTIALKEY = &H105 ' Partial key search (display search dialog) Global Const HELP_CLOSEWINDOW = &H107 Global Const HELP_CONTEXTNOFOCUS = &H108 Global Const HELP_MULTIKEY = &H201 Global Const HELP_SETWINPOS = &H203 ' API declarations Public Const HBWM_KEYDOWN = &H100 Public Const HBVK_F1 = &H70 Declare Function HbSendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long ' Function declarations Declare Function WinHelp32V Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As String) As Long Declare Function WinHelp32L Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, dwData As Long) As Long Function HelpContents(rfrmMain As Form) As Long HelpContents = WinHelp(rfrmMain.hwnd, App.HelpFile, HELP_INDEX, 0) End Function Function HelpSearch(rfrmMain As Form) As Long Dim lsDummy As String lsDummy = "" HelpSearch = WinHelp(rfrmMain.hwnd, App.HelpFile, HELP_PARTIALKEY, lsDummy) End Function Function HelpUsing(rfrmMain As Form) As Long HelpUsing = WinHelp(rfrmMain.hwnd, "", HELP_HELPONHELP, 0) End Function Function 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 If End Function Sub 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 Recordset Private Sub addUser_Click() frmAddUser.Show End Sub Private Sub MDIForm_Load() rs1.Open "select * From CreatUser ", cnn, adOpenDynamic, adLockOptimistic If rs1.EOF Then frmAddUser.Show frmAddUser.cmblabel.Text = "Administrator" frmAddUser.cmbempid.Text = "E0000" frmAddUser.cmblabel.Enabled = False frmAddUser.cmbempid.Enabled = False Else enab frmLogin.Show End If Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs1.Close End Sub Private Sub mnuabout_Click() frmAbout.Show End Sub Private Sub mnuAttendence_Click() frmAttend.Show End Sub Private Sub mnuContaint_Click() Dim hwndHelp As Long hwndHelp = HtmlHelp(hWnd, "help.chm", HH_DISPLAY_TOPIC, 0) End Sub Private Sub mnuDatabasebackup_Click() On Error Resume Next Dim ComDate As Date Dim a As String Dim strDBPath As String a = MsgBox("Do You Want To Backup DataBase ?", vbQuestion + vbYesNo) If a = vbYes Then Screen.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 strSQLDataBackup Screen.MousePointer = vbNormal End If End Sub Private Sub mnudexp_Click() frmdailyexpn.Show End Sub Private Sub mnuef_Click() frmLogin.Show End Sub Private Sub mnuempinfo_Click() frmempinfo.Show End Sub Private Sub mnuExit_Click() End End Sub Private Sub mnuLeave_Click() frmLeaveAdmin.Show End Sub Private Sub mnuLogoff_Click() enab End Sub Private Sub mnulossprofite_Click() frmlossprofit.Show End Sub Private Sub mnupayment_Click() frmPayment.Show End Sub Private Sub mnuPerchase_Click() frmperchase.Show End Sub Private Sub mnuReLog_Click() frmLogin.Show End Sub Private Sub mnuSalary_Structure_Click() frmSstructure.Show End Sub Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Private Sub mnuSell_Click() frmsell.Show End Sub Private Sub mnuSet_Price_Click() g=1 frmsetprice.Show End Sub Private Sub mnutemp_Click() Form1.Show End Sub Private Sub Timer1_Timer() ForeColor = BackColor FontSize = 55 FontName = "TIMES NEW ROMAN" CurrentX = tx + 10 CurrentY = ty Print "THIS PROJECT IS DEVOLOPED BY S.M. ROKIBUZZAMAN (NEON)" ForeColor = QBColor(9) CurrentX = tx CurrentY = ty Print "THIS PROJECT IS DEVOLOPED BY S.M. ROKIBUZZAMAN (NEON)" tx = tx - 10 End Sub Private Sub ttest_Click(Index As Integer) frmsetprice.Show End Sub Private Sub mnuSexp_Click() frmtotalexp.Show End Sub Private Sub enab() 'mnuef.Enabled = False 'mnuAttendence.Enabled = False mnuempinfo.Enabled = False mnuSet_Price.Enabled = False mnuPerchase.Enabled = False mnulossprofite.Enabled = False mnuSell.Enabled = False mnuUser.Enabled = False mnuexpinfo.Enabled = False mnuEmployee.Enabled = False mnuDatabasebackup.Enabled = False End Sub Private Sub mnusyslog_Click() Dim d As Date d = Date DataEnvironment13.Connection1.Open DataEnvironment13.Command1 (d) DataReport11.Show End Sub
LC Product Information Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Private Sub cboWtype_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSave_Click() On Error Resume Next If cboPName.text = "" Then

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

MsgBox "Please Enter The Product Name ", vbCritical + vbOKOnly cboPName.SetFocus Exit Sub ElseIf txtPtype.text = "" Then MsgBox "Please Enter The Product Type ", vbCritical + vbOKOnly txtPtype.SetFocus Exit Sub ElseIf txtCountry.text = "" Then MsgBox "Please Enter The Country of Origin", vbCritical + vbOKOnly txtCountry.SetFocus Exit Sub ElseIf 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, adLockOptimistic rs.AddNew rs("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.Update rs.Close rs1.Open "select * from LcMainStock", Cnn, adOpenDynamic, adLockOptimistic rs1.AddNew rs1("ProductName") = Trim(cboPName.text) rs1("ProductType") = Trim(txtPtype.text) rs1.Update rs1.Close cboPName.AddItem Trim(cboPName.text) cboPName.text = "" txtPtype.text = "" txtCountry.text = "" cboWtype.text = "" txtltr.text = "" Unload Me Load Me End Sub Private Sub Form_Load() On Error Resume Next 'rs1.CursorLocation = adUseClient rs2.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimistic rs2.MoveFirst Do While Not rs2.EOF cboPName.AddItem rs2(0) rs2.MoveNext Loop Call Gr cboWtype.AddItem "Litre", 0 cboWtype.AddItem "KG", 1 cboWtype.AddItem "Pices", 2 End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next Set rs = Nothing End Sub Private Sub txtltr_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub Gr()

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "Select * from LcProductInfo", Cnn, adOpenDynamic, adLockOptimistic Set DG.DataSource = rs1 End Sub LC INFORMATION Dim rs As New ADODB.Recordset Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSave_Click() On Error Resume Next If 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 Sub ElseIf 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 Sub ElseIf txtExname.text = "" Then MsgBox "Please Enter The Exporter Name ", vbCritical + vbOKOnly txtExname.SetFocus Exit Sub ElseIf txtImpname.text = "" Then MsgBox "Please Enter The Importer Name ", vbCritical + vbOKOnly txtImpname.SetFocus Exit Sub ElseIf txtCnfAdd.text = "" Then MsgBox "Please Enter CNF Address ", vbCritical + vbOKOnly txtCnfAdd.SetFocus Exit Sub ElseIf txtBank.text = "" Then MsgBox "Please Enter The Bank Name ", vbCritical + vbOKOnly txtBank.SetFocus Exit Sub ElseIf txtBranch.text = "" Then MsgBox "Please Enter The Branch Name ", vbCritical + vbOKOnly txtBranch.SetFocus Exit Sub ElseIf txtPreBank.text = "" Then MsgBox "Please Enter The Preferred Bank Name ", vbCritical + vbOKOnly txtPreBank.SetFocus Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from LcInformation", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("ProformaInvoiceNo") = Trim(txtPinv.text) rs("ProformaDate") = DDate.Value rs("LCANo") = Trim(txtLcano.text) rs("LCADate") = Ddate1.Value rs("LCNo") = Trim(txtLcno.text) rs("LCDate") = Ddate2.Value rs("HSCode") = Trim(txtHscode.text) rs("ExporterName") = Trim(txtExname.text) rs("ImporterName") = Trim(txtImpname.text) rs("CNFAgentName") = Trim(txtCnfname.text) rs("CNFAgentAddress") = Trim(txtCnfAdd.text)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs("BankName") = Trim(txtBank.text) rs("Branch") = Trim(txtBranch.text) rs("PreferredBank") = Trim(txtPreBank.text) rs("CountryBranch") = Trim(txtCountry.text) rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal txtPinv.text = "" txtLcano.text = "" txtLcno.text = "" txtImpname.text = "" txtCnfname.text = "" txtBranch.text = "" txtPreBank.text = "" txtCountry.text = "" DDate.Value = Date Ddate1.Value = Date Ddate2.Value = Date End Sub Private Sub Form_Load() On Error Resume Next DDate.Value = Date Ddate1.Value = Date Ddate2.Value = Date End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next rs.Close Set rs = Nothing End Sub LC DETAILS Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim remove As Boolean Private Sub cboCurrency_Click() If cboCurrency.text = "EURO" Then Label8.Caption = "Total Euro" Exit Sub ElseIf cboCurrency.text = "Rupee" Then Label8.Caption = "Total Rupee" Exit Sub ElseIf cboCurrency.text = "US Dollar" Then Label8.Caption = "Total Dollar(US$$)" Exit Sub ElseIf cboCurrency.text = "YEN" Then Label8.Caption = "Total YEN" Exit Sub End If End Sub Private Sub cboCurrency_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboLcno_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select LCNo from LcInformation where LCNo='" & cbolcno.text & "' ", Cnn, adOpenDynamic, adLockOptimistic rs1.Close End Sub Private Sub cboLcno_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPname_Click() On Error Resume Next

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

cboPType.clear rs.Close rs.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPType.AddItem rs(0) rs.MoveNext Loop rs.Close cboPType.ListIndex = 0 End Sub Private Sub cboPname_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If 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 Sub ElseIf cboPType.text = "" Then MsgBox "Please Select The Product Type", vbCritical + vbOKOnly cboPType.SetFocus Exit Sub ElseIf 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 If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cbolcno.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPType.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtValue.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatecurrency.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtQty.text

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = cboCurrency hsGrid.TextMatrix(hsGrid.Rows - 1, 8) = txtTotal.text hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.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 Then hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cbolcno hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPName hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPType hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtValue hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatecurrency hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtQty hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = cboCurrency hsGrid.TextMatrix(hsGrid.Rows - 1, 8) = txtTotal hsGrid.Rows = hsGrid.Rows + 1 End If cmdRemove.Enabled = True cmdSave.Enabled = True cbolcno.Enabled = False End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cbolcno.text = "" cboPName.text = "" cboPType.text = "" txtTotal.text = "" txtGtotal.text = "" End Sub Private Sub cmdexit_Click() Unload Me End Sub Private 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 If End Sub Private Sub cmdSave_Click() On Error Resume Next If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If Cnn.BeginTrans Dim rs2 As New ADODB.Recordset rs2.Open "select * from LcDetails", Cnn, adOpenDynamic, adLockOptimistic Dim i As Integer For i = 1 To hsGrid.Rows - 2 rs2.AddNew rs2("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)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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.Update Next i rs2.Close Cnn.CommitTrans Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cbolcno.text = "" txtGtotal.text = "" cmdRemove.Enabled = True cmdSave.Enabled = False cbolcno.Enabled = True End Sub Private Sub Form_Load() On Error Resume Next cboPType.clear rs1.Open "select * from LcInformation ORDER BY LCDate", Cnn, adOpenDynamic, adLockOptimistic rs1.MoveFirst Do While Not rs1.EOF cbolcno.AddItem Trim(rs1(4)) rs1.MoveNext Loop rs1.Close rs.Open "select distinct ProductName from LcProductInfo ", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPName.AddItem rs(0) rs.MoveNext Loop rs.Close cboCurrency.AddItem "EURO", 0 cboCurrency.AddItem "Rupee", 1 cboCurrency.AddItem "Swiss Frank", 2 cboCurrency.AddItem "US Dollar", 3 cboCurrency.AddItem "UK POUND", 4 cboCurrency.AddItem "YEN", 5 hsGrid.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 = Nothing cmdRemove.Enabled = False cmdSave.Enabled = False End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtQty_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtRatecurrency_Change() On Error Resume Next txtTotal.text = 0 txtTotal.text = Val(txtValue.text) * Val(txtRatecurrency.text) End Sub Private Sub txtRatecurrency_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTotal_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006
End Sub LC Product Received

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim rs3 As New ADODB.Recordset Dim rs4 As New ADODB.Recordset Dim remove As Boolean Dim blnClickStander2 As Boolean Private Sub cboLcno_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select LCNo from LcInformation where LCNo='" & cbolcno.text & "' ", Cnn, adOpenDynamic, adLockOptimistic rs1.Close cboPName.clear cboPType.clear rs1.Open "select distinct ProductName,ProductType from LcDetails where LcNo = '" & cbolcno.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs1.MoveFirst Do While Not rs1.EOF cboPName.AddItem Trim(rs1("ProductName")) cboPType.AddItem Trim(rs1("ProductType")) rs1.MoveNext Loop rs1.Close End Sub Private Sub cboLcno_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPname_Click() On Error Resume Next cboPType.clear rs.Close rs.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPType.AddItem rs(0) rs.MoveNext Loop rs.Close cboPType.ListIndex = 0 End Sub Private Sub cboPname_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If cbolcno.text = "" Then MsgBox "Please Select the LC Number.", vbCritical + vbOKOnly cbolcno.SetFocus Exit Sub ElseIf txtInvno.text = "" Then MsgBox "Please Enter the Invoice No.", vbCritical + vbOKOnly txtInvno.SetFocus Exit Sub ElseIf cboPType.text = "" Then MsgBox "Please Select The Product Type.", vbCritical + vbOKOnly txtPlace.SetFocus Exit Sub ElseIf txtTltrkg.text = 0 Or txtTltrkg.text = "" Then MsgBox "Please Enter the Total Litre/Kg.", vbCritical + vbOKOnly txtTltrkg.text = "" txtTltrkg.SetFocus Exit Sub ElseIf txtQty.text = 0 Or txtQty.text = "" Then

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

MsgBox "Please Enter the Product Quantity Number.", vbCritical + vbOKOnly txtQty.text = "" txtQty.SetFocus Exit Sub ElseIf txtRate.text = 0 Or txtRate.text = "" Then MsgBox "Please Enter the Product Rate", vbCritical + vbOKOnly txtRate.text = "" txtRate.SetFocus Exit Sub End If If InvoiceDate.Value > ConDate.Value Then MsgBox "Invoice Date Should be Less Than Consignment Date.", vbInformation + vbOKOnly InvoiceDate.SetFocus Exit Sub End If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i cbolcno.Enabled = False ConDate.Enabled = False txtInvno.Enabled = False InvoiceDate.Enabled = False cmdSave.Enabled = True Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cbolcno.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPType.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtQty.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtTltrkg.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtRate.text hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtTotalAmt.text hsGrid.TextMatrix(hsGrid.Rows - 1, 8) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmt.text) cboPName.text = "" cboPType.text = "" txtQty.text = "" txtTltrkg.text = "" txtRate.text = "" txtTotalAmt.text = "" txtRemarks.text = "" End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k txtRate.text = "" txtTotalAmt.text = "" txtInvno.text = "" txtGtotal.text = "" txtTruckNo.text = "" txtDriver.text = "" cbolcno.Enabled = True

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

ConDate.Enabled = True txtInvno.Enabled = True InvoiceDate.Enabled = True ConDate.Value = Date InvoiceDate.Value = Date End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cmdSave_Click() On Error Resume Next If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If If 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 Sub End If Cnn.BeginTrans Dim j As Integer For j = 1 To hsGrid.Rows - 2 rs4.Open " select * from LcMainStock where ProductName='" & hsGrid.TextMatrix(j, 2) & "' And ProductType='" & hsGrid.TextMatrix(j, 3) & "'", Cnn, adOpenDynamic, adLockOptimistic rs4("Qty") = Val(rs4("Qty")) + Val(hsGrid.TextMatrix(j, 4)) rs4("LiterKg") = Val(rs4("LiterKg")) + Val(hsGrid.TextMatrix(j, 5)) rs4.Update rs4.Close Next j Dim rs2 As New ADODB.Recordset rs2.Open "select * from LcProductReceive", Cnn, adOpenDynamic, adLockOptimistic Dim i As Integer For i = 1 To hsGrid.Rows - 2 rs2.AddNew rs2("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) rs2("Rate") = hsGrid.TextMatrix(i, 6) rs2("TotalAmount") = hsGrid.TextMatrix(i, 7) rs2("Remarks") = hsGrid.TextMatrix(i, 8) rs2("ConsignDate") = ConDate.Value rs2("InvoiceDate") = InvoiceDate.Value rs2("InvoiceNo") = txtInvno.text 'rs2("TruckNo") = hsGrid.TextMatrix(1, 12) 'rs2("DriverName") = hsGrid.TextMatrix(1, 13) rs2.Update

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Next i rs2.Close Cnn.CommitTrans Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k rs3.Open "select * from LCProductreceivedMaster", Cnn, adOpenDynamic, adLockOptimistic rs3.AddNew rs3(0) = cbolcno.text rs3(1) = ConDate.Value rs3(2) = txtInvno.text rs3(3) = InvoiceDate.Value rs3(4) = txtTruckNo.text rs3(5) = txtDriver.text rs3(6) = txtGtotal.text rs3.Update rs3.Close cbolcno.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 = True InvoiceDate.Enabled = True cmdRemove.Enabled = True ConDate.Value = Date InvoiceDate.Value = Date End Sub Private Sub Form_Load() On Error Resume Next cboPType.clear rs1.Open "select * from LcInformation ORDER BY LCDate", Cnn, adOpenDynamic, adLockOptimistic rs1.MoveFirst Do While Not rs1.EOF cbolcno.AddItem Trim(rs1(4)) rs1.MoveNext Loop rs1.Close rs.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPName.AddItem rs(0) rs.MoveNext Loop rs.Close blnClickStander2 = False hsGrid.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" 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 = Date InvoiceDate.Value = Date End Sub Private Sub txtQty_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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Private Sub txtRate_Change() On Error Resume Next 'txtRate.text = 0 txtTotalAmt.text = Val(txtQty.text) * Val(txtRate.text) End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtRate_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTltrkg_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTotalAmt_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub LC OTHER COST Dim rs1 As New ADODB.Recordset Dim rs As New ADODB.Recordset Private Sub Command3_Click() Unload Me End Sub Private Sub cboLcno_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select LCNo from LcInformation where LCNo='" & cbolcno.text & "' ", Cnn, adOpenDynamic, adLockOptimistic rs1.Close End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSave_Click() On Error Resume Next If cbolcno.text = "" Then MsgBox "Please Select The LC No from The Selected Box.", vbCritical + vbOKOnly cbolcno.SetFocus Exit Sub End If If txtCnfcost.text = "" Then MsgBox "Please Enter The CNF Agent Charge/Cost ", vbCritical + vbOKOnly txtCnfcost.SetFocus Exit Sub ElseIf txtTax.text = "" Then MsgBox "Please Enter The Tax ", vbCritical + vbOKOnly txtTax.SetFocus Exit Sub ElseIf 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 Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from LCOtherCost", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("LCNo") = Trim(cbolcno.text) rs("ConsignDate") = ConDate.Value rs("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)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal cbolcno.text = "" txtCnfcost.text = "" txtMisce.text = "" txtTax.text = "" txtLcost.text = "" txtUcost.text = "" txtOcost.text = "" ConDate.Value = Date End Sub Private Sub Form_Load() On Error Resume Next rs1.Open "select * from LcInformation ORDER BY LCDate", Cnn, adOpenDynamic, adLockOptimistic rs1.MoveFirst Do While Not rs1.EOF cbolcno.AddItem Trim(rs1(4)) rs1.MoveNext Loop rs1.Close ConDate.Value = Date End Sub Private Sub txtCnfcost_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtLcost_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtMisce_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtOcost_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTax_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtUcost_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub LC DAMAGE PRODUCT LOSS Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim remove1 As Boolean Dim AA As Integer Private Sub cboLcno_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select LCNo from LcInformation where LCNo='" & cbolcno.text & "' ", Cnn, adOpenDynamic, adLockOptimistic rs1.Close cboPName.clear cboPType.clear rs1.Open "select distinct ProductName,ProductType from LcDetails where LcNo = '" & cbolcno.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs1.MoveFirst Do While Not rs1.EOF cboPName.AddItem Trim(rs1("ProductName")) cboPType.AddItem Trim(rs1("ProductType")) rs1.MoveNext Loop rs1.Close rs1.Open "select CNFAgentName from LcInformation where LCNo = '" & cbolcno.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs1.MoveFirst Do While Not rs1.EOF txtCnfname.text = Trim(rs1("CNFAgentName")) ' txtCnfname.SelText

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006
rs1.MoveNext Loop End Sub

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Private Sub cboLcno_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPname_Click() On Error Resume Next cboPType.clear rs.Close rs.Open "select distinct ProductType from LcProductInfo where ProductName='" & Trim(cboPName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPType.AddItem rs(0) rs.MoveNext Loop rs.Close cboPType.ListIndex = 0 End Sub Private Sub cboPname_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPType_Click() On Error Resume Next Dim rsnew As New ADODB.Recordset AA = 0 rsnew.Open "select QtyPerDrum from LcProductInfo where ProductName='" & Trim(cboPName.text) & "' and ProductType='" & Trim(cboPType.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rsnew.EOF Then AA = rsnew(0) End If End Sub Private Sub cboPType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If 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 Sub ElseIf 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 ElseIf txtTltrkg.text = 0 Or txtTltrkg.text = "" Then MsgBox "Please Enter the Damage Product Litre/Kg", vbCritical + vbOKOnly txtTltrkg.text = "" txtTltrkg.SetFocus Exit Sub ElseIf txtTotal.text = 0 Or txtTotal.text = "" Then MsgBox "Please Enter Total Taka", vbCritical + vbOKOnly txtTotal.text = "" txtTotal.SetFocus Exit Sub End If Dim ROW As Integer ROW = hsGrid.Rows

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

For i = 1 To ROW - 1 If 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 Sub End If Next i Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cbolcno.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = ConDate.Value hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCnfname.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = cboPName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = cboPType.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtQty.text hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtTltrkg.text hsGrid.TextMatrix(hsGrid.Rows - 1, 8) = txtTotal.text hsGrid.TextMatrix(hsGrid.Rows - 1, 9) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.text = Val(txtGtotal.text) + Val(txtTotal.text) cboPName.text = "" cboPType.text = "" txtQty.text = "" txtTltrkg.text = "" txtTotal.text = "" ''txtCnfname.text = "" txtRemarks.text = "" cbolcno.Enabled = False ConDate.Enabled = False cmdRemove.Enabled = True End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cbolcno.text = "" cboPName.text = "" cboPType.text = "" txtQty.text = "" txtTltrkg.text = "" txtTotal.text = "" txtCnfname.text = "" txtRemarks.text = "" txtGtotal.text = "" cbolcno.Enabled = True ConDate.Enabled = True ConDate.Value = Date End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information" End If End Sub Private Sub cmdSave_Click() On Error Resume Next If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If Cnn.BeginTrans Dim rs2 As New ADODB.Recordset rs2.Open "select * from LcDamageProductLoss", Cnn, adOpenDynamic, adLockOptimistic Dim i As Integer For i = 1 To hsGrid.Rows - 2 rs2.AddNew rs2("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.Update Next i rs2.Close Cnn.CommitTrans Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k txtGtotal.text = "" txtQty.text = "" cmdRemove.Enabled = True ConDate.Value = Date cbolcno.Enabled = True ConDate.Enabled = True End Sub Private Sub hsGrid_Click() remove1 = True End Sub Private Sub Form_Load() On Error Resume Next cboPType.clear rs1.Open "select * from LcInformation ORDER BY LCDate", Cnn, adOpenDynamic, adLockOptimistic rs1.MoveFirst Do While Not rs1.EOF cbolcno.AddItem Trim(rs1(4)) rs1.MoveNext Loop rs1.Close rs.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPName.AddItem rs(0) rs.MoveNext Loop rs.Close hsGrid.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"

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

hsGrid.TextMatrix(0, 8) = "Total TK" hsGrid.TextMatrix(0, 9) = "Remarks" remove1 = False cmdRemove.Enabled = False ConDate.Value = Date End Sub Private Sub txtQty_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTltrkg_Change() On Error Resume Next txtQty.text = Val(txtTltrkg.text) / Val(AA) End Sub Private Sub txtTltrkg_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTotal_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub XPButton1_Click() End Sub PARTY INFORMATION Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSave_Click() On Error Resume Next If 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 Sub ElseIf 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 Sub ElseIf txtAddress.text = "" Then MsgBox "Please Enter The Address ", vbCritical + vbOKOnly txtAddress.SetFocus Call Gr Exit Sub ElseIf 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 = vbHourglass

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Cnn.BeginTrans rs.Open "select * from RawPartyInfo", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("PartyName") = txtPName.text rs("ProperitorName") = txtProName rs("District") = txtDistrict.text rs("Address") = txtAddress.text rs("Phone") = txtphone.text rs("Mobile") = txtMobileNo.text rs("Division") = Cbodivision.text rs.Update rs.Close rs1.Open "select * from RawPartyAC", Cnn, adOpenDynamic, adLockOptimistic rs1.AddNew rs1("PartyName") = txtPName.text rs1.Update rs1.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Call Gr txtPName.text = "" txtProName.text = "" txtDistrict.text = "" txtAddress.text = "" txtphone.text = "" txtMobileNo.text = "" Cbodivision.text = "" End Sub Private Sub Form_Load() On Error Resume Next Cbodivision.AddItem "Barisal", 0 Cbodivision.AddItem "Chittagong", 1 Cbodivision.AddItem "Dhaka", 2 Cbodivision.AddItem "Khulna", 3 Cbodivision.AddItem "Rajshahi", 4 Cbodivision.AddItem "Sylhet", 5 Call Gr End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next Set rs = Nothing End Sub Private Sub Gr() On Error Resume Next Dim rsD As New ADODB.Recordset rsD.CursorLocation = adUseClient rsD.Open "Select * from RawPartyInfo", Cnn, adOpenDynamic, adLockOptimistic Set DGrid.DataSource = rsD End Sub RAW MATERIALS ORDER TO PARTY(VERBAL) Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim rs3 As New ADODB.Recordset Dim rs4 As New ADODB.Recordset Dim blnClickStander2 As Boolean Dim remove As Boolean Dim LK As Double Private Sub cboPartyName_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select distinct PartyName from RawPartyInfo where PartyName='" & Trim(cboPartyName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic rs1.Close End Sub Private Sub cboPartyName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Private Sub cboPname_Click() On Error Resume Next cboPType.clear rs.Close rs.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPType.AddItem rs(0) rs.MoveNext Loop rs.Close cboPType.ListIndex = 0 txtOrderRate.text = "" txtQuantity.text = "" txtTotalLKg.text = "" txtTotal.text = "" Dim rs5 As New ADODB.Recordset LK = 0 rs5.Open "select * from LcProductInfo where ProductName='" & Trim(cboPName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic LK = rs5("QtyPerDrum") rs5.Close txtTotalLKg.text = "" End Sub Private Sub cboPname_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If txtOrder.text = "" Then MsgBox "Please Enter An Order Number.", vbCritical + vbOKOnly txtOrder.SetFocus Exit Sub ElseIf cboPartyName.text = "" Then MsgBox "Please Select The Party Name.", vbCritical + vbOKOnly cboPartyName.SetFocus Exit Sub ElseIf txtcontactPerson.text = "" Then MsgBox "Please Enter The Contact Person Name.", vbCritical + vbOKOnly txtcontactPerson.SetFocus Exit Sub ElseIf cboPName.text = "" Then MsgBox "Please Select The Product Name.", vbCritical + vbOKOnly cboPName.SetFocus Exit Sub ElseIf cboPType.text = "" Then MsgBox "Please Select The Product Type.", vbCritical + vbOKOnly cboPType.SetFocus Exit Sub ElseIf txtOrderRate.text = "" Or Val(txtOrderRate.text) = 0 Then MsgBox "Please Enter The Order Rate.", vbCritical + vbOKOnly txtOrderRate.SetFocus Exit Sub ElseIf txtQuantity.text = "" Or Val(txtQuantity.text) = 0 Then MsgBox "Please Enter The Order Quantity.", vbCritical + vbOKOnly txtQuantity.SetFocus Exit Sub ElseIf 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.Recordset rs2.Open "select * from VerbalReceivedMaster where OrderNo='" & Trim(txtOrder.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs2.EOF Then MsgBox "This Order Number Is Already Saved." & Chr(13) & "Enter Another Order No.", vbInformation + vbOKOnly Call cmdClear_Click

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Exit Sub End If rs2.Close If DelivaryDate.Value < OrderDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly OrderDate.SetFocus Exit Sub End If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next 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 Integer introw1 = hsGrid.Rows - 1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtOrder hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPName hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPType hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtOrderRate hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtQuantity hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalLKg hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtTotal hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.text = Val(txtGtotal.text) + Val(txtTotal.text) cboPName.text = "" cboPType.text = "" txtOrderRate.text = 0 txtQuantity.text = 0 txtTotalLKg.text = 0 txtTotal.text = 0 cmdRemove.Enabled = True cmdSave.Enabled = True If hsGrid.Rows = 2 Then hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtOrder hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPName hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPType hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtOrderRate hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtQuantity.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalLKg.text hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtTotal.text hsGrid.Rows = hsGrid.Rows + 1 End If End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k OrderDate.Enabled = True DelivaryDate.Enabled = True cboPartyName.Enabled = True txtcontactPerson.Enabled = True DTTime.Enabled = True OrderTime.Enabled = True txtOrder.text = "" DTTime.Value = Time OrderDate.Value = Date

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

DelivaryDate.Value = Date cboPartyName.text = "" cboPName.text = "" cboPType.text = "" txtcontactPerson.text = "" txtOrderRate.text = "" txtQuantity.text = "" txtTotalLKg.text = "" txtTotal.text = "" txtGtotal.text = "" End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cmdSave_Click() On Error Resume Next If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If Dim i As Integer Screen.MousePointer = vbHourglass Cnn.BeginTrans rs3.Open "select * from VerbalOrderMaster", Cnn, adOpenDynamic, adLockOptimistic rs3.AddNew rs3("OrderNo") = Trim(txtOrder.text) rs3("OrderDate") = Trim(OrderDate.Value) rs3("OrderTime") = OrderTime.Value rs3("Delivary") = DelivaryDate.Value rs3("PartName") = cboPartyName.text rs3("ContactPerson") = txtcontactPerson.text rs3("TotalAmount") = txtGtotal.text rs3.Update rs3.Close rs4.Open "select * from VerbalOrderDetails", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rs4.AddNew rs4("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.Update Next i Cnn.CommitTrans Screen.MousePointer = vbNormal rs4.Close OrderDate.Value = Date DelivaryDate.Value = Date OrderTime.Value = Time Call cmdClear_Click End Sub Private Sub Form_Load() On Error Resume Next

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs1.Open "select * from RawPartyInfo", Cnn, adOpenDynamic, adLockOptimistic rs1.MoveFirst Do While Not rs1.EOF cboPartyName.AddItem Trim(rs1(0)) rs1.MoveNext Loop rs1.Close rs.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPName.AddItem rs(0) rs.MoveNext Loop rs.Close cmdSave.Enabled = False cmdRemove.Enabled = False hsGrid.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 = Date DelivaryDate.Value = Date OrderTime.Value = Time End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next rs.Close rs1.Close rs2.Close rs3.Close rs4.Close Set rs = Nothing Set rs1 = Nothing Set rs2 = Nothing Set rs3 = Nothing Set rs4 = Nothing End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub InTime_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date) End Sub Private Sub txtOrderRate_Change() On Error Resume Next txtTotal.text = 0 txtTotal.text = Val(txtQuantity.text) * Val(txtOrderRate.text) End Sub Private Sub txtOrderRate_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtQuantity_Change() On Error Resume Next txtTotal.text = Val(txtOrderRate.text) * Val(txtQuantity.text) txtTotalLKg.text = Val(txtQuantity.text) * Val(LK) End Sub Private Sub txtQuantity_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTotalLKg_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub RAW MATERIALS RECEIVED FROM PARTY(Verbal) Dim rsSave As New ADODB.Recordset

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Dim rs As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim rs3 As New ADODB.Recordset Dim rs4 As New ADODB.Recordset Dim rs5, rs6 As New ADODB.Recordset Dim Qty As Double Dim remove As Boolean Dim Total As Double Private Sub cboOrder_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select OrderDate,PartName from VerbalOrderMaster where OrderNo='" & Trim(CboOrder.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic OrderDate.text = rs1("OrderDate") cboPartyName.text = rs1("PartName") OrderDate.Enabled = False cboPartyName.Enabled = False rs1.Close cboPName.clear rs6.Open "select distinct ProductName from VerbalOrderDetails where OrderNo = '" & CboOrder.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs6.MoveFirst Do While Not rs6.EOF cboPName.AddItem Trim(rs6("ProductName")) rs6.MoveNext Loop rs6.Close Dim rs4 As New ADODB.Recordset rs4.CursorLocation = adUseClient rs4.Open "select ProductName,ProductType,Qty as Quantity,TotalLiterKg,Rate,Amount as Amount_TK from VerbalOrderDetails where OrderNo='" & Trim(CboOrder.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Set OrderGrid.DataSource = rs4 End Sub Private Sub cboOrder_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPartyName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPname_Click() On Error Resume Next cboPType.clear rs.Close rs.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPType.AddItem rs(0) rs.MoveNext Loop rs.Close cboPType.ListIndex = 0 txtReRate.text = "" txtQuantity.text = "" txtDrum.text = "" txtTotalAmount.text = "" End Sub Private Sub cboPname_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If CboOrder.text = "" Then MsgBox "Please Select The Order No", vbOKOnly CboOrder.SetFocus Exit Sub ElseIf cboPartyName.text = "" Then

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

MsgBox "Please Select The Party Name", vbOKOnly cboPartyName.SetFocus Exit Sub ElseIf cboPName.text = "" Then MsgBox "Please Select The Product Name", vbOKOnly cboPName.SetFocus Exit Sub ElseIf cboPType.text = "" Then MsgBox "Please Select Product Type Name", vbOKOnly cboPType.SetFocus Exit Sub ElseIf txtReRate.text = "" Then MsgBox "Please Enter The Product Rate", vbOKOnly txtReRate.SetFocus Exit Sub ElseIf txtQuantity.text = "" Then MsgBox "Please Enter The Right Quantity", vbOKOnly txtQuantity.SetFocus Exit Sub ElseIf txtTotalLKg.text = "" Then MsgBox "Please Enter The Total Liter KG", vbOKOnly txtTotalLKg.SetFocus Exit Sub End If Dim rsCh As New ADODB.Recordset rsCh.Open "select * from VerbalReceivedMaster where OrderNo='" & Trim(CboOrder.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rsCh.EOF Then MsgBox "This Record Is Already Existed. Enter Another Record..", vbInformation + vbOKOnly CboOrder.SetFocus Exit Sub Else rsCh.Close End If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i CboOrder.Enabled = False OrderDate.Enabled = False ReceivedDate.Enabled = False ReceivedTime.Enabled = False cboPartyName.Enabled = False ReceivedTime.Enabled = False introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = CboOrder.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = cboPType.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtReRate.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtQuantity.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalLKg.text hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtDrum.text hsGrid.TextMatrix(hsGrid.Rows - 1, 8) = txtTotalAmount.text hsGrid.TextMatrix(hsGrid.Rows - 1, 9) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.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 = False

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

OrderDate.Enabled = False cboPartyName.Enabled = False cmdRemove.Enabled = True cmdSave.Enabled = True End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer Total = 0 CboOrder.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 = True ReceivedTime.Enabled = True CboOrder.Enabled = True ReceivedTime.Enabled = True For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k txtGtotal.text = "" txtGTotF.text = "" Call cboOrder_Click End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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)) 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 If cboPName.text = "" txtReRate.text = "" cboPType.text = "" txtQuantity.text = "" txtTotalLKg.text = "" txtDrum.text = "" txtTotalAmount.text = "" txtRemarks.text = "" txtGtotal.text = "" txtGTotF.text = "" End Sub Private Sub cmdSave_Click() On Error Resume Next If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

If txtTruckDriverNam.text = "" Then MsgBox "Please Enter Track Driver Name.", vbCritical + vbOKOnly txtTruckDriverNam.SetFocus Exit Sub ElseIf txtTruckNo.text = "" Then MsgBox "Please Enter Track Number.", vbCritical + vbOKOnly txtTruckNo.SetFocus Exit Sub ElseIf txttranport.text = "" Then MsgBox "Please Enter Transport Amount.", vbCritical + vbOKOnly txttranport.SetFocus Exit Sub ElseIf txtLabour.text = "" Then MsgBox "Please Enter Labour Cost.", vbCritical + vbOKOnly txtLabour.SetFocus Exit Sub End If 'txtGTotF.text = Val(txtGTotF.text) + Val(txttranport.text) + Val(txtLabour.text) + Val(txtOtherExpenses.text) Screen.MousePointer = vbHourglass Cnn.BeginTrans rsSave.Open "select * from VerbalReceivedMaster", Cnn, adOpenDynamic, adLockOptimistic rsSave.AddNew rsSave("OrderNo") = Trim(CboOrder.text) rsSave("OrderDate") = OrderDate.text rsSave("ReceivedDate") = ReceivedDate.Value rsSave("ReceivedTime") = ReceivedTime.Value rsSave("PartyName") = Trim(cboPartyName.text) rsSave("Conveyance") = txttranport.text rsSave("LabourCost") = txtLabour.text rsSave("DriverName") = Trim(txtTruckDriverNam.text) rsSave("TruckNo") = txtTruckNo.text rsSave("OtherExp") = txtOtherExpenses.text rsSave("TotalAmount") = txtGtotal.text rsSave.Update rsSave.Close Dim rsLC As New ADODB.Recordset rsSave.Open "select * from VerbalReceivedDetails", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rsSave.AddNew rsSave("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) 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.Update rsLC.Open "select * from LcMainStock where ProductName = '" & Trim(hsGrid.TextMatrix(i, 2)) & "' and ProductType ='" & Trim(hsGrid.TextMatrix(i, 3)) & "'", Cnn, adOpenDynamic, adLockOptimistic rsLC("Qty") = Val(rsLC("Qty")) + Val(hsGrid.TextMatrix(i, 5)) rsLC("LiterKg") = Val(rsLC("LiterKg")) + Val(hsGrid.TextMatrix(i, 6)) rsLC.Update rsLC.Close Next i rsSave.Close rsLC.Open "select * from RawPartyAC where PartyName='" & Trim(cboPartyName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rsLC("InvoiceAmount") = Val(rsLC("InvoiceAmount")) + Val(txtGtotal.text) rsLC("Balance") = Val(rsLC("Balance")) + Val(txtGtotal.text) rsLC.Update rsLC.Close Cnn.CommitTrans Screen.MousePointer = vbNormal CboOrder.Enabled = True OrderDate.Enabled = True cboPartyName.Enabled = True ReceivedDate.Enabled = True ReceivedTime.Enabled = True Dim k As Integer

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k ReceivedDate.Value = Date ReceivedTime.Value = Time Call Blank Call cboOrder_Click txtGtotal.text = "" txtGTotF.text = "" cmdSave.Enabled = False End Sub Private Sub Form_Load() On Error Resume Next adLockOptimistic Dim rs4 As New ADODB.Recordset rs2.Open "select OrderNo,OrderDate from VerbalOrderMaster Order by OrderDate", Cnn, adOpenDynamic, adLockOptimistic rs2.MoveFirst Do While Not rs2.EOF CboOrder.AddItem Trim(rs2("OrderNo")) rs2.MoveNext Loop rs2.Close ReceivedDate.Value = Date ReceivedTime.Value = Time rs3.Open "select PartyName from RawPartyInfo", Cnn, adOpenDynamic, adLockOptimistic rs3.MoveFirst Do While Not rs3.EOF cboPartyName.AddItem Trim(rs3("PartyName")) rs3.MoveNext Loop rs3.Close hsGrid.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" cmdSave.Enabled = False End Sub Private Sub Text1_Change() Dim X As Double X = Val(txtLabour.text) + Val(txtGTotF.text) Text1.text = X End Sub Private Sub txtDrum_Change() On Error Resume Next txtTotalAmount.text = Val((txtReRate.text) * Val(txtQuantity.text)) + Val(txtDrum.text) End Sub Private Sub txtDrum_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtLabour_Change() txtGTotF.text = "" txtGTotF.text = Val(txtGtotal.text) + Val(txttranport.text) + Val(txtLabour.text) End Sub Private Sub txtLabour_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtOtherExpenses_Change() txtGTotF.text = "" txtGTotF.text = Val(txtGtotal.text) + Val(txttranport.text) + Val(txtLabour.text) + Val(txtOtherExpenses.text) End Sub Private Sub txtOtherExpenses_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

End Sub Private Sub txtQuantity_Change() On Error Resume Next txtTotalAmount.text = Val(txtReRate.text) * Val(txtQuantity.text) End Sub Private Sub txtQuantity_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtQuantity_lostfocus() On Error Resume Next End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtReRate_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTotalLKg_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub Blank() On Error Resume Next CboOrder.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 Sub Private Sub txttranport_change() txtGTotF.text = Val(txttranport.text) + Val(txtGtotal.text) End Sub Private Sub txttranport_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub PAYMENT TO PARTY AGAINST RAW MATERIALS RECEIVED Dim rs1 As New ADODB.Recordset Private Sub cboPartyName_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset txtPartyPaidup.text = "" txtBalance.text = "" txtPartyReceivable.text = "" rs1.Open "select distinct Balance from RawPartyAC where PartyName='" & Trim(cboPartyName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic txtPartyReceivable.text = rs1(0) rs1.Close End Sub Private Sub cboPartyName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPayType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSave_Click()

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

On Error Resume Next If cboPartyName.text = "" Then MsgBox "Please Select The Party Name .", vbCritical + vbOKOnly cboPartyName.SetFocus Exit Sub ElseIf 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 Sub ElseIf 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 Sub ElseIf txtBranchName.text = "" Then MsgBox "Please Enter Bank Branch Name.", vbCritical + vbOKOnly txtBranchName.SetFocus Exit Sub ElseIf txtPartyPaidup.text = "" Then MsgBox "Please Enter The Payment Amount(TK) to Party.", vbCritical + vbOKOnly txtPartyPaidup.SetFocus Exit Sub End If Dim rsSave As New ADODB.Recordset Screen.MousePointer = vbHourglass rsSave.Open "select * from RawPartyAC where PartyName='" & Trim(cboPartyName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic rsSave("PaidupAmount") = Val(rsSave("PaidupAmount")) + Val(txtPartyPaidup.text) rsSave("Balance") = Val(rsSave("Balance")) - Val(txtPartyPaidup.text) rsSave.Update rsSave.Close rsSave.Open "select * from VerbalPartyPayment", Cnn, adOpenDynamic, adLockOptimistic rsSave.AddNew rsSave("PartyName") = Trim(cboPartyName.text) rsSave("MRNo") = Trim(txtMRNo.text) rsSave("PayDate") = PayDate.Value rsSave("PayType") = Trim(cboPayType.text) rsSave("DDTTCheckNo") = Trim(txtDDTTCHENO.text) rsSave("BankName") = Trim(txtBankName.text) rsSave("Branch") = Trim(txtBranchName.text) rsSave("PayAmount") = txtPartyPaidup.text rsSave("LeftAmount") = txtBalance.text rsSave.Update rsSave.Close cboPartyName.text = "" txtMRNo.text = "" PayDate.Value = Date cboPayType.text = "" txtDDTTCHENO.text = "" txtBankName.text = "" txtBranchName.text = "" txtPartyPaidup.text = "" txtBalance.text = "" txtPartyReceivable.text = "" Screen.MousePointer = vbNormal End Sub Private Sub Form_Load() On Error Resume Next rs1.Open "select * from RawPartyAC where Balance >'" & 0 & "'", Cnn, adOpenDynamic, adLockOptimistic rs1.MoveFirst Do While Not rs1.EOF cboPartyName.AddItem Trim(rs1(0)) rs1.MoveNext Loop

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs1.Close cboPayType.AddItem "CHEQUE", 0 cboPayType.AddItem "DD", 1 cboPayType.AddItem "PAY ORDER", 2 cboPayType.AddItem "TT", 3 PayDate.Value = Date End Sub Private Sub Label1_Click() End Sub Private Sub txtPartyPaidup_Change() On Error Resume Next If Val(txtPartyPaidup.text) > Val(txtPartyReceivable.text) Then MsgBox "Paidup Amount Can Not Be Grater Than Recevable Amount.", vbInformation + vbOKOnly txtPartyPaidup.text = 0 End If txtBalance.text = Val(txtPartyReceivable.text) - Val(txtPartyPaidup.text) End Sub Private Sub txtPartyPaidup_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub DAMAGE RAW MATERIALS PRODUCT Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim remove As Boolean Private Sub cboPartyName_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select distinct PartyName from RawPartyInfo where PartyName='" & Trim(cboPartyName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic rs1.Close End Sub Private Sub cboPartyName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPname_Click() On Error Resume Next cboPType.clear rs.Close rs.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPType.AddItem rs(0) rs.MoveNext Loop rs.Close cboPType.ListIndex = 0 End Sub Private Sub cboPname_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If cboPartyName.text = "" Then MsgBox "Please Select The Party Name .", vbCritical + vbOKOnly cboPartyName.SetFocus Exit Sub ElseIf 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

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Exit Sub ElseIf txtQty.text = "" Then MsgBox "Please Enter Loss Quantity Of The Product.", vbCritical + vbOKOnly txtQty.SetFocus Exit Sub ElseIf txtTltrkg.text = "" Then MsgBox "Please Enter Product Total(Loss) of Litre/Kg.", vbCritical + vbOKOnly txtTltrkg.SetFocus Exit Sub ElseIf txtTotal.text = "" Then MsgBox "Please Enter Total Amount.", vbCritical + vbOKOnly txtTotal.SetFocus Exit Sub End If Dim rs2 As New ADODB.Recordset rs2.Open "select * from DamageRawProduct where ProductName ='" & Trim(cboPName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs2.EOF Then MsgBox "This Product Name Is Already Saved." & Chr(13) & "Enter Another Order No.", vbInformation + vbOKOnly Exit Sub End If rs2.Close If ConDate.Value > LossassumeDate.Value Then MsgBox "Consignment Received Date Can Not Be Greater Than Loss Assume Date.", vbInformation + vbOKOnly ConDate.SetFocus Exit Sub End If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Exit Sub End If Next i Dim introw1 As Integer introw1 = hsGrid.Rows - 1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboPName hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPType hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtQty hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtTltrkg hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtTotal hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.text = Val(txtGtotal.text) + Val(txtTotal.text) cboPartyName.Enabled = False ConDate.Enabled = False LossassumeDate.Enabled = False cboPName.text = "" cboPType.text = "" txtQty.text = "" txtTltrkg.text = "" txtTotal.text = "" cmdRemove.Enabled = True cmdSave.Enabled = True End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cboPartyName.Enabled = True ConDate.Enabled = True

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

LossassumeDate.Enabled = True cboPartyName.text = "" cboPType.text = "" txtGtotal.text = "" ConDate.Value = Date LossassumeDate.Value = Date End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cmdSave_Click() On Error Resume Next If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If Dim rsSave As New ADODB.Recordset Dim i As Integer rsSave.Open "select * from VerbalRawDamage", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rsSave.AddNew rsSave("PartyName") = Trim(cboPartyName.text) rsSave("ConDate") = ConDate.Value rsSave("AssumDate") = LossassumeDate.Value rsSave("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.Update Next i rsSave.Update rsSave.Close Call cmdClear_Click ConDate.Value = Date LossassumeDate.Value = Date End Sub Private Sub Form_Load() On Error Resume Next rs1.Open "select * from RawPartyInfo", Cnn, adOpenDynamic, adLockOptimistic rs1.MoveFirst Do While Not rs1.EOF cboPartyName.AddItem Trim(rs1(0)) rs1.MoveNext Loop rs1.Close rs.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPName.AddItem rs(0) rs.MoveNext Loop rs.Close hsGrid.TextMatrix(0, 0) = "Serial No" hsGrid.TextMatrix(0, 1) = "Product Name" hsGrid.TextMatrix(0, 2) = "Product Type"

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

hsGrid.TextMatrix(0, 3) = "Loss Quantity" hsGrid.TextMatrix(0, 4) = "Litre/Kg" hsGrid.TextMatrix(0, 5) = "Total Amount" ConDate.Value = Date LossassumeDate.Value = Date End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtQty_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTltrkg_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTotal_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub RAW MATERIALS IN FACTORY Dim rs As New ADODB.Recordset Dim rsLcStock As New ADODB.Recordset Dim remove As Boolean Private Sub cboPname_Click() On Error Resume Next cboPType.clear rs.Close rs.Open "select distinct ProductType from LcProductInfo where ProductName='" & cboPName.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPType.AddItem rs(0) rs.MoveNext Loop rs.Close cboPType.ListIndex = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If txtGatePassNo.text = "" Then MsgBox "Please Select The Gate Pass Number .", vbCritical + vbOKOnly txtGatePassNo.SetFocus Exit Sub ElseIf txtLedgerName.text = "" Then MsgBox "Please Enter Ledger Name.", vbCritical + vbOKOnly txtLedgerName.SetFocus Exit Sub ElseIf txtPageNo.text = "" Then MsgBox "Please Enter The Page No.", vbCritical + vbOKOnly txtPageNo.SetFocus Exit Sub ElseIf txtCarryBy.text = "" Then MsgBox "Please Enter The Carryed By Name.", vbCritical + vbOKOnly txtCarryBy.SetFocus Exit Sub ElseIf 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

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

MsgBox "Please Enter Piece", vbCritical + vbOKOnly txtPiece.SetFocus Exit Sub End If ProQty = 0 rsLcStock.Open "select * from LcMainStock where ProductName='" & cboPName.text & "' and ProductType='" & cboPType.text & "'", Cnn, adOpenDynamic, adLockOptimistic ProQty = Val(rsLcStock(2)) If ProQty < Val(txtCarton.text) Then MsgBox "This Products (Raw Materials) Stock Quantity is '" & ProQty & "' So Enter Right Quantity" txtCarton.text = "" txtPiece.text = "" txtCarton.SetFocus rsLcStock.Close Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "select * from RawInFactoryMaster where GatePassNo ='" & Trim(txtGatePassNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Record Is Already Saved. Enter Another GatePass No..", vbInformation + vbOKOnly txtGatePassNo.SetFocus Exit Sub End If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 = "" cboPName.SetFocus Exit Sub End If Next i Dim introw1 As Integer introw1 = hsGrid.Rows - 1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboPName hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboPType hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = Trim(txtRemarks.text) hsGrid.Rows = hsGrid.Rows + 1 txtCarryBy.Enabled = False txtLedgerName.Enabled = False txtPageNo.Enabled = False txtGatePassNo.Enabled = False InDate.Enabled = False InTime.Enabled = False cboPName.text = "" cboPType.text = "" txtCarton.text = "" txtPiece.text = "" txtRemarks.text = "" cmdRemove.Enabled = True End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer txtCarryBy.Enabled = True txtLedgerName.Enabled = True txtLedgerName.text = "" txtPageNo.Enabled = True txtPageNo.text = "" txtGatePassNo.Enabled = True

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006
txtGatePassNo.text = "" InDate.Enabled = True InTime.Enabled = True cboPName.text = "" cboPType.text = "" txtCarton.text = "" txtPiece.text = "" txtRemarks.text = "" txtCarryBy.text = ""

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k InDate.Value = Date InTime.Value = Time End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If ROW = hsGrid.Rows End Sub Private Sub cmdSave_Click() On Error Resume Next Dim rsSave As New ADODB.Recordset Screen.MousePointer = vbHourglass rsSave.Open "select * from RawInFactoryMaster", Cnn, adOpenDynamic, adLockOptimistic rsSave.AddNew rsSave("GatePassNo") = Trim(txtGatePassNo.text) rsSave("LegerNo") = Trim(txtLedgerName.text) rsSave("PageNO") = txtPageNo.text rsSave("InDate") = InDate.Value rsSave("InTime") = InTime.Value rsSave("CarriedBy") = Trim(txtCarryBy.text) rsSave.Update rsSave.Close Dim i As Integer Dim rsUpdate As New ADODB.Recordset For i = 1 To hsGrid.Rows - 2 rsUpdate.Open "select * from LcMainStock where ProductName ='" & Trim(hsGrid.TextMatrix(i, 1)) & "' and ProductType='" & Trim(hsGrid.TextMatrix(i, 2)) & "'", Cnn, adOpenDynamic, adLockOptimistic rsUpdate("Qty") = Val(rsUpdate("Qty")) - Val(hsGrid.TextMatrix(i, 3)) rsUpdate("LiterKg") = Val(rsUpdate("LiterKg")) - Val(hsGrid.TextMatrix(i, 4)) rsUpdate.Update rsUpdate.Close rsSave.Open "select * from RawInFactoryDetails", Cnn, adOpenDynamic, adLockOptimistic rsSave.AddNew rsSave("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.Update Next i Screen.MousePointer = vbNormal Call cmdClear_Click InDate.Value = Date InTime.Value = Time End Sub

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Private Sub Form_Load() On Error Resume Next rs.Open "select distinct ProductName from LcProductInfo", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboPName.AddItem rs(0) rs.MoveNext Loop rs.Close hsGrid.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 = False InDate.Value = Date InTime.Value = Time End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtPiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub PRODUCT INFORMATION Dim rs As New ADODB.Recordset Private Sub Form_Load() On Error Resume Next Call Gr End Sub Private Sub Gr() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "Select * from ProductInfo", Cnn, adOpenDynamic, adLockOptimistic Set DG.DataSource = rs1 End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next rs.Close Set rs = Nothing End Sub Private Sub txtExit_Click() Unload Me End Sub Private Sub txtPiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtSave_Click() On Error Resume Next If txtProName.text = "" Then MsgBox "Product Name Can Not Be Blank.", vbCritical, "Shah Soap" txtProName.SetFocus Call Gr Exit Sub ElseIf txtPiece.text = "" Or txtPiece.text = 0 Then MsgBox "Please Enter The piece per Carton.", vbCritical, "Shah Soap" txtPiece.SetFocus Call Gr Exit Sub End If Dim rs1 As New ADODB.Recordset If Not rs1.EOF Then MsgBox "This Product Is Already Existed.", vbCritical + vbOKOnly

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006
rs1.Close Exit Sub End If

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.Open "select * from ProductInfo", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("ProductName") = Trim(txtProName.text) rs("CartonPiece") = txtPiece.text rs("Price") = 0 rs.Update rs.Close rs.Open "select * from MainStock", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("ProductName") = Trim(txtProName.text) rs("Carton") = 0 rs("Piece") = 0 rs("BadCarton") = 0 rs("BadPiece") = 0 rs.Update rs.Close Call Gr txtProName.text = "" txtPiece.text = "" End Sub PRODUCT PRICE Dim rs As New ADODB.Recordset Private Sub cboProductName_Click() On Error Resume Next txtPresentPrice.text = "" txtUpdatePrice.text = "" rs.Open "select * from Productinfo Where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic txtPresentPrice.text = rs("Price") rs.Close End Sub Private Sub cboProductName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from Productinfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboProductName.AddItem Trim(rs("ProductName")) rs.MoveNext Loop rs.Close PDate.Value = Date Call Gride txtPresentPrice.Enabled = False End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next Set rs = Nothing End Sub Private Sub txtExit_Click() Unload Me End Sub Private Sub Gride() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "select ProductName,Price from Productinfo", Cnn, adOpenDynamic, adLockOptimistic Set DG.DataSource = rs1 End Sub Private Sub txtSave_Click() On Error Resume Next If cboProductName.text = "" Then MsgBox "Please Select The Product Name.", vbInformation + vbOKOnly cboProductName.SetFocus

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Exit Sub ElseIf txtUpdatePrice.text = "" Then MsgBox "Please Insert The New Price.", vbInformation + vbOKOnly txtUpdatePrice.SetFocus Exit Sub ElseIf txtUpdatePrice.text = 0 Then MsgBox "Please Insert The New Price.", vbInformation + vbOKOnly txtUpdatePrice.SetFocus Exit Sub End If Screen.MousePointer = vbHourglass rs.Open "select * from Productinfo Where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("Price") = txtUpdatePrice.text rs.Update rs.Close rs.Open "select * from ProductPriceinfo ", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("PDate") = PDate.Value rs("ProductName") = Trim(cboProductName.text) rs("NewPrice") = txtUpdatePrice.text rs("OldPrice") = txtPresentPrice.text rs.Update rs.Close Screen.MousePointer = vbNormal Call Gride cboProductName.text = "" txtPresentPrice.text = "" txtUpdatePrice.text = "" cboProductName.SetFocus End Sub Private Sub txtUpdatePrice_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub FINISHED GOODS STOCK IN Dim rs As New ADODB.Recordset Dim remove As Boolean Dim piece As Double Dim ROW As Integer Private Sub cboProductName_Click() On Error Resume Next piece = 0 txtCarton.text = "" txtPiece.text = "" txtRemarks.text = "" rs.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "' And ProductName='" & Trim(cboProductName.text) & piece = rs("CartonPiece") rs.Close End Sub Private Sub cboProductName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If txtGatePassNo.text = "" Then MsgBox "Please Enter The Gate Pass Number.", vbCritical + vbOKOnly txtGatePassNo.SetFocus Exit Sub ElseIf txtLedgerName.text = "" Then MsgBox "Please Enter the Ledger Name.", vbCritical + vbOKOnly txtLedgerName.SetFocus Exit Sub ElseIf txtPageNo.text = "" Then MsgBox "Please Enter the Page Number.", vbCritical + vbOKOnly txtPageNo.SetFocus Exit Sub ElseIf txtCarryBy.text = "" Then MsgBox "Please Enter Carried Person Name.", vbCritical + vbOKOnly

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtCarryBy.SetFocus Exit Sub ElseIf cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit Sub ElseIf txtCarton.text = "" Or txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtPiece.text = "" Or txtPiece.text = 0 Then MsgBox "Please Enter the Piece Number.", vbCritical + vbOKOnly txtPiece.SetFocus Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "select * from ProductionInMaster where GetPassNo='" & Trim(txtGatePassNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If 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 Sub End If rs1.Close Dim i As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 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 Sub End If Next i txtGatePassNo.Enabled = False txtCarryBy.Enabled = False txtLedgerName.Enabled = False txtPageNo.Enabled = False DDate.Enabled = False DTime.Enabled = False Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboProductName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtPiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 ROW = hsGrid.Rows cboProductName.text = "" cmdProductName.text = "" txtCarton = "" txtPiece = "" txtRemarks.text = "" End Sub Private 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 = ""

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtLedgerName.text = "" txtPageNo.text = "" txtCarryBy.text = "" DDate.Value = Date DTime.Value = Time For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If ROW = hsGrid.Rows End Sub Private Sub cmdSave_Click() On Error Resume Next Dim i, j As Integer If ROW = 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from ProductionInMaster", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("GetPassNo") = Trim(txtGatePassNo.text) rs("InDate") = DDate.Value rs("LegerName") = Trim(txtLedgerName.text) rs("PageNumber") = txtPageNo.text rs("CarriedBy") = Trim(txtCarryBy.text) rs("InTime") = DTime.Value rs.Update rs.Close rs.Open "select * from ProductionInDetails", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rs.AddNew rs("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.Update Next i rs.Close For j = 1 To hsGrid.Rows - 2 rs.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("Carton") = Val(rs("Carton")) + Val(hsGrid.TextMatrix(j, 2)) rs("Piece") = Val(rs("Piece")) + Val(hsGrid.TextMatrix(j, 3)) rs.Update rs.Close Next j Cnn.CommitTrans Screen.MousePointer = vbNormal Dim k As Integer txtGatePassNo.Enabled = True txtCarryBy.Enabled = True txtLedgerName.Enabled = True txtPageNo.Enabled = True DDate.Enabled = True

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

DTime.Enabled = True txtGatePassNo.text = "" txtLedgerName.text = "" txtPageNo.text = "" txtCarryBy.text = "" DDate.Value = Date DTime.Value = Time For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from Productinfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboProductName.AddItem Trim(rs("ProductName")) rs.MoveNext Loop rs.Close hsGrid.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 ROW = 2 DDate.Value = Date DTime.Value = Time End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next Set rs = Nothing End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_Change() On Error Resume Next txtPiece.text = Val(txtCarton.text) * Val(piece) End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtPiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub EMPLOYEE INFORMATION Dim rs As New ADODB.Recordset Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRefresh_Click() On Error Resume Next txtMarExID.text = "" txtEmployeeName.text = "" txtEmployeeId.text = "" txtAddress.text = "" txtDesignation.text = "" txtphone.text = "" cmdRefresh.Enabled = False cmdSave.Enabled = True cmdSearch.Enabled = True cmdUpdate.Enabled = False txtEmployeeId.Locked = False End Sub Private Sub cmdSave_Click() On Error Resume Next If txtEmployeeId.text = "" Then

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

MsgBox "Please Input An Employee ID.", vbCritical + vbOKOnly txtEmployeeId.SetFocus Call PG Exit Sub ElseIf txtEmployeeName.text = "" Then MsgBox "Please Input An Employee Name.", vbCritical + vbOKOnly txtEmployeeName.SetFocus Call PG Exit Sub ElseIf txtDesignation.text = "" Then MsgBox "Please Input The Employee Designation.", vbCritical + vbOKOnly txtDesignation.SetFocus Call PG Exit Sub ElseIf txtAddress.text = "" Then MsgBox "Please Input The Employee Address.", vbCritical + vbOKOnly txtAddress.SetFocus Call PG Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.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 = "" txtEmployeeName.text = "" txtDesignation.text = "" txtAddress.text = "" txtphone.text = "" txtEmployeeName.SetFocus rs1.Close Call PG Exit Sub End If Cnn.BeginTrans Screen.MousePointer = vbHourglass rs.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("EmpId") = Trim(txtEmployeeId.text) rs("EmpName") = Trim(txtEmployeeName.text) rs("Designation") = Trim(txtDesignation.text) rs("Address") = Trim(txtAddress.text) rs("Phone") = txtphone.text rs.Update rs.Close rs.Open "select * from PersonalACstatus", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("EmpID") = Trim(txtEmployeeId.text) rs("InvoiceAmount") = 0 rs("PaidUpAmount") = 0 rs("Balance") = 0 rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Call PG txtEmployeeId.text = "" txtEmployeeName.text = "" txtDesignation.text = "" txtAddress.text = "" txtphone.text = "" cmdUpdate.Enabled = False cmdSave.Enabled = True cmdSearch.Enabled = True cmdRefresh.Enabled = False End Sub Private Sub PG() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimistic

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Set palash.DataSource = rs1 End Sub Private Sub cmdSearch_Click() On Error Resume Next rs.Open "Select * from EmployeeInfo where EmpId='" & Trim(txtMarExID.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then txtEmployeeId.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 = True cmdSave.Enabled = False cmdRefresh.Enabled = True cmdUpdate.Enabled = True End If rs.Close Call PG cmdSearch.Enabled = False End Sub Private Sub cmdUpdate_Click() On Error Resume Next Dim rspa As New ADODB.Recordset 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.text rspa.Update rspa.Close txtEmployeeName.text = "" txtDesignation.text = "" txtAddress.text = "" txtphone.text = "" cmdUpdate.Enabled = False cmdSave.Enabled = True cmdSearch.Enabled = True cmdRefresh.Enabled = False Call PG End Sub Private Sub Form_Load() cmdUpdate.Enabled = False Call PG End Sub Private Sub ID() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimistic txtEmployeeId.text = "SSE" & 1000 + rs1.RecordCount + 1 rs1.Close End Sub Private Sub txtMarExID_Click() End Sub PERSONAL SALES Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim piece As Double Dim remove As Boolean Dim ROW As Integer Private Sub cboProductName_Click() On Error Resume Next piece = 0 txtCarton.text = "" txtPiece.text = "" txtRatePiece.text = "" txtTotalAmount.text = "" rs.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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

piece = rs("CartonPiece") rs.Close End Sub Private Sub cboProductName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmbEmployeeName_Click() On Error Resume Next txtid.text = "" rs.Open "select * from EmployeeInfo where EmpName= '" & Trim(cmbEmployeeName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic txtid.text = rs("EmpId") rs.Close End Sub Private Sub cmbEmployeeName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If txtPInvoiceNo.text = "" Then MsgBox "Please Enter the Invoice Number.", vbCritical + vbOKOnly txtPInvoiceNo.SetFocus Exit Sub ElseIf cmbEmployeeName.text = "" Then MsgBox "Please Select the Employee Name.", vbCritical + vbOKOnly cmbEmployeeName.SetFocus Exit Sub ElseIf cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit Sub ElseIf txtPiece.text = "" Then MsgBox "Please Enter the Piece.", vbCritical + vbOKOnly txtPiece.SetFocus Exit Sub ElseIf txtRatePiece.text = "" Then MsgBox "Please Enter the Rate per Piece.", vbCritical + vbOKOnly txtRatePiece.SetFocus Exit Sub ElseIf txtTotalAmount.text = "" Then MsgBox "Please Enter the Invoice Number.", vbCritical + vbOKOnly txtTotalAmount.SetFocus Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "select * from PersonalSalesMaster where PInvoiceNo='" & Trim(txtPInvoiceNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Invoice Number is Already Existed. Insert Another Invoice Number. ", vbInformation + vbOKOnly txtPInvoiceNo.SetFocus rs1.Close Exit Sub End If Dim i As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i cmbEmployeeName.Enabled = False PDate.Enabled = False txtPInvoiceNo.Enabled = False

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Dim introw1 As Integer introw1 = hsGrid.Rows - 1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtPInvoiceNo hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount hsGrid.Rows = hsGrid.Rows + 1 txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtTotalAmount.text) cboProductName.text = "" txtCarton = "" txtPiece = "" txtRatePiece = "" txtTotalAmount = "" ROW = hsGrid.Rows End Sub Private Sub cmdRefresh_Click() On Error Resume Next cmbEmployeeName.Enabled = True 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 -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If ROW = hsGrid.Rows End Sub Private Sub cmdSave_Click() On Error Resume Next If ROW = 2 Then MsgBox "Sorry!First Add The Data To The Grid", vbInformation + vbOKOnly Exit Sub End If Dim i As Integer Cnn.BeginTrans rs.Open "select * from PersonalSalesMaster", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("PInvoiceNo") = Trim(txtPInvoiceNo.text) rs("EmpID") = Trim(txtid.text) rs("SalesDate") = PDate.Value rs("InvoiceAmount") = txtGrandTotal.text rs("PaidupAmount") = 0 rs("Balance") = txtGrandTotal.text

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.Update rs.Close rs.Open "select * from PersonalACstatus where EmpID='" & Trim(txtid.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic rs("InvoiceAmount") = Val(rs("InvoiceAmount")) + Val(txtGrandTotal.text) rs("Balance") = Val(rs("Balance")) + Val(txtGrandTotal.text) rs.Update rs.Close rs.Open "select * from PersonalSales", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rs.AddNew rs("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.Update Next i rs.Close i=1 For i = 1 To hsGrid.Rows - 2 rs.Open "select * from MainStock where productname='" & Trim(hsGrid.TextMatrix(i, 2)) & "' ", Cnn, adOpenDynamic, adLockOptimistic rs("Carton") = Val(rs("Carton")) - Val(hsGrid.TextMatrix(i, 3)) rs("piece") = Val(rs("piece")) - Val(hsGrid.TextMatrix(i, 4)) rs.Update rs.Close Next i Cnn.CommitTrans txtGrandTotal.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 -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k ROW = 2 End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cmbEmployeeName.AddItem Trim(rs("EmpName")) rs.MoveNext Loop rs.Close rs1.Open "select * from Productinfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs1.EOF cboProductName.AddItem Trim(rs1("ProductName")) rs1.MoveNext Loop rs1.Close PDate.Value = Date ROW = 2 hsGrid.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"

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

hsGrid.TextMatrix(0, 6) = "Amount(TK)" txtCarton.Enabled = False remove = False End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_Change() On Error Resume Next End Sub Private Sub txtExit_Click() Unload Me End Sub Private Sub txtPiece_Change() On Error Resume Next txtCarton.text = Val(txtPiece.text) / Val(piece) txtTotalAmount.text = Val(txtPiece.text) * (txtRatePiece.text) End Sub Private Sub txtPiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtRatePiece_Change() txtTotalAmount.text = Val(txtPiece.text) * Val(txtRatePiece.text) End Sub Private Sub txtRatePiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub PERSONAL MONEY RECEIPT Dim rs As New ADODB.Recordset Private Sub cboEmpName_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset Dim ID As String txtAmount.text = "" txtBalance.text = "" txtInvoiceAmount.text = "" lblID.Caption = "" ID = "" cboInvoice.clear rs.Open "select * from EmployeeInfo where EmpName= '" & Trim(cboEmpName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblID.Caption = Trim(rs("EmpID")) ID = rs("EmpID") rs.Close rs1.Open "select pInvoiceNo from PersonalSalesMaster where EmpID= '" & Trim(ID) & If rs1.EOF Then Exit Sub Else Do While Not rs1.EOF cboInvoice.AddItem Trim(rs1("pInvoiceNo")) rs1.MoveNext Loop rs1.Close cboInvoice.ListIndex = 0 End If End Sub Private Sub cboEmpName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboInvoice_Click() On Error Resume Next txtAmount.text = "" txtBalance.text = "" txtInvoiceAmount.text = "" rs.Open "select * from PersonalSalesMaster where PInvoiceNo= '" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic txtInvoiceAmount.text = rs("Balance") rs.Close End Sub Private Sub cboInvoice_KeyPress(KeyAscii As Integer)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

KeyAscii = 0 End Sub Private Sub cboPayType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSave_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset Dim Amount As Double Amount = 0 If cboEmpName.text = "" Then MsgBox "Please Select An Employee Name.", vbCritical + vbOKOnly cboEmpName.SetFocus Exit Sub ElseIf cboInvoice.text = "" Then MsgBox "Please Select An Invoice No.", vbCritical + vbOKOnly cboInvoice.SetFocus Exit Sub ElseIf txtMRNo.text = "" Then MsgBox "Please Enter The Money Receipt No.", vbCritical + vbOKOnly txtMRNo.SetFocus Exit Sub ElseIf cboPayType.text = "" Then MsgBox "Please Select The Pay Type.", vbCritical + vbOKOnly cboPayType.SetFocus Exit Sub ElseIf txtAmount.text = "" Or txtAmount.text = 0 Then MsgBox "Please Enter The Paidup Amount.", vbCritical + vbOKOnly txtAmount.SetFocus Exit Sub End If rs1.Open "select * from PersonalMR where MRNo='" & Trim(txtMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Money Receipt Is Already Existed.", vbCritical + vbOKOnly Exit Sub End If rs1.Close Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from PersonalMR", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("EmpID") = Trim(lblID.Caption) rs("PInvoiceNo") = Trim(cboInvoice.text) rs("MRNo") = Trim(txtMRNo.text) rs("PayType") = Trim(cboPayType.text) rs("PayDate") = PayDate.Value rs("Amount") = txtAmount.text rs("Remarks") = Trim(txtRemarks.text) rs.Update rs.Close rs.Open "select * from PersonalSalesMaster where PInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Amount = Val(rs("PaidupAmount")) + Val(txtAmount.text) rs("PaidupAmount") = Amount rs("Balance") = Val(rs("InvoiceAmount")) - Val(Amount) rs.Update rs.Close rs.Open "select * from PersonalACstatus where EmpID='" & Trim(lblID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic Amount = 0 Amount = Val(rs("PaidupAmount")) + Val(txtAmount.text) rs("PaidupAmount") = Amount rs("Balance") = Val(rs("InvoiceAmount")) - Val(Amount) rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Unload Me Load Me

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next rs.Close Set rs = Nothing Set rs1 = Nothing End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboEmpName.AddItem Trim(rs("EmpName")) rs.MoveNext Loop rs.Close cboPayType.AddItem "CASH", 0 cboPayType.AddItem "CHEQUE", 1 cboPayType.AddItem "DD", 2 cboPayType.AddItem "PAY ORDER", 3 cboPayType.AddItem "TT", 4 PayDate.Value = Date txtInvoiceAmount.Enabled = False txtBalance.Enabled = False End Sub Private Sub txtAmount_Change() On Error Resume Next If Val(txtAmount.text) > Val(txtInvoiceAmount.text) Then MsgBox "Paidup Amount Can Not Greater Than Invoice Amount.", vbCritical + vbOKOnly txtAmount.text = "" txtAmount.SetFocus Exit Sub End If txtBalance.text = Val(txtInvoiceAmount.text) - Val(txtAmount.text) End Sub Private Sub txtAmount_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtBalance_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtInvoiceAmount_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub FREE OR GIFT PRODUCT Dim rs As New ADODB.Recordset Dim piece As Double Private Sub cboEmpName_Click() On Error Resume Next lblID.Caption = "" rs.Open "select * from EmployeeInfo where EmpName= '" & Trim(cboEmpName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblID.Caption = rs("EmpID") rs.Close rs.Open "select * from ProductInfo ", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF CboProName.AddItem Trim(rs("ProductName")) rs.MoveNext Loop rs.Close End Sub Private Sub cboEmpName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboProName_Click() On Error Resume Next piece = 0 rs.Open "select * from Productinfo where ProductName='" & Trim(CboProName.text) & piece = rs("CartonPiece") rs.Close txtCarton.text = "" txtPiece.text = ""

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

End Sub Private Sub CboProName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSave_Click() On Error Resume Next If cboEmpName.text = "" Then MsgBox "Please Select An Employee Name.", vbCritical + vbOKOnly cboEmpName.SetFocus Exit Sub ElseIf CboProName.text = "" Then MsgBox "Please Select The Product Name.", vbCritical + vbOKOnly CboProName.SetFocus Exit Sub ElseIf txtCarton.text = "" Then MsgBox "Please Enter The Carton Quantity.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtCarton.text = 0 Then MsgBox "Please Enter The Carton of Quantity.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtPiece.text = "" Then MsgBox "Please Enter The Piece of Quantity.", vbCritical + vbOKOnly txtPiece.SetFocus Exit Sub ElseIf txtPiece.text = 0 Then MsgBox "Please Enter The Piece of Quantity.", vbCritical + vbOKOnly txtPiece.SetFocus Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from FreeProduct", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("EmpID") = Trim(lblID.Caption) rs("GiftDate") = PDate.Value rs("ProductName") = Trim(CboProName.text) rs("Carton") = txtCarton.text rs("Piece") = txtPiece.text rs("Remark") = txtRemarks.text rs.Update rs.Close rs.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.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Unload Me Load Me End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from EmployeeInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboEmpName.AddItem Trim(rs("EmpName")) rs.MoveNext Loop rs.Close txtCarton.Enabled = False PDate.Value = Date End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next rs.Close

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Set rs = nothimg End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtPiece_Change() On Error Resume Next txtCarton.text = Val(txtPiece.text) / Val(piece) End Sub Private Sub txtPiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub SALES EXECUTIVE INFORMATION DETAILS Dim rs As New ADODB.Recordset Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRefresh_Click() On Error Resume Next txtMarExID.text = "" txtMID.text = "" txtMname.text = "" txtDesignation.text = "" txtAddress.text = "" txtphone.text = "" txtMobile.text = "" txtArea.text = "" rs.Close cmdRefresh.Enabled = False cmdSave.Enabled = True cmdSearch.Enabled = True cmdUpdate.Enabled = False txtEmployeeId.Locked = False End Sub Private Sub cmdSave_Click() On Error Resume Next If Trim(txtMID.text) = "" Then MsgBox "Please Enter The Sales Executive ID.", vbCritical + vbOKOnly txtMID.SetFocus Call GR1 Exit Sub ElseIf txtMname.text = "" Then MsgBox "Please Enter The Sales Executive Name.", vbCritical + vbOKOnly txtMname.SetFocus Call GR1 Exit Sub ElseIf txtDesignation.text = "" Then MsgBox "Please Enter The Designation.", vbCritical + vbOKOnly txtDesignation.SetFocus Call GR1 Exit Sub ElseIf txtAddress.text = "" Then MsgBox "Please Enter The Address.", vbCritical + vbOKOnly txtAddress.SetFocus Call GR1 Exit Sub ElseIf txtArea.text = "" Then MsgBox "Please Enter The Marketing Executive Area Name.", vbCritical + vbOKOnly txtArea.SetFocus Call GR1 Exit Sub End If Dim rsIDSearch As New ADODB.Recordset rsIDSearch.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 = ""

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtAddress.text = "" txtphone.text = "" txtMobile.text = "" txtArea.text = "" txtMID.SetFocus rsIDSearch.Close Call GR1 Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("MID") = txtMID.text rs("MName") = Trim(txtMname.text) rs("Designation") = txtDesignation.text rs("Address") = Trim(txtAddress.text) rs("Phone") = txtphone.text rs("Mobile") = txtMobile.text rs("Area") = Trim(txtArea.text) rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal txtMID.text = "" txtMname.text = "" txtDesignation.text = "" txtAddress.text = "" txtphone.text = "" txtMobile.text = "" txtArea.text = "" Call GR1 cmdSave.Enabled = False End Sub Private Sub cmdSearch_Click() On Error Resume Next rs.Close rs.Open "Select * from MarketingInfo where MID='" & Trim(txtMarExID.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If rs.EOF Then rs.Close Exit Sub Else txtMID.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 = False cmdSearch.Enabled = False txtEmployeeId.Locked = True cmdRefresh.Enabled = True cmdUpdate.Enabled = True End If End Sub Private Sub cmdUpdate_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select * from MarketingInfo where MID='" & Trim(txtMarExID.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs1("MID") = txtMID.text rs1("MName") = Trim(txtMname.text) rs1("Designation") = txtDesignation.text rs1("Address") = Trim(txtAddress.text) rs1("Phone") = txtphone.text rs1("Mobile") = txtMobile.text rs1("Area") = Trim(txtArea.text) rs1.Update rs1.Close txtMID.text = ""

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtMname.text = "" txtDesignation.text = "" txtAddress.text = "" txtphone.text = "" txtMobile.text = "" txtArea.text = "" Call GR1 cmdUpdate.Enabled = False cmdSave.Enabled = True cmdSearch.Enabled = True cmdRefresh.Enabled = False End Sub Private Sub Form_Load() On Error Resume Next Call GR1 cmdSearch.Enabled = False cmdRefresh.Enabled = False End Sub Private Sub GR1() On Error Resume Next rs.Close rs.CursorLocation = adUseClient rs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimistic Set ShowAll.DataSource = rs End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next rs.Close Set rs = Nothing End Sub Private Sub txtArea_GotFocus() cmdSave.Enabled = True End Sub Private Sub ID() On Error Resume Next Dim NewId As Double NewId = 1 rs.Open "Select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF NewId = Val(NewId) + Val(1) rs.MoveNext Loop rs.Close txtMID.text = "SSM" & NewId End Sub Private Sub txtMarExID_GotFocus() cmdSearch.Enabled = True cmdRefresh.Enabled = True End Sub SALES EXECUTIVE ORDER DETAILS Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim blnClickStander2 As Boolean Dim piece As Double Private Sub cboMarkName_Click() On Error Resume Next Label1.Caption = "" rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarkName.text) & Label1.Caption = rs("MID") rs.Close End Sub Private Sub cboMarkName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboProductName_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset piece = 0

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs1.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "' And ProductName='" & Trim(cboProductName.text) & piece = rs1("CartonPiece") txtRatePiece.text = rs1("Price") rs1.Close txtCarton.text = "" txtPiece.text = "" End Sub Private Sub cboProductName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If txtMOrderNo.text = "" Then MsgBox "Please Enter An Order Number.", vbCritical + vbOKOnly txtMOrderNo.SetFocus Exit Sub ElseIf cboMarkName.text = "" Then MsgBox "Please Select the Marketing Executive Name.", vbCritical + vbOKOnly cboMarkName.SetFocus Exit Sub ElseIf cboProductName.text = "" Then MsgBox "Please Select the Product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit Sub ElseIf txtCarton.text = 0 Or txtCarton = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtPiece.text = 0 Or txtPiece.text = "" Then MsgBox "Please Enter the Piece of a Carton.", vbCritical + vbOKOnly txtPiece.SetFocus Exit Sub ElseIf txtRatePiece.text = 0 Or txtRatePiece.text = "" Then MsgBox "Please Enter the Rate per Piece.", vbCritical + vbOKOnly txtRatePiece.SetFocus Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "select * from MarketingOrderMaster where MOrderNo='" & Trim(txtMOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Order Number Is Already Saved." & Chr(13) & "Enter Another Order No.", vbInformation + vbOKOnly Exit Sub End If rs1.Close If DTPicker1.Value < PDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly DTPicker1.SetFocus Exit Sub End If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i txtMOrderNo.Enabled = False cboMarkName.Enabled = False PDate.Enabled = False DTPicker1.Enabled = False Dim introw1 As Integer introw1 = hsGrid.Rows - 1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtMOrderNo hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount hsGrid.Rows = hsGrid.Rows + 1 txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtTotalAmount.text) cboProductName.text = "" txtCarton = 0 txtPiece = 0 txtRatePiece = 0 txtTotalAmount = 0 cmdRemove.Enabled = True cmdSave.Enabled = True If hsGrid.Rows = 2 Then hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtMOrderNo hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.text hsGrid.Rows = hsGrid.Rows + 1 cboMarkName.Locked = True End If End Sub Private Sub cmdRefresh_Click() cboMarkName.Enabled = True End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer txtMOrderNo.Enabled = True cboMarkName.Enabled = True PDate.Enabled = True DTPicker1.Enabled = True txtMOrderNo.text = "" cboMarkName.text = "" Label1.Caption = "" txtGrandTotal.text = "" For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cmdSave_Click() On Error Resume Next If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If Cnn.BeginTrans Dim rs1 As New ADODB.Recordset rs.Open "select * from MarketingOrderMaster", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("MOrderNo") = Trim(txtMOrderNo.text) rs("OrderDate") = PDate.Value rs("MID") = Trim(Label1.Caption)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs("MName") = Trim(cboMarkName.text) rs("TotalAmount") = txtGrandTotal.text rs("FullOrNot") = "Not" rs("DeleveryDate") = DTPicker1.Value rs.Update rs.Close rs.Open "select * from MarketingOrderDetails", Cnn, adOpenDynamic, adLockOptimistic Dim i As Integer For i = 1 To hsGrid.Rows - 2 rs.AddNew rs("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.Update Next i rs.Close Cnn.CommitTrans Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k txtMOrderNo.Enabled = True cboMarkName.Enabled = True PDate.Enabled = True DTPicker1.Enabled = True txtMOrderNo.text = "" cboMarkName.text = "" Label1.Caption = "" txtGrandTotal.text = "" cmdRemove.Enabled = True cmdSave.Enabled = False End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboMarkName.AddItem Trim(rs("MName")) rs.MoveNext Loop rs.Close rs.Open "select * from Productinfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboProductName.AddItem Trim(rs("ProductName")) rs.MoveNext Loop rs.Close cmdSave.Enabled = False cmdRemove.Enabled = False hsGrid.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 = Date DTPicker1.Value = Date End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next rs.Close rs1.Close Set rs = Nothing Set rs1 = Nothing End Sub Private Sub hsGrid_Click()

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

blnClickStander2 = True 'new End Sub Private Sub txtCarton_Change() On Error Resume Next txtPiece.text = Val(txtCarton.text) * Val(piece) txtTotalAmount.text = Val(txtRatePiece.text) * Val(txtCarton.text) End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtPiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtRatePiece_Change() On Error Resume Next End Sub Private Sub txtRatePiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub SALES EXECUTIVE PRODUCT OUT DETAILS Dim rs As New ADODB.Recordset Dim piece As Integer Dim remove As Boolean Private Sub cboCondition_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboMarketingName_Click() On Error Resume Next lblMID.Caption = "" rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblMID.Caption = rs("MID") rs.Close cboOrderNo.clear Call cboOrderNo_Click rs.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 Loop End If rs.Close End Sub Private Sub cboMarketingName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboOrderNo_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset cboProductName.clear rs1.CursorLocation = adUseClient rs1.Open "select * from MarketingOrderDetails where MOrderNo='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Set OrderGrid.DataSource = rs1 Do While Not rs1.EOF cboProductName.AddItem Trim(rs1("ProductName")) rs1.MoveNext Loop End Sub Private Sub cboOrderNo_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboProductName_Click() On Error Resume Next txtCarton.text = "" txtPiece.text = "" txtRatePiece.text = "" txtTotalAmount.text = "" Dim rs1 As New ADODB.Recordset

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

piece = 0 rs1.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic piece = rs1("CartonPiece") txtRatePiece.text = rs1("Price") rs1.Close End Sub Private Sub cboProductName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If txtMInvoice.text = "" Then MsgBox "Please Enter the Gate Pass Number.", vbCritical + vbOKOnly txtMInvoice.SetFocus Exit Sub ElseIf cboMarketingName.text = "" Then MsgBox "Please Select the Sales Executive Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit Sub ElseIf cboOrderNo.text = "" Then MsgBox "Please Select An Order Number.", vbCritical + vbOKOnly cboOrderNo.SetFocus Exit Sub ElseIf txtPlace.text = "" Then MsgBox "Please Enter the Place Name.", vbCritical + vbOKOnly txtPlace.SetFocus Exit Sub ElseIf txtTrackNo.text = "" Then MsgBox "Please Enter the Truck Number.", vbCritical + vbOKOnly txtTrackNo.SetFocus Exit Sub ElseIf txtDriverName.text = "" Then MsgBox "Please Enter the Truck Driver Name.", vbCritical + vbOKOnly txtDriverName.SetFocus Exit Sub ElseIf txtLedgerName.text = "" Then MsgBox "Please Enter the Ledger Name.", vbCritical + vbOKOnly txtLedgerName.SetFocus Exit Sub ElseIf 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 Sub ElseIf txtCarton.text = "" Or txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtPiece.text = "" Or txtPiece.text = 0 Then MsgBox "Please Enter the Piece Number.", vbCritical + vbOKOnly txtPiece.SetFocus Exit Sub ElseIf txtRatePiece.text = "" Or txtRatePiece.text = 0 Then MsgBox "Please Enter the Rate per Carton.", vbCritical + vbOKOnly txtRatePiece.SetFocus Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "select * from MarketingOrderMaster where MOrderNo='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If rs1("OrderDate") > DDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly DDate.SetFocus Exit Sub End If rs1.Close Dim ROW As Integer

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i rs1.Open "select * from MarketingProductOutMaster Where MInvoiceNo='" & Trim(txtMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This GatePass Number is Already Existed." & Chr(13) & "Enter Another GatePass No.", vbInformation + vbOKOnly Exit Sub End If rs1.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 Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtMInvoice.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.text hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmount.text) cboProductName.text = "" txtCarton = "" txtPiece = "" txtRatePiece = "" txtTotalAmount = "" txtRemarks.text = "" End Sub Private 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 = ""

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtRemarks.text = "" For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k txtGtotal.text = "" txtMInvoice.text = "" Call cboOrderNo_Click End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cmdSave_Click() On Error Resume Next Dim i, j As Integer Dim rs1 As New ADODB.Recordset If txtMInvoice.text = "" Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If If cboCondition.text = "" Then MsgBox "Please Select The Order Condition.", vbInformation + vbOKOnly cboCondition.SetFocus Exit Sub End If Dim A As String A = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo) If Not A = vbYes Then Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from MarketingProductOutMaster", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("MInvoiceNo") = Trim(txtMInvoice.text) rs("MOrderNo") = Trim(cboOrderNo.text) rs("MID") = Trim(lblMID.Caption) rs("MName") = Trim(cboMarketingName.text) rs("DeliveryDate") = DDate.Value rs("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.text rs("PaidupAmount") = 0 rs("InvoiceAmount") = txtGtotal.text rs("Balance") = txtGtotal.text If txtTransportCost.text = "" Then rs("TransPortCost") = 0 Else rs("TransPortCost") = txtTransportCost.text End If rs.Update rs.Close rs.Open "select * from MarketingProductOutDetails", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.AddNew 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.Update Next i rs.Close For j = 1 To hsGrid.Rows - 2 rs1.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 2)) & "'", Cnn, adOpenDynamic, adLockOptimistic rs1("Carton") = Val(rs1("Carton")) - Val(hsGrid.TextMatrix(j, 3)) rs1("Piece") = Val(rs1("Piece")) - Val(hsGrid.TextMatrix(j, 4)) rs1.Update rs1.Close Next j rs.Open "select * from MarketingOrderMaster where MOrderNo ='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("FullOrNot") = Trim(cboCondition.text) rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.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 Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboMarketingName.AddItem Trim(rs("MName")) rs.MoveNext Loop rs.Close hsGrid.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"

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

hsGrid.TextMatrix(0, 6) = "Amount(TK)" hsGrid.TextMatrix(0, 7) = "Remarks" remove = False cboCondition.AddItem "More" cboCondition.AddItem "Full" cboCondition.AddItem "More Than Half" cboCondition.AddItem "Less Than Half " cboCondition.AddItem "Half" DDate.Value = Date End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_Change() On Error Resume Next Dim rs2 As New ADODB.Recordset txtPiece.text = "" txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text) rs2.Open "select * from MainStock where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs2.EOF Then If Val(txtCarton.text) > Val(rs2("Carton")) Then MsgBox "You Have Only " & rs2("Carton") & " Carton In Stock", vbCritical + vbOKOnly txtCarton.text = "" End If rs2.Close txtPiece.text = Val(txtCarton.text) * Val(piece) End If End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTransportCost_Change() On Error Resume Next Dim k As Integer txtGtotal.text = "" For k = hsGrid.Rows - 2 To 1 Step -1 txtGtotal.text = Val(txtGtotal.text) + hsGrid.TextMatrix(k, 6) Next k txtGtotal.text = Val(txtGtotal.text) + Val(txtTransportCost.text) End Sub Private Sub txtTransportCost_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub SALES EXECUTIVE MONEY RECEIPT Dim rs As New ADODB.Recordset Private Sub cboGatePass_Click() On Error Resume Next txtAmount.text = "" txtBalance.text = "" txtInvoiceAmount.text = "" rs.Open "select * from MarketingProductOutMaster where MInvoiceNo= '" & Trim(cboGatePass.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic txtInvoiceAmount.text = rs("Balance") rs.Close End Sub Private Sub cboGatePass_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboMarketingName_Click() lblMID.Caption = "" rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblMID.Caption = rs("MID") rs.Close cboGatePass.clear rs.Open "select * from MarketingProductOutMaster where MID='" & Trim(lblMID.Caption) & "' and Balance >'" & 0 & "' order by DeliveryDate", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then Do While Not rs.EOF cboGatePass.AddItem Trim(rs("MInvoiceNo"))

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.MoveNext Loop End If rs.Close cmbpartyname.clear Dim rsn As New ADODB.Recordset rsn.Open "select ShopeName from MarketingDistributorInfo where MName='" & Trim(cboMarketingName.text) & "' order by ShopeName", Cnn, adOpenDynamic, adLockOptimistic If Not rsn.EOF Then Do While Not rsn.EOF cmbpartyname.AddItem Trim(rsn("ShopeName")) rsn.MoveNext Loop End If rsn.Close End Sub Private Sub cboMarketingName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPayType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmbpartyname_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSave_Click() On Error Resume Next If cboMarketingName.text = "" Then MsgBox "Please Select The Sales Executive Name.", vbInformation + vbOKOnly cboMarketingName.SetFocus Exit Sub ElseIf cboGatePass.text = "" Then MsgBox "Please Select The Gatepass Number.", vbInformation + vbOKOnly cboGatePass.SetFocus Exit Sub ElseIf txtMRNo.text = "" Then MsgBox "Please Enter The Money Receipt Number.", vbInformation + vbOKOnly txtMRNo.SetFocus Exit Sub ElseIf cboPayType.text = "" Then MsgBox "Please Select The Payment Type.", vbInformation + vbOKOnly cboPayType.SetFocus Exit Sub ElseIf txtAmount.text = "" Then MsgBox "Please Enter The Amount(TK).", vbInformation + vbOKOnly txtAmount.SetFocus Exit Sub ElseIf Val(txtAmount.text) = 0 Then MsgBox "Please Enter The Amount(TK).", vbInformation + vbOKOnly txtAmount.SetFocus txtAmount.text = "" Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "Select * from MarketingMR Where MRNo='" & Trim(txtMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Money Receipt is Already exists.Please Enter Another Money Receipt Number.", vbInformation + vbOKOnly txtMRNo.SetFocus Exit Sub End If rs1.Close rs1.Open "select DeliveryDate from MarketingProductOutMaster where MID= '" & Trim(lblMID.Caption) & "' and MInvoiceNo='" & Trim(cboGatePass.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic If rs1("DeliveryDate") > PayDate.Value Then MsgBox "Payment Date Can Not Be Less Than Delivery Date." & Chr(13) & "Delivary Date Is :" & rs1("DeliveryDate"), vbInformation + vbCritical PayDate.SetFocus

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Exit Sub End If rs1.Close Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "Select * from MarketingMR", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew If cmbpartyname.text = "" Then rs("MDID") = Trim(lblMID.Caption) rs("MInvoiceNo") = Trim(cboGatePass.text) rs("MRNo") = Trim(txtMRNo.text) rs("PayType") = Trim(cboPayType.text) rs("PayDate") = PayDate rs("Amount") = Val(txtAmount.text) rs("Remarks") = Trim(txtRemarks.text) rs("ShopeName") = "NA" rs.Update Else rs("MDID") = Trim(lblMID.Caption) rs("MInvoiceNo") = Trim(cboGatePass.text) rs("MRNo") = Trim(txtMRNo.text) rs("PayType") = Trim(cboPayType.text) rs("PayDate") = PayDate rs("Amount") = Val(txtAmount.text) rs("Remarks") = Trim(txtRemarks.text) rs("ShopeName") = Trim(cmbpartyname.text) rs.Update End If rs.Close rs.Open "Select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("PaidupAmount") = Val(rs("PaidupAmount")) + Val(txtAmount.text) rs("Balance") = Val(rs("Balance")) - Val(txtAmount.text) rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal PayDate.Value = Date txtAmount.text = "" cboPayType.text = "" cboGatePass.text = "" cboMarketingName.text = "" lblMID.Caption = "" txtInvoiceAmount.text = "" txtBalance.text = "" txtRemarks.text = "" txtMRNo.text = "" cmbpartyname.text = "" End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboMarketingName.AddItem Trim(rs("MName")) rs.MoveNext Loop rs.Close cboPayType.AddItem "CASH", 0 cboPayType.AddItem "CHEQUE", 1 cboPayType.AddItem "DD", 2 cboPayType.AddItem "PAY ORDER", 3 cboPayType.AddItem "TT", 4 PayDate.Value = Date End Sub Private Sub txtAmount_Change() On Error Resume Next txtBalance.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

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtAmount.text = "" txtBalance.text = "" Exit Sub End If End Sub Private Sub txtAmount_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub SALES EXECUTIVE PARTY INFORMATION Dim rs As New ADODB.Recordset Private Sub cboMname_Click() On Error Resume Next lblMID.Caption = "" rs.Open "Select * from MarketingInfo where MName = '" & Trim(cboMname.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblMID.Caption = rs("MID") rs.Close End Sub Private Sub cboMname_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRefresh_Click() On Error Resume Next txtMDID.text = "" txtMaExID.text = "" txtDname.text = "" txtPName.text = "" txtAddress.text = "" cboMname.text = "" lblMID.Caption = "" txtPlace.text = "" Call Gr cmdRefresh.Enabled = False cmdSave.Enabled = True cmdSearch.Enabled = True cmdUpdate.Enabled = False End Sub Private Sub cmdSave_Click() On Error Resume Next If txtMDID.text = "" Then MsgBox "Please Enter The Sales Executive's Party ID.", vbInformation + vbOKOnly txtMDID.SetFocus Exit Sub ElseIf txtDname.text = "" Then MsgBox "Please Enter The Distributor Name.", vbInformation + vbOKOnly txtDname.SetFocus Exit Sub ElseIf txtPName.text = "" Then MsgBox "Please Enter The Proprietor Name.", vbInformation + vbOKOnly txtPName.SetFocus Exit Sub ElseIf txtAddress.text = "" Then MsgBox "Please Enter The Address.", vbInformation + vbOKOnly txtAddress.SetFocus Exit Sub ElseIf txtPlace.text = "" Then MsgBox "Please Enter The Place Name.", vbInformation + vbOKOnly txtPlace.SetFocus Exit Sub ElseIf cboMname.text = "" Then MsgBox "Please Enter The Sales Executive Name.", vbInformation + vbOKOnly cboMname.SetFocus Exit Sub End If Dim rsMDID As New ADODB.Recordset rsMDID.Open "select * from MarketingDistributorInfo where MDID='" & Trim(txtMDID.text) & "'", Cnn, adOpenDynamic, adLockOptimistic

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

If 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 If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "Select * from MarketingDistributorInfo", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("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.Update rs.Close rs.Open "Select * from MDistributorACstutas", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("MDID") = Trim(txtMDID.text) rs("ShopeName") = Trim(txtDname.text) rs("InvoiceAmount") = 0 rs("PaidupAmount") = 0 rs("ReceivableAmount") = 0 rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal txtDname.text = "" txtPName.text = "" txtAddress.text = "" cboMname.text = "" lblMID.Caption = "" txtPlace.text = "" txtMDID.text = "" Call Gr End Sub Private Sub cmdSearch_Click() On Error Resume Next rs.Open "Select * from MarketingDistributorInfo where MDID='" & Trim(txtMaExID.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then txtMDID.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 cmdRefresh.Enabled = True cmdUpdate.Enabled = True End If rs.Close cmdSearch.Enabled = False End Sub Private Sub cmdUpdate_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "Select * from MarketingDistributorInfo where MDID ='" & Trim(txtMDID.text) & "'", Cnn, adOpenDynamic, adLockOptimistic

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs1("ShopeName") = Trim(txtDname.text) rs1("ProprietorName") = Trim(txtPName.text) rs1("Address") = Trim(txtAddress.text) rs1("Place") = Trim(txtPlace.text) rs1.Update rs1.Close txtMDID.text = "" txtDname.text = "" txtPName.text = "" txtAddress.text = "" cboMname.text = "" lblMID.Caption = "" txtPlace.text = "" Call Gr cmdUpdate.Enabled = False cmdSave.Enabled = True cmdSearch.Enabled = True cmdRefresh.Enabled = False End Sub Private Sub Form_Load() On Error Resume Next rs.Open "Select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboMname.AddItem Trim(rs("MName")) rs.MoveNext Loop rs.Close Call Gr End Sub Private Sub ID() On Error Resume Next Dim NewId As Double Dim rs1 As New ADODB.Recordset NewId = 1 rs1.Open "Select * from MarketingDistributorInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs1.EOF NewId = Val(NewId) + Val(1) rs1.MoveNext Loop rs1.Close txtMDID.text = "SMD" & NewId End Sub Private Sub txtMaExID_Click() End Sub Private Sub Gr() On Error Resume Next rs.Close rs.CursorLocation = adUseClient rs.Open "select * from MarketingDistributorInfo", Cnn, adOpenDynamic, adLockOptimistic Set DataGrid.DataSource = rs End Sub SALES EXECUTIVE PARTY SALES Dim rs As New ADODB.Recordset Dim remove As Boolean Dim piece As Integer Private Sub cboDname_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset lblPID.Caption = "" rs.Open "select * from MarketingDistributorInfo where ShopeName= '" & Trim(cboDname.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblPID.Caption = rs("MDID") rs.Close cboOrderNo.clear rs1.Open "select * from MarketingDistributorOrderMaster where MDID='" & Trim(lblPID.Caption) & "' and FullorNot <> 'Full' order by orderdate", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then Do While Not rs1.EOF

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

cboOrderNo.AddItem Trim(rs1("MSOrderNo")) rs1.MoveNext Loop End If rs1.Close cboOrderNo_Click End Sub Private Sub cboDname_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboMarketingName_Click() On Error Resume Next lblMID.Caption = "" cboDname.clear rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblMID.Caption = rs("MID") rs.Close rs.Open "select * from MarketingDistributorInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then Do While Not rs.EOF cboDname.AddItem Trim(rs("ShopeName")) rs.MoveNext Loop End If rs.Close cboOrderNo.text = "" Call cboOrderNo_Click End Sub Private Sub cboMarketingName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboOrderNo_Click() On Error Resume Next cboProductName.clear Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "select ProductName,Carton,Piece from MarketingDistributorOrderDetails where MSOrderNo='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Set OrderGrid.DataSource = rs1 Do While Not rs1.EOF cboProductName.AddItem Trim(rs1("ProductName")) rs1.MoveNext Loop End Sub Private Sub cboOrderNo_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboProductName_Click() On Error Resume Next txtCarton.text = "" txtPiece.text = "" txtRatePiece.text = "" txtTotalAmount.text = "" piece = 0 rs.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic piece = rs("CartonPiece") txtRatePiece.text = rs("Price") rs.Close End Sub Private Sub cboProductName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If txtMInvoice.text = "" Then MsgBox "Please Enter An Invoice Number.", vbCritical + vbOKOnly txtMInvoice.SetFocus Exit Sub

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

ElseIf cboMarketingName.text = "" Then MsgBox "Please Select the Sales Executive Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit Sub ElseIf cboDname.text = "" Then MsgBox "Please Select the Sales Executive Party Name.", vbCritical + vbOKOnly cboDname.SetFocus Exit Sub ElseIf cboOrderNo.text = "" Then MsgBox "Please Select the Order Number.", vbCritical + vbOKOnly cboOrderNo.SetFocus Exit Sub ElseIf cboProductName.text = "" Then MsgBox "Please Select the Product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit Sub ElseIf txtCarton.text = "" Or txtCarton.text = 0 Then MsgBox "Please Enter the Carton Number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "select * from MarketingDistributorOrderMaster where MSOrderNo='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If rs1("OrderDate") > DDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly DDate.SetFocus Exit Sub End If rs1.Close Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i rs1.Open "select * from MarketingSalesMaster Where MSInvoiceNo='" & Trim(txtMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Invoice Number Is Already existed." & Chr(13) & "Enter Another GatePass No.", vbInformation + vbOKOnly Exit Sub End If rs1.Close Frame1.Enabled = False Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboProductName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtPiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtRatePiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtTotalAmount.text hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmount.text) cboProductName.text = "" txtCarton = "" txtPiece = "" txtRatePiece = "" txtTotalAmount = "" End Sub Private Sub cmdClear_Click() On Error Resume Next Frame1.Enabled = True Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0))

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Next k cboProductName.text = "" txtCarton = "" txtPiece = "" txtRatePiece = "" txtTotalAmount = "" DDate.Value = Date txtMInvoice.text = "" cboDname.text = "" lblMID.Caption = "" lblPID.Caption = "" cboMarketingName.text = "" cboOrderNo.text = "" txtGtotal.text = "" Call cboOrderNo_Click End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cmdSave_Click() On Error Resume Next Dim i, j As Integer Dim rs1 As New ADODB.Recordset If Frame1.Enabled = True Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If If cboCondition.text = "" Then MsgBox "Please Select An Order Condition.", vbInformation + vbOKOnly cboCondition.SetFocus Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from MarketingSalesMaster", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("MSInvoiceNo") = Trim(txtMInvoice.text) rs("MSOrderNo") = Trim(cboOrderNo.text) rs("MID") = Trim(lblMID.Caption) rs("MDID") = Trim(lblPID.Caption) rs("DeliveryDate") = DDate.Value rs("InvoiceAmount") = txtGtotal.text rs("PaidupAmount") = 0 rs("Balance") = txtGtotal.text rs.Update rs.Close rs.Open "select * from MDistributorACstutas where MDID='" & Trim(lblPID.Caption) & "' and ShopeName='" & Trim(cboDname.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("InvoiceAmount") = rs("InvoiceAmount") + Val(txtGtotal.text) rs("ReceivableAmount") = rs("ReceivableAmount") + Val(txtGtotal.text) rs.Update rs.Close rs.Open "select * from MarketingSalesDetails", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rs.AddNew rs("MSInvoiceNo") = Trim(txtMInvoice.text)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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.Update Next i rs.Close Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimistic rs.Open "select * from MarketingDistributorOrderMaster where MSOrderNo='" & Trim(cboOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("FullorNot") = Trim(cboCondition.text) rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Call cmdClear_Click cboCondition.text = "" End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboMarketingName.AddItem Trim(rs("MName")) rs.MoveNext Loop rs.Close hsGrid.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 = False DDate.Value = Date cboCondition.AddItem "More" cboCondition.AddItem "Full" cboCondition.AddItem "More Than Half" cboCondition.AddItem "Less Than Half " cboCondition.AddItem "Half" End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_Change() On Error Resume Next txtPiece.text = Val(txtCarton.text) * Val(piece) txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text) End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtPiece_Change() End Sub Private Sub txtRatePiece_Change() On Error Resume Next txtTotalAmount.text = Val(txtPiece.text) * Val(txtRatePiece.text) End Sub SALES EXECUTIVE PRODUCT RETURN Dim rs As New ADODB.Recordset Dim remove As Boolean Dim piece As Integer Dim Carton As Double Private Sub cboGatePass_Click() On Error Resume Next Dim rs2 As New ADODB.Recordset cboProductName.clear

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs2.Open "select * from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs2.EOF Then Do While Not rs2.EOF cboProductName.AddItem Trim(rs2("ProductName")) rs2.MoveNext Loop rs2.Close Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "Select ProductName,Carton,Piece from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Set MReturnGrid.DataSource = rs1 End If End Sub Private Sub cboGatePass_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboMarketingName_Click() On Error Resume Next Label1.Caption = "" rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Label1.Caption = rs("MID") rs.Close cboGatePass.clear Call cboGatePass_Click cboProductName.clear rs.Open "select * from MarketingProductOutMaster where MID='" & Trim(Label1.Caption) & "' order by DeliveryDate", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then Do While Not rs.EOF cboGatePass.AddItem Trim(rs("MInvoiceNo")) rs.MoveNext Loop End If rs.Close End Sub Private Sub cboMarketingName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboProductName_Click() On Error Resume Next piece = 0 rs.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic piece = rs("CartonPiece") rs.Close txtRatePiece.text = "" rs.Open "select * from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboGatePass.text) & "' and ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Carton = rs("Carton") txtRatePiece.text = rs("RatePerCarton") rs.Close txtCarton.text = "" txtPiece.text = "" End Sub Private Sub cboProductName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next Dim introw1 As Integer Dim ROW As Integer If cboMarketingName.text = "" Then MsgBox "Please Select The Sales Executive Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit Sub ElseIf cboGatePass.text = "" Then MsgBox "Please Enter the Gate Pass Number.", vbCritical + vbOKOnly cboGatePass.SetFocus Exit Sub

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

ElseIf cboMarketingName.text = "" Then MsgBox "Please Select the Marketing Executive Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit Sub ElseIf cboProductName.text = "" Then MsgBox "Please Select the Product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit Sub ElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtCarton = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "Select Carton from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Val(txtCarton.text) > Val(rs1("Carton")) Then MsgBox "Return Carton Quantity Can Not Be Greater Than Delivery Quantity.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub End If rs1.Close rs1.Open "select * from MarketingReturn where MInvoiceNo='" & Trim(cboGatePass.text) & "' and ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "These Records are Already Existed,please Insert Another InvoiceNo", vbCritical + vbOKOnly rs1.Close Exit Sub End If rs1.Close rs1.Open "select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If PDate.Value < rs1("DeliveryDate") Then MsgBox "Return Date Can Not Be Less Than Delivery Date. Delivery Date IS :" & rs1("DeliveryDate"), vbInformation + vbOKOnly Exit Sub End If rs1.Close ROW = hsGrid.Rows For 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 Sub End If Next introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboProductName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtPiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtRatePiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtTotalAmount.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtTotalAmount.text) cboProductName.text = "" txtCarton = "" txtPiece = "" txtRatePiece.text = "" txtTotalAmount.text = "" cboGatePass.Enabled = False cboMarketingName.Enabled = False PDate.Enabled = False End Sub Private Sub cmdClear_Click()

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cboGatePass.Enabled = True cboGatePass.text = "" cboMarketingName.Enabled = True cboMarketingName.text = "" PDate.Enabled = True txtGrandTotal.text = "" PDate.Value = Date cboProductName.text = "" txtCarton = "" txtPiece = "" txtRatePiece.text = "" txtTotalAmount.text = "" Label1.Caption = "" cboGatePass.text = "" txtRemarks.text = "" Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "Select ProductName,Carton,Piece from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboGatePass.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Set MReturnGrid.DataSource = rs1 End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cmdSave_Click() On Error Resume Next If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If Dim k As Integer Dim i, j As Integer Dim rs1 As New ADODB.Recordset If rs.State = adStateOpen Then rs.Close Set rs = Nothing End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from MarketingReturn ", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rs.AddNew rs("MID") = Trim(Label1.Caption) rs("MInvoiceNo") = Trim(cboGatePass.text) rs("ReturnDate") = PDate.Value rs("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)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.Update Next i rs.Close rs.Open "select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(cboGatePass.text) & "' and MID='" & Trim(Label1.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("InvoiceAmount") = Val(rs("InvoiceAmount")) - Val(txtGrandTotal.text) rs("Balance") = Val(rs("Balance")) - Val(txtGrandTotal.text) rs.Update rs.Close For j = 1 To hsGrid.Rows - 2 rs.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("Carton") = Val(rs("Carton")) + Val(hsGrid.TextMatrix(j, 2)) rs("Piece") = Val(rs("Piece")) + Val(hsGrid.TextMatrix(j, 3)) rs.Update rs.Close Next j Cnn.CommitTrans Screen.MousePointer = vbNormal Call cmdClear_Click End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select MName from MarketingInfo order by MName", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboMarketingName.AddItem Trim(rs("MName")) rs.MoveNext Loop rs.Close hsGrid.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 = False PDate.Value = Date End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next Set rs = Nothing End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_Change() On Error Resume Next txtPiece.text = Val(txtCarton.text) * Val(piece) txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text) End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub CARTON WISE SALES EXECUTIVE COMMISION Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim rs3 As New ADODB.Recordset Dim remove As Boolean Private Sub cboMarketingName_Click() lblMID.Caption = "" rs3.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblMID.Caption = rs3("MID") rs3.Close End Sub Private Sub cboMarketingName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub CboProName_KeyPress(KeyAscii As Integer)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If cboMarketingName.text = "" Then MsgBox "Please Select the Marketing Executive Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit Sub ElseIf CboProName.text = "" Then MsgBox "Please Select the Product(Soap) Name.", vbCritical + vbOKOnly CboProName.SetFocus Exit Sub ElseIf Val(txtCarton.text) = 0 Then MsgBox "Please enter total carton number;Zero will not be accepted.", vbCritical + vbOKOnly txtCarton.text = "" txtCarton.SetFocus Exit Sub ElseIf 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 Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = ComDate.Value hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboMarketingName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = CboProName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePerCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.text hsGrid.Rows = hsGrid.Rows + 1 txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtTotalAmount.text) cboMarketingName.text = "" lblMID.Caption = "" CboProName.text = "" txtCarton.text = "" txtRatePerCarton.text = "" txtTotalAmount.text = "" cmdSave.Enabled = True End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cboMarketingName.text = "" lblMID.Caption = "" CboProName.text = "" txtCarton.text = "" txtRatePerCarton.text = "" txtTotalAmount.text = "" ComDate.Value = Date

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtGrandTotal.text = "" End Sub Private Sub cmdClose_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cmdSave_Click() Dim A As String A = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo) If Not A = vbYes Then Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans Dim rsnew As New ADODB.Recordset rsnew.Open "Select * from SalesExeDistrCommision", Cnn, adOpenDynamic, adLockOptimistic Dim i As Integer For i = 1 To hsGrid.Rows - 2 rsnew.AddNew rsnew("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.Update Next i rsnew.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Call clear cmdSave.Enabled = False End Sub Private Sub Form_Load() ComDate.Value = Date cmdSave.Enabled = False rs1.Open "select distinct MName from MarketingInfo order by MName", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs1.EOF cboMarketingName.AddItem Trim(rs1("MName")) rs1.MoveNext Loop rs1.Close rs2.Open "select Distinct ProductName from Productinfo order by ProductName", Cnn, adOpenDynamic, adLockOptimistic rs2.MoveFirst Do While Not rs2.EOF CboProName.AddItem Trim(rs2("ProductName")) rs2.MoveNext Loop rs2.Close hsGrid.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) + 200

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

hsGrid.ColWidth(2) = hsGrid.ColWidth(2) + 700 hsGrid.ColWidth(3) = hsGrid.ColWidth(3) + 350 hsGrid.ColWidth(4) = hsGrid.ColWidth(4) + 500 hsGrid.ColWidth(5) = hsGrid.ColWidth(5) + 250 hsGrid.ColWidth(6) = hsGrid.ColWidth(6) + 500 End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call ValidationNotPoint(KeyAscii) End Sub Private Sub txtRatePerCarton_Change() Dim AA As Double AA = FormatNumber(Val(txtCarton.text) * Val(txtRatePerCarton.text), 0) txtTotalAmount.text = Val(AA) End Sub Private Sub txtRatePerCarton_KeyPress(KeyAscii As Integer) Call Validationwithpoint(KeyAscii) End Sub Private Sub txtTotalAmount_KeyPress(KeyAscii As Integer) Call ValidationNotPoint(KeyAscii) End Sub Public Sub clear() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cboMarketingName.text = "" lblMID.Caption = "" CboProName.text = "" txtCarton.text = "" txtRatePerCarton.text = "" txtTotalAmount.text = "" ComDate.Value = Date txtGrandTotal.text = "" End Sub BANK INFORMATION Dim rs As New ADODB.Recordset Dim rsac As New ADODB.Recordset Private Sub cmdClear_Click() Call clear cmdSave.Enabled = True End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdClose_Click() Unload Me End Sub Private Sub cmdSave_Click() If txtBankName.text = "" Then MsgBox " Please Enter The Bank Name", vbCritical + vbOKOnly, "Equipment Repare and Sells Billing System" txtBankName.SetFocus Exit Sub ElseIf txtAccountholder.text = "" Then MsgBox " Please Enter The Account Holder Name", vbCritical + vbOKOnly, txtAccountholder.SetFocus Exit Sub ElseIf txtAccountNumber.text = "" Then MsgBox "Please Enter The Account Number", vbCritical + vbOKOnly, "Equipment Repare and Sells Billing System" txtAccountNumber.SetFocus Exit Sub End If Cnn.BeginTrans rs.Open "select * from NewBankInfo", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("BankName") = Trim(txtBankName.text)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs("BranchName") = Trim(txtbranceName.text) rs("AccountHolderName") = Trim(txtAccountholder.text) rs("AccountNumber") = Trim(txtAccountNumber.text) rs("OpeningDate") = openingDate.Value rs("BankAddress") = txtbankAddress.text rs("Phone") = txtphone.text rs.Update rs.Close Cnn.CommitTrans Call clear End Sub Private Sub DGrid() Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "select * from NewBankInfo", Cnn, adOpenDynamic, adLockOptimistic Set Grid.DataSource = rs1 End Sub Private Sub Form_Load() Call DGrid End Sub Private Sub txtSizeDimension_Change() Call Validation(KeyAscii) End Sub Public Sub clear() txtAccountholder.text = "" txtAccountNumber.text = "" txtbankAddress.text = "" txtphone.text = "" openingDate.Value = Date txtBankName.text = "" txtbranceName.text = "" End Sub DISTRIBUTOR DEALER INFORMATION Dim rs As New ADODB.Recordset Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdInsert_Click() On Error Resume Next txtDname.text = "" txtPName.text = "" txtAddress.text = "" txtTel.text = "" txtMobile.text = "" txtCredit.text = "" cmdSave.Enabled = True cmdInsert.Enabled = False cmdUpdate.Enabled = False cmdRefresh.Enabled = True cmdSearch.Enabled = True End Sub Private Sub cmdRef1_Click() On Error Resume Next txtDname.text = "" txtPName.text = "" txtAddress.text = "" txtTel.text = "" txtMobile.text = "" txtCredit.text = "" txtSearch.text = "" cmdSave.Enabled = True cmdInsert.Enabled = True cmdUpdate.Enabled = False cmdSearch.Enabled = True cmdRefresh.Enabled = False End Sub Private Sub cmdRefresh_Click() On Error Resume Next

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtMobile.text = "" txtCredit.text = "" txtSearch.text = "" cmdSave.Enabled = True cmdInsert.Enabled = True cmdUpdate.Enabled = False cmdSearch.Enabled = True cmdRefresh.Enabled = False End Sub Private Sub cmdSave_Click() On Error Resume Next If txtDid.text = "" Then MsgBox "Please Enter The Distributor ID.", vbCritical + vbOKOnly txtDid.SetFocus Call Gd Exit Sub ElseIf txtDname.text = "" Then MsgBox "Please Enter The Distributor Name.", vbCritical + vbOKOnly txtDname.SetFocus Call Gd Exit Sub ElseIf txtPName.text = "" Then MsgBox "Please Enter The Distributor Proprietor Name.", vbCritical + vbOKOnly txtPName.SetFocus Call Gd Exit Sub Exit Sub End If rs.Close Dim rsdidsearch As New ADODB.Recordset rsdidsearch.Open "Select * from DistributorInfo where DID='" & Trim(txtDid.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rsdidsearch.EOF Then MsgBox "This Distributor ID is already existed,Please insert another Distributor ID.", vbCritical + vbOKOnly txtTel.text = "" txtMobile.text = "" txtCredit.text = "" txtDid.SetFocus rsdidsearch.Close Call Gd Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "Select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("DID") = Trim(txtDid.text) rs("ShopName") = Trim(txtDname.text) rs("PropreitorName") = Trim(txtPName.text) rs("JoinDate") = DDate.Value rs("Address") = Trim(txtAddress.text) rs("TelNo") = txtTel.text rs("MobNumber") = txtMobile.text rs("CreditLimit") = txtCredit.text rs.Update rs.Close rs.Open "Select * from DistributorACStatus", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("DID") = Trim(txtDid.text) rs("ShopName") = Trim(txtDname.text) rs("InvoiceAmount") = 0 rs("PaidupAmount") = 0 rs("RecevalAmount") = 0 rs.Update rs.Close rs.Open "Select * from DistributorAdvanceAC", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("DID") = Trim(txtDid.text) rs("ShopName") = Trim(txtDname.text) rs("Amount") = 0 rs.Update

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Call Gd txtDid.text = "" txtDname.text = "" txtPName.text = "" txtAddress.text = "" txtTel.text = "" txtMobile.text = "" txtCredit.text = "" cmdInsert.Enabled = False End Sub Private Sub cmdSearch_Click() On Error Resume Next If txtSearch.text = "" Then MsgBox "Please Write down the correct distributor ID No." End If rs.Close rs.Open "Select * from DistributorInfo where DID='" & Trim(txtSearch.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If rs.EOF Then rs.Close Exit Sub Else txtDid.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 = False cmdInsert.Enabled = True cmdUpdate.Enabled = True cmdSearch.Enabled = False cmdRefresh.Enabled = True End If End Sub Private Sub cmdUpdate_Click() On Error Resume Next rs.Open "Select * from DistributorInfo where DID='" & Trim(txtDid.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("PropreitorName") = Trim(txtPName.text) rs("JoinDate") = DDate.Value rs("Address") = Trim(txtAddress.text) rs("TelNo") = txtTel.text rs("MobNumber") = txtMobile.text rs("CreditLimit") = txtCredit.text rs.Update rs.Close Call cmdInsert_Click rs.Close Call Gd End Sub Private Sub Form_Load() On Error Resume Next Call Gd cmdUpdate.Enabled = False DDate.Value = Date End Sub Private Sub ID() On Error Resume Next Dim NewId As Double Dim rs1 As New ADODB.Recordset NewId = 1 rs1.Open "Select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs1.EOF NewId = Val(NewId) + Val(1) rs1.MoveNext Loop

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs1.Close txtDid.text = "SD" & NewId End Sub Private Sub Gd() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "Select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimistic Set Grid.DataSource = rs1 End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next rs.Close Set rs = Nothing End Sub Private Sub txtCredit_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtSearch_GotFocus() End Sub DISTRIBUTOR ORDER FORM Dim rs As New ADODB.Recordset Dim remove As Boolean Dim piece As Double Private Sub cboDname_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select DID from DistributorInfo where ShopName='" & cboDname.text & "' ", Cnn, adOpenDynamic, adLockOptimistic lblDID.Caption = rs1(0) rs1.Close End Sub Private Sub cboDname_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboProName_Click() On Error Resume Next piece = 0 rs.Open "select * from Productinfo where ProductName='" & Trim(CboProName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic piece = rs("CartonPiece") rs.Close End Sub Private Sub CboProName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If txtOrderno.text = "" Then MsgBox "Please Enter the Order Number.", vbCritical + vbOKOnly txtOrderno.SetFocus Exit Sub ElseIf cboDname.text = "" Then MsgBox "Please Select the Dealer Name.", vbCritical + vbOKOnly cboDname.SetFocus Exit Sub ElseIf CboProName.text = "" Then MsgBox "Please Select the Product Name.", vbCritical + vbOKOnly CboProName.SetFocus Exit Sub ElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtCarton.text = 0 Then MsgBox "Please Enter the Carton.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub End If Dim rs1 As New ADODB.Recordset

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs1.Open "select * from DistributorOrderMaster where DOrdeNo ='" & Trim(txtOrderno.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Order Number is Already Saved." & Chr(13) & "Enter Another Order No.", vbInformation + vbOKOnly txtOrderno.SetFocus Exit Sub End If rs1.Close If ODate.Value > DDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly DDate.SetFocus Exit Sub End If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i Dim introw1 As Integer Frame1.Enabled = False introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtOrderno hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboDname hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = CboProName hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtCarton hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtPiece hsGrid.Rows = hsGrid.Rows + 1 CboProName.text = "" txtCarton.text = "" txtPiece.text = "" End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer Frame1.Enabled = True For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k DDate.Value = Date CboProName.text = "" txtCarton.text = "" txtPiece.text = "" lblDID.Caption = "" End Sub Private Sub cmdClose_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cmdSave_Click() On Error Resume Next If Frame1.Enabled = True Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If Dim i As Integer

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from DistributorOrderMaster", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("DOrdeNo") = Trim(txtOrderno.text) rs("DID") = Trim(lblDID.Caption) rs("ShopName") = Trim(cboDname.text) rs("OrderDate") = ODate.Value rs("DeliveryDate") = DDate.Value rs("FullOrNot") = "No" rs.Update rs.Close rs.Open "select * from DistributorOrderDetails", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rs.AddNew rs("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.Update Next i Cnn.CommitTrans Screen.MousePointer = vbNormal rs.Close Call cmdClear_Click End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF cboDname.AddItem Trim(rs(1)) rs.MoveNext Loop rs.Close rs.Open "select * from Productinfo", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF CboProName.AddItem Trim(rs(0)) rs.MoveNext Loop rs.Close hsGrid.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 = Date DDate.Value = Date End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next rs.Close Set rs = Nothing End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_Change() On Error Resume Next txtPiece.text = Val(txtCarton.text) * Val(piece) End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub DISTRIBUTOR PRODUCT OUT DETAILS

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Dim rs As New ADODB.Recordset Dim remove As Boolean Dim piece As Double Private Sub cboCondition_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboDistributorName_Click() On Error Resume Next lblDID.Caption = "" cboDistributorOrderNo.clear cboDistributorOrderNo_Click rs.Open "select * from DistributorInfo where ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblDID.Caption = rs("DID") rs.Close rs.Open "select * from DistributorOrderMaster where ShopName='" & Trim(cboDistributorName.text) & "' and FullOrNot <> 'Full'", Cnn, adOpenDynamic, adLockOptimistic If rs.EOF Then rs.Close Exit Sub Else Do While Not rs.EOF cboDistributorOrderNo.AddItem Trim(rs("DOrdeNo")) rs.MoveNext Loop End If rs.Close End Sub Private Sub cboDistributorName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboDistributorOrderNo_Click() On Error Resume Next cboProductName.clear Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "select ProductName,Cartoon,Piece from DistributorOrderDetails where DOrderNo='" & Trim(cboDistributorOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Set OrderGrid.DataSource = rs1 Do While Not rs1.EOF cboProductName.AddItem Trim(rs1("ProductName")) rs1.MoveNext Loop End Sub Private Sub cboDistributorOrderNo_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboProductName_Click() On Error Resume Next txtCarton.text = "" txtPiece.text = "" txtRatePiece.text = "" txtTotalAmount.text = "" piece = 0 rs.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic piece = rs("CartonPiece") txtRatePiece.text = rs("Price") rs.Close End Sub Private Sub cboProductName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If txtDInvoice.text = "" Then MsgBox "Please Enter An Invoice Number.", vbCritical + vbOKOnly txtDInvoice.SetFocus Exit Sub ElseIf cboDistributorName.text = "" Then

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

MsgBox "Please Select the Distributor Name.", vbCritical + vbOKOnly cboDistributorName.SetFocus Exit Sub ElseIf cboDistributorOrderNo.text = "" Then MsgBox "Please Select An Order Number.", vbCritical + vbOKOnly cboDistributorOrderNo.SetFocus Exit Sub ElseIf txtPlace.text = "" Then MsgBox "Please Enter the Place Name.", vbCritical + vbOKOnly txtPlace.SetFocus Exit Sub ElseIf 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 Sub ElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "select * from DistributorProductOutMaster where DInvoiceNo='" & Trim(txtDInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Gatepass Number Is Already Saved." & Chr(13) & "Enter Another GatePass No.", vbInformation + vbOKOnly txtDInvoice.SetFocus Exit Sub End If rs1.Close rs1.Open "select * from DistributorOrderMaster where DOrdeNo='" & Trim(cboDistributorOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If rs1("OrderDate") > DDate.Value Then MsgBox "Delivery Date Can Not Be Less Than Order Date.", vbInformation + vbOKOnly DDate.SetFocus Exit Sub End If Dim rs2 As New ADODB.Recordset rs2.Open "select * from MainStock where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Val(txtCarton.text) > Val(rs2("Carton")) Then MsgBox "You Have Only " & rs2("Carton") & " Carton In Stock", vbCritical + vbOKOnly txtCarton.text = "" Exit Sub End If rs2.Close Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next 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

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

DDate.Enabled = False Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtDInvoice.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.text hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmount.text) cboProductName.text = "" txtCarton = "" txtPiece = "" txtRatePiece = "" txtTotalAmount = "" txtRemarks.text = "" End Sub Private 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 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k txtGtotal.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 = Date cboDistributorOrderNo_Click cboProductName.clear End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Private Sub cmdSave_Click() On Error Resume Next Dim i, j As Integer Dim rs1 As New ADODB.Recordset If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If If cboCondition.text = "" Then MsgBox "Please Select An Order Condition.", vbInformation + vbOKOnly cboCondition.SetFocus Exit Sub End If Dim A As String A = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo) If Not A = vbYes Then Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from DistributorProductOutMaster", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("DInvoiceNo") = Trim(txtDInvoice.text) rs("DeliveryDate") = DDate.Value rs("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.text rs("PaidupAmount") = 0 rs("Balance") = txtGtotal.text rs("Total") = txtGtotal.text If txtTransportCost.text = "" Then rs("TransPortCost") = 0 Else rs("TransPortCost") = txtTransportCost.text End If rs.Update rs.Close rs.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("InvoiceAmount") = Val(rs("InvoiceAmount")) + Val(txtGtotal.text) rs("RecevalAmount") = Val(rs("RecevalAmount")) + Val(txtGtotal.text) rs.Update rs.Close rs.Open "select * from DistributorProductOutDetails", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rs.AddNew rs("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.Update Next i rs.Close For j = 1 To hsGrid.Rows - 2 rs1.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 2)) & "'", Cnn, adOpenDynamic, adLockOptimistic rs1("Carton") = Val(rs1("Carton")) - Val(hsGrid.TextMatrix(j, 3)) rs1("Piece") = Val(rs1("Piece")) - Val(hsGrid.TextMatrix(j, 4)) rs1.Update rs1.Close Next j rs.Open "select * from DistributorOrderMaster where DOrdeNo='" & Trim(cboDistributorOrderNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("FullOrNot") = Trim(cboCondition.text)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal cboCondition.text = "" Call cmdClear_Click End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboDistributorName.AddItem Trim(rs("ShopName")) rs.MoveNext Loop rs.Close hsGrid.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 = False cboCondition.AddItem "More" cboCondition.AddItem "Full" cboCondition.AddItem "More Than Half" cboCondition.AddItem "Less Than Half " cboCondition.AddItem "Half" DDate.Value = Date End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_Change() On Error Resume Next txtPiece.text = "" txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text) txtPiece.text = Val(txtCarton.text) * Val(piece) End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtPiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtRatePiece_Change() On Error Resume Next txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text) End Sub Private Sub txtRatePiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtTransportCost_Change() On Error Resume Next Dim k As Integer txtGtotal.text = "" For k = hsGrid.Rows - 2 To 1 Step -1 txtGtotal.text = Val(txtGtotal.text) + hsGrid.TextMatrix(k, 6) Next k txtGtotal.text = Val(txtGtotal.text) + Val(txtTransportCost.text) End Sub Private Sub txtTransportCost_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Distributor Advance Payment Dim rs As New ADODB.Recordset Private Sub cboDistributorName_Click()

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

On Error Resume Next Dim rs1 As New ADODB.Recordset lblDID.Caption = "" txtAmount.text = "" rs1.Open "select DID from DistributorInfo where ShopName='" & Trim(cboDistributorName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic lblDID.Caption = Trim(rs1(0)) rs1.Close Call Gd End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSave_Click() On Error Resume Next If cboDistributorName.text = "" Then MsgBox "Please Select the Distributor Name", vbCritical + vbOKOnly cboDistributorName.SetFocus Call Gd Exit Sub ElseIf txtMRNo.text = "" Then MsgBox "please Enter Money Receit No.", vbCritical + vbOKOnly txtMRNo.SetFocus Call Gd Exit Sub ElseIf cboPayType.text = "" Then MsgBox "please Select pay type.", vbCritical + vbOKOnly cboPayType.SetFocus Call Gd Exit Sub ElseIf txtAmount.text = "" Then MsgBox "Please Enter amount.", vbCritical + vbOKOnly txtAmount.SetFocus Call Gd Exit Sub ElseIf txtAmount.text = 0 Then MsgBox "Please Enter amount.", vbCritical + vbOKOnly txtAmount.SetFocus Exit Sub Call Gd End If Screen.MousePointer = vbHourglass rs.Open "select * from DistributorAdvancePayment", Cnn, adOpenDynamic, adLockOptimistic rs.AddNew rs("DID") = Trim(lblDID.Caption) rs("Shopname") = Trim(cboDistributorName.text) rs("PayDate") = PayDate.Value rs("Mrno") = Trim(txtMRNo.text) rs("PayType") = Trim(cboPayType.text) rs("Amount") = txtAmount.text rs.Update rs.Close Call Gd rs.Open "select * from DistributorAdvanceAC where DID='" & Trim(lblDID.Caption) & "' and ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("Amount") = Val(rs("Amount")) + Val(txtAmount.text) rs.Update rs.Close Call Gd rs.Open "select * from DistributorACStatus where DID='" & Trim(lblDID.Caption) & "' and ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("Paidupamount") = Val(rs("Paidupamount")) + Val(txtAmount.text) rs("RecevalAmount") = Val(rs("RecevalAmount")) - Val(txtAmount.text) rs.Update rs.Close Call Gd Screen.MousePointer = vbNormal Unload Me Load Me End Sub

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Private Sub Form_Load() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then Do While Not rs1.EOF cboDistributorName.AddItem Trim(rs1("ShopName")) rs1.MoveNext Loop End If rs1.Close Call Gd cboPayType.AddItem "CASH", 0 cboPayType.AddItem "CHEQUE", 1 cboPayType.AddItem "DD", 2 cboPayType.AddItem "PAY ORDER", 3 cboPayType.AddItem "TT", 4 PayDate.Value = Date End Sub Private Sub Gd() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "Select * from DistributorAdvancePayment", Cnn, adOpenDynamic, adLockOptimistic Set DataGrid.DataSource = rs1 End Sub DISTRIBUTOR MONEY RECEIPT Dim rs As New ADODB.Recordset Dim remove As Boolean Private 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.Close End Sub Private 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.Close End Sub Private Sub cboDInvoice_Click() On Error Resume Next txtAmount.text = "" txtBalance.text = "" txtInvoiceAmount.text = "" rs.Open "select * from DistributorProductOutMaster where DInvoiceNo= '" & Trim(cboDInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic txtInvoiceAmount.text = rs("Balance") rs.Close End Sub Private Sub cboDInvoice_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboDistributorName_Click() On Error Resume Next txtAdvanceMoney.text = "" txtTotalBalance.text = "" txtBalanceAdvance.text = ""

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtBalance.text = "" txtInvoiceAmount.text = "" cboDInvoice.clear lblDID.Caption = "" txtAmount.text = "" rs.Open "select DID from DistributorInfo where ShopName='" & Trim(cboDistributorName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic lblDID.Caption = Trim(rs(0)) rs.Close rs.Open "select DInvoiceNo from DistributorProductOutMaster where DID= '" & Trim(lblDID.Caption) & "' and Balance > '" & 0 & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then Do While Not rs.EOF cboDInvoice.AddItem Trim(rs("DInvoiceNo")) rs.MoveNext Loop rs.Close cboDInvoice.ListIndex = 0 End If Dim rs1 As New ADODB.Recordset rs1.Open "select * from DistributorAdvanceAC where DID='" & Trim(lblDID.Caption) & "' and ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then txtAdvanceMoney.text = rs1("Amount") End If End Sub Private Sub cboDistributorName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboPayType_Click() If cboPayType.text = "BY BANK" Then txtCheckNo.Visible = True cboAccNumber.Visible = True cboBankName.Visible = True cboBranchName.Visible = True Label15.Visible = True Label19.Visible = True Label20.Visible = True Label14.Visible = True Else txtCheckNo.Visible = False cboAccNumber.Visible = False cboBankName.Visible = False cboBranchName.Visible = False Label15.Visible = False Label19.Visible = False Label20.Visible = False Label14.Visible = False End If End Sub Private Sub cboPayType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset Dim Amount As Double Amount = 0 If cboDistributorName.text = "" Then MsgBox "Please Select The Distributor Name.", vbCritical + vbOKOnly cboDistributorName.SetFocus Exit Sub ElseIf cboDInvoice.text = "" Then MsgBox "Please Select An Invoice No.", vbCritical + vbOKOnly cboDInvoice.SetFocus Exit Sub ElseIf txtMRNo.text = "" Then MsgBox "Please Enter The Money Receipt No.", vbCritical + vbOKOnly txtMRNo.SetFocus Exit Sub

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

ElseIf cboPayType.text = "" Then MsgBox "Please Select The Payment Type.", vbCritical + vbOKOnly cboPayType.SetFocus Exit Sub ElseIf txtAmount.text = "" Then MsgBox "Please Enter The Paidup Amount.", vbCritical + vbOKOnly txtAmount.SetFocus Exit Sub ElseIf txtAmount.text = 0 Then MsgBox "Please Enter The Paidup Amount.", vbCritical + vbOKOnly txtAmount.SetFocus Exit Sub End If rs1.Open "select * from DistributorMR where MRNo='" & Trim(txtMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Money Receipt Is Already Existed", vbCritical + vbOKOnly txtMRNo.SetFocus txtCashPay.text = "" Exit Sub End If rs1.Close rs1.Open "select DeliveryDate from DistributorProductOutMaster where DID= '" & Trim(lblDID.Caption) & "' and DInvoiceNo='" & Trim(cboDInvoice.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic If rs1("DeliveryDate") > PayDate.Value Then MsgBox "Payment Date Can Not Be Less Than Delivery Date." & Chr(13) & "Delivary Date Is :" & rs1("DeliveryDate"), vbInformation + vbCritical PayDate.SetFocus Exit Sub End If rs1.Close rs1.Open "select * from DistributorMR where MRNo='" & Trim(txtMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Money Receipt is Already Existed.", vbCritical + vbOKOnly txtMRNo.SetFocus rs1.Close Exit Sub End If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboDInvoice.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = txtAmount.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtBalanceAdvance.text 'a hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = cboBankName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = cboBranchName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = cboAccNumber.text hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtCheckNo.text hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.text = Val(txtGtotal.text) + Val(txtCashPay.text) txtTotalBalance.text = Val(txtTotalBalance.text) + Val(txtBalanceAdvance.text) cboDistributorName.Enabled = False txtMRNo.Enabled = False PayDate.Enabled = False cboPayType.Enabled = False txtBalance.text = "" txtCashPay.text = "" txtInvoiceAmount.text = "" txtAmount.text = "" cboDInvoice.text = "" txtBalanceAdvance.text = "" End Sub Private Sub cmdClear_Click()

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cboDistributorName.Enabled = True txtMRNo.Enabled = True PayDate.Enabled = True cboPayType.Enabled = True cboDistributorName.text = "" txtMRNo.text = "" PayDate.Value = Date cboPayType.text = "" txtAmount.text = "" cboDInvoice.text = "" txtInvoiceAmount.text = "" txtBalance.text = "" txtGtotal.text = "" lblDID.Caption = "" txtAdvanceMoney.text = "" 'a txtBalanceAdvance.text = "" 'a txtTotalBalance.text = "" 'a End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cmdSave_Click() On Error Resume Next If Not hsGrid.GridColor > 2 Then MsgBox "Sorry! You First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If Dim A As String A = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo) If Not A = vbYes Then Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from DistributorMR", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rs.AddNew rs("DID") = Trim(lblDID.Caption) rs("DInvoiceNo") = Trim(hsGrid.TextMatrix(i, 1)) rs("MRNo") = Trim(txtMRNo.text) rs("PayType") = Trim(cboPayType.text) rs("PayDate") = PayDate.Value rs("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.Update Next i rs.Close

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

For i = 1 To hsGrid.Rows - 2 rs.Open "select * from DistributorProductOutMaster where DInvoiceNo='" & Trim(hsGrid.TextMatrix(i, 1)) & "'", Cnn, adOpenDynamic, adLockOptimistic Amount = Val(rs("PaidupAmount")) + Val(hsGrid.TextMatrix(i, 2)) ' + Val(hsGrid.TextMatrix(i, 3)) 'a rs("PaidupAmount") = Amount rs("Balance") = Val(rs("InvoiceAmount")) - Val(Amount) rs.Update rs.Close Next i rs.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic Amount = 0 Amount = Val(rs("PaidupAmount")) + Val(txtGtotal.text) rs("PaidupAmount") = Amount rs("RecevalAmount") = Val(rs("InvoiceAmount")) - Val(Amount) rs.Update rs.Close rs.Open "select * from DistributorAdvanceAC where DID='" & Trim(lblDID.Caption) & adLockOptimistic rs("Amount") = Val(rs("Amount")) - Val(txtTotalBalance.text) rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Call cmdClear_Click End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then Do While Not rs.EOF cboDistributorName.AddItem Trim(rs("ShopName")) rs.MoveNext Loop End If rs.Close cboPayType.AddItem "CASH", 0 cboPayType.AddItem "BY BANK", 1 PayDate.Value = Date hsGrid.TextMatrix(0, 0) = "Serial No" hsGrid.TextMatrix(0, 1) = "Invoice No" hsGrid.TextMatrix(0, 2) = "Amount" hsGrid.TextMatrix(0, 3) = "Advance" remove = False txtCheckNo.Visible = False cboAccNumber.Visible = False cboBankName.Visible = False cboBranchName.Visible = False Label15.Visible = False Label19.Visible = False Label20.Visible = False Label14.Visible = False Dim rsB As New ADODB.Recordset rsB.Open "select * from NewBankInfo", Cnn, adOpenDynamic, adLockOptimistic If Not rsB.EOF Then Do While Not rsB.EOF cboBankName.AddItem Trim(rsB("BankName")) rsB.MoveNext Loop End If rsB.Close End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next Set rs = Nothing End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtAmount_Change() On Error Resume Next

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

If 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 Sub End If txtBalance.text = Val(txtInvoiceAmount.text) - Val(txtAmount.text) End Sub Private Sub txtAmount_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtBalanceAdvance_Change() On Error Resume Next If Val(txtBalanceAdvance.text) > Val(txtAdvanceMoney) Then MsgBox "This Amount Can not be grater than Advance Amount.", vbInformation + vbOKOnly txtBalanceAdvance.text = 0 txtBalance.text = "" txtAmount.text = txtCashPay.text Else txtAmount.text = Val(txtCashPay.text) + Val(txtBalanceAdvance.text) End If End Sub Private Sub txtBalanceAdvance_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtCashPay_Change() On Error Resume Next If Val(txtCashPay.text) > Val(txtInvoiceAmount.text) Then MsgBox "This Amount Can not be grater than Invoice Amount.", vbInformation + vbOKOnly txtCashPay.text = 0 txtAmount.text = txtBalanceAdvance.text Else txtAmount.text = Val(txtCashPay.text) + Val(txtBalanceAdvance.text) End If End Sub DISTRIBUTOR PRODUCT RETURN Dim rs As New ADODB.Recordset Dim remove As Boolean Dim piece As Double Private Sub cboCondition_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboDistributorName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboInvoice_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.CursorLocation = adUseClient rs1.Open "select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Set ReturnGrid.DataSource = rs1 cboProductName.clear rs.Open "select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboProductName.AddItem Trim(rs("ProductName")) rs.MoveNext Loop rs.Close End Sub Private Sub cboInvoice_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboProductName_Click()

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

On Error Resume Next Dim rs1 As New ADODB.Recordset rs1.Open "select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboInvoice.text) & "' And ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic txtRateCarton.text = rs1("RatePerCartoon") rs1.Close piece = 0 rs1.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic piece = rs1("CartonPiece") rs1.Close txtCarton.text = "" txtPiece.text = "" End Sub Private Sub cboProductName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next Dim ROW As Integer If cboInvoice.text = "" Then MsgBox "Please Select An Invoice Number.", vbCritical + vbOKOnly cboInvoice.SetFocus Exit Sub ElseIf cboDistributorName.text = "" Then MsgBox "Please Select the Distributor Name.", vbCritical + vbOKOnly cboDistributorName.SetFocus Exit Sub ElseIf cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit Sub ElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "select * from DistributorReturn where DInvoice='" & Trim(cboInvoice.text) & "' and ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "These Records are Already Existed Insert Another Invoice No.", vbCritical + vbOKOnly rs1.Close Exit Sub End If rs1.Close rs1.Open "select DeliveryDate from DistributorProductOutMaster where DInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If 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 Sub End If rs1.Close rs1.Open "select Cartoon from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboInvoice.text) & "' And ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If 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 Sub End If rs1.Close ROW = hsGrid.Rows For i = 1 To ROW - 1 If Me.cboProductName = hsGrid.TextMatrix(i, 1) Then

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

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 Sub End If Next i cboDistributorName.Enabled = False cboInvoice.Enabled = False cboCondition.Enabled = False RDate.Enabled = False Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboProductName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtPiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtRateCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtTotalAmount.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 txtGtotal.text = Val(txtGtotal.text) + Val(txtTotalAmount.text) cboProductName.text = "" txtCarton = "" txtPiece = "" txtRateCarton = "" txtTotalAmount = "" txtRemarks.text = "" End Sub Private 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 -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cboProductName.text = "" txtCarton = "" txtPiece = "" txtRatePiece = "" txtTotalAmount = "" txtRemarks.text = "" cboDistributorName.text = "" cboInvoice.text = "" cboCondition.text = "" RDate.Value = Date txtGtotal.text = "" Call cboInvoice_Click lblDID.Caption = "" cboProductName.clear End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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 If End Sub Private Sub cboDistributorName_Click()

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

On Error Resume Next lblDID.Caption = "" cboInvoice.clear rs.Open "select * from DistributorInfo where ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblDID.Caption = rs("DID") rs.Close Call cboInvoice_Click rs.Open "select DInvoiceNo from DistributorProductOutMaster where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic If rs.EOF Then rs.Close Exit Sub Else Do While Not rs.EOF cboInvoice.AddItem Trim(rs("DInvoiceNO")) rs.MoveNext Loop End If rs.Close End Sub Private Sub cmdSave_Click() On Error Resume Next Dim k As Integer Dim i, j As Integer Dim rs1 As New ADODB.Recordset If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If If rs.State = adStateOpen Then rs.Close Set rs = Nothing End If Dim A As String A = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo) If Not A = vbYes Then Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "select * from DistributorProductOutMaster where DInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("InvoiceAmount") = Val(rs("InvoiceAmount")) - Val(txtGtotal.text) rs("Balance") = rs("Balance") - Val(txtGtotal.text) rs.Update rs.Close rs.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("InvoiceAmount") = Val(rs("InvoiceAmount")) - Val(txtGtotal.text) rs("RecevalAmount") = Val(rs("RecevalAmount")) - Val(txtGtotal.text) rs.Update rs.Close rs.Open "select * from DistributorReturn ", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rs.AddNew rs("DID") = Trim(lblDID.Caption) rs("DInvoice") = Trim(cboInvoice.text) rs("Condition") = Trim(cboCondition.text) rs("ReturnDate") = RDate.Value rs("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) = "" Then rs("Remarks") = Trim(hsGrid.TextMatrix(i, 6)) Else rs("Remarks") = " " End If

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.Update Next i rs.Close If cboCondition.text = "Good" Then For j = 1 To hsGrid.Rows - 2 rs.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("Carton") = Val(rs("Carton")) + Val(hsGrid.TextMatrix(j, 2)) rs("Piece") = Val(rs("Piece")) + Val(hsGrid.TextMatrix(j, 3)) rs.Update rs.Close Next j ElseIf cboCondition.text = "Bad" Then For j = 1 To hsGrid.Rows - 2 rs.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("BadCarton") = Val(rs("BadCarton")) + Val(hsGrid.TextMatrix(j, 2)) rs("BadPiece") = Val(rs("BadPiece")) + Val(hsGrid.TextMatrix(j, 3)) rs.Update rs.Close Next j End If Cnn.CommitTrans Screen.MousePointer = vbNormal Call cmdClear_Click End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs.EOF cboDistributorName.AddItem Trim(rs("ShopName")) rs.MoveNext Loop rs.Close hsGrid.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", 0 cboCondition.AddItem "Bad", 1 cboCondition.ListIndex = 0 RDate.Value = Date End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next Set rs = Nothing End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_Change() On Error Resume Next txtPiece.text = Val(txtCarton.text) * Val(piece) txtTotalAmount.text = Val(txtCarton.text) * Val(txtRateCarton.text) End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub DISTRIBUTOR PRODUCT LOSS ADJUST(Yearly) Dim rs As New ADODB.Recordset Dim remove As Boolean Dim piece As Double Private Sub cboDInvoice_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtAmount.text = "" txtBalance.text = "" txtInvoiceAmount.text = "" cboProductName.clear rs1.Open "select * from DistributorProductOutMaster where DInvoiceNo= '" & Trim(cboDInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then txtInvoiceAmount.text = rs1("Balance") End If rs1.Close rs1.CursorLocation = adUseClient rs1.Open "Select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboDInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs1.EOF cboProductName.AddItem Trim(rs1("ProductName")) rs1.MoveNext Loop Set LossGrid.DataSource = rs1 End Sub Private Sub cboDInvoice_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboDistributorName_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset cboDInvoice.clear rs1.Open "select DID from DistributorInfo where ShopName='" & Trim(cboDistributorName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic lblDID.Caption = Trim(rs1(0)) rs1.Close rs1.Open "select DInvoiceNo from DistributorProductOutMaster where DID= '" & Trim(lblDID.Caption) & "' and Balance > '" & 0 & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then Do While Not rs1.EOF cboDInvoice.AddItem Trim(rs1("DInvoiceNo")) rs1.MoveNext Loop rs1.Close cboDInvoice.ListIndex = 0 End If End Sub Private Sub cboDistributorName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboProductName_Click() On Error Resume Next Dim rs1 As New ADODB.Recordset piece = 0 rs1.Open "select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboDInvoice.text) & "' And ProductName='" & Trim(cboProductName.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic piece = rs1("Piece") rs1.Close End Sub Private Sub cboProductName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private 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 -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cboProductName.text = "" txtAmount.text = "" txtPiece.text = "" cboDInvoice.text = "" txtBalance.text = ""

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtInvoiceAmount.text = "" txtGrandTotal.text = "" cboDistributorName.text = "" AdjustDate.Value = Date cboDInvoice.text = "" txtRemarks.text = "" lblDID.Caption = "" Call cboDInvoice_Click End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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)) 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 If End Sub Private Sub cmdAdd_Click() On Error Resume Next If cboDistributorName.text = "" Then MsgBox "Please Select the Distributor Name.", vbCritical + vbOKOnly cboDistributorName.SetFocus Exit Sub ElseIf cboDInvoice.text = "" Then MsgBox "Please Select the Invoice Number.", vbCritical + vbOKOnly cboDInvoice.SetFocus Exit Sub ElseIf cboProductName.text = "" Then MsgBox "Please Select the Product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit Sub ElseIf txtAmount.text = 0 Then MsgBox "Please Enter Amount.", vbCritical + vbOKOnly txtAmount.SetFocus Exit Sub End If Dim rs1 As New ADODB.Recordset rs1.Open "select * from DistributorProductLossAdjust where DInvoiceNo='" & Trim(cboDInvoice.text) & "' And ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs1.EOF Then MsgBox "This Product name is Already Saved." & Chr(13) & "Insert Information for Another Product .", vbInformation + vbOKOnly cboProductName.SetFocus Exit Sub End If rs1.Close Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboDInvoice.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtPiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtAmount.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtAmount.text)

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

cboDistributorName.Enabled = False AdjustDate.Enabled = False cboDInvoice.Enabled = False cboProductName.text = "" txtAmount.text = "" txtPiece.text = "" End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSave_Click() On Error Resume Next Dim i, j As Integer If Not hsGrid.Rows > 2 Then MsgBox "Sorry!First Add The Data To The Grid.", vbInformation + vbOKOnly Exit Sub End If If rs.State = adStateOpen Then rs.Close Set rs = Nothing End If Cnn.BeginTrans Screen.MousePointer = vbHourglass rs.Open "select * from DistributorProductLossAdjust", Cnn, adOpenDynamic, adLockOptimistic For i = 1 To hsGrid.Rows - 2 rs.AddNew rs("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.Value rs.Update Next i rs.Close For j = 1 To hsGrid.Rows - 2 rs.Open "select * from DistributorProductOutMaster where DInvoiceNo='" & Trim(hsGrid.TextMatrix(j, 1)) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("InvoiceAmount") = Val(rs("InvoiceAmount")) - Val(hsGrid.TextMatrix(j, 4)) rs("Balance") = Val(rs("Balance")) - Val(hsGrid.TextMatrix(j, 4)) rs.Update rs.Close Next j rs.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("InvoiceAmount") = Val(rs("InvoiceAmount")) - Val(txtGrandTotal.text) rs("RecevalAmount") = Val(rs("RecevalAmount")) - Val(txtGrandTotal.text) rs.Update rs.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Call cmdClear_Click AdjustDate.Value = Date End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from DistributorInfo", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then Do While Not rs.EOF cboDistributorName.AddItem Trim(rs("ShopName")) rs.MoveNext Loop End If rs.Close hsGrid.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"

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

remove = False AdjustDate.Value = Date End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next Set rs = Nothing End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtAmount_Change() On Error Resume Next If Val(txtAmount.text) > Val(txtInvoiceAmount.text) Then MsgBox "Adjust Amount Can Not Greater Than Invoice Amount.", vbCritical + vbOKOnly txtAmount.text = "" txtAmount.SetFocus Exit Sub End If End Sub Private Sub txtAmount_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtGrandTotal_Change() On Error Resume Next txtBalance.text = Val(txtInvoiceAmount.text) - Val(txtGrandTotal.text) End Sub Private Sub txtPiece_Change() On Error Resume Next If Val(piece) <= Val(txtPiece.text) Then MsgBox "Adjust Piece Can Not Be Greater Than Delivery Product Piece Quantity.", vbCritical + vbOKOnly txtPiece.text = "" End If End Sub Private Sub txtPiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub CARTON WISE DISTRIBUTOR EXECUTIVE COMMISION Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim rs3 As New ADODB.Recordset Dim remove As Boolean Private Sub cboMarketingName_Click() lblMID.Caption = "" rs3.Open "select * from DistributorInfo where ShopName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblMID.Caption = rs3("DID") rs3.Close End Sub Private Sub cboMarketingName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub CboProName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdAdd_Click() On Error Resume Next If cboMarketingName.text = "" Then MsgBox "Please Select the Distributor Name.", vbCritical + vbOKOnly cboMarketingName.SetFocus Exit Sub ElseIf CboProName.text = "" Then MsgBox "Please Select the Product(Soap) Name.", vbCritical + vbOKOnly CboProName.SetFocus Exit Sub ElseIf Val(txtCarton.text) = 0 Then MsgBox "Please enter total carton number;Zero will not be accepted.", vbCritical + vbOKOnly txtCarton.text = ""

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

txtCarton.SetFocus Exit Sub ElseIf 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 Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = ComDate.Value hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboMarketingName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = CboProName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePerCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.text hsGrid.Rows = hsGrid.Rows + 1 txtGrandTotal.text = Val(txtGrandTotal.text) + Val(txtTotalAmount.text) cboMarketingName.text = "" lblMID.Caption = "" CboProName.text = "" txtCarton.text = "" txtRatePerCarton.text = "" txtTotalAmount.text = "" cmdSave.Enabled = True End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cboMarketingName.text = "" lblMID.Caption = "" CboProName.text = "" txtCarton.text = "" txtRatePerCarton.text = "" txtTotalAmount.text = "" ComDate.Value = Date txtGrandTotal.text = "" End Sub Private Sub cmdClose_Click() Unload Me End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

End If Else MsgBox "Select the row then click the remove button.", vbInformation, "Information" End If End Sub Private Sub cmdSave_Click() Dim A As String A = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo) If Not A = vbYes Then Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans Dim rsnew As New ADODB.Recordset rsnew.Open "Select * from DistributorCommission", Cnn, adOpenDynamic, adLockOptimistic Dim i As Integer For i = 1 To hsGrid.Rows - 2 rsnew.AddNew rsnew("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.Update Next i rsnew.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Call clear cmdSave.Enabled = False End Sub Private Sub Form_Load() ComDate.Value = Date cmdSave.Enabled = False rs1.Open "select distinct ShopName from DistributorInfo order by ShopName", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs1.EOF cboMarketingName.AddItem Trim(rs1("ShopName")) rs1.MoveNext Loop rs1.Close rs2.Open "select Distinct ProductName from Productinfo order by ProductName", Cnn, adOpenDynamic, adLockOptimistic rs2.MoveFirst Do While Not rs2.EOF CboProName.AddItem Trim(rs2("ProductName")) rs2.MoveNext Loop rs2.Close hsGrid.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) + 200 hsGrid.ColWidth(2) = hsGrid.ColWidth(2) + 700 hsGrid.ColWidth(3) = hsGrid.ColWidth(3) + 350 hsGrid.ColWidth(4) = hsGrid.ColWidth(4) + 500 hsGrid.ColWidth(5) = hsGrid.ColWidth(5) + 250 hsGrid.ColWidth(6) = hsGrid.ColWidth(6) + 500 End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call ValidationNotPoint(KeyAscii) End Sub Private Sub txtRatePerCarton_Change()

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Dim AA As Double AA = FormatNumber(Val(txtCarton.text) * Val(txtRatePerCarton.text), 0) txtTotalAmount.text = Val(AA) End Sub Private Sub txtRatePerCarton_KeyPress(KeyAscii As Integer) Call Validationwithpoint(KeyAscii) End Sub Private Sub txtTotalAmount_KeyPress(KeyAscii As Integer) Call ValidationNotPoint(KeyAscii) End Sub Public Sub clear() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cboMarketingName.text = "" lblMID.Caption = "" CboProName.text = "" txtCarton.text = "" txtRatePerCarton.text = "" txtTotalAmount.text = "" ComDate.Value = Date txtGrandTotal.text = "" End Sub Update Sales Executive Product Out Update Dim piece As Integer Dim remove As Boolean Private Sub cboMarketingName_Click() On Error Resume Next lblMID.Caption = "" rs.Open "select * from MarketingInfo where MName= '" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblMID.Caption = rs("MID") rs.Close cboMInvoice.clear rs.Open "select * from MarketingProductOutMaster where MName='" & Trim(cboMarketingName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then Do While Not rs.EOF cboMInvoice.AddItem Trim(rs("MInvoiceNo")) rs.MoveNext Loop End If rs.Close End Sub Private Sub cboMInvoice_Click() On Error Resume Next lblOrderno.Caption = "" lblDate.Caption = "" rs1.Open "select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(cboMInvoice.text) & "' order by DeliveryDate", Cnn, adOpenDynamic, adLockOptimistic lblOrderno.Caption = rs1("MOrderNo") lblDate.Caption = rs1("DeliveryDate") rs1.Close End Sub Private Sub cboProductName_Click() On Error Resume Next txtCarton.text = "" txtPiece.text = "" txtRatePiece.text = "" txtTotalAmount.text = "" Dim rs1 As New ADODB.Recordset piece = 0 rs1.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic piece = rs1("CartonPiece") txtRatePiece.text = rs1("Price") rs1.Close

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

End Sub Private Sub cmdAdd_Click() On Error Resume Next If cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit Sub ElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtRatePiece.text = "" Then MsgBox "Please Enter the Rate per Carton.", vbCritical + vbOKOnly txtRatePiece.SetFocus Exit Sub End If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i Dim A As String A = MsgBox("Do You Want To Save ?", vbQuestion + vbYesNo) If Not A = vbYes Then Exit Sub End If Dim rsUp As New ADODB.Recordset Screen.MousePointer = vbHourglas Cnn.BeginTrans rsUp.Open "select * from MarketingProductOutMaster where MInvoiceNo ='" & Trim(cboMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rsUp("InvoiceAmount") = Val(rsUp("InvoiceAmount")) + Val(txtTotalAmount.text) rsUp("Balance") = Val(rsUp("Balance")) + Val(txtTotalAmount.text) rsUp.Update rsUp.Close rsUp.Open "select * from MarketingProductOutDetails", Cnn, adOpenDynamic, adLockOptimistic rsUp.AddNew rsUp("MInvoiceNo") = Trim(cboMInvoice.text) rsUp("ProductName") = Trim(cboProductName.text) rsUp("Carton") = txtCarton.text rsUp("Piece") = txtPiece.text rsUp("RatePerCarton") = txtRatePiece.text rsUp("TotalAmount") = txtTotalAmount.text rsUp("Remarks") = Trim(txtRemarks.text) rsUp.Update rsUp.Close rsUp.Open "select * from MainStock where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rsUp("Carton") = Val(rsUp("Carton")) - Val(txtCarton.text) rsUp("Piece") = Val(rsUp("Piece")) - Val(txtPiece.text) rsUp.Update rsUp.Close Cnn.CommitTrans Screen.MousePointer = vbNormal Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = txtMInvoice.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.text

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 cboProductName.text = "" txtCarton = "" txtPiece = "" txtRatePiece = "" txtTotalAmount = "" txtRemarks.text = "" End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k cboMarketingName.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 = Date cboMInvoice.Enabled = True End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSearch_Click() End Sub Private Sub cmdFresh_Click() Call cmdClear_Click End Sub Private Sub cmdGo_Click() Dim rsSearch As New ADODB.Recordset rsSearch.Open "select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(cboMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblOrderno.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.Close rsSearch.Open "Select * from MarketingProductOutDetails where MInvoiceNo='" & Trim(cboMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Do While Not rsSearch.EOF introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.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 + 1 rsSearch.MoveNext Loop

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

cboMInvoice.Enabled = False End Sub Private Sub cmdGo_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdRemove_Click() Dim A As String A = MsgBox("Do You Want To Delete ?", vbQuestion + vbYesNo) If Not A = vbYes Then Exit Sub End If If remove = True Then If hsGrid.Rows > 2 Then Dim rsUp As New ADODB.Recordset Screen.MousePointer = vbHourglass Cnn.BeginTrans Dim rr As New ADODB.Recordset rr.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(hsGrid.ROW, 2)) & "'", Cnn, adOpenDynamic, adLockOptimistic MsgBox 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.Update rr.Close rsUp.Open "select * from MarketingProductOutMaster where MInvoiceNo ='" & Trim(cboMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rsUp("InvoiceAmount") = Val(rsUp("InvoiceAmount")) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) rsUp("Balance") = Val(rsUp("Balance")) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) rsUp.Update rsUp.Close rsUp.Open "Delete from MarketingProductOutDetails where MInvoiceNo ='" & Trim(cboMInvoice.text) & "' and ProductName ='" & Trim(hsGrid.TextMatrix(hsGrid.ROW, 2)) & "'", Cnn, adOpenDynamic, adLockOptimistic Trim(hsGrid.TextMatrix(hsGrid.ROW, 2)) & "'", Cnn ', adOpenDynamic, adLockOptimistic Cnn.CommitTrans Screen.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 If End Sub Private Sub cmdSave_Click() End Sub Private Sub cmdUpdate_Click() Dim rsUp As New ADODB.Recordset rsUp.Open "select * from MarketingProductOutMaster where MInvoiceNo ='" & Trim(cboMInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rsUp("DeliveryDate") = DDate.Value rsUp("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.Update rsUp.Close End Sub Private Sub Form_Load() On Error Resume Next Dim rs3 As New ADODB.Recordset rs3.Open "select distinct ProductName from Productinfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs3.EOF cboProductName.AddItem Trim(rs3("ProductName")) rs3.MoveNext Loop rs3.Close rs3.Open "select MInvoiceNo from MarketingProductOutMaster", Cnn, adOpenDynamic, adLockOptimistic If Not rs3.EOF Then

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Do While Not rs3.EOF cboMInvoice.AddItem Trim(rs3("MInvoiceNo")) rs3.MoveNext Loop rs3.Close End If hsGrid.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 = False remove = False End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_Change() On Error Resume Next Dim rs2 As New ADODB.Recordset txtPiece.text = "" txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text) txtPiece.text = Val(txtCarton.text) * Val(piece) End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub SALES EXECUTIVE MONEY RECEIPT UPDATE Dim rs As New ADODB.Recordset Private Sub cboGatePass_Click() On Error Resume Next txtAmount.text = "" txtBalance.text = "" txtInvoiceAmount.text = "" rs.Open "select * from MarketingProductOutMaster where MInvoiceNo= '" & Trim(cboGatePass.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic txtInvoiceAmount.text = rs("Balance") rs.Close End Sub Private Sub cboGatePass_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboMarketingName_Click() On Error Resume Next lblMID.Caption = "" PayDate.Value = Date txtAmount.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, adLockOptimistic lblMID.Caption = rs("MID") rs.Close cboMRNo.clear rs.Open "select * from MarketingMR where MDID='" & Trim(lblMID.Caption) & "' order by paydate", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then Do While Not rs.EOF cboMRNo.AddItem Trim(rs("MRNO")) rs.MoveNext Loop

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

End If rs.Close End Sub Private Sub cboMarketingName_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cboMRNo_Click() On Error Resume Next lblPassNo.Caption = "" Dim rr As New ADODB.Recordset rr.Open "select * from MarketingMR where MRNo='" & Trim(cboMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblPassNo.Caption = Trim(rr(1)) PayDate.Value = CDate(rr("PayDate")) lblAmount.Caption = rr("Amount") cboPayType.text = Trim(rr("PayType")) rr.Close rr.Open "Select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(lblPassNo.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic txtInvoiceAmount.text = Val(rr("Balance")) + Val(lblAmount.Caption) rr.Close End Sub Private Sub cboPayType_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub Private Sub cmdClear_Click() PayDate.Value = Date txtBalance.text = "" lblAmount.Caption = "" cboMRNo.text = "" End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdUpdate_Click() 'On Error Resume Next If cboMarketingName.text = "" Then MsgBox "Please Select The Sales Executive Name.", vbInformation + vbOKOnly cboMarketingName.SetFocus Exit Sub ElseIf cboMRNo.text = "" Then MsgBox "Please Enter The Money Receipt Number.", vbInformation + vbOKOnly txtMRNo.SetFocus Exit Sub ElseIf cboPayType.text = "" Then MsgBox "Please Select The Payment Type.", vbInformation + vbOKOnly cboPayType.SetFocus Exit Sub ElseIf txtAmount.text = "" Then MsgBox "Please Enter The Amount(TK).", vbInformation + vbOKOnly txtAmount.SetFocus Exit Sub ElseIf txtAmount.text = 0 Then MsgBox "Please Enter The Amount(TK).", vbInformation + vbOKOnly txtAmount.SetFocus txtAmount.text = "" Exit Sub End If Screen.MousePointer = vbHourglass Cnn.BeginTrans rs.Open "Select * from MarketingMR where MRNo='" & Trim(cboMRNo.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("PayType") = Trim(cboPayType.text) rs("PayDate") = PayDate rs("Amount") = Val(txtAmount.text) rs.Update rs.Close rs.Open "Select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(lblPassNo.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic rs("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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.Close Dim rc As New ADODB.Recordset rc.Open "Select * from MarketingProductOutMaster where MInvoiceNo='" & Trim(lblPassNo.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic rc("PaidupAmount") = Val(rc("PaidupAmount")) + Val(txtAmount.text) rc("Balance") = Val(rc("Balance")) - Val(txtAmount.text) rc.Update rc.Close Cnn.CommitTrans Screen.MousePointer = vbNormal PayDate.Value = Date txtAmount.text = "" cboPayType.text = "" lblPassNo.Caption = "" cboMarketingName.text = "" lblMID.Caption = "" txtInvoiceAmount.text = "" txtBalance.text = "" lblAmount.Caption = "" cboMRNo.text = "" End Sub Private Sub Form_Load() On Error Resume Next rs.Open "select * from MarketingInfo", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then Do While Not rs.EOF cboMarketingName.AddItem Trim(rs("MName")) rs.MoveNext Loop End If rs.Close cboPayType.AddItem "CASH", 0 cboPayType.AddItem "CHEQUE", 1 cboPayType.AddItem "DD", 2 cboPayType.AddItem "PAY ORDER", 3 cboPayType.AddItem "TT", 4 PayDate.Value = Date End Sub Private Sub txtAmount_Change() On Error Resume Next txtBalance.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 Sub End If End Sub Private Sub txtAmount_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Distributor Product Out Update Dim rs As New ADODB.Recordset Dim remove As Boolean Dim piece As Double Private Sub cboDistributorName_Click() On Error Resume Next lblDID.Caption = "" rs.Open "select * from DistributorInfo where ShopName= '" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic lblDID.Caption = rs("DID") rs.Close cboDInvoice.clear rs.Open "select * from QryDistributorProductOut where ShopName='" & Trim(cboDistributorName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rs.EOF Then Do While Not rs.EOF cboDInvoice.AddItem Trim(rs("DInvoiceNo"))

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs.MoveNext Loop End If rs.Close End Sub Private Sub cboProductName_Click() On Error Resume Next Dim rsP As New ADODB.Recordset txtCarton.text = "" txtPiece.text = "" txtRatePiece.text = "" txtTotalAmount.text = "" piece = 0 rsP.Open "select * from Productinfo where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic piece = rsP("CartonPiece") txtRatePiece.text = rsP("Price") rsP.Close End Sub Private Sub cmdClear_Click() On Error Resume Next Dim k As Integer For k = hsGrid.Rows - 2 To 1 Step -1 hsGrid.RemoveItem (hsGrid.TextMatrix(k, 0)) Next k txtGtotal.text = "" lblName.Caption = "" txtPlace.text = "" txtRemarks.text = "" lblDID.Caption = "" cboProductName.text = "" txtTotalAmount.text = "" txtRemarks.text = "" cboInvoice.text = "" DDate.Value = Date cboInvoice.Enabled = True End Sub Private Sub cmdexit_Click() Unload Me End Sub Private Sub cmdSearch_Click() On Error Resume Next rs.Close rs.Open "select * from DistributorProductOutDetails where DInvoiceNo='" & cboDInvoice.text & "'", Cnn, adOpenDynamic, adLockOptimistic rs.MoveFirst Do While Not rs.EOF introw1 = hsGrid.Rows - 1 'new hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 'new hsGrid.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 + 1 rs.MoveNext Loop rs.Close End Sub Private Sub cmdFresh_Click() Call cmdClear_Click End Sub Private Sub cmdGo_Click() Dim rsSearch As New ADODB.Recordset Dim rsName As New ADODB.Recordset rsSearch.Open "select * from DistributorProductOutMaster where DInvoiceNo ='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rsSearch.EOF Then lblDID.Caption = Trim(rsSearch("DID")) txtPlace.text = Trim(rsSearch("Place"))

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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.Close rsName.Open "select * from QRYDISTRIBUTORNAME where DInvoiceNo ='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic If Not rsName.EOF Then lblName.Caption = Trim(rsName("ShopName")) rsName.Close rsSearch.Open "Select * from DistributorProductOutDetails where DInvoiceNo='" & Trim(cboInvoice.text) & "'", Cnn, adOpenDynamic, adLockOptimistic Do While Not rsSearch.EOF introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.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 + 1 rsSearch.MoveNext Loop rsSearch.Close cboInvoice.Enabled = False End If End If End Sub Private Sub cmdHSave_Click() Dim rsH As New ADODB.Recordset rsH.Open "select * from DistributorProductOutMaster", Cnn, adOpenDynamic, adLockOptimistic rsH("DInvoiceNo") = Trim(cboInvoice.text) rsH("DeliveryDate") = DDate.Value rsH("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.Update rsH.Close End Sub Private Sub cmdRemove_Click() On Error Resume Next If 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, adLockOptimistic rsUp("InvoiceAmount") = Val(rsUp("InvoiceAmount")) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) rsUp("Balance") = Val(rsUp("Balance")) - Val(hsGrid.TextMatrix(hsGrid.ROW, 6)) rsUp.Update rsUp.Close rsUp.Open "Delete from DistributorProductOutDetails where DInvoiceNo='" & Trim(hsGrid.TextMatrix(hsGrid.ROW, 1)) & "' and ProductName='" & Trim(hsGrid.TextMatrix(hsGrid.ROW, 2)) & "'", Cnn, adOpenDynamic, adLockOptimistic rsUp.Close rsUp.Open "select * from MainStock where ProductName='" & Trim(hsGrid.TextMatrix(hsGrid.ROW, 2)) & "'", Cnn, adOpenDynamic, adLockOptimistic rsUp("Carton") = Val(rsUp("Carton")) + Val(hsGrid.TextMatrix(hsGrid.ROW, 3)) rsUp("Piece") = Val(rsUp("Piece")) + Val(hsGrid.TextMatrix(hsGrid.ROW, 4)) rsUp.Update rsUp.Close

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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 If End Sub Private Sub cmdSave_Click() If cboProductName.text = "" Then MsgBox "Please Select the product Name.", vbCritical + vbOKOnly cboProductName.SetFocus Exit Sub ElseIf txtCarton.text = "" Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub ElseIf txtCarton.text = 0 Then MsgBox "Please Enter the Carton number.", vbCritical + vbOKOnly txtCarton.SetFocus Exit Sub End If Dim ROW As Integer ROW = hsGrid.Rows For i = 1 To ROW - 1 If 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 Sub End If Next i Dim introw1 As Integer introw1 = hsGrid.Rows - 1 hsGrid.TextMatrix(hsGrid.Rows - 1, 0) = introw1 hsGrid.TextMatrix(hsGrid.Rows - 1, 1) = cboInvoice.text hsGrid.TextMatrix(hsGrid.Rows - 1, 2) = cboProductName.text hsGrid.TextMatrix(hsGrid.Rows - 1, 3) = txtCarton.text hsGrid.TextMatrix(hsGrid.Rows - 1, 4) = txtPiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 5) = txtRatePiece.text hsGrid.TextMatrix(hsGrid.Rows - 1, 6) = txtTotalAmount.text hsGrid.TextMatrix(hsGrid.Rows - 1, 7) = txtRemarks.text hsGrid.Rows = hsGrid.Rows + 1 Dim rsUp As New ADODB.Recordset Screen.MousePointer = vbHourglass Cnn.BeginTrans rsUp.Open "select * from DistributorProductOutMaster where DInvoiceNo ='" & Trim(cboInvoice.text) & "' ", Cnn, adOpenDynamic, adLockOptimistic rsUp("InvoiceAmount") = Val(rsUp("InvoiceAmount")) + Val(txtTotalAmount.text) rsUp("Balance") = Val(rsUp("Balance")) + Val(txtTotalAmount.text) rsUp.Update rsUp.Close rsUp.Open "select * from DistributorACstatus where DID='" & Trim(lblDID.Caption) & "'", Cnn, adOpenDynamic, adLockOptimistic rsUp("InvoiceAmount") = Val(rsUp("InvoiceAmount")) + Val(txtTotalAmount.text) rsUp("RecevalAmount") = Val(rsUp("RecevalAmount")) + Val(txtTotalAmount.text) rsUp.Update rsUp.Close rsUp.Open "select * from DistributorProductOutDetails", Cnn, adOpenDynamic, adLockOptimistic rsUp.AddNew rsUp("DInvoiceNo") = Trim(cboInvoice.text) rsUp("ProductName") = Trim(cboProductName.text) rsUp("Cartoon") = txtCarton.text rsUp("Piece") = txtPiece.text rsUp("RatePerCartoon") = txtRatePiece.text rsUp("TotalAmount") = txtTotalAmount.text rsUp("Remark") = txtRemarks.text rsUp.Update rsUp.Close Dim rs1 As New ADODB.Recordset

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

rs1.Open "select * from MainStock where ProductName='" & Trim(cboProductName.text) & "'", Cnn, adOpenDynamic, adLockOptimistic rs1("Carton") = Val(rs1("Carton")) - Val(txtCarton.text) rs1("Piece") = Val(rs1("Piece")) - Val(txtPiece.text) rs1.Update rs1.Close Cnn.CommitTrans Screen.MousePointer = vbNormal cboProductName.text = "" txtCarton = "" txtPiece = "" txtRatePiece = "" txtTotalAmount = "" txtRemarks.text = "" End Sub Private Sub Form_Load() On Error Resume Next Dim rsInv As New ADODB.Recordset rsInv.Open "Select DInvoiceNo from DistributorProductOutMaster order by DeliveryDate ", Cnn, adOpenDynamic, adLockOptimistic Do While Not rsInv.EOF cboInvoice.AddItem Trim(rsInv("DInvoiceNo")) rsInv.MoveNext Loop rsInv.Close Dim rs3 As New ADODB.Recordset rs3.Open "select distinct ProductName from Productinfo", Cnn, adOpenDynamic, adLockOptimistic Do While Not rs3.EOF cboProductName.AddItem Trim(rs3("ProductName")) rs3.MoveNext Loop rs3.Close hsGrid.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 = False End Sub Private Sub hsGrid_Click() remove = True End Sub Private Sub txtCarton_Change() On Error Resume Next txtPiece.text = "" txtTotalAmount.text = Val(txtCarton.text) * Val(txtRatePiece.text) txtPiece.text = Val(txtCarton.text) * Val(piece) End Sub Private Sub txtCarton_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtPiece_KeyPress(KeyAscii As Integer) Call Validation(KeyAscii) End Sub Private Sub txtRatePiece_Change() On Error Resume Next txtTotalAmount.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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

[8] OPERATING INSTRUCTIONS


[

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.

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)

===============================================

Maintainability
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 System in 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.

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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Conclusion and suggestions


Its 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.

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 dont 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.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

10

LMITATIONS
=========xxxxxxxxx========= Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

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.

-------------------------------------

BIBLIOGRAPHY
========xxxxxxxxx========= Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

The number of books are recommended and being used to develop this project given bellow :

Books Name =========================== ===================


1.

Authors Name
Mahabubur Rahman(Bd) Aptech Book Petroutsos

Visual Basic Database Programming

2. Learning Visual basics 3. Mastering Visual Basic 6 4. Computing Programming in VB 4. 5. 6. 7. 8.

Tariqul Islam Chow & Lutfur Rahman Vhu Database Developers Guide with Visual Basic 6 Roger Jennings

Hitchhiker Guide to Visual Basic and SQL Sever William R. Vaughn Database Developers Guide with visual Basic 6 Hitchhikers Guide to Visual Basic and SQL Sever MSDN Roger Jennings William R. Vaughn

Microsoft Co Ray Rankins, Paul Paul Bertucci .

9. Microsoft SQL Sever 2000 Unleashed (2nd Edition) Jensen,

------------ O ------------

11
Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

A
Abstract 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 components 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 variables 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.

B
Binary : 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.

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 programmers 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.

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 programs 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.

F
Field: 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.

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.

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.

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.

Length: 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.

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.

M
Machine language: The language, made up of binarycoded instructions, that is directly by the computer. Mainframe: A large computing system designed for highvolume 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.

N
s Nesting: 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. 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.

K
Key: data that identifies a file record, an index. Keyword: An identifier that, when used syntactically, has a meaning to the program.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

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.

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 computers 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 languages capability to hold the result.

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 computers processing.

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 computers 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.

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.

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.

V
Variable: A location in memory, referenced by an identifier, in which a data value that can be changed is stored.

Copyright by MIZANUR RAHMAN, MUHAMMAD FAKHRUL ISLAM, MD. ATIKUZZAMAN LIMON

GENETIC COMPUTER SCHOOL, SINGAPORE, BANGLADESH CAMPUS.

Industrial Project-2006

Shah Sultan Soap Inventory Control System Ver: -2.1

Page13

Word: 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.

You might also like