You are on page 1of 101

Accounting Software

By

Sadaf Fayyaz

Supervised

By

Mr. Nadeem M. Khan

This report is submitted to Department of Computer Science, Bahria University,


Islamabad

In partial fulfillment of the requirement for degree of BCS (Hons)

Department of Computer Science

Bahria University
Examination committee

Supervisor

External Examiner

Internal Examiner

HOD

Dated
DEDICATED

TO

OUR BELOVED PARENTS

&

RESPECTED TEACHERS

We are dedicating this project to our respected teachers who supported us till the end and gave
us courage and motivation for the completion of this project.
ACKNOWLEDGEMENTS

It is a universal truth that the intensity of love, affection and warmness of one’s inner
feelings cannot be measured by verbal means. Real regards and fondness for some
personality can only be visualized and perceived. But in this civilized age the only media
to communicate one’s inner feelings to other fellows are the words. Therefore I have tried
to clad my inner feelings into following words.

First of all, all our heartiest thanks to the almighty ALLAH, whose mercy and blessings
helped me to complete this final project.

We express my deepest thanks and gratitude to our project advisor Mr. Nadeem M Khan
for his help, guidance and providing every facility possible. Without his sincere
cooperation, we might not be able to complete this project.

We are truly grateful to our respected teachers. Without their guidance and sincerity, we
might not be able to get such an achievement in our career.

Our thanks are due to Mr. Zia for his every possible technical support.

We would like to thank all our friends and campus mates. We shall always remember
their support throughout the BCS program.

The account of acknowledgement will remain incomplete if we don’t express our sincere
appreciation indebtedness and gratitude to our lovely parents whose deep love and utmost
care cherished our lives. Their prayers and concern have always been a source of
inspiration and encouragement to us throughout our academic career.
PROJECT IN BRIEF

Project Title Accounts Management Software

Objectives Developed for AMD desk

Developed By Sadaf Fayyaz & Maria Samar

Final Demo Date 14th July 2005

Supervised By Mr. Nadeem M. Khan

Approved On 3rd November 2004

Stating Date 20th November 2004

Ending Date 20th June 2005

Tools Used VB.net & SQL Server 2000

Operating System Windows 98, Windows XP,2000

System Used Intel Pentium III 500MHz, IBM Compatible, 14”


Monitor, 128 MB RAM.

SUMMARY

It is an accounting software. Voucher entries are made, transactions are processed and the data
entries are maintained in a backend database. Time to time software maintenance is done. The
basic purpose of the software is the maintenance of the company’s accounts. It can only be used
by an accountant or a person having little bit information about accounts. It is designed in
keeping in mind the international format of “Peachtree accounting Software”.
It generates different account reports like General Ledger report, Chart of account report and trial
basis reports.
Various financial statements like income statement, Cash flow statement and Balance sheet are
generated. The accountant is free to use five kinds of vouchers according to his/her choice.
Through this computerized system the status about the database management the system is
provided in an efficient manner. The speed and the processing time of the system is quick
enough thus giving better data manipulation and correct calculated results.
CHAPTER ONE INTRODUCTION

Introduction

1.1 HBL Brand And History

The Habib Bank Group is a leader in Pakistan's services industry. An extensive network of 1425
domestic branches – the largest in Pakistan – and 55 international branches has enabled HBL to
provide comprehensive services that meet customer needs. This has ensured thriving client
relationships that form the backbone of the Bank's operations.
 
Today, HBL plays a central role in Pakistan's financial and economic development. It has come a
long way from its modest beginnings in Bombay in 1941 when it commenced operations with a
fixed capital of 25,000 rupees.

Habib Bank has been a pioneer in providing innovative banking services. These have included
the installation of the first mainframe computer in Pakistan followed by the first ATM and more
recently, internet banking facilities in all our 1425 domestic branches.
 
The Bank's towering presence in Pakistan's financial and commercial life has remained
unchanged over the decades. The strength of its brand and image is symbolized by its prominent
Head Office building that has dominated Karachi's skyline for 35 years.

1.2 Their Mission

To be recognized as the leading financial institition of Pakistan and a dynamic international bank
in the emerging markets and granting a superior value to customers , stakeholders and
employees.

1.3 RBG (HBL Retail Banking Group)

The Retail Banking network, with 1425 branches, is the core strength of Habib Bank. Its
extensive reach in all geographic locations – urban and rural – throughout the country provides
access to over 5 Million customers across all sectors of the economy. The network provides HBL
with the largest diversified low cost deposit base of any bank in Pakistan, and forms the basis for
many of our other business lines: corporate and investment banking and treasury activities.

Retail Banking Group (RBG) has two principal areas of activity; the retail network for deposit
mobilization and the consumer-banking group. Deposits mobilization, the traditional strength,
continued to perform strongly in 2002 with deposits growing by 12%.
HBL is the only major bank to have a very dedicated group to serve the Small & Medium
Enterprises (SME) sector. CBG was therefore established in late 2000 to provide banking
services and credit on a structured and systemized basis. It now covers 25 branches in the six
major industrial cities of Pakistan. The Group now works closely with its customers, which cover
all segments of the economy including the textile sector, vendors and suppliers to structure the
finances and improve their capabilities. There is a growing propensity for consumer spending to
uplift living standards. Recognizing that consumer demand can be a major driver of investment
and economic growth, the Government has also moved towards an enabling regulatory
framework and has also taken initiatives to create an appropriate legal regulatory framework to
enable the development of a housing finance market.
With its extensive branch network and large customer base, HBL has an important role to play in
the development of this sector of the economy in which substantial growth in the next five years
is expected. HBL has moved aggressively and has already introduced three major products;
Personal Loans, Car Financing and Consumer Durable Financing, in association with major
suppliers of consumer products. These have been well received and volumes have been building
up steadily.
Agriculture is the most important contributor to Pakistan’s economy. HBL, which has been a
leader in agriculture financing, plans to increase further its credit to this sector with a particular
focus on providing a wider range of products to small and medium size farmers. In this regard, to
provide flexibility, the Haryali scheme for farmers was introduced which is a 3-year revolving
facility rather than the traditional short term seasonal financing. Our specialized agricultural
finance department helps farmers in modernizing their farming techniques. The Government has
also provided a regulatory framework to encourage corporate farming and as this develops our
participation in this sector will grow even further.

In 2002, was launched real time inter-city banking, internet banking for 500,000 customers and
PC banking for our corporate and commercial banking customers. Their ATM network has
expanded and its usage is also growing rapidly.
A Debit Card program has also been introduced which will be available in over 1,000 point of
sale terminals within the country.
Inward remittances from overseas Pakistanis provide an immeasurable support to the economy.
Owing to our unique combination of the largest domestic and international networks, they
process the highest volume of overseas remittances into Pakistan. they recognize that speed and
efficient processing is the requirement of remitters and to meet these needs, we have put in place
our FAST Transfer service and fully automated processing center in Karachi ensures that all
remittances are delivered within 24 hours in urban areas and 48 hours in rural areas.
In their Retail network, they have an unmatched distribution network, which provides many
opportunities for growth.

1.4 HBL Domestic Network


1.5 HBL Internet Banking

Internet Banking is another medium of e-banking services, which allows Retail, Commercial
and Individual Customers to access the information of their account(s) both in Pak Rupees &
Foreign Currency by connecting to hblEbank from their desktop through Internet.

Internet Banking Services provide the following secured facilities to our clients:-

 Statement of Account(s)
 Single Account Balances
 Group Accounts Balances
 Payment to Third Party by requesting the following:
o Issuance of Draft
o Issuance of Pay Order
o Issuance of Telegraphic Transfer
o Issuance of Mail Transfer

Payments can also be made in Foreign Currencies (if permitted under Foreign Exchange
Regulations). All authorized payment instructions received on any working day by hblEbank
before 1:30 P.M. (Monday to Thursday) and 12:00 Noon (Friday & Saturday) will be acted upon
the same day. Payment instruction(s) received after these timings will be entertained in next
working day.

1.5.1 Services to be offered in future


 Utility Bills Payment
 Cheque Book Requests

1.5.2 System Requirement

 Internet Explorer version 5.5 preferable.


 Java Virtual Machine (JVM) should be available on the PC.

1.6 HBL PC Banking

PC Banking is one of the e-banking services being offered by the Bank.. This allows two-way
communication between the Bank and its Corporate, Retail and Commercial Customers and
gives the client access to download the information of their account(s) both in Pak Rupees &
Foreign Currency to their desktop PC through a dial-up connection.
 
With PC Banking customers enjoy the following secured facilities:

 Statement of Account(s)
 Single Account Balances
 Group Accounts Balances
 Account to Account Transfers
 Payment to Third Party by requesting the following:
o Issuance of Draft
o Issuance of Pay Order
o Issuance of Telegraphic Transfer
o Issuance of Mail Transfer

Payments can also be made in Foreign Currencies (if permitted under Foreign Exchange
Regulations). All authorized payment instructions received on any working day by hblEbank
before 1:30 P.M. (Monday to Thursday) and 12:00 Noon (Friday & Saturday) will be acted upon
the same day. Payment instruction(s) received after these timings will be entertained on next
working day.

1.6.1 Services to be offered in future

 Utility Bills Payment


 Cheque Book Requests
 Exchange Rates
 Market Commentary
 Product Information
 Secure E-mail.

1.6.2 Equipment Requirement


The minimum equipment required for PC Banking product of hblEbank is as follows:

 IBM Compatible PC
 P3 Processor + 64MB Ram (Minimum)
 Windows 95 / 98 / NT / 2000 / XP
 56K Modem (AT HAYES compatible) 3 Com / US Robotics (Preferred)
 DUN-Dial up Networking (Windows)
 Hard Disk -- Free space: at least 250 MB (for hblEbank application)
 Telephone Line – that can use a modem i.e. Analogue.

1.7 HBL Commercial Banking

Enterprises operating in the middle market contribute significantly to the economy of a country.
Traditionally, this sector was the stronghold of HBL’s business. During the early 90s, with the
liberalization of the financial sector in Pakistan, competition in the industry stiffened due to the
emergence of new banks in the private sector. The senior management at most of these banks
comprised personnel from HBL. They not only knew the market but were also familiar with the
shortcomings of HBL. Under the new set-up, they were able to address these shortcomings and
began to target HBL’s customer base. With the inception of an alternative, HBL customers
started migrating to the newly established banks this causing the erosion of HBL’s market share.

During FY-2000 HBL’s management decided to address this issue. Hence forth, Commercial
Banking was created to focus on the business needs of the middle market customers. On
November 1, 2000 Commercial Banking came into being, it is headed by Mirza Saleem Baig. At
present, 18 Commercial Centers and Sub-Centers functioning, located at Karachi, Lahore,
Faisalabad, Sialkot and Gujranwala.
CHAPTER TWO EXISTING SYSTEM

2.1 Drawbacks of Prevailing System

2.1.1 Manual System:

There was no systematic approach towards the dealing of management, every transactions is
adopted manually. To date all dates and records was collected manually. No scientific approach
or technique was used.

All current records, date and information were entered by hand, so there was a greater
opportunity of mistake.

2.1.2 Unshared Data:

Unlike computerized date, in manual system data is entered in files, which are onward by
departments, each department just keeps the record of its own data, so data does belong to
organization but it cannot be shared unless it is taken up to other department. Another problem
that arises here is that multiple users cannot share data at one time.

2.1.3 Wastage of Time:

As all processing was done manually, i.e. voucher entry, maintenance of records or updating of
records, which take a lot of time. Management needs more employees and more capital is
required.

Along with this lot of time is wasted, as time is very precious for any organization so it is a great
loss as “TIME IS MONEY”.

2.1.4 Data Scattered:


At Bank various departments were situated at different locations, if management needs data of IT
department then one has to go or has to bring data from respective department, which takes a lot
of time.

2.1.5 Inconsistency:

As there is manual system, registers are maintained, so there is no proper system of record
keeping, no consistent process of keeping relevant record is maintained. Every employee has free
access to the records, so they can commit changes to the data, and multiple mistakes can be there
in data.

2.1.6 Redundancy:

Among all drawbacks, the aspect of redundancy is the major issue. Redundancy is when same
type of data is present at different location. At bank same type of data was present at multiple
locations, items of data were identical, information was not integrated, hence several copies of
the same data were created.

2.1.7 No Data Backup:

In bank there was no backup of data, unless you make copies of data, as data was entered in files,
so there was big chance of loss of data.

2.1.8 Data Misplaced:

Intentionally or unintentionally, anyone could misplace data. So it would be big loss to


accountant if it looses its required data. If there is no systematic way to perform backup then data
once misplaced cannot be recovered, hence the bank can suffer huge losses.

2.1.9 Lack of Security:

Data can be stolen due to lack of security. Someone can break into record room and steel
precious data. Security was a big problem for the organization. Today anywhere in the world
data is the most important for any organization.

2.2 Requirements of theBank


Requirement of our client is to convert manual system into computerized one, in which each and
every record is computerized and facility of updating and deleting the record is available at once
own will.

Management not only wants to computerize the database, but also want to maintain that system,
its record entries, update and delete the records and easy retrievable of data. They need data
backups so that the chances of loosing data are minimized. Our clients need more security for
their data so that any one cannot access the data at its own will.

CHAPTERTHREE
PROPOSED SYSTEM
3.1 Scope of Proposed System

The Bank is currently using manual system, which has some drawbacks. That was the reason that
forced management to change it into computerized system. In the first phase

we choose some areas of organization to implement the system on trial basis. The main reason
for this was

a) To make the management realize the importance of computerized system.


b) To get acquainted with the new system.

3.2 Advantages of Proposed System

Our computerized system has many advantages over manual system. It makes our system more
efficient, reliable and fast. Through this we save our time and manpower. Our system offers a
number of potential advantages, which are described one by one.

3.2.1 User Friendly:

a) Easy to use
b) Easy to access

We can easily retrieve, add, delete and modify the data in short time using queries. Our system
provides a facility to the user and management to access the data easily. A database system
provides multiple retrieval paths to each item of data, giving user much greater flexibility in
location and retrieving department boundaries.

3.2.2 Less Time Consuming:

The whole computerized system is time saving as user just need to make an entry in the
system only.

3.2.3 Data Back Up:


We provide data backup with our system. Through data backup we provide minimal data
redundancy, with all its associated benefits, must allow for backup copies of data. Such in one
heading and rest of accounts are automatically updated. A database is accessed by all authorized
users in the organization at the same time.

Independently produced copies are helpful in restoring damaged data files and in providing
validity checks on crucial data. To ensure that data are accurate and available whenever needed,
either database management software or additional procedures have to provide these essential
capabilities. A database management system usually automates many more of the backup and
recovery tasks than a file system. Our system covers database security, integrity and recovery
thought.

3.2.4 Data Security:

Data is always kept secured. As the administrator has the option of following password to the
person so the data is not available for all and only the considered person and the top management
can access it. For this safety we provide looking system facility with out system, to secure data.

3.2.5 Minimum Data Redundancy:

Through minimum data redundancy we make our system more efficient. Each data is recorded at
only one place. If data occurs at multiple places our system is aware of it. We reduced data
redundancy through repeated files are integrated into single logical structure.

3.2.6 Data is Consistent:

By eliminating data redundancy, we greatly reduced the possibility of inconsistency. If each


product is stored only once, we cannot have duplication in the store values. When controlled
redundancy is permitted in the database, the DBMS itself should enforce consistence by updating
each occurrence of data item when a change occurs. If an address is stored in two separate
records, the database system should update this data value in both records, whenever a change
occurs. Unfortunately many systems today enforce data consistency in this manner. But we tried
best to maintain our system consistent.
3.2.7 Records in Specific Order:
Records are stored in specific location. Where user can easily hack database records. If the need
is felt one can easily add, delete, modify, update and change the records.

3.2.8 Reduced Program Maintenance:

In our database system, data are dependent of the application programs that use them. Within
limits we can change either the data or the application programs that use the data without
necessitating a change in the other factor. As a result, program maintenance can be significantly
reduced in modern database environment.

3.2.9 Data Independence:

The separation of data description from the application that use the data is called data
independence. As a result of this, an organization’s data can change and evolve without
necessitating a change in the application programs that process the data. Data independence is
one of the major objectives our database system.

CHAPTER FOUR
WORKING OF THE PROPOSED SYSTEM
EACH ENTRY is stored only once, we cannot have duplication in the store values. When
controlled redundancy is permitted in the database, the DBMS itself shoulenforce consistence by
updating.The new system is more efficient and generates useful reports like Chart of Account
Report, Genaral Ledger report, different balace sheets like income statement, cash flowstatement
and many more. A little bit description aboount the reports generatrd by thesystem is as follows:

4.1 Chart of Account Report:

The Chart of Accounts is the coding elements used to classify, record, budget and report
financial transactions. Every transaction must be properly coded to be a valid posting to a
ledger.The Chart Of Account is a listing of all the accounts in the general Ledger, each account
accompanied by a reference number. To set up a COA, one needs to identify theaccount type and
to be used by the accountant according to the business. For very small business, three
digitnumber may suffice for the account number.

4.2 General Ledger Report

The general ledger is the core of a company’s financial records. These constitute the central
“books” of the system, and every transaction flows through the general ledger.
These records remain as a permanent track of the history of all financial transactions since day
one of the life of the company.

It is a collection of the company’s accounts. While the general Journal is recognized as a


chronological record of transactions, the ledger is organized by account. It provides arobust
feature set designed to meet even the most demanding budgeting and processing needs. We can
customize General Ledger by using the many tools inherent in the system, including a built-in
financial report writer that provides us with a timely picture of the company's fiscal activities.
General Ledger fully integrates with all Advantage Series modules and is the key to maximizing
the efficiency and accuracy of financial data. Advantage Series also runs through a standard Web
browser, so we can design and view financial statements anytime, anywhere using an Internet
browser.

4.2.1 Highlights

 Flexible account structure.


 Powerful budgeting capabilities.
 Extensive comparative and historical data.
 Financial reporting.
 Multicurrency support using the add-on Multicurrency module.
 Ability to drill down to originating transaction in other modules.
 Integrates with Microsoft Office.
4.2.2 Powerful Budgeting Features

 Store different sets of budget figures to project future needs and compare projections.
 Lock periods to prevent unauthorized changes.
 Automatically create budgets using prior-year information, or choose from seven other
computation methods.

4.3 General Journal Report:

The Journal is a point of entries of business transactions into the accounting system. It’s a
chronological record of transactions, showing an explanation of each transaction, the accounts
affected, whether those accounts are increased or decreased, and in what amount. The Monthly
General Journal report is used at the end of each month to derive the Journal entries required by
your Accounts Package to ascertain monthly

4.4 Profit/Loss.

By entering these details into Accounts Package we shoud be able to, identify how the service
traded in the past month, identify what amounts were spent in particular areas, compare with
previous Profit/Loss Reports and identify movement in some account classifications e.g.
Food/Drink expenses were higher in March, than in April. We may wish to investigate the
reasons for any variations in the above areas so that more accurate budget forecasting and
costing can be achieved.The Profit/Loss Report from Accounts Package will list the
Income/Expenditure transactions for the month by consolidating the journal postings from the
Monthly General Journal report and the regular payments you make to creditors each month.

Accounts Payable:

4.5 Balanace Sheet:

The balance sheet is a snapshot of the company's financial standing at a point in time. The
balance sheet shows the company's financial position, what it owns (assets) and what it owes
(liabilities and net worth). The bottom line of a balance sheet must always balance (i.e. assets =
liabilities + net worth). The individual elements of a balance sheet change from day to day and
reflect the activities of the company. Analyzing how the balance sheet changes over time will
reveal important information about the company's business trends. Liabilities and net worth on
the balance sheet represent the company's sources of funds. Liabilities and net worth are
composed of creditors and investors who have provided cash or its equivalent to the company in
the past. As a source of funds, they enable the company to continue in business or expand
operations. If creditors and investors are unhappy and distrustful, the company's chances of
survival are limited. Assets, on the other hand, represent the company's use of funds. The
company uses cash or other funds provided by the creditor/investor to acquire assets. Assets
include all the things of The balance sheet is one of the financial statements that limited
companies and PLCs produce every year for their shareholders. It is like a financial snapshot of
the company's financial situation at that moment in time. It is worked out at the company's year
end, giving the company's assets and liabilities at that moment.It is given in two halves - the top
half shows where the money is currently being used in the business (the net assets), and the
bottom half shows where that money came from (the capital employed). The value of the two
halves must be the same - Capital employed = net assets, hence the term balance sheet.

The money invested in the business may have been used to buy long-term assets or short-term
assets. The long-term assets are known as fixed assets, and help the firm to produce.

Examples would be machinery, equipment, computers and so on, none of which actually get
used up in the production process. The short-term assets are known as current assets – assets
which are used day to day by the firm. The current assets may include cash, stocks and debtors.

The top half of the balance sheet will therefore be made up of the total of the fixed and current
assets, less any current or long-term liabilities the firm may have (creditors, loans and so on). It
may look as follows:-

million
Fixed assets 200
Current assets - stock 40
- debtors 50
- cash 20
TOTAL 110
less Current liabilities (40) 70
NET ASSETS 270m

The bottom half of the balance sheet then looks at where this money came from. Thisdepends on
how the business was originally funded. The main source of money for a limited company
starting up is the issue of shares. This is termed the share capital - the money the original
shareholders put into the business. From then on the assets of the company may be built up by
ploughing profit back into the business. This is calledretained profit, and is the other source of
money usually included in the bottom half of the balance sheet. This may therefore look as
follows:
Share capital 100
Retained profit 170
CAPITAL EMPLOYED £270m

value that are owned or due to the business.

4.6 Liabilities:

Liabilities represent a company's obligations to creditors while net worth represents the owner's
investment in the company. In reality, both creditors and owners are investors in the company;
the only difference is the degree of nervousness and the time frame in which they expect
repayment.

4.7 Assets

They are anything of value that is owned or due to the business is included under the assets
section of the balance sheet. Assets are shown at net book or net realizable value (more on this
later), but appreciated values are not generally considered.

4.8 Current Assets

Current assets are those which mature in less than one year. They are the sum of the following
categories:

 Cash
 Accounts Receivable (A/R)
 Inventory (Inv)
 Notes Receivable (N/R)
 Prepaid Expenses
 Other Current Assets

4.9 Cash

Cash is the only game in town. Cash pays bills and obligations; inventory, receivables, land,
building, machinery, and equipment do not, even though they can be sold for cash and then used
to pay bills. If cash is inadequate or improperly managed, the company may become insolvent
and be forced into bankruptcy. Include all checking, money market, and short term savings
accounts under cash.

4.10 Accounts Receivable (A/R)

Accounts receivable are dollars due from customers. They arise as a result of the processof
selling inventory or services on terms that allow delivery prior to the collection of cash.
Inventory is sold and shipped, an invoice is sent to the customer, and later cash is collected. The
receivable exists for the time period between the selling of the inventory and the receipt of cash
Receivables are proportional to sales; as sales rise, the investment one must make in receivables
also rises.

4.11 Inventory

Inventory consists of the goods and materials a company purchases to re-sell at a profit.

In the process, sales and receivables are generated. The company purchases raw material
inventory that is processed (aka work in process inventory) to be sold as finished
goodsinventory. For a company that sells a product, inventory is often the first use of cash.

Purchasing inventory to be sold at a profit is the first step in the profit-making cycle(operating
cycle), as illustrated previously. Selling inventory does not bring cash back into the company - it
creates a receivable. Only after a time lag equal to the receivable's collection period will cash
return to the company; thus it is very important that the level of inventory be well-managed so
that the business does not keep too much cash tied up in inventory, as this will reduce profits. At
the same time, a company must keep sufficient inventory on hand to prevent stockouts (having
nothing to sell) because this too will erode profits and may result in the loss of customers.

4.12 Notes Receivable (N/R)

N/R is a receivable due the company in the form of a promissory note, arising because the
company made a loan. Making loans is the business of banks, not operating
businesses, particularly small companies with limited financial resources. Notes receivable is
probably a note due from one of three sources:

 Customers
 Employee 
 Officers of the company

Customer notes receivable is when the customer who borrowed from the companyprobably
borrowed because they could not meet the accounts receivable terms. If the customer fails to pay
the invoice according to the agreed-upon payment terms, the customer's obligation may be
converted to a promissory note. Employee notes receivable may be for legitimate reasons, such
as a down payment on a home, but the company is neither a charity nor a bank. If the company
wants to help the employee, it can co-sign onthe loan advanced by a bank.

An officer or owner borrowing from the company is the worst form of notes receivable. If an
officer takes money from the company, it should be declared as a dividend or withdrawal and
reflected as a reduction in net worth. Treating it in any other way leads to possible manipulation
of the company's stated net worth, and banks and other lending institutions frown greatly upon it.

4.13 Other Current Assets


Other current assets consist of prepaid expenses and other miscellaneous current assets.

4.14 Fixed Assets

Fixed assets represent the use of cash to purchase physical assets whose life exceeds one year.
They include assets such as:

 Land
 Buildings
 Machinery and Equipment
 Furniture and Fixtures
 Leasehold Improvements

4.15 Trial Balance:

The trial balance is a worksheet on which a list of all general ledger accounts and their debit or
credit balance. It is a tool that is used to alert to errors in books. The total debits must equal the
total credits. If they don't equal, then there is an error that must be tracked down.

CHAPTER FIVE
ENTITES&ATTRIBUTES

We have found the following seven entities in the Proposed Systems

 Password
 Fiscal year
 Genaral Ledger
 Chart of Account
 Vouchers

5.1 Password

Password Login

Password

The Password class has two attributes namely

Password and Login

5.2 Fiscal Year

In this Fiscal year Class the attributes are

 Starting date
 Month
 Year
 Ending Date

Year
month

Fiscal Year

Starting Date Ending Date

5.3 Genaral Ledger

In third entity class (Genaral Ledger ) the attributes are

 Voucher Type
 Debit
 Credit
 Account Id
 Account Type
Account Id Voucher Type

Genaral Ledger

Credit Account Type


Debit

5.4 Chart Of Account

In this Class (Cahrt of account ) the attributes are

 Account ID (ID)
 Account Type
 Voucher Entries
 References

Account Type Account Id

Chart Of
Account
Voucher Entries
References

5.5 Vouchers

In this entity class (Vouchers) the attributes are

 Bank Payment
 Bank Receipt
 Cash Payment

Bank Payment Bank Receipt

Vouchers

Cash Payment Quantity


CHAPTER SIX
RELATIONS

6.1 About Relationships

Entity Relation Diagram plays an important role in project making because all the projects
depend upon the ERD. After choosing all the entities and their attributes we have to find out
what kind of relationship is present in those all entities. Without defining the relationship we are
unable to draw a proper ERD for that project.

We can define relationship as

“An association between the instances of two or more entities, in which the Organization
takes interest.”

6.2 Types

We have three types of relationships.


a) One-to-One Relation
b) One –to-Many Relation
c) Many-to-Many Relation

6.2.1 One-to-One Relation:

When instance of entity class A is associated with only one instance class B then it is called One-
to-One relationship between A & B.

6.2.2 One-to-Many Relation:

When one instance of entity class A is associated with more than one instance of class B then it
is One-to-Many relationship between A & B.

6.2.3 Many-to-Many Relation:

When many instances of entity class A are associated with many instances of entity class B then
it is Many-to-Many relationship between A & B.
6.3 Representation

Relationship representation depends upon the nature of the relationship between entities.

 If primary key of any to relation may be represented as a foreign key in other


relationship then the relationship present between them is One-to-One.
 If primary key of one side is represented as a foreign key in the other side then it is One-
to-Many relationship.
 If a third relation is formed with composite key consisting of primary key of both
relations, then it is called Many-to-Many relations.

6.4 Relationships

Relations in our project are as follows:

6.4.1 Company_Entry:

The relationship found in these two entities is One-to-Many. i.e. only one Company to many
entrries .

Entry VOUCHER
Company

6.4.2 Voucher_types:

The relationship found in these two entities is One-to-Many. This because a voucher has five
types.
has
Types VOUCHER

6.4.3 COAR_Genaral Ledger:

The relationship found in these two entities is One-to-Many. i.e. A chart of account report has
many Genaral Ledger entries.

GENERAL has

LEDGER COAR
6.4.4 GL accounts_Trial Balance Sheet:

The relationship found in these two entities is One-to-Many. i.e. There is 1 Trial balance sheet
for all the general Ledger accounts. Which shows that all the debits must equal 2 all the credits.

All GL accounts have


Trial BL
Sheet

6.4.5 Notes Receivable_Customers:

The relationship found in these two entities is One-to-Many.

HAVE Customers
N/R

N/R is a receivable due the company in the form of a promissory note, arising because

the company made a loan. Making loans is the business of banks, not operating

businesses, particularly small companies with limited financial resources. Notes

receivable is probably a note due from one of three sources:

 Customers
 Employee 
 Officers of the company

6.4.6 Balance Sheet _Assets:

The relationship found in these two entities is One-to-Many. i.e Many assets have 1 balance
sheet.

Assets HJas
Bal Sheet
CHAPTER SEVEN
USER INTERFACE

7.1 User Login

When Opening and compiling the project, Login screen appears, type the password and

MDI behid it will be opened. Now interaction with the accounts is enabled.
7.2 Chart Of Account

Go to the Debit /Credit, select a voucher type, make and process a certain transaction, save
it.There is no edit option. Print the record in the crystal report format, or press the search option
if a certain recor d has to be searched.

7.3 Form Login


7.4 Form Set Fiscal Year

7.5 Form Splash COA


CHAPTER EIGHT
ENTITY RELATIONSHIP DIAGRAM

8.1 Entity Relationship Diagram (ERD):

ERD shows the direction of data flows from entity to entity. Following Entity Relationship
Diagram shows the direction of the data flow in our database system.
Voucher Orders Customer

Provide

Produces Assets
Account

produce

Net assets GOT


Bal Sheet

8.2 Accounts Module


TO
CUSTOME
CHAPTER NINE
TABLES

We Have 6 tables in our project.

9.1 User Defined

9.2 Chart Of account


9.3 Financial Year

9.3 Genaral Ledger


9.5 General Ledger Detail
9.6 Genaral Journal

9.7 Relationship of Tables


CHAPTER TEN
TOOL

We use two different tools of Microsoft for the creation of database.

 SQL server 2000


 Microsoft Visual Basic 6.0

10.1 SQL server 2000

We use SQL server 2000 for the storage of data. It is used for backend purposes. In this we
create the tables of our database system. These tables are used to store, manipulate and retrieval
data where Microsoft Visual Basic 6.0 is used for Front end. It is user friendly.

10.2 Microsoft Visual Basic 6.0

Microsoft Visual Basic 6.0 is used for font end in our database system. It is used to create forms
and reports using its own language. These forms are user friendly and very easy to use. The
interface of the software is designed using Microsoft Visual Basic 6.0. It is front-end tool. It has
very useful features as compared to the previous version. ADO is one of the good features of the
VB 6.0.VB 5.0 includes DAO and RDO. DAO has ability to access data from local machine
while RDO has ability to access data from remotely
There was nothing, which provides both of the DAO and RDO. Visual Basic 6.0 has
ActiveXData Object, which fulfill our requirement. It has a control, which is used to access data
from local machine as well as from remote server. By using this we can add new records, modify
previous records, delete records, find records etc.

10.2.1 Database Connectivity:

Database connectivity is done by using ActiveX Data Object (ADO). ADO allows to access and
manipulate data from a data source. The ADO has three main components.

 Connection Object
 Command Object
 Record Set Object

10.2.1.1 Connection Object:

The connection object is the highest-level object in ADO object. It is used to make a connection
between the application and an external data score.

10.2.1.2 Command Object:

The connection object establishes a connection to data source. It allows your application to pass
client information such as username and password, to the database for validation.

The command object is used to build queries. Including user-specific parameters, to


accessrecords from a data source. Typically, these records are returned in a Record set Object.

10.2.1.3 Record Set Object:

The record set object is used to access records returned from a SQL query. Using the object, one
can navigate returned records, modify existing records, add new records, or delete specific
records.
CHAPTER ELEVEN CODING

11.1 Form Change password

Option Explicit
'Public LoginSucceeded As Boolean
Dim objOperationBtn As prjControlPanel.clsControlPanel

Private Sub cboUserName_GotFocus()


cboUserName.BackColor = QBColor(15)
End Sub

Private Sub cboUserName_LostFocus()


cboUserName.BackColor = RGB(253, 250, 227)
End Sub

Private Sub cmdCancel_Click()


Unload Me
End Sub

Private Sub cmdChange_Click()


Dim boolCheckSaving As Boolean
If txtNewPass.Text = txtConfirmPass.Text Then
boolCheckSaving = objOperationBtn.SaveRecThroughSql(prjControlPanel.Update,
"UserRights", , "Password" & "= '" & txtConfirmPass.Text & "'", "UserName",
cboUserName.Text)
If boolCheckSaving = True Then
MsgBox "Password changed successfully", vbInformation, "Password Saved"
Unload Me
End If
Else
MsgBox "The Value entered in both the Input boxes do not match" & vbNewLine &
"Please Rewrite Password", vbExclamation, "Error Ocurred"
End If
End Sub

Private Sub cmdOK_Click()


Dim rsInternal As Object
Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From UserRights")
If cboUserName.Text = "Guest" Then rsInternal.MoveNext
If rsInternal.Fields(1) = txtPassword.Text Or IsNull(rsInternal.Fields(1)) Or
rsInternal.Fields(1) = "" Then
Frame1.Visible = False
cmdOk.Visible = False
Frame2.Visible = True
cmdChange.Visible = True
rsInternal.Close
Else
MsgBox "Please enter correct current password", vbInformation, "Incorrect Password"
End If
End Sub

Private Sub Form_Load()


Set objOperationBtn = New prjControlPanel.clsControlPanel
objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
' Me.Top = 2900
' Me.Left = 4200
End Sub

Private Sub Form_Unload(Cancel As Integer)


frmMDI.mnuChangePassword.Enabled = True
Call objOperationBtn.ClosingConnection
Set objOperationBtn = Nothing
End Sub

Private Sub txtConfirmPass_GotFocus()


txtConfirmPass.BackColor = QBColor(15)
End Sub

Private Sub txtConfirmPass_LostFocus()


txtConfirmPass.BackColor = RGB(253, 250, 227)
End Sub

Private Sub txtNewPass_GotFocus()


txtNewPass.BackColor = QBColor(15)
End Sub

Private Sub txtNewPass_LostFocus()


txtNewPass.BackColor = RGB(253, 250, 227)
End Sub

Private Sub txtPassword_GotFocus()


txtPassword.BackColor = QBColor(15)
End Sub
Private Sub txtPassword_LostFocus()
txtPassword.BackColor = RGB(253, 250, 227)
End Sub

11.2 FORM COA

Option Explicit
Dim rsDetail As ADODB.Recordset
Dim boolAdd As Boolean
Dim boolDeactivateWin As Boolean
'Dim strAccountType As String
Dim strAccountId As String
'Dim objGrid As PrjFlexGrid.clsFlexGrid
Dim objOperationBtn As prjControlPanel.clsControlPanel

Private Sub cboAccountType_Click()


Dim rsInternal As ADODB.Recordset
If cboAccountType.Text <> "" Then
' If boolAdd = True Then
Set rsInternal = objOperationBtn.ExternalRecordSet("Select accountID From
ChartOfAccount Where AccountType = '" & cboAccountType.Text & "'")
If Not rsInternal.EOF Then
Dim lngAccountID As Long
rsInternal.MoveLast
lngAccountID = rsInternal.Fields(0) + 1
rsInternal.Find "AccountID=" & lngAccountID, , adSearchForward, 1
If Not rsInternal.EOF Then
Set rsDetail = objOperationBtn.TakeRsDetail
rsDetail.MoveLast
Set rsInternal = objOperationBtn.ExternalRecordSet("Select Min(AccountID) From
ChartOfAccount Where AccountType = '" & rsDetail.Fields(2) & "'")
txtAccountID.Text = rsInternal.Fields(0) + 10000
Else
txtAccountID.Text = lngAccountID
End If
Else
Set rsDetail = objOperationBtn.TakeRsDetail
rsDetail.MoveLast
Set rsInternal = objOperationBtn.ExternalRecordSet("Select Min(AccountID) From
ChartOfAccount Where AccountType = '" & rsDetail.Fields(2) & "'")
txtAccountID.Text = rsInternal.Fields(0) + 10000
End If
rsInternal.Close
Set rsInternal = Nothing
' End If
End If
End Sub

Private Sub cboAccountType_GotFocus()


cboAccountType.BackColor = vbWhite
frmMDI.sbGeneral.Panels(1).Text = "Enter Nature of Account ID"
End Sub

Private Sub cboAccountType_KeyPress(KeyAscii As Integer)


Dim rsInternal As ADODB.Recordset
If KeyAscii = 13 Then
' If boolAdd = True Then
Set rsInternal = objOperationBtn.ExternalRecordSet("Select accountID From
ChartOfAccount Where AccountType = '" & cboAccountType.Text & "'")
If Not rsInternal.EOF Then
Dim lngAccountID As Long
rsInternal.MoveLast
lngAccountID = rsInternal.Fields(0) + 1
rsInternal.Find "AccountID=" & lngAccountID, , adSearchForward, 1
If Not rsInternal.EOF Then
Set rsDetail = objOperationBtn.TakeRsDetail
rsDetail.MoveLast
Set rsInternal = objOperationBtn.ExternalRecordSet("Select Min(AccountID) From
ChartOfAccount Where AccountType = '" & rsDetail.Fields(2) & "'")
txtAccountID.Text = rsInternal.Fields(0) + 10000
Else
txtAccountID.Text = lngAccountID
End If
Else
Set rsDetail = objOperationBtn.TakeRsDetail
rsDetail.MoveLast
Set rsInternal = objOperationBtn.ExternalRecordSet("Select Min(AccountID) From
ChartOfAccount Where AccountType = '" & rsDetail.Fields(2) & "'")
txtAccountID.Text = rsInternal.Fields(0) + 10000
End If
rsInternal.Close
Set rsInternal = Nothing
' End If
txtAccountDescription.SetFocus
End If
End Sub

Private Sub cboAccountType_LostFocus()


cboAccountType.BackColor = &H80000018
frmMDI.sbGeneral.Panels(1).Text = ""
End Sub

Private Sub cmd1st_Click()


lblShowStatus.Caption = "Move First"
Call objOperationBtn.Go1st("AccountType", "AccountID", frm)
' lblShowStatus.Left = 1420
'If tabCOA.TabEnabled(1) = True Then tabCOA.TabEnabled(1) = False
End Sub

Private Sub cmdAdd_Click()


Call objOperationBtn.DoAdd(frm, "UnlockFrame")
Call objOperationBtn.SettingBookmark
Call objOperationBtn.EnablingBtns("cmdSave,cmdUndo", frm)
Call
objOperationBtn.DisablingBtns("cmdAdd,cmdEdit,cmdDelete,cmdFind,cmdPrint,cmdNext,cmd
Previous,cmd1st,cmdLast", frm)
lblShowStatus.Left = 1565
lblShowStatus.Caption = "Adding Record......"
'If tabCOA.TabEnabled(1) = True Then tabCOA.TabEnabled(1) = False
tabCOA.Tab = 0
boolAdd = True
cboAccountType.Visible = True
cboFague.Visible = False
cboAccountType.SetFocus
End Sub

Private Sub cmdClose_Click()


Call objOperationBtn.CloseForm(frm)
End Sub

'Private Sub cmdDelete_Click()


' Dim boolValidation As Boolean
' Dim Verifying As Variant
' Dim boolValidationLedger As Boolean

' lblShowStatus.Visible = True


' lblShowStatus.Caption = "Deleting Record......"
' objOperationBtn.SettingTransStatus = operationalbtns.TransactionStatus.Begin
' boolValidation = objOperationBtn.SaveRecThroughSql(Delete, "ChartOfAccount", , ,
"AccountID", txtAccountID.Text)
' If boolValidation = True Then
' Verifying = MsgBox("Are you really want to Detete this record", vbYesNo + vbQuestion,
"Deleting")
' If Verifying = vbYes Then
' objOperationBtn.SettingTransStatus = operationalbtns.TransactionStatus.Commit
' Set rsDetail = objOperationBtn.Gobackward("AccountID", "AccountID", frm)
' If Not rsDetail Is Nothing Then
' Call PopulateGrid
' Else
' Call
objOperationBtn.disablingBtns("cmdEdit,cmdFind,cmdPrint,cmdDelete,cmdNext,cmdPrevious,c
md1st,cmdLast", frm)
' End If
' Else
' objOperationBtn.SettingTransStatus = operationalbtns.TransactionStatus.RollBack
' End If
' Else
' objOperationBtn.SettingTransStatus = operationalbtns.TransactionStatus.RollBack
' End If

' lblShowStatus.Visible = False


'End Sub

Private Sub cmdEdit_Click()


'Call objOperationBtn.DoEdit(frm)
strAccountId = txtAccountID.Text
Call objOperationBtn.DoEdit(frm, "UnlockFrame")
Call objOperationBtn.SettingBookmark
Call objOperationBtn.EnablingBtns("cmdSave,cmdUndo", frm)
Call
objOperationBtn.DisablingBtns("cmdAdd,cmdEdit,cmdDelete,cmdFind,cmdPrint,cmdNext,cmd
Previous,cmd1st,cmdLast", frm)
lblShowStatus.Left = 1470
lblShowStatus.Caption = "Updating Record......"
'If tabCOA.TabEnabled(1) = True Then tabCOA.TabEnabled(1) = False
cboAccountType.Visible = True
cboFague.Visible = False
tabCOA.Tab = 0
cboAccountType.Text = cboFague.Text
' strAccountType = cboAccountType.Text
txtAccountDescription.SetFocus
SendKeys "{Home}+{End}"
End Sub

Private Sub cmdFind_Click()


Call objOperationBtn.DoFind(frm, "FindRec")
Call objOperationBtn.SettingBookmark
If AdminLoginSucceeded = True Then
Call
objOperationBtn.DisablingBtns("cmdAdd,cmdEdit,cmdDelete,cmdFind,cmdPrint,cmdNext,cmd
Previous,cmd1st,cmdLast", frm)
Else
Call
objOperationBtn.DisablingBtns("cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cmdLast",
frm)
End If
Call objOperationBtn.EnablingBtns("cmdUndo", frm)
lblShowStatus.Left = 1590
lblShowStatus.Caption = "Finding Record......"
tabCOA.TabEnabled(1) = True
fraAccountID.Enabled = True
txtAccountID.SetFocus
End Sub

Private Sub cmdLast_Click()


lblShowStatus.Caption = "Move Last"
Call objOperationBtn.GoLast("AccountType", "AccountID", frm)
' lblShowStatus.Left = 1350
'If tabCOA.TabEnabled(1) = True Then tabCOA.TabEnabled(1) = False
End Sub

Private Sub cmdNext_Click()


lblShowStatus.Caption = "Move Next"
Call objOperationBtn.GoForward("AccountType", "AccountID", frm)
' lblShowStatus.Left = 1350
'If tabCOA.TabEnabled(1) = True Then tabCOA.TabEnabled(1) = False
End Sub

Private Sub cmdPrevious_Click()


lblShowStatus.Caption = "Move Previous"
Call objOperationBtn.GoBackward("AccountType", "AccountID", frm)
' lblShowStatus.Left = 1150
'If tabCOA.TabEnabled(1) = True Then tabCOA.TabEnabled(1) = False
End Sub

Private Sub cmdPrint_Click()


'Dim rsInternal As ADODB.Recordset
Dim Report As crCOA
' 'Dim SQL As String
' 'SQL = "SELECT
GeneralJournal.Reference,GeneralJournalDetail.Dated,GeneralJournalDetail.AccountID,General
JournalDetail.TransactionDrescription,GeneralJournalDetail.Debit,GeneralJournalDetail.Credit
FROM GeneralJournal INNER JOIN GeneralJournalDetail ON GeneralJournal.GJournalID =
GeneralJournalDetail.GJournalID WHERE GeneralJournal.GJournalID =" &
txtGJournalID.Text
' 'SQL = "SELECT [Reference] From GeneralJournal WHERE GJournalID =" &
txtGJournalID.Text
' 'Set rsInternal = objOperationBtn.TakeRecordSetPrint(SQL)
' 'Load frmReportViewer
Set Report = New crCOA
strRpt = "rptChartOfAccount"
Call frmReportViewer.RepInit(Report)
End Sub

Private Sub cmdSave_Click()


Dim boolSaveStatus As Boolean
Dim boolFormValidation As Boolean
Screen.MousePointer = vbHourglass
boolFormValidation = ValidateForm
If boolFormValidation = True Then
If boolAdd = True Then
boolSaveStatus = AddNewRec
Else
boolSaveStatus = UpdateExistingRec
End If
If boolSaveStatus = True Then
Call objOperationBtn.DisablingBtns("cmdSave,cmdUndo", frm)
Call
objOperationBtn.EnablingBtns("cmdAdd,cmdEdit,cmdDelete,cmdFind,cmdPrint,cmdNext,cmdP
revious,cmd1st,cmdLast", frm)
'Call objOperationBtn.DoCancel(frm)
Frame2.Enabled = False
fraAccountID.Enabled = False
If boolAdd = True Then
Call InsertPanel
Call objOperationBtn.GoLast
boolAdd = False
Else
Call objOperationBtn.BookMarkRec
End If
cboFague.Visible = True
cboAccountType.Visible = False
lblShowStatus.Left = 1700
lblShowStatus.Caption = "Record Saved"
Call PopulateCombo
cboFague.Text = cboAccountType.Text
Else
lblShowStatus.Left = 1520
lblShowStatus.Caption = "Record Not Saved"
End If
End If
Screen.MousePointer = vbDefault
End Sub
Public Function ValidateForm() As Boolean
Dim rsInternal As ADODB.Recordset
If txtAccountID.Text = "" Or txtAccountDescription.Text = "" Or cboAccountType.Text = ""
Then
MsgBox "Please fill the complete Form", vbInformation, "Incomplete Form"
ValidateForm = False
Exit Function
End If
Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From ChartOfAccount Where
AccountType like'" & cboAccountType.Text & "'")
Do While Not rsInternal.EOF
If Not rsInternal.Fields(0) = txtAccountID.Text And VBA.LCase$(rsInternal.Fields(1)) =
VBA.LCase$(txtAccountDescription.Text) Then
MsgBox "Duplicate Account Description found in same Account Type" & vbNewLine &
"Please give different description"
ValidateForm = False
rsInternal.Close
Set rsInternal = Nothing
Exit Function
End If
rsInternal.MoveNext
Loop
' If InStr("Income,Expenses,Accounts Receivable,Cash,Other Current Assets,Fixed
Assets,Other Assets,Accounts Payable,Other Current Liabilities,Long Term Liabilities,Notes
Receivable,Notes Payable,Owner Equity", strAccountType) And Not strAccountType = "" Then
' If Not LCase(cboAccountType.Text) = LCase(strAccountType) Then
' MsgBox "You cannot change this value of Account Type" & vbNewLine & "It will
effect the Financial Statements Result", vbCritical, "Invalid Value"
' ValidateForm = False
' Exit Function
' End If
' End If
rsInternal.Close
Set rsInternal = Nothing
ValidateForm = True
End Function

Private Sub cmdUndo_Click()


Call objOperationBtn.DoCancel(frm)
If AdminLoginSucceeded = True Then
Call objOperationBtn.DisablingBtns("cmdSave,cmdUndo", frm)
Call
objOperationBtn.EnablingBtns("cmdAdd,cmdEdit,cmdDelete,cmdFind,cmdPrint,cmdNext,cmdP
revious,cmd1st,cmdLast", frm)
Else
Call
objOperationBtn.EnablingBtns("cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cmdLast",
frm)
End If
Call objOperationBtn.BookMarkRec("AccountID", , frm)
If boolAdd = True Then boolAdd = False
If cboFague.Visible = False Then
cboFague.Visible = True
cboAccountType.Visible = False
End If
lblShowStatus.Left = 1570
lblShowStatus.Caption = "Undo Last Action"
End Sub

Private Sub cmdViewAll_Click()


' Dim rsDetail As ADODB.Recordset
Set rsDetail = objOperationBtn.TakeRsDetail
Call PopulateGrid
End Sub

Private Sub Form_Activate()


Set frm = Me
objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
QryMaster = "Select * From ChartOfAccount Order by AccountId"
QryDetail = "Select * From ChartOfAccount Order by AccountId"
Call objOperationBtn.OpeningRecordsets(QryMaster, QryDetail)
Call InsertPanel
If boolDeactivateWin = False Then
tabCOA.Tab = 0
Call objOperationBtn.GoLast(, "AccountID", frm)
'If Not rsDetail Is Nothing Then
If AdminLoginSucceeded = False Then
Call objOperationBtn.DisablingBtns("cmdAdd,cmdEdit,cmdDelete", frm)
Else
'Call objOperationBtn.DisablingBtns("cmdAdd,cmdEditcmdDelete", frm)
End If
'Else
' If AdminLoginSucceeded = True Then
' Call
objOperationBtn.DisablingBtns("cmdEdit,cmdFind,cmdPrint,cmdDelete,cmdNext,cmdPrevious,
cmd1st,cmdLast", frm)
'Else
' Call
objOperationBtn.DisablingBtns("cmdAdd,cmdEdit,cmdDelete,cmdFind,cmdPrint,cmdNext,cmd
Previous,cmd1st,cmdLast", frm)
' End If
'End If
Call PopulateCombo
Else
Call objOperationBtn.BookMarkRec
' Call FlexGridCOA.SettingCboAndFlexGridObj
End If
End Sub

Private Sub InsertPanel()


Dim rsInternal As ADODB.Recordset
frmMDI.sbGeneral.Panels(2).ToolTipText = "No. of Account Heads in Chart of Account"
Set rsInternal = objOperationBtn.ExternalRecordSet("Select Count(AccountID) From
ChartOfAccount")
If Not rsInternal.EOF Then
frmMDI.sbGeneral.Panels(2).Text = "Total Account Heads : " & rsInternal.Fields(0)
Else
frmMDI.sbGeneral.Panels(2).Text = "Total Account Heads : 0"
End If
rsInternal.Close
Set rsInternal = Nothing
End Sub

Public Sub PopulateCombo()


Dim rsInternal As ADODB.Recordset
Set rsInternal = objOperationBtn.ExternalRecordSet("Select Distinct AccountType From
ChartOfAccount")
Do While Not rsInternal.EOF
cboAccountType.AddItem (rsInternal.Fields(0))
rsInternal.MoveNext
Loop
rsInternal.Close
Set rsInternal = Nothing
End Sub

Private Sub FinishingTasks()


Call objOperationBtn.ClosingRecordsets
Call objOperationBtn.ClosingConnection
' Call objGrid.SettingObjToNothing
Set frm = Nothing
End Sub

Private Sub Form_Deactivate()


boolDeactivateWin = True
Call objOperationBtn.SettingBookmark
Call FinishingTasks
End Sub

Private Sub Form_Load()


' Set objGrid = New PrjFlexGrid.clsFlexGrid
Set objOperationBtn = New prjControlPanel.clsControlPanel
End Sub

Private Sub Form_Unload(Cancel As Integer)


Call FinishingTasks
'Set objGrid = Nothing
frmMDI.sbGeneral.Panels(2).Text = ""
Set objOperationBtn = Nothing
frmMDI.mnuCOA.Enabled = True
Set frmCOA = Nothing
End Sub

Public Function AddNewRec() As Boolean


On Error GoTo errhandler
Dim Values As String
Dim boolSaveValidation As Boolean

Values = Val(txtAccountID.Text)
Values = Values & ",'" & txtAccountDescription.Text & "'"
Values = Values & ",'" & VBA.Trim$(cboAccountType.Text) & "'"
'objOperationBtn.SettingTransStatus = OperationalBtns.TransactionStatus.Begin
boolSaveValidation = objOperationBtn.SaveRecThroughSql(prjControlPanel.Insert,
"ChartOfAccount", "AccountID,AccountDescription,AccountType", Values)
If boolSaveValidation = True Then
' objOperationBtn.SettingTransStatus = OperationalBtns.TransactionStatus.Commit
AddNewRec = True
Else
' objOperationBtn.SettingTransStatus = OperationalBtns.TransactionStatus.RollBack
AddNewRec = False
End If
Exit Function
errhandler:
Call objOperationBtn.ErrHandlerProcedure
End Function

Public Function UpdateExistingRec() As Boolean


On Error GoTo errhandler
Dim Values As String
Dim boolSaveValidation As Boolean

Call objOperationBtn.DeactivateRecordset
Call objOperationBtn.ClosingConnection
objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
Values = "AccountID =" & Val(txtAccountID.Text)
Values = Values & ",AccountDescription = '" & txtAccountDescription.Text & "'"
Values = Values & ",AccountType = '" & VBA.Trim$(cboAccountType.Text) & "'"
objOperationBtn.SettingTransStatus = prjControlPanel.Begin
boolSaveValidation = objOperationBtn.SaveRecThroughSql(prjControlPanel.Update,
"ChartOfAccount", , Values, "AccountID", strAccountId)
If boolSaveValidation = False Then
objOperationBtn.SettingTransStatus = prjControlPanel.RollBack
UpdateExistingRec = False
Else
If Not txtAccountID.Text = strAccountId Then
Values = "AccountID=" & Val(txtAccountID.Text)
boolSaveValidation = objOperationBtn.SaveRecThroughSql(prjControlPanel.Update,
"GeneralJournalDetail", , Values, "AccountID", strAccountId)
If boolSaveValidation = True Then
boolSaveValidation = objOperationBtn.SaveRecThroughSql(prjControlPanel.Update,
"GeneralLedger", , Values, "AccountID", strAccountId)
If boolSaveValidation = True Then
objOperationBtn.SettingTransStatus = prjControlPanel.Commit
UpdateExistingRec = True
Else
objOperationBtn.SettingTransStatus = prjControlPanel.RollBack
UpdateExistingRec = False
End If
Else
objOperationBtn.SettingTransStatus = prjControlPanel.RollBack
UpdateExistingRec = False
End If
Else
objOperationBtn.SettingTransStatus = prjControlPanel.Commit
UpdateExistingRec = True
End If
End If
Exit Function
errhandler:
Call objOperationBtn.ErrHandlerProcedure
End Function

Public Sub PopulateGrid()


Dim intRow As Integer
Dim intCol As Integer
Dim strVarHolder As String

intRow = 1
FlexGridCOA.Clear
FlexGridCOA.Rows = 2
FlexGridCOA.Cols = 4
FlexGridCOA.RowHeight(0) = 420
FlexGridCOA.FormatString = "^ S.No |^Account No.| Account Description |
Account Type "
Do While rsDetail.EOF = False
For intCol = 0 To 2
If intCol < 2 Then
If intCol = 0 Then FlexGridCOA.TextMatrix(intRow, intCol) = intRow
If IsNull(rsDetail.Fields(intCol)) Then
strVarHolder = ""
FlexGridCOA.TextMatrix(intRow, intCol + 1) = strVarHolder
Else
FlexGridCOA.TextMatrix(intRow, intCol + 1) = rsDetail.Fields(intCol)
End If
Else
If IsNull(rsDetail.Fields(intCol)) Then
strVarHolder = ""
FlexGridCOA.TextMatrix(intRow, intCol + 1) = strVarHolder
Else
FlexGridCOA.TextMatrix(intRow, intCol + 1) = rsDetail.Fields(intCol)
End If
End If
Next
intRow = intRow + 1
FlexGridCOA.Rows = FlexGridCOA.Rows + 1
rsDetail.MoveNext
Loop
rsDetail.MoveFirst
Exit Sub
errhandler:
Call objOperationBtn.ErrHandlerProcedure
End Sub

Private Sub txtAccountID_GotFocus()


Call objOperationBtn.FormatingInputBoxes("AccountID", frm)
frmMDI.sbGeneral.Panels(1).Text = "Enter Valid Numeric Account ID"
End Sub

Private Sub txtAccountID_KeyPress(KeyAscii As Integer)


If KeyAscii = 13 Then
If IsNumeric(txtAccountID) Then
' Dim rsDetail As ADODB.Recordset
If boolAdd = True Then
cboAccountType.SetFocus
Exit Sub
End If
Screen.MousePointer = vbHourglass
'QryMaster = "Select * From ChartOfAccount Order by AccountId"
'QryDetail = "Select * From ChartOfAccount Order by AccountId"
Call objOperationBtn.ClosingRecordsets
Call objOperationBtn.OpeningRecordsets(QryMaster, QryDetail)
Call objOperationBtn.FindingRec("AccountID", "AccountType", txtAccountID.Text, ,
frm)
Set rsDetail = objOperationBtn.TakeRsDetail
If Not rsDetail.EOF Then
'Call PopulateGrid(rsDetail)
If AdminLoginSucceeded = True Then
Call objOperationBtn.DisablingBtns("cmdUndo", frm)
Call
objOperationBtn.EnablingBtns("cmdAdd,cmdEdit,cmdDelete,cmdFind,cmdPrint,cmdNext,cmdP
revious,cmd1st,cmdLast", frm)
Else
Call
objOperationBtn.EnablingBtns("cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cmdLast",
frm)
Call objOperationBtn.DisablingBtns("cmdUndo", frm)
End If
txtAccountID.BackColor = &H80000016
lblShowStatus.Left = 1715
lblShowStatus.Caption = "Record Found"
fraAccountID.Enabled = False
Else
lblShowStatus.Left = 1500
' objGrid.ClearingGrid
FlexGridCOA.Cols = 4
' Call FlexGridCOA.SettingGridCellHeight(0, 420)
' FlexGridCOA.ColTitles = "S.No| Account No. |^ Account Description
|^ Account Type "
lblShowStatus.Caption = "Record Not Found"
End If
Screen.MousePointer = vbDefault
Else
MsgBox "Please enter Numeric Value in this field", vbInformation, "Invalid Value"
End If
End If
End Sub

Private Sub txtAccountID_LostFocus()


If objOperationBtn.ValidatingInputBoxes("AccountID", True, frm) = True Then
frmMDI.sbGeneral.Panels(1).Text = ""
Else
txtAccountID.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub

Private Sub txtAccountDescription_GotFocus()


Call objOperationBtn.FormatingInputBoxes("AccountDescription", frm)
frmMDI.sbGeneral.Panels(1).Text = "Enter Useful Description of Account ID"
End Sub

Private Sub txtAccountDescription_KeyPress(KeyAscii As Integer)


If KeyAscii = 13 Then
cboAccountType.SetFocus
End If
End Sub

Private Sub txtAccountDescription_LostFocus()


Call objOperationBtn.ValidatingInputBoxes("AccountDescription", False, frm)
frmMDI.sbGeneral.Panels(1).Text = ""
End Sub

Private Sub txtFindAccountID_GotFocus()


txtFindAccountID.BackColor = vbWhite
frmMDI.sbGeneral.Panels(1).Text = "Enter Valid Numeric Account ID"
End Sub

Private Sub txtFindAccountID_KeyUp(KeyCode As Integer, Shift As Integer)


Dim i As Long
Dim intRow As Integer
If IsNumeric(txtFindAccountID.Text) Then
'Dim rsDetail As ADODB.Recordset
'Set rsDetail = objoperationbtn.TakeRsDetail
Set rsDetail = objOperationBtn.ExternalRecordSet("Select * From ChartOfAccount")
i = Len(txtFindAccountID.Text)
If Not rsDetail.EOF Then
rsDetail.MoveFirst
FlexGridCOA.Clear
FlexGridCOA.Rows = 2
FlexGridCOA.Cols = 4
FlexGridCOA.RowHeight(0) = 420
FlexGridCOA.FormatString = "^ S.No |^Account No.| Account Description
| Account Type "
Do While Not rsDetail.EOF
If Left$(rsDetail.Fields(0), i) = txtFindAccountID.Text Then
intRow = intRow + 1
FlexGridCOA.Rows = FlexGridCOA.Rows + 1
FlexGridCOA.TextMatrix(intRow, 0) = intRow
FlexGridCOA.TextMatrix(intRow, 1) = rsDetail.Fields(0)
FlexGridCOA.TextMatrix(intRow, 2) = rsDetail.Fields(1)
FlexGridCOA.TextMatrix(intRow, 3) = rsDetail.Fields(2)
End If
rsDetail.MoveNext
Loop
rsDetail.MoveFirst
' Call PopulateGrid(rsDetail)
Else
FlexGridCOA.Clear
FlexGridCOA.Cols = 4
FlexGridCOA.RowHeight(0) = 420
FlexGridCOA.FormatString = "S.No| Account No. |^ Account Description
|^ Account Type "
End If
End If
End Sub

Private Sub txtFindAccountID_LostFocus()


txtFindAccountID.BackColor = &H80000018
frmMDI.sbGeneral.Panels(1).Text = ""
End Sub

11.3 FORM FISCAL YEAR

Option Explicit
Dim objOperationBtn As prjControlPanel.clsControlPanel

Private Sub cmdCancel_Click()


Unload Me
End Sub

Private Sub Form_Load()


Me.Top = 2400
Me.Left = 3700
End Sub

Private Sub Form_Unload(Cancel As Integer)


If Not objOperationBtn Is Nothing Then
Call objOperationBtn.ClosingConnection
Set objOperationBtn = Nothing
End If
End Sub
Private Sub cmdOK_Click()
Dim msg As Variant
Dim rsInternal As ADODB.Recordset
msg = MsgBox("Please check once again that you have set a valid financial year",
vbOKCancel + vbInformation, "Setting Financial Year")
If msg = vbOK Then
Set objOperationBtn = New prjControlPanel.clsControlPanel
objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
Call SetFiscalYear
frmMDI.sbGeneral.Visible = True
Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From FinancialYear")
dtStartingDate = rsInternal.Fields(1)
dtEndingDate = rsInternal.Fields(2)
frmMDI.sbGeneral.Panels(5).Text = "Fiscal Year:" & rsInternal.Fields(1) & " To " &
rsInternal.Fields(2)
Set objOperationBtn = Nothing
frmMDI.mnuFiscalYear.Enabled = False
frmMDI.mnuCloseFiscalYear.Enabled = True
frmMDI.mnuForms.Enabled = True
frmMDI.mnuLedger.Enabled = True
frmMDI.mnuTrialBalance.Enabled = True
frmMDI.mnuFinancialStatement.Enabled = True
Unload Me
End If
End Sub

Private Sub SetFiscalYear()


Dim rsTemp As ADODB.Recordset
Dim SQL As String
Dim Values As String

Screen.MousePointer = vbHourglass
SQL = "SELECT * FROM GeneralLedger INNER JOIN FinancialYear ON
GeneralLedger.Dated >= FinancialYear.StartingDate AND GeneralLedger.Dated <=
FinancialYear.EndingDate where GeneralLedger.TransactionDrescription = 'Balance c/d'"
Set rsTemp = objOperationBtn.ExternalRecordSet(SQL)
Do While rsTemp.EOF = False
'Balance = rsTemp.Fields(0) - rsTemp.Fields(1)
Values = 0
Values = Values & "," & rsTemp.Fields(1)
Values = Values & ",'" & dtStartDate.value & "'"
Values = Values & ",''"
Values = Values & ",'" & "Balance b/d" & "'"
If rsTemp.Fields(5) > 0 Then
Values = Values & "," & 0
Values = Values & "," & rsTemp.Fields(5)
ElseIf rsTemp.Fields(6) > 0 Then
Values = Values & "," & rsTemp.Fields(6)
Values = Values & "," & 0
End If
Call objOperationBtn.SaveRecThroughSql(prjControlPanel.Insert, "GeneralLedger", ,
Values)
rsTemp.MoveNext
Loop
rsTemp.Close
Set rsTemp = Nothing
Call objOperationBtn.SaveRecThroughSql(prjControlPanel.Delete, "FinancialYear")
Call objOperationBtn.SaveRecThroughSql(prjControlPanel.Insert, "FinancialYear", , "'1'," &
"'" & dtStartDate.value & "'," & "'" & dtEndDate.value & "'")
Call objOperationBtn.SaveRecThroughSql(prjControlPanel.Insert, "FinancialYear", , "'2'," &
"'" & dtStartDate.value & "'," & "'" & dtEndDate.value & "'")
Screen.MousePointer = vbDefault
End Sub

11.4 FORM GENEARL JOURNAL

Option Explicit
'Dim objGrid As PrjFlexGrid.clsFlexGrid
Dim objOperationBtn As prjControlPanel.clsControlPanel
Dim rsDetail As ADODB.Recordset
Dim strDescription As String
Dim boolAdd As Boolean
Dim boolFind As Boolean
Dim boolDeactivateWin As Boolean

Private Sub cboReference_GotFocus()


cboReference.BackColor = vbWhite
frmMDI.sbGeneral.Panels(1).Text = "Enter/Select Voucher type"
End Sub

Private Sub cboReference_KeyPress(KeyAscii As Integer)


If KeyAscii = 13 Then
FlexGridGJ.Col = 1
FlexGridGJ.Row = 1
FlexGridGJ.SetFocus
End If
End Sub

Private Sub cboReference_LostFocus()


cboReference.BackColor = &H80000018
frmMDI.sbGeneral.Panels(1).Text = ""
End Sub

Private Sub cmd1st_Click()


Set rsDetail = objOperationBtn.Go1st("GJournalID", "GJournalID", frm)
If Not rsDetail Is Nothing Then
Call FlexGridGJ.Clear
FlexGridGJ.Cols = 6
FlexGridGJ.Rows = 2
FlexGridGJ.RowHeight(0) = 420
FlexGridGJ.FormatString = "^S.No|^Account No.| Account Description |
Transaction Description |^ Debit |^ Credit "
txtTotalDebit.Text = ""
txtTotalCredit.Text = ""
Call PopulateGrid
lblShowStatus.Left = 1635
lblShowStatus.Caption = "Move First"
End If
End Sub

Private Sub cmdAdd_Click()


Call objOperationBtn.DoAdd(frm, "FindRec")
Call objOperationBtn.SettingBookmark
Call objOperationBtn.EnablingBtns("cmdSave,cmdUndo", frm)
Call
objOperationBtn.DisablingBtns("cmdAdd,cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cm
dLast", frm)
FlexGridGJ.GridStatus = True
FlexGridGJ.Clear
FlexGridGJ.Rows = 2
FlexGridGJ.Cols = 6
FlexGridGJ.RowHeight(0) = 420
FlexGridGJ.FormatString = "^S.No|^Account No.| Account Description |
Transaction Description |^ Debit |^ Credit "
txtGJournalID.Text = objOperationBtn.AutoIncValueinDB("GJournalID", "GeneralJournal")
lblShowStatus.Left = 1330
lblShowStatus.Caption = "Adding Record...."
boolAdd = True
txtTotalDebit.Text = ""
txtTotalCredit.Text = ""
cboReference.Visible = True
cboFague.Visible = False
dtDate.SetFocus
End Sub

Private Sub cmdClose_Click()


Call objOperationBtn.CloseForm(frm)
End Sub

Private Sub cmdFind_Click()


Call objOperationBtn.DoFind(frm, "FindRec")
Call objOperationBtn.SettingBookmark
If AdminLoginSucceeded = True Then
Call
objOperationBtn.DisablingBtns("cmdAdd,cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cm
dLast", frm)
Else
Call
objOperationBtn.DisablingBtns("cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cmdLast",
frm)
End If
Call objOperationBtn.EnablingBtns("cmdUndo", frm)
FlexGridGJ.Clear
FlexGridGJ.Rows = 2
FlexGridGJ.Cols = 6
FlexGridGJ.RowHeight(0) = 420
FlexGridGJ.FormatString = "^S.No|^Account No.| Account Description |
Transaction Description |^ Debit |^ Credit "
lblShowStatus.Left = 1325
lblShowStatus.Caption = "Finding Record...."
txtTotalDebit.Text = ""
txtTotalCredit.Text = ""
boolFind = True
fraTotal.Enabled = False
txtGJournalID.SetFocus
End Sub

Private Sub cmdLast_Click()


Set rsDetail = objOperationBtn.GoLast("GJournalID", "GJournalID", frm)
If Not rsDetail Is Nothing Then
FlexGridGJ.Clear
FlexGridGJ.Cols = 6
FlexGridGJ.Rows = 2
FlexGridGJ.RowHeight(0) = 420
FlexGridGJ.FormatString = "^S.No|^Account No.| Account Description |
Transaction Description |^ Debit |^ Credit "
txtTotalDebit.Text = ""
txtTotalCredit.Text = ""
Call PopulateGrid
lblShowStatus.Left = 1635
lblShowStatus.Caption = "Move Last"
End If
End Sub
Private Sub cmdNext_Click()
Set rsDetail = objOperationBtn.GoForward("GJournalID", "GJournalID", frm)
If Not rsDetail Is Nothing Then
Call FlexGridGJ.Clear
FlexGridGJ.Cols = 6
FlexGridGJ.Rows = 2
FlexGridGJ.RowHeight(0) = 420
FlexGridGJ.FormatString = "^S.No|^Account No.| Account Description |
Transaction Description |^ Debit |^ Credit "
txtTotalDebit.Text = ""
txtTotalCredit.Text = ""
Call PopulateGrid
lblShowStatus.Left = 1635
lblShowStatus.Caption = "Move Next"
End If
End Sub

Private Sub cmdPrevious_Click()


Set rsDetail = objOperationBtn.GoBackward("GJournalID", "GJournalID", frm)
If Not rsDetail Is Nothing Then
Call FlexGridGJ.Clear
FlexGridGJ.Cols = 6
FlexGridGJ.Rows = 2
FlexGridGJ.RowHeight(0) = 420
FlexGridGJ.FormatString = "^S.No|^Account No.| Account Description |
Transaction Description |^ Debit |^ Credit "
txtTotalDebit.Text = ""
txtTotalCredit.Text = ""
Call PopulateGrid
lblShowStatus.Left = 1430
lblShowStatus.Caption = "Move Previous"
End If
End Sub

Private Sub cmdPrint_Click()


' Dim rsInternal As ADODB.Recordset
Dim Report As crGeneralJournal
'Dim SQL As String
'SQL = "SELECT
GeneralJournal.Reference,GeneralJournalDetail.Dated,GeneralJournalDetail.AccountID,General
JournalDetail.TransactionDrescription,GeneralJournalDetail.Debit,GeneralJournalDetail.Credit
FROM GeneralJournal INNER JOIN GeneralJournalDetail ON GeneralJournal.GJournalID =
GeneralJournalDetail.GJournalID WHERE GeneralJournal.GJournalID =" &
txtGJournalID.Text
'SQL = "SELECT [Reference] From GeneralJournal WHERE GJournalID =" &
txtGJournalID.Text
'Set rsInternal = objOperationBtn.TakeRecordSetPrint(SQL)
'Load frmReportViewer
Set Report = New crGeneralJournal
strRpt = "rptGJ"
Call frmReportViewer.RepInit(Report)
End Sub

Private Sub cmdSave_Click()


Dim boolSaveStatus As Boolean
'Dim rsTemp As ADODB.Recordset
Dim boolFormValidation As Boolean

Screen.MousePointer = vbHourglass
boolFormValidation = ValidateForm
If boolFormValidation = True Then
If boolAdd = True Then
boolSaveStatus = AddNewRec
' Else
' boolSaveStatus = UpdateExistingRec
End If
If boolSaveStatus = True Then
Call objOperationBtn.DisablingBtns("cmdSave,cmdUndo", frm)
Call
objOperationBtn.EnablingBtns("cmdAdd,cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cmd
Last", frm)
Call FlexGridGJ.HideInputBoxes
If boolAdd = True Then
Call objOperationBtn.GoLast
' Set rsTemp = objOperationBtn.ExternalRecordSet("Select * From FinancialYear")
Call InsertPanel
Frame2.Enabled = False
boolAdd = False
Else
Call objOperationBtn.BookMarkRec
End If
cboFague.Text = cboReference.Text
lblShowStatus.Left = 1440
lblShowStatus.Caption = "Record Saved"
cboFague.Visible = True
cboReference.Visible = False
FlexGridGJ.GridStatus = False
Else
lblShowStatus.Left = 1250
lblShowStatus.Caption = "Record Not Saved"
End If
End If
' If rsTemp.State = adStateOpen Then rsTemp.Close
' Set rsTemp = Nothing
Screen.MousePointer = vbDefault
End Sub

Private Function ValidateForm() As Boolean


' Dim rsTemp As ADODB.Recordset
' Dim value As Variant
' Dim intTemp As Integer
Dim intRow As Integer
Dim DebitValue As Double
Dim CreditValue As Double

If cboReference.Text = "" Then


MsgBox "Please fill the complete Form" & vbNewLine & "Reference Field is empty",
vbInformation, "Incomplete Form"
ValidateForm = False
Exit Function
ElseIf IsNumeric(cboReference.Text) Then
MsgBox "You cannot enter numbers in the Reference field", vbInformation, "Invalid
Value"
ValidateForm = False
Exit Function
End If
'intTemp = FlexGridGJ.CountPopulatedRowsOnGrid
For intRow = 1 To FlexGridGJ.Rows - 2
'value = FlexGridGJ.TextMatrix(intRow, 1)
If FlexGridGJ.TextMatrix(intRow, 1) = "" Then
MsgBox "Please fill the complete Form" & vbNewLine & "The Cell is empty at Row " &
intRow & " and Column " & 1, vbInformation, "Incomplete Form"
ValidateForm = False
Exit Function
End If
' value = FlexGridGJ.TakingValuesFromGrid(intRow, 3)
If FlexGridGJ.TextMatrix(intRow, 3) = "" Then
MsgBox "Please fill the complete Form" & vbNewLine & "The Cell is empty at Row " &
intRow & " and Column " & 2, vbInformation, "Incomplete Form"
ValidateForm = False
Exit Function
End If
' value = FlexGridGJ.TakingValuesFromGrid(intRow, 4)
If FlexGridGJ.TextMatrix(intRow, 4) = "" And FlexGridGJ.TextMatrix(intRow, 5) = ""
Then
MsgBox "Please fill the complete Form" & vbNewLine & "The Cell is empty at Row "
& intRow & " and either Column " & 3 & "or " & 4, vbInformation, "Incomplete Form"
ValidateForm = False
Exit Function
ElseIf Not FlexGridGJ.TextMatrix(intRow, 4) = "" And Not
FlexGridGJ.TextMatrix(intRow, 5) = "" Then
If Not FlexGridGJ.TextMatrix(intRow, 4) = 0 And Not FlexGridGJ.TextMatrix(intRow,
5) = 0 Then
MsgBox "In a Single Row either Debit or Credit Field can be filled", vbInformation,
"Additional Value Found"
ValidateForm = False
Exit Function
End If
End If
DebitValue = DebitValue + Val(FlexGridGJ.TextMatrix(intRow, 4))
CreditValue = CreditValue + Val(FlexGridGJ.TextMatrix(intRow, 5))
Next
If DebitValue <> CreditValue Then
MsgBox "Balance of Credit and Debit does not match" & vbNewLine & ".Difference is " &
Abs(DebitValue - CreditValue), vbExclamation, "Incorrect Balance"
ValidateForm = False
Exit Function
Else
' txtTotalDebit.Text = DebitValue
' txtTotalCredit.Text = CreditValue
End If
' Set rsTemp = objOperationBtn.ExternalRecordSet("Select * From FinancialYear")
' If dtDate.value >= rsTemp.Fields(1) And dtDate.value <= rsTemp.Fields(2) Then
If dtDate.value >= dtStartingDate And dtDate.value <= dtEndingDate Then
ValidateForm = True
Else
MsgBox "Please enter date in the range of Financial Year", vbInformation, "Invalid Date"
ValidateForm = False
End If
' rsTemp.Close
'Set rsTemp = Nothing
End Function

Private Sub cmdUndo_Click()


Call objOperationBtn.DoCancel(frm)
FlexGridGJ.GridStatus = False
Set rsDetail = objOperationBtn.BookMarkRec("GJournalID", "GJournalID", frm)
If boolAdd = True Or boolFind = True Then
FlexGridGJ.Clear
FlexGridGJ.Cols = 6
FlexGridGJ.Rows = 2
FlexGridGJ.RowHeight(0) = 420
FlexGridGJ.FormatString = "^S.No|^Account No.| Account Description |
Transaction Description |^ Debit |^ Credit "
If Not rsDetail Is Nothing Then
Call PopulateGrid
Else
If AdminLoginSucceeded = True Then Call objOperationBtn.EnablingBtns("cmdAdd",
frm)
End If
boolAdd = False
boolFind = False
End If
If AdminLoginSucceeded = True Then
Call objOperationBtn.DisablingBtns("cmdSave,cmdUndo", frm)
Call
objOperationBtn.EnablingBtns("cmdAdd,cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cmd
Last", frm)
Else
Call
objOperationBtn.EnablingBtns("cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cmdLast",
frm)
Call objOperationBtn.DisablingBtns("cmdUndo", frm)
End If
If cboFague.Visible = False Then
cboFague.Visible = True
cboReference.Visible = False
End If
Call FlexGridGJ.HideInputBoxes
lblShowStatus.Left = 1275
lblShowStatus.Caption = "Undo Last Action"
End Sub

Private Sub dtDate_GotFocus()


frmMDI.sbGeneral.Panels(1).Text = "Enter Date in the range of Fiscal Year"
End Sub

Private Sub dtDate_KeyUp(KeyCode As Integer, Shift As Integer)


If KeyCode = 13 Then
cboReference.SetFocus
End If
End Sub

Private Sub dtDate_LostFocus()


frmMDI.sbGeneral.Panels(1).Text = ""
End Sub
Private Sub FlexGridGJ_EnterCell()
'On Error GoTo errhandler
'Dim rsInternal As ADODB.Recordset
' Static boolTemp As Boolean
If FlexGridGJ.Col = 3 Then
frmMDI.sbGeneral.Panels(1).Text = "Enter Useful Description About Transaction"
ElseIf FlexGridGJ.Col = 4 Then
frmMDI.sbGeneral.Panels(1).Text = "Enter Debit Value"
ElseIf FlexGridGJ.Col = 5 Then
frmMDI.sbGeneral.Panels(1).Text = "Enter Credit Value"
DoEvents
Label6.Caption = "Press Enter to move to new Row"
End If
' frmMDI.sbGeneral.Panels(1).Text = "Select Account ID From Chart of Account"
' frmShowAccounts.Show vbModal
' FlexGridGJ.Col = 3
' ElseIf FlexGridGJ.Col = 2 Then
' FlexGridGJ.Col = 3
' End If
' Exit Sub
'errhandler:
' If Err.Number = 400 Then
' Err.Clear
' ' DoEvents
' End If
End Sub

Public Sub TakeAccountID(AccountID As Long)


Dim rsInternal As ADODB.Recordset
FlexGridGJ.TextMatrix(FlexGridGJ.Row, 1) = AccountID
If Not AccountID = 0 Then
Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From ChartOfAccount
Where AccountID=" & AccountID)
If Not rsInternal.EOF Then
' FlexGridGJ.Col = 2
FlexGridGJ.TextMatrix(FlexGridGJ.Row, 2) = rsInternal.Fields(1)
frmMDI.sbGeneral.Panels(1).Text = ""
End If
FlexGridGJ.TextMatrix(FlexGridGJ.Row, 3) = strDescription
End If
End Sub

Private Sub FlexGridGJ_HaveFocus()


If FlexGridGJ.Col = 1 Then
frmMDI.sbGeneral.Panels(1).Text = "Select Account ID From Chart of Account"
Label6.Caption = ""
frmShowAccounts.Show vbModal
FlexGridGJ.Col = 3
End If
End Sub

Private Sub FlexGridGJ_LostFocus()


frmMDI.sbGeneral.Panels(1).Text = ""
Label6.Caption = ""
End Sub

Private Sub FlexGridGJ_ValidateEntryInGrid(value As Variant, ColumnNumber As Integer)


' Dim boolValidateRec As Boolean
' Dim temp As Variant

If ColumnNumber = 3 Then
strDescription = value
ElseIf ColumnNumber = 4 Then
If IsNumeric(value) Or value = "" Then
txtTotalDebit.Text = Val(txtTotalDebit.Text) -
Val(FlexGridGJ.TextMatrix(FlexGridGJ.Row, 4))
txtTotalDebit.Text = Val(txtTotalDebit.Text) + Val(value)
If txtTotalDebit.Text = 0 Then
txtTotalDebit.Text = ""
End If
FlexGridGJ.AvoidMovingCtrl = False
Else
MsgBox "Please enter Numeric Value in this Column", vbInformation, "Invalid Value"
FlexGridGJ.AvoidMovingCtrl = True
End If
ElseIf ColumnNumber = 5 Then
If IsNumeric(value) Or value = "" Then
txtTotalCredit.Text = Val(txtTotalCredit.Text) -
Val(FlexGridGJ.TextMatrix(FlexGridGJ.Row, 5))
txtTotalCredit.Text = Val(txtTotalCredit.Text) + Val(value)
If txtTotalCredit.Text = 0 Then
txtTotalCredit.Text = ""
End If
FlexGridGJ.AvoidMovingCtrl = False
Else
MsgBox "Please enter Numeric Value in this Column", vbInformation, "Invalid Value"
FlexGridGJ.AvoidMovingCtrl = True
End If
End If
End Sub

Private Sub Form_Activate()


'Dim rsTemp As ADODB.Recordset
Set frm = Me
FlexGridGJ.Cols = 6
FlexGridGJ.RowHeight(0) = 420
FlexGridGJ.FormatString = "^S.No|^Account No.| Account Description |
Transaction Description |^ Debit |^ Credit "
FlexGridGJ.ColLoc = "txt3,txt4,txt5"
objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
'Set rsTemp = objOperationBtn.ExternalRecordSet("Select * From FinancialYear")
QryMaster = "Select * From GeneralJournal Where Dated >= '" & dtStartingDate & "' And
Dated <='" & dtEndingDate & "'"
QryDetail = "Select * From GeneralJournalDetail Where Dated >= '" & dtStartingDate & "'
And Dated <='" & dtEndingDate & "'"
Call objOperationBtn.OpeningRecordsets(QryMaster, QryDetail)
Call InsertPanel
If boolDeactivateWin = False Then
Set rsDetail = objOperationBtn.GoLast("GJournalID", "GJournalID", frm)
If Not rsDetail Is Nothing Then
Call PopulateGrid
If AdminLoginSucceeded = False Then
Call objOperationBtn.DisablingBtns("cmdAdd", frm)
End If
Else
If AdminLoginSucceeded = True Then
Call
objOperationBtn.DisablingBtns("cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cmdLast",
frm)
Else
Call
objOperationBtn.DisablingBtns("cmdAdd,cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cm
dLast", frm)
End If
End If
cboReference.AddItem "Cash Payment"
cboReference.AddItem "Bank Payment"
cboReference.AddItem "Cash Receipt"
cboReference.AddItem "Bank Receipt"
cboReference.AddItem "Journal Voucher"
Else
Call objOperationBtn.BookMarkRec
' Call FlexGridGJ.SettingCboAndFlexGridObj
If boolAdd = True Then FlexGridGJ.GridStatus = True
End If
End Sub
Private Sub InsertPanel()
Dim rsTemp As ADODB.Recordset
frmMDI.sbGeneral.Panels(2).ToolTipText = "No. of Vouchers Posted in Currend Fiscal Year"
Set rsTemp = objOperationBtn.ExternalRecordSet("Select Count(GJournalID) From
GeneralJournal Where Dated >= '" & dtStartingDate & "' And Dated <='" & dtEndingDate & "'")
If Not rsTemp.EOF Then
frmMDI.sbGeneral.Panels(2).Text = "Vouchers Posted : " & rsTemp.Fields(0)
Else
frmMDI.sbGeneral.Panels(2).Text = "Vouchers Posted : 0"
End If
End Sub

Private Sub Form_Deactivate()


boolDeactivateWin = True
Call objOperationBtn.SettingBookmark
Call FinishingTasks
End Sub

Private Sub Form_Load()


'Set objGrid = New PrjFlexGrid.clsFlexGrid
Set objOperationBtn = New prjControlPanel.clsControlPanel
End Sub

Private Sub Form_Unload(Cancel As Integer)


Call FinishingTasks
'Set objGrid = Nothing
Set objOperationBtn = Nothing
boolDeactivateWin = False
frmMDI.sbGeneral.Panels(2).Text = ""
frmMDI.mnuGJ.Enabled = True
Set frmGJ = Nothing
End Sub

Private Sub Label6_Click()

End Sub

Private Sub txtGJournalID_GotFocus()


Call objOperationBtn.FormatingInputBoxes("GJournalID", frm)
frmMDI.sbGeneral.Panels(1).Text = "Enter Valid Numeric General Journal ID"
End Sub

Private Sub txtGJournalID_KeyPress(KeyAscii As Integer)


If KeyAscii = 13 Then
If IsNumeric(txtGJournalID) Then
Screen.MousePointer = vbHourglass
Set rsDetail = objOperationBtn.FindingRec("GJournalID", "GJournalID",
txtGJournalID.Text, txtGJournalID.Text, frm)
If Not rsDetail Is Nothing Then
' Dim rsInternal As ADODB.Recordset
' Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From FinancialYear")
' rsDetail.Filter = adFilterNone
' rsDetail.Filter = "GJournalID = " & txtGJournalID.Text & " And Dated >= '" &
rsInternal.Fields(1) & "' And Dated <= '" & rsInternal.Fields(2) & "'"
Call PopulateGrid
If AdminLoginSucceeded = True Then
Call objOperationBtn.DisablingBtns("cmdSave,cmdUndo", frm)
Call
objOperationBtn.EnablingBtns("cmdAdd,cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cmd
Last", frm)
lblShowStatus.Left = 1365
lblShowStatus.Caption = "Record Found"
Else
Call
objOperationBtn.EnablingBtns("cmdFind,cmdPrint,cmdNext,cmdPrevious,cmd1st,cmdLast",
frm)
Call objOperationBtn.DisablingBtns("cmdUndo", frm)
lblShowStatus.Left = 1190
lblShowStatus.Caption = "Record Not Found"
End If
fraGJournalID.Enabled = False
End If
Screen.MousePointer = vbDefault
End If
End If
End Sub

Public Function AddNewRec() As Boolean


On Error GoTo errhandler
Dim intRow As Integer
Dim Values As String
Dim boolSaveValidation As Boolean

Call objOperationBtn.DeactivateRecordset
Call objOperationBtn.ClosingConnection
objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
Values = Val(txtGJournalID.Text)
Values = Values & ",'" & cboReference.Text & "'"
Values = Values & ",'" & dtDate.value & "'"
objOperationBtn.SettingTransStatus = prjControlPanel.Begin
boolSaveValidation = objOperationBtn.SaveRecThroughSql(prjControlPanel.Insert,
"GeneralJournal", "GJournalID,Reference,Dated", Values)
If boolSaveValidation = True Then
' intTemp = FlexGridGJ.CountPopulatedRowsOnGrid
boolSaveValidation = False
For intRow = 1 To FlexGridGJ.Rows - 2
Values = Val(txtGJournalID.Text)
Values = Values & "," & Val(FlexGridGJ.TextMatrix(intRow, 1))
Values = Values & ",'" & dtDate.value & "'"
Values = Values & ",'" & FlexGridGJ.TextMatrix(intRow, 3) & "'"
' If objGrid.TakingValuesFromGrid(intRow, 3) <> "" Then
' DebitNum = DebitNum + 1
' End If
' If objGrid.TakingValuesFromGrid(intRow, 4) <> "" Then
' CreditNum = CreditNum + 1
' End If
Values = Values & "," & VBA.Format(Val(FlexGridGJ.TextMatrix(intRow, 4)), ".00")
Values = Values & "," & VBA.Format(Val(FlexGridGJ.TextMatrix(intRow, 5)), ".00")
boolSaveValidation = objOperationBtn.SaveRecThroughSql(prjControlPanel.Insert,
"GeneralJournalDetail", "GJournalID,AccountID,Dated,TransactionDrescription,Debit,Credit",
Values)
If boolSaveValidation = False Then
objOperationBtn.SettingTransStatus = prjControlPanel.RollBack
Exit Function
End If
Next
boolSaveValidation = EntryInLedger(intRow, Values, boolSaveValidation)
If boolSaveValidation = True Then
objOperationBtn.SettingTransStatus = prjControlPanel.Commit
AddNewRec = True
End If
Else
objOperationBtn.SettingTransStatus = prjControlPanel.RollBack
End If
Exit Function
errhandler:
Call objOperationBtn.ErrHandlerProcedure
End Function

Public Function EntryInLedger(intRow As Integer, Values As String, boolSaveValidation As


Boolean) As Boolean
If boolAdd = True Then
For intRow = 1 To FlexGridGJ.Rows - 2
Values = Val(txtGJournalID.Text)
Values = Values & "," & Val(FlexGridGJ.TextMatrix(intRow, 1))
Values = Values & ",'" & dtDate.value & "'"
Values = Values & ",'" & cboReference.Text & "'"
Values = Values & ",'" & FlexGridGJ.TextMatrix(intRow, 3) & "'"
Values = Values & "," & VBA.Format(Val(FlexGridGJ.TextMatrix(intRow, 4)), ".00")
Values = Values & "," & VBA.Format(Val(FlexGridGJ.TextMatrix(intRow, 5)), ".00")
boolSaveValidation = objOperationBtn.SaveRecThroughSql(prjControlPanel.Insert,
"GeneralLedger",
"GJournalID,AccountID,Dated,Reference,TransactionDrescription,Debit,Credit", Values)
If boolSaveValidation = False Then
objOperationBtn.SettingTransStatus = prjControlPanel.RollBack
EntryInLedger = False
Exit Function
End If
Next
End If
EntryInLedger = True
End Function

Private Sub FinishingTasks()


Call objOperationBtn.ClosingRecordsets
Call objOperationBtn.ClosingConnection
' Call objGrid.SettingObjToNothing
Set frm = Nothing
End Sub

Private Sub PopulateGrid()


Dim intRow As Integer
Dim intCol As Integer
Dim rsInternal As ADODB.Recordset
Dim strVarHolder As String
intRow = 1
rsDetail.Sort = "Debit Desc"
If Not rsDetail.EOF Then dtDate.value = rsDetail.Fields(2)
Do While rsDetail.EOF = False
For intCol = 1 To 5
'If intCol < 6 Then
If intCol = 2 Then
Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From
ChartOfAccount Where AccountID=" & rsDetail.Fields(1))
If Not rsInternal.EOF Then
FlexGridGJ.TextMatrix(intRow, intCol) = rsInternal.Fields(1) ', False)
FlexGridGJ.TextMatrix(intRow, 1) = rsDetail.Fields(1)
End If
ElseIf intCol = 3 Then
If IsNull(rsDetail.Fields(intCol)) Then
strVarHolder = ""
FlexGridGJ.TextMatrix(intRow, intCol) = strVarHolder ', False)
Else
FlexGridGJ.TextMatrix(intRow, intCol) = rsDetail.Fields(intCol) ', False)
End If
ElseIf intCol = 4 Or intCol = 5 Then
If IsNull(rsDetail.Fields(intCol)) Or rsDetail.Fields(intCol) = 0 Then
strVarHolder = ""
FlexGridGJ.TextMatrix(intRow, intCol) = strVarHolder ', False)
Else
FlexGridGJ.TextMatrix(intRow, intCol) = rsDetail.Fields(intCol) ', False)
If intCol = 4 Then txtTotalDebit.Text = Val(txtTotalDebit.Text) +
Val(FlexGridGJ.TextMatrix(intRow, 4))
If intCol = 5 Then txtTotalCredit.Text = Val(txtTotalCredit.Text) +
Val(FlexGridGJ.TextMatrix(intRow, 5))
End If
Else
' If IsNull(rsDetail.Fields(intCol)) Or rsDetail.Fields(intCol) = 0 Then
' strVarHolder = ""
' FlexGridGJ.TextMatrix(intRow, intCol) = strVarHolder ', False)
' Else
' FlexGridGJ.TextMatrix(intRow, intCol) = rsDetail.Fields(intCol) ', False)
' End If
' ElseIf intCol = 5 Then
' If IsNull(rsDetail.Fields(intCol)) Then
' strVarHolder = ""
' Call FlexGridGJ.PopulateGrid(intRow, intCol, strVarHolder, True)
' Else
' Call FlexGridGJ.PopulateGrid(intRow, intCol, rsDetail.Fields(intCol), True)
End If

' End If
Next
intRow = intRow + 1
FlexGridGJ.Rows = FlexGridGJ.Rows + 1
rsDetail.MoveNext
Loop
'rsDetail.Filter = adFilterNone
Exit Sub
errhandler:
Call objOperationBtn.ErrHandlerProcedure
End Sub

Private Sub txtGJournalID_LostFocus()


txtGJournalID.BackColor = &H8000000B
frmMDI.sbGeneral.Panels(1).Text = ""
End Sub
11.5 FORM LOGIN

Option Explicit
Dim objOperationBtn As prjControlPanel.clsControlPanel

Private Sub cboUserName_GotFocus()


cboUserName.BackColor = QBColor(15)
End Sub

Private Sub cboUserName_LostFocus()


cboUserName.BackColor = RGB(253, 250, 227)
End Sub

Private Sub cmdCancel_Click()


'set the global var to false
'to denote a failed login
'AdminLoginSucceeded = False
End
End Sub

'Private Sub cmdChangePassword_Click()


' Dim rsInternal As Object
' Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From UserRights Where
UserName like '" & cboUserName.Text & "' And Password like '" & txtPassword.Text & "'")
' If Not rsInternal.EOF Then
' End If
' rsInternal.Close
' Set rsInternal = Nothing
'End Sub

Private Sub cmdOK_Click()


'check for correct password
Dim rsInternal As ADODB.Recordset
Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From UserRights")
If cboUserName.Text = "Guest" Then rsInternal.MoveNext
If IsNull(rsInternal.Fields(1)) Or rsInternal.Fields(1) = txtPassword.Text Then
frmMDI.mnuForms.Enabled = True
If cboUserName.Text = "Admin" Then
AdminLoginSucceeded = True
Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From FinancialYear")
If Not rsInternal.EOF Then rsInternal.MoveNext
If Not rsInternal.EOF Then
frmMDI.mnuCloseFiscalYear.Enabled = True
frmMDI.sbGeneral.Visible = True
dtStartingDate = rsInternal.Fields(1)
dtEndingDate = rsInternal.Fields(2)
frmMDI.sbGeneral.Panels(5).Text = "Fiscal Year:" & rsInternal.Fields(1) & " To " &
rsInternal.Fields(2)
Else
frmMDI.mnuLedger.Enabled = False
frmMDI.mnuTrialBalance.Enabled = False
frmMDI.mnuFinancialStatement.Enabled = False
frmMDI.mnuForms.Enabled = False
frmMDI.mnuFiscalYear.Enabled = True
End If
Else
AdminLoginSucceeded = False
End If
rsInternal.Close
Set rsInternal = Nothing
Unload Me
Else
MsgBox "Invalid Password, try again!", vbExclamation, "Wrong Password"
rsInternal.Close
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub

Private Sub Form_Load()


Set objOperationBtn = New prjControlPanel.clsControlPanel
objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
End Sub

Private Sub Form_Unload(Cancel As Integer)


Call objOperationBtn.ClosingConnection
Set objOperationBtn = Nothing
End Sub

Private Sub txtPassword_GotFocus()


txtPassword.BackColor = QBColor(15)
End Sub

Private Sub txtPassword_KeyPress(KeyAscii As Integer)


If KeyAscii = 13 Then cmdOK_Click
End Sub

Private Sub txtPassword_LostFocus()


txtPassword.BackColor = RGB(253, 250, 227)
End Sub
11.6 FORM MDI

Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)


End
End Sub

Private Sub mnuBalanceSheet_Click()


strRpt = "rptBalanceSheet"
Me.mnuBalanceSheet.Enabled = False
frmSetDate.Show vbModal
End Sub

Private Sub mnuCashFlow_Click()


strRpt = "rptCashFlow"
Me.mnuCashFlow.Enabled = False
frmSetDate.Show vbModal
End Sub

Private Sub mnuChangePassword_Click()


Me.mnuChangePassword.Enabled = False
frmChangePassword.Show
End Sub

Private Sub mnuCloseFiscalYear_Click()


Call ClosingFiscalYear
End Sub

Private Sub mnuCOA_Click()


mnuCOA.Enabled = False
frmCOA.Show vbModal
End Sub

Private Sub mnuCOAccount_Click()


mnuCOAccount.Enabled = False
strRpt = "rptCOA"
frmSetDate.Show vbModal
End Sub

Private Sub mnuExit_Click()


Unload Me
End Sub

Private Sub mnuFile_Click()


' Arrange vbTileVertical

' Arrange vbTileHorizontal


End Sub

Private Sub mnuFiscalYear_Click()


Me.mnuFiscalYear.Enabled = False
frmFiscalYear.Show
End Sub

Private Sub mnuGJ_Click()


Me.mnuGJ.Enabled = False
frmGJ.Show
End Sub

Private Sub mnuGJournal_Click()


strRpt = "rptGJDetail"
Me.mnuGJournal.Enabled = False
frmSetDate.Show vbModal
End Sub

Private Sub mnuIncomeStatement_Click()


strRpt = "rptIncomeStatement"
Me.mnuIncomeStatement.Enabled = False
frmSetDate.Show vbModal
End Sub

Private Sub mnuLedger_Click()


strRpt = "rptLedger"
Me.mnuLedger.Enabled = False
frmSetDate.Show vbModal
End Sub

'Private Sub mnuLogIn_Click()


' frmLogin.Show
' Me.mnuLogIn.Enabled = False
'End Sub

Private Sub mnuPR_Click()


' Me.mnuPR.Enabled = False
' strRpt = "rptEmpSalary"
' frmPrint.Show vbModal
End Sub

Private Sub mnuTrialBalance_Click()


strRpt = "rptTrialBalance"
Me.mnuTrialBalance.Enabled = False
frmSetDate.Show vbModal
End Sub
11.7 FORM SET DATE

Option Explicit
Dim Report As Object
Dim objOperationBtn As New prjControlPanel.clsControlPanel

Private Sub cmdPrint_Click()


'Dim rsInternal As ADODB.Recordset

Select Case strRpt


Case "rptLedger"
'Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From FinancialYear Where
StartingDate <= '" & dtDateFrom.value & "' And EndingDate >= '" & dtDateUpto.value & "'")
'If rsInternal.EOF = False Then
If dtDateFrom.value >= dtStartingDate And dtDateUpto.value <= dtEndingDate Then
Set Report = New crLedger
Call frmReportViewer.RepInit(Report)
Else
MsgBox "Please set Date with in the current Fiscal year range", vbInformation,
"Violating Fiscal Year Range"
End If
' rsInternal.Close
Case "rptGJDetail"
Set Report = New crGeneralJournalDetail
Call frmReportViewer.RepInit(Report)
Case "rptTrialBalance"
' Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From FinancialYear Where
StartingDate <= '" & dtDateFrom.value & "' And EndingDate >= '" & dtDateUpto.value & "'")
' If rsInternal.EOF = False Then
If dtDateFrom.value >= dtStartingDate And dtDateUpto.value <= dtEndingDate Then
Set Report = New crTrialBalance
Call frmReportViewer.RepInit(Report)
Else
MsgBox "Please set Date with in the current Fiscal year range", vbInformation,
"Violating Fiscal Year Range"
End If
' rsInternal.Close
Case "rptIncomeStatement"
' Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From FinancialYear Where
StartingDate <= '" & dtDateFrom.value & "' And EndingDate >= '" & dtDateUpto.value & "'")
' If rsInternal.EOF = False Then
If dtDateFrom.value >= dtStartingDate And dtDateUpto.value <= dtEndingDate Then
Set Report = New crIncomeStatement
Call frmReportViewer.RepInit(Report)
Else
MsgBox "Please set Date with in the current Fiscal year range", vbInformation,
"Violating Fiscal Year Range"
End If
' rsInternal.Close
Case "rptBalanceSheet"
' Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From FinancialYear Where
StartingDate <= '" & dtDateFrom.value & "' And EndingDate >= '" & dtDateUpto.value & "'")
' If rsInternal.EOF = False Then
If dtDateFrom.value >= dtStartingDate And dtDateUpto.value <= dtEndingDate Then
Set Report = New crBalanceSheet
Call frmReportViewer.RepInit(Report)
Else
MsgBox "Please set Date with in the current Fiscal year range", vbInformation,
"Violating Fiscal Year Range"
End If
'rsInternal.Close
Case "rptCashFlow"
' Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From FinancialYear Where
StartingDate <= '" & dtDateFrom.value & "' And EndingDate >= '" & dtDateUpto.value & "'")
' If rsInternal.EOF = False Then
If dtDateFrom.value >= dtStartingDate And dtDateUpto.value <= dtEndingDate Then
Set Report = New crCashFlowStatement
Call frmReportViewer.RepInit(Report)
Else
MsgBox "Please set Date with in the current Fiscal year range", vbInformation,
"Violating Fiscal Year Range"
End If
Case "rptCOA"
If dtDateFrom.value >= dtStartingDate And dtDateUpto.value <= dtEndingDate Then
Set Report = New crCOADetail
Call frmReportViewer.RepInit(Report)
Else
MsgBox "Please set Date with in the current Fiscal year range", vbInformation,
"Violating Fiscal Year Range"
End If
' rsInternal.Close
End Select
Unload Me
End Sub

Private Sub Form_Activate()


Dim rsInternal As ADODB.Recordset
Set rsInternal = objOperationBtn.ExternalRecordSet("Select * From FinancialYear")
If Not rsInternal.EOF Then
dtDateFrom = rsInternal.Fields(1)
dtDateUpto = rsInternal.Fields(2)
End If

' Load frmReportViewer


' Set Report = New crLedger
' If frmMDI.mnuGJournal.Enabled = False Then
' Call frmReportViewer.RepInit(Report, , "rptLedger")
End Sub

Private Sub FinishingTasks()


Call objOperationBtn.ClosingConnection
Set objOperationBtn = Nothing
End Sub

Private Sub Form_Deactivate()


' Call FinishingTasks
End Sub

Private Sub Form_Load()


'dtDateUpto.value = Date
'dtDateFrom.value = DateSerial(Year(Now), Month(Now), 1)
Select Case strRpt
Case "rptCOADetail"
Me.Caption = "Chart Of Account Report"
Case "rptLedger"
Me.Caption = "GL Report"
Case "rptGJDetail"
Me.Caption = "General Journal Detail Report"
Case "rptTrialBalance"
Me.Caption = "Trial Balance Report"
Case "rptIncomeStatement"
Me.Caption = "Income Statement Report"
Case "rptBalanceSheet"
Me.Caption = "Balance Sheet Report"
Case "rptCashFlow"
Me.Caption = "Cash Flow Statement Report"
Case "rptGJ"
Me.Caption = "General Journal Report"
End Select
objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
End Sub

Private Sub Form_Unload(Cancel As Integer)


Select Case strRpt
Case "rptCOA"
frmMDI.mnuCOAccount.Enabled = True
Case "rptLedger"
frmMDI.mnuLedger.Enabled = True
Case "rptGJDetail"
frmMDI.mnuGJournal.Enabled = True
Case "rptTrialBalance"
frmMDI.mnuTrialBalance.Enabled = True
Case "rptIncomeStatement"
frmMDI.mnuIncomeStatement.Enabled = True
Case "rptBalanceSheet"
frmMDI.mnuBalanceSheet.Enabled = True
Case "rptCashFlow"
frmMDI.mnuCashFlow.Enabled = True
End Select
Call FinishingTasks
'DoEvents
End Sub

11.8 FORM SHOW ACCOUNTS

Option Explicit
Dim bCOA As Boolean
Dim objOperationBtn As prjControlPanel.clsControlPanel
Dim rsDetail As ADODB.Recordset

Private Sub cmdNewHead_Click()


bCOA = True
Unload Me
' DoEvents
' frmCOA.tabCOA.Tab = 0

End Sub

Private Sub cmdViewAll_Click()


Call PopulateGrid
End Sub

Public Sub PopulateGrid()


Dim intRow As Integer
Dim intCol As Integer
Dim strVarHolder As String
intRow = 1
FlexGridShowAccounts.Clear
FlexGridShowAccounts.Rows = 2
FlexGridShowAccounts.Cols = 4
FlexGridShowAccounts.RowHeight(0) = 420
FlexGridShowAccounts.FormatString = "^ S.No |^Account No.| Account Description
| Account Type "
Do While rsDetail.EOF = False
For intCol = 0 To 2
If intCol < 2 Then
If intCol = 0 Then FlexGridShowAccounts.TextMatrix(intRow, intCol) = intRow
If IsNull(rsDetail.Fields(intCol)) Then
strVarHolder = ""
FlexGridShowAccounts.TextMatrix(intRow, intCol + 1) = strVarHolder
Else
FlexGridShowAccounts.TextMatrix(intRow, intCol + 1) = rsDetail.Fields(intCol)
End If
Else
If IsNull(rsDetail.Fields(intCol)) Then
strVarHolder = ""
FlexGridShowAccounts.TextMatrix(intRow, intCol + 1) = strVarHolder
Else
FlexGridShowAccounts.TextMatrix(intRow, intCol + 1) = rsDetail.Fields(intCol)
End If
End If
Next
intRow = intRow + 1
FlexGridShowAccounts.Rows = FlexGridShowAccounts.Rows + 1
rsDetail.MoveNext
Loop
rsDetail.MoveFirst
Exit Sub
errhandler:
Call objOperationBtn.ErrHandlerProcedure
End Sub

Private Sub FlexGridShowAccounts_dblClick()


Dim Val As Long
Val = FlexGridShowAccounts.TextMatrix(FlexGridShowAccounts.Row, 1)
Call frmGJ.TakeAccountID(Val)
Unload Me
End Sub

Private Sub Form_Load()


Set objOperationBtn = New prjControlPanel.clsControlPanel
objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
Set rsDetail = objOperationBtn.ExternalRecordSet("Select * From ChartOfAccount Order by
AccountId")
' Me.Top = Screen.Height / 4
' Me.Left = Screen.Width / 5.5
Call PopulateGrid
End Sub

Private Sub Form_Unload(Cancel As Integer)


Set objOperationBtn = Nothing
Set rsDetail = Nothing
Set frmShowAccounts = Nothing
frmMDI.sbGeneral.Panels(1).Text = ""
If bCOA = True Then
frmCOA.Show vbModal
Set frm = frmGJ
End If
End Sub

Private Sub txtFindAccountID_GotFocus()


txtFindAccountID.BackColor = vbWhite
frmMDI.sbGeneral.Panels(1).Text = "Select Account ID From Chart of Account"
End Sub

Private Sub txtFindAccountID_KeyUp(KeyCode As Integer, Shift As Integer)


Dim i As Long
Dim intRow As Integer

If KeyCode = 13 Then
If objOperationBtn.VarifyFindingRec("ChartOfAccount", "AccountId",
txtFindAccountID.Text) = True Then
Call frmGJ.TakeAccountID(txtFindAccountID.Text)
Unload Me
End If
End If
If IsNumeric(txtFindAccountID.Text) Then
'Dim rsDetail As ADODB.Recordset
'Set rsDetail = objoperationbtn.TakeRsDetail
' Set rsDetail = objOperationBtn.ExternalRecordSet("Select * From ChartOfAccount")
i = Len(txtFindAccountID.Text)
If Not rsDetail.EOF Then
rsDetail.MoveFirst
FlexGridShowAccounts.Clear
FlexGridShowAccounts.Rows = 2
FlexGridShowAccounts.Cols = 4
FlexGridShowAccounts.RowHeight(0) = 420
FlexGridShowAccounts.FormatString = "^ S.No |^Account No.| Account
Description | Account Type "
Do While Not rsDetail.EOF
If Left$(rsDetail.Fields(0), i) = txtFindAccountID.Text Then
intRow = intRow + 1
FlexGridShowAccounts.Rows = FlexGridShowAccounts.Rows + 1
FlexGridShowAccounts.TextMatrix(intRow, 0) = intRow
FlexGridShowAccounts.TextMatrix(intRow, 1) = rsDetail.Fields(0)
FlexGridShowAccounts.TextMatrix(intRow, 2) = rsDetail.Fields(1)
FlexGridShowAccounts.TextMatrix(intRow, 3) = rsDetail.Fields(2)
End If
rsDetail.MoveNext
Loop
rsDetail.MoveFirst
' Call PopulateGrid(rsDetail)
Else
FlexGridShowAccounts.Clear
FlexGridShowAccounts.Cols = 4
FlexGridShowAccounts.RowHeight(0) = 420
FlexGridShowAccounts.FormatString = "^ S.No |^Account No.| Account
Description | Account Type "
End If
End If
If KeyCode = 27 Then Unload Me
End Sub

Private Sub txtFindAccountID_LostFocus()


txtFindAccountID.BackColor = &H80000018
End Sub

11.9 FORM SPLASH

Option Explicit

Private Sub Form_Load()


' lblProjectName.Caption = strProjectName
' lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision
' lblProductName.Caption = UCase(App.Title)
End Sub

Private Sub Timer1_Timer()


If pBar.value = 600 Then
frmMDI.Show
Unload Me
frmLogin.Show vbModal
Me.Timer1 = False
Exit Sub
End If
If pBar.value = 500 Then frmLogin.cboUserName.Text = "Admin"
Timer1.Interval = Timer1.Interval + 100
pBar.value = Timer1.Interval - 100
End Sub

11.10 MODULES GENERALIZE

Option Explicit
Public frm As Object
Public AdminLoginSucceeded As Boolean
Public strRpt As String
Public QryMaster As String
Public QryDetail As String
'Public strDSN As String
Public dtStartingDate As Date
Public dtEndingDate As Date
'Public strProjectName As String

Private Sub Main()


On Error GoTo errhandler
' Dim i As Integer
' Dim rsTemp As New ADODB.Recordset
' Dim objOperationBtn As New prjControlPanel.clsControlPanel
' Dim intLimit As Integer
' ' Dim bFileExist As Boolean
' ' Set objOperationBtn = New prjControlPanel.clsControlPanel
'
'' bFileExist = FileExists(App.Path & "\Database\Important File.txt")
'' If bFileExist = True Then
'' If FileLen(App.Path & "\Database\Important File.txt") > 0 Then
'' Open App.Path & "\Database\Important File.txt" For Input As #1
'' Input #1, strDSN
'' Close 1
'' Else
'' intLimit = 3
'' For i = 1 To intLimit
'' strDSN = InputBox("Please enter DSN name that you made in control panel", "DSN
Not Found", "DSN Name")
'' If Not strDSN = "" Then
'' Open App.Path & "\Database\Important File.txt" For Output As #1
'' Print #1, strDSN
'' Close 1
'' Exit For
'' Else
'' If MsgBox("Please enter a valid DSN Name", vbInformation + vbOKCancel,
"Invalid DSN Name") = vbCancel Then End
'' 'intLimit = intLimit + 1
'' If i = 3 Then End
'' End If
'' Next
'' End If
'' End If
' objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
' 'objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
' Set rsTemp = objOperationBtn.ExternalRecordSet("Select * From ProjectInformation")
' If rsTemp.EOF Then
' intLimit = 3
' For i = 1 To intLimit
' strProjectName = InputBox("Please enter Project name", "Enter Project Name", "Project
Name")
' If strProjectName = "" Then
' If MsgBox("Please enter a valid Project Name", vbInformation + vbOKCancel,
"Invalid Project Name") = vbCancel Then End
' If i = 3 Then End
' Else
' Call objOperationBtn.SaveRecThroughSql(prjControlPanel.Insert,
"ProjectInformation", , "'" & strProjectName & "'")
' Call objOperationBtn.ClosingConnection
' Exit For
' End If
' Next
' Else
' strProjectName = rsTemp.Fields(0).value
' End If
frmSplash.Show
' Set objOperationBtn = Nothing
Exit Sub
errhandler:
MsgBox Err.Description
Err.Clear
End Sub

Private Function FileExists(filename As String) As Boolean


On Error Resume Next
FileExists = (Dir$(filename) <> "")
End Function

Public Sub ClosingFiscalYear()


On Error GoTo errhandler
Dim objOperationBtn As prjControlPanel.clsControlPanel
Dim rsTemp As ADODB.Recordset
Dim SQL As String
Dim Values As String
Dim dtStartingDate As String
'Dim dtClosingDate As String
Dim msg As Variant
Dim dtFiscalYearClosingDate As String

msg = MsgBox("Are you sure you want to close a year?", vbYesNo + vbExclamation,
"Closing Year")
If msg = vbYes Then
Set objOperationBtn = New prjControlPanel.clsControlPanel
objOperationBtn.MakingConnection ("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Habib Bank Accounts")
Screen.MousePointer = vbHourglass
Set rsTemp = objOperationBtn.ExternalRecordSet("Select * From FinancialYear")
dtStartingDate = rsTemp.Fields(1)
dtFiscalYearClosingDate = rsTemp.Fields(2)
rsTemp.Close
Set rsTemp = Nothing
SQL = "SELECT SUM(GeneralLedger.Debit)-
SUM(GeneralLedger.Credit),ChartOfAccount.AccountID FROM ChartOfAccount INNER JOIN
GeneralLedger ON ChartOfAccount.AccountID = GeneralLedger.AccountID Where
GeneralLedger.Dated >= '" & dtStartingDate & "' And GeneralLedger.Dated <= '" &
dtFiscalYearClosingDate & "' GROUP BY ChartOfAccount.AccountID "
Set rsTemp = objOperationBtn.ExternalRecordSet(SQL)
' dtClosingDate = InputBox("Please enter Closing Date", "Enter Date", Date)
' If Not IsDate(dtClosingDate) Then
' MsgBox "Please enter correct Date VBA.Format", vbInformation, "Invalid Date
VBA.Format"
' Screen.MousePointer = vbDefault
' Exit Sub
' End If
Do While rsTemp.EOF = False
'Balance = rsTemp.Fields(0) - rsTemp.Fields(1)
Values = 0
Values = Values & "," & rsTemp.Fields(1)

Values = Values & ",'" & dtFiscalYearClosingDate & "'"


Values = Values & ",''"
Values = Values & ",'" & "Balance c/d" & "'"
If rsTemp.Fields(0) > 0 Then
Values = Values & "," & 0
Values = Values & "," & rsTemp.Fields(0)
ElseIf rsTemp.Fields(0) < 0 Then
Values = Values & "," & Abs(rsTemp.Fields(0))
Values = Values & "," & 0
End If
If rsTemp.Fields(0) <> 0 Then Call
objOperationBtn.SaveRecThroughSql(prjControlPanel.Insert, "GeneralLedger", , Values)
rsTemp.MoveNext
Loop
rsTemp.Close
Set rsTemp = Nothing
Call objOperationBtn.SaveRecThroughSql(prjControlPanel.Delete, "FinancialYear", , ,
"FinancialYearID", 1)
Call objOperationBtn.ClosingConnection
Set objOperationBtn = Nothing
Screen.MousePointer = vbDefault
MsgBox "This program will now be exit" & vbNewLine & "Please run the program again if
you want to start another year", vbInformation + vbOKOnly, "Closing the Application"
End
End If
Exit Sub
errhandler:
MsgBox Err.Description
End Sub
CHAPTER TWELVE
PROJECT SCHEDULING

The following tasks were divided among the ywo group members in the following ways.

Activities Time taken Performed By

Nov 2004-Mar2005 May2005-Jul2005

High level analysis Both team


members
Selection of Maria , Sadaf
hardware platform
Installation and //////
commissioning of
hardware
Detailed analysis of //////
core modules
Programming of maria
core modules
Programming of maria
supporting
modules
Development of sadaf
accounting
reporting
.Documentation sadaf
Slide preparation Maria N Sadaf
Final Presentation //////
REFERENCES

Websites consulted:

http://www.me.umn.edu/courses/me4054/assignments/gantt.pdf
http://www.netmba.com/operations/project/gantt/
http://www.netmba.com/operations/project/pert/

Search Engines Consulted:

www.google.com.pk
www.yahoo.com
www.cisco.com
BIBLIOGRAPHY

Ian Somerville. Software Engineering. Lancaster 2000

D Budgen : Softawre Design

C. J. Date: An Introduction to Database Systems, 6th Edition. Addison-

Wesley 1995
GLOSSARY

account: An accounting record in which the results of transactions are accumulated; shows
increases, decreases, and a balance.

accounting: A service activity designed to accumulate, measure, and communicate financial


information about economic entities for decision-making purposes.

accounting cycle: The procedures for analyzing, recording, classifying, summarizing, and
reporting the transactions of a business.

accounting model: The basic accounting assumptions, concepts, principles, and procedures that
determine the manner of recording, measuring, and reporting an entity's transactions.

accounting system: The set of manual and computerized procedures and controls that provide
for identifying relevant transactions or events; preparing accurate source documents, entering
data into the accounting records accurately, processing transactions accurately, updating master
files properly, and generating accurate documents and reports.

account payable: An amount owed to a supplier for good or services purchased on credit;
payment is due within a short time period, usually 30 days or less.

account receivable: A current asset representing money due for services performed or
merchandise sold on credit.

accrued liabilities: Liabilities that arise through adjusting entries when accounting for
unrecorded liabilities.

accumulated depreciation: The total depreciation recorded on an asset since its acquisition; a
contra account deducted from the original cost of an asset on the balance sheet.

acid-test ratio (or quick ratio): A measure of a firm's ability to meet current liabilities; more
restrictive than the current ratio, it is computed by dividing net quick assets (all current assets,
except inventories and prepaid expenses) by current liabilities.

annual report: A document that summarizes the results of operations and financial status of a
company for the past year and outlines plans for the future.
annuity: A series of equal amounts to be received or paid at the end of equal time intervals.

assets: Economic resources that are owned or controlled by an entity.

audit: The result of an independent accountant's review of the statements and footnotes to ensure
compliance with generally accepted accounting principles and to render an opinion on the
fairness of the financial statements.

audit report: A report issued by an independent CPA that expresses an opinion about whether
the financial statements present fairly a company's financial position, operating results, and cash
flows in accordance with generally accepted accounting principles.

authorized stock: The amount and type of stock that may be issued by a company, as specified
in its articles of incorporation.

available-for-sale securities: Debt and equity securities not classified as trading, held-to-
maturity, or equity method securities.  

bad debt: An uncollectible account receivable.

balance sheet (statement of financial position): The financial statement that shows the assets,
liabilities, and owners' equity of an entity at a particular date.

bank reconciliation: The process of systematically comparing the cash balance as reported by
the bank with the cash balance on the company's books and explaining any differences.

basket purchase: The purchase of two or more assets acquired together at a single price.

book value: The net amount shown in the accounts for an asset, liability, or owners' equity item.

business: An organization operated with the objective of making a profit from the sale of goods
or scalendar year: An entity's reporting year, covering 12 months and ending on December 31.

capital: The total amount of money or other resources owned or used to acquire future income or
benefits.

capital account: An account in which a proprietor's or partner's interest in a firm is recorded; it


is increased by owner investments and net income and decreased by withdrawals and net losses.

capital expenditure: An expenditure that is recorded as an asset because it is expected to benefit


more than the current period.
capital gain: The excess of the selling price over the cost basis when assets, such as securities
and other personal and investment assets, are sold.

capital lease: A leasing transaction that is recorded as a purchase by the lessee.

capital stock: The portion of a corporation's owners' equity contributed by investors (owners) in
exchange for shares of stock.

cash: Coins, currency, money orders, checks, and funds on deposit with financial institutions;
the most liquid of assets.

cash-basis accounting: A system of accounting in which transactions are recorded and revenues
and expenses are recognized only when cash is received or paid.

chart of accounts: A systematic listing of all accounts used by a company.

charter (articles of incorporation): A document issued by a state that gives legal status to a
corporation and details its specific rights, including the authority to issue a certain maximum
number of shares of stock.

classified balance sheet: A balance sheet in which assets and liabilities are subdivided into
current and noncurrent categories.

comparative financial statements: Financial statements in which data for two or more years are
shown together.

consolidated financial statements: Statements that report the combined operating results,
financial position, and cash flows of two or more legally separate but affiliated companies as if
they were one economic entity.

contingent liability: A potential obligation, dependent upon the occurrence of future events.

credit: An entry on the right side of the account.

current (or working capital) ratio: A measure of the liquidity of a business; equal to current
assets divided by current liabilities.  

date of record: The date selected by a corporation's board of directors on which the shareholders
of record are identified as those who will receive dividends.

debit: An entry on the left side of an account.

deduction: Business expenses or losses that are subtracted from gross income in
benefited.

discounting a note receivable: The process of the payee's selling notes to financial institution
for less than the maturity value.

fair market value: The current value of an asset, e.g., the amount at which an asset could be
sold or purchased in an arm's-length transaction.

financial accounting: The area of accounting concerned with reporting financial information to
interested external parties.

financial statements: Reports such as the balance sheet, income statement, and statement of
cash flows, which summarize the financial status and results of operations of a business entity.

financing activities: Transactions and events whereby resources are obtained from, or repaid to,
owners (equity financing) and creditors (debt financing).

fiscal year: An entity's reporting year, covering a 12 month accounting period.

floor: The minimum market amount at which inventory can be carried on the books; equal to net
realizable value minus a normal profit.

journal: An accounting record in which transactions are first entered; provides a chronological
record of all business activities.

journal entry: A recording of a transaction where debits equal credits; usually includes a date
and an explanation of the transaction.

LCM (lower cost or market): A basis for valuing certain assets at the lower of original cost or
current market value.

lease: A contract that specifies the terms under which the owner of an asset (the lessor) agrees to
transfer the right to use the asset to another party (the lessee).

ledger: A book of accounts in which data from transactions recorded in journals are posted and
thereby classified and summarized.

legal capital: The amount of contributed capital not available for dividends; usually equal to the
par or stated value of outstanding capital stock.

liabilities: Obligations measurable in monetary terms that represent amounts owed to creditors,
governments, employees, and other parties.

license: The right to perform certain activities, generally granted by a governmental


long-term liabilities: Debts or toher obligations that will not be paid within one year.

losses: Costs that provide no benefit to an organization.

loss per share: The amount of net loss related to each share of stock; computed by dividing net
loss by a number of shares of common stock outstanding during the period.

natural resources: Assets that are physically consumed or waste away, such as oil, minerals,
gravel, and timber.

net assets (owners' equity): The ownership interest in the assets of an entity; equal total assets
minus total liabilities.

net income (or net loss): A measure of the overall performance of a business entity; equal to
revenues minus expenses for the period.

operating assets: Long-term, or noncurrent, assets acquired for use in the business rather than
for resale; includes property, plant, and equipment; intangible assets; and natural resources.

operating lease: A simple rental agreement.

owners' equity (net assets): The ownership interest in the assets of an entity; equal total assets
minus total liabilities.  

realized gains and losses: Gains and losses resulting from the sale of securities in an arm's
length transaction.

receivables: Claims for money, goods, or services.

revenues: Increases in a company's resources from the sale of goods or services.

transactions: Exchange of goods or services between entities (whether individuals, businesses,


or other organizations), as well as other events having an economic impact on a business.

transportation costs: Costs of transferring merchandise into or out of a firm.

treasury stock: Issued stock that has subsequently been reacquired by the corporation.

trial balance: A listing of all account balances; provides a means of testing whether total debits
equal total credits for all accounts.  

work sheet: A columnar schedule used to summarize accounting data.

working capital: Current assets minus current liabilities.


working capital turnover: A measure of the amount of working capital used in generating the
sales of a period; computed by dividing net sales by average working capital.  

You might also like