Sunday, May 20, 2012

Data List Forms Created

3:31 PM - Sunday, May 20, 2012

I was able to create the first 4 forms displaying a list of the information inside the simple accounting system. This is the first step in creating a functional data entry for all tables.

1. Chart of accounts List
2. Authorized Users List
3. Subsidiary Accounts List
4. Transactions List

1. Chart of Accounts list

For the chart of accounts, the list form (window) shows the list of account codes along with the description of the accounts. The last column is the account type. Presently it is still number coded but I'll create a function later that defines the meaning of the codes which are:

Account Type 1 - Asset
Account Type 2 - Liabilities
Account Type 3 - Capital
Account Type 4 - Income
Account Type 5 - Expenses

Instead of displaying the coded number a function should return the description.

Here's the code for the function

function AcctDesc(cAcctType)
local cAcctDesc
cAcctDesc = ""
cAcctType = alltrim(cAcctType)
do case
     case empty(cAcctType)
             cAcctDesc = "Unknown Type"
     case cAcctType == "1"
             cAcctDesc = "Asset"
     case cAcctType == "2"
             cAcctDesc = "Liability"
     case cAcctType == "3"
             cAcctDesc = "Capital"
     case cAcctType == "4"
             cAcctDesc = "Income"
     case cAcctType == "5"
             cAcctDesc = "Expense"
endcase
return (cAcctDesc)

This function will be added to a new procedure file rapidtool.prg and the procedure file will be called inside the main program via set proc to rapidtool.prg

Add New Record in the chart of accounts. 

Since I created the standard list form as a component, I was already able to add in the default action when Add New Record is clicked. All that is needed is to define a property in the form telling it which data entry form to use in adding record.

The property is cEntryForm. The data entry form should still be created (we will just create a new instance of the standard data entry form and revise it to fit the fields of the chart of accounts).

Now it's time to add the search form and the ability to print a hard copy of the chart of accounts.

Here's the subsidiary codes entry screen
 Here's the transaction entry screen


No comments:

Post a Comment