1.3 Posting

When a transaction is entered, it is posted into the accounting system, and all of the affected accounts are updated. Every transaction that is posted contains two fields, a ledger field and a ledger_key field, that specify where the transaction is to be posted. A transaction is posted by updating the balance in the record, specified in the transaction. For example, if an invoice transaction contained "ar" and "jdsmith" as its ledger and ledger_key values, the balance of the customer "jdsmith", would be updated.

Every record in a master file, and every record in a transaction header file, also has a ledger field and a ledger_key field. So, in our example, the customer record that was updated, also has the ledger and ledger_key fields. This second record is fetched, and its balance field is updated also. This process is repeated until the general ledger is updated.

As another example: suppose you enter an invoice for a customer. The posting routines will be given the ledger and ledger_key values for the customer (in the customer master file). The balance for the customer will be updated. Then, in the customer record there will be another ledger, ledger_key pair, pointing to the Accounts Receivable account in the General Ledger. The posting routines will then update this account. Upon reaching the General Ledger, the posting process stops.

When the payment for the invoice is received from the customer, the posting routines will be given ledger, ledger_key values that will point to the invoice being paid. The balance of the invoice will be adjusted by the amount of the payment, and the ledger, ledger_key values of the invoice will be followed to the customer account (in the customer master file). The balance of the customer will be adjusted by the payment amount, and once again, the ledger, ledger_key values will be followed to the Accounts Receivables account in the General Ledger. The balance of this account is updated and, upon having reached the General Ledger, the posting process stops.

By using this combination of ledger, ledger_key fields to create posting chains, we have eliminated the need for special, or "hard-coded", account numbers. The posting routines have no knowledge of the connection between invoices, customers, and the general ledger. This is determined strictly by the ledger and ledger_key fields in each record. As an added benefit, you can divide your payables into trade, internal, and tax categories. This is true of any subsidiary ledger.

In addition to the above, the posting routines will update not only the balance field in each record, but also the units field. This will handle inventory transactions automatically. (The units field also represents hours in the payroll system.)