A view on voucher input module in accounting software

Source: Internet
Author: User
Tags integer key words reference table name variable

A view on voucher input module in accounting software

Wuhan Huazhong Normal University letter pipe system Thank anti-trust mechanisms

Summary:

The production and processing of vouchers is the most important part of accounting work, especially for the accounting computerization, it seems more important, the application software to achieve the traditional accounting process, vouchers are all the basis for all other processing. Without the voucher there is nothing behind the accounting software. And as far as the voucher is concerned, the most important basis is the input of the voucher. And the entry of the voucher is the first step is to determine the voucher number, in the accounting software should try to avoid manual to get the voucher number, can be implemented by the program to automatically obtain the voucher number, because the previous said that the voucher number is not allowed to be wrong. This article discusses the process of obtaining voucher numbers in the following discussion. Using development tools: PowerBuilder8.0 + MS sql-server2000



Key words:

Accounting software voucher input voucher number PowerBuilder8.0 sql-server2000



Body:



A The discussion of traditional methods:

Through the investigation and analysis of the voucher input module in the domestic accounting software, it is found that most of the voucher input module of the software is basically consistent with the method used in voucher number acquisition. Use the following methods:

Before a new voucher is entered, you must first determine the voucher number for this voucher. The general practice is: by the program Check PPK (Day library) records. If you find a record inside, take the voucher number for the last record. Plus 1 is the number of the voucher that is being entered; if there is no record in the PPK library (stating that the voucher you are preparing to enter is the first voucher for this working day), you must access the POK&RQ (monthly library) record, If you find a record inside, similarly, the voucher number for the last record, plus 1, is the voucher number for the voucher being entered; if there is no record in the Pok library, it is the first working day of the month (but it is only 12 times a year).



Two Experience in personal design process:

When I personally design the voucher input program (with PowerBuilder + MS sql-server2000 design), I found that the above method is implemented in language with the following deficiencies:

First: In code design and maintenance of the time is not convenient,

Second: More important is the continuity of the voucher number is not convenient, such as: From the payroll module turned over the payroll voucher will have to use a new voucher mechanism to store these vouchers,

Third: There is a waste of a lot of system resources, such as every time you add a voucher to move a large number of database records, especially at the beginning of the first working day, at the end of the month also face the same problem (month to month, the table more than a month, the number of mobile more than a

Therefore, I in the actual design process, groped out a kind of new idea to solve this problem, can solve the above three problems very well, feel this thought need to come out and discuss together, concrete realization thought is as follows:

First: Create another new datasheet (table name HQPZBH):

Field names are: Id,pzbh, the field properties are: Integer,char type. Set up to attach a set of values (preferably with the program to attach value). The ID field is attached to the 1,PZBH field of 0000 (select the number of digits, such as 000000, according to the specific requirements).

Use the program implementation code as follows (for reference only, according to the specific programming language transformation form):

(The connection database statement is omitted to the same below)

Insert into HQPZBH (HQPZBH.ID,HQPZBH.PZBH)

Values (1,0000);

Second: The idea of getting the voucher number each time before entering a new voucher:

The data table HQPZBH always has only one record, the ID is always 1,PZBH is the number of the last voucher that is always inside the library. Each time the input voucher gets the voucher number, accesses the data table, reads the value of the Pzbh field in the table, plus 1 is OK.

The code implemented by the program is as follows (for reference):

Integer NOWPZBH (defines a variable that stores the voucher number of the voucher to be entered)

Gets the value of the Pzbh field in the table HQPZBH and places it in the NOWPZBH variable

Select HQPZBH.PZBH

Into:nowpzbh

From HQPZBH

where hqpzbh.id=1;

Note: There is always a single record in this table

NOWPZBH = nowpzbh+1

This value becomes the voucher number for the voucher that is about to be entered since 1.

Third: Ensure that the value of the Pzbh field in the datasheet HQPZBH is always the number of the last voucher.

Then we require each voucher entered and tested to save the same time, use this voucher number to replace the data table HQPZBH inside the original PZBH field value.

The code implemented by the program is as follows (for reference):

Suppose the variable that stores the voucher number for the voucher that you just saved is NOWPZBH

Update HQPZBH

Set HQPZBH.PZBH=:NOWPZBH

where hqpzbh.id=1;

There is only one record in the table. and the value of its ID field is always 1



Third, summary

I think this method is better to understand and implement, the design and maintenance of code is also more convenient. At the same time, the processing of those special vouchers is also very convenient, for example: The automatic transfer of payroll vouchers to the voucher library is no longer necessary to use the traditional software of the "specific section of the voucher number" mode. You can realize the true meaning of the voucher number in the voucher library continuously. There is a large amount of data in the database, this approach is quite dominant, because it only needs to access a voucher per two database data table, more importantly, the data table has only one piece of data, access does not need any time to move. Avoid the traditional way of finding the voucher number (especially the first working day of the month and the large movement of the data at the beginning of the week). Greatly saves the time and space overhead of accessing the database.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.