Some Opinions on the credential input module in Accounting Software

Source: Internet
Author: User

Some Opinions on the credential input module in Accounting Software

Xie gang, Department of Information Management, Huazhong Normal University, Wuhan

Abstract:

The preparation and handling of creden is the most important part in accounting work. Especially for accounting computerization, it is more important to use software to implement the traditional accounting process, creden are the basis for all other processes. Without a credential, there will be nothing behind the accounting software. For the credential, the most basic and important is the credential input. The first step in credential input is to determine the credential Number of the Credential. In the accounting software, we should try to avoid manual access to the credential number, the program should automatically obtain the credential number for all the software that can be implemented, because as mentioned earlier, the credential number cannot be incorrect. This article discusses how to obtain the credential number. Use development tools: powerbuilder8.0 + MS SQL-Server2000

 

Keywords:

Enter the credential number for the accounting software credentialPowerbuilder8.0

 SQL-Server2000

 

Body:

1. Traditional methods:

Based on the investigation and analysis of the Credential input module in accounting software in China, it is found that the credential input module of most software basically uses the same method to obtain the credential number. The usage is as follows:

Before entering a new credential, you must first confirm the credential number for this credential. Generally, the program checks the PPK (daily database) records. If there is a record in it, take the credential Number of the last record, and Add 1 to the ID of the credential to be entered; if no records are recorded in the PPK database (This credential is the first credential of the current working day), you must access the records of Pok & RQ (monthly database of the current month, if a record is found, the credential Number of the last record is also obtained, and 1 is the credential Number of the prepared credential. If there is no record in the Pok library, it indicates that this day is the first business day of the beginning of the month (but this case is only 12 times a year ).

 

2. Experience in the design process:

I personally design the credential Input Program (with Powerbuilder + MS SQL-Server2000 design), found that the above method with language implementation has the following shortcomings:

First, it is inconvenient for code design and maintenance,

Second, it is more important that the continuity of the Credential numbers is inconvenient. For example, the salary creden transferred from the wage module have to use a new credential mechanism to store these creden,

Third, there is a waste of system resources, such as moving a large number of database records every time you add creden, especially the first business day at the beginning of the month, at the end of the month, the same problem is also encountered (from month to month, the table has more records than month, and the number of moves is more than month ).

Therefore, in the actual design process, I found a new way to solve this problem, which can solve the above three problems well, I think this idea is necessary to discuss with you. The specific implementation ideas are as follows:

1. Create another data table (table name: hqpzbh ):

The field names are ID and pzbh respectively, and the field attributes are integer and char. Create a set of values (it is best to use a program to attach values ). The ID field has a value of 1, and the pzbh field is 0000 (select the number of digits as required, such as 000000 ).

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

(The database connection statement is omitted, the same as below)

Insert into hqpzbh (hqpzbh. ID, hqpzbh. pzbh)

Values (1,0000 );

Second, the idea of getting the credential number before entering a new credential each time:

There is always only one record in the data table hqpzbh, And the ID is always 1. pzbh is always the number of the last credential in the database. Access this data table every time you enter the credential to obtain the credential number, read the pzbh field value in the table, and Add 1 to it.

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

Integer nowpzbh; (defines the variable that stores the credential Number of the credential to be entered)

// Obtain the value of the pzbh field in the hqpzbh table and place it in the nowpzbh variable

Select hqpzbh. pzbh

Into: nowpzbh

From hqpzbh

Where hqpzbh. ID = 1;

// Note: This table always has only one record

Nowpzbh = nowpzbh + 1

// This value becomes the credential Number of the credential to be entered after being added with 1

Third, ensure that the pzbh field value in the hqpzbh data table is always the ID of the last credential.

Therefore, we must use this credential number to replace the original pzbh field value in the hqpzbh data table when each credential is input and verified and saved.

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

Assume that the variable for storing the credential Number of the saved credential is nowpzbh

Update hqpzbh

Set hqpzbh. pzbh =: nowpzbh

Where hqpzbh. ID = 1;

// There is only one record in the table. And the value of the ID field is always 1

 

Iii. Summary

I think this method is easy to understand and implement, and it is also convenient to design and maintain code. At the same time, it is extremely convenient to handle those special creden. For example, when the salary creden are automatically transferred to the credential library, it is unnecessary to use the "credential number for specific sections" method of the traditional software. The real continuity of the Credential numbers in the credential library can be achieved. There is also a large amount of data in the database, this method is quite dominant, because each input a credential only needs to access the secondary database data table, more importantly, this data table only has one data, no movement time is required during access. This avoids the traditional way of searching for Credential numbers (especially the first working day at the beginning of the month and the large amount of data at the end of the month ). This greatly saves time and space for 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.