====== Account Balances ====== The account balance is updated every time an invoice, credit note or payment receipt is added to a customer's account. ===== How are the aged balances calculated? ===== The aged balances are running balances on the customer account. They are not related to the reconciliation process therefore, in general //the age balance for a given month will not be the total of all the sales for that month//. The following invariant is always true for any set of balances: ''Total = the sum of all the aged balances'' For the purpose of the examples on this section we will create an account with current balance of: || | Total | May | April | March | February | Over Due || || Before | 1500.00 | 100.00 | 200.00 | 300.00 | 400.00 | 500.00 || ==== Invoices === All invoices are add to the current month. ** Example ** An invoice is raised for 150.00. || | Total | May | April | March | February | Over Due || || Before | 1500.00 | 100.00 | 200.00 | 300.00 | 400.00 | 500.00 || || After | 1650.00 | 250.00 | 200.00 | 300.00 | 400.00 | 500.00 || The value of the invoice was added to the ''Total'' and ''May''. ==== Credit Notes === All credit notes are add to the current month. ** Example ** A credit note is raised for 175.00. || | Total | May | April | March | February | Over Due || || Before | 1500.00 | 100.00 | 200.00 | 300.00 | 400.00 | 500.00 || || After | 1300.00 | -75.00 | 200.00 | 300.00 | 400.00 | 500.00 || The value of the credit deducted from to the ''Total'' and ''May''. ==== Receipts === All receipts are deducted from the oldest balance. If the aged balance would become negative, the difference is carried to the next younger balance. ** Example 1, basic.** A receipt is raised for 300.00. || | Total | May | April | March | February | Over Due || || Before | 1500.00 | 100.00 | 200.00 | 300.00 | 400.00 | 500.00 || || After | 1200.00 | 100.00 | 200.00 | 300.00 | 400.00 | 200.00 || The value of the receipt is deducted from the ''Total'' and ''Over Due''. ** Example 2, roll over.** A receipt is raised for 1000.00. || | Total | May | April | March | February | Over Due || || Before | 1500.00 | 100.00 | 200.00 | 300.00 | 400.00 | 500.00 || || After | 500.00 | 100.00 | 200.00 | 200.00 | 0.00 | 0.00 || The value of the receipt is deducted from the ''Total'', ''February'' and ''Over Due'' are zeroed and the remainder is deducted from ''March''. ** Example 3, a bounced cheque or reversal of a receipt.** A receipt is raised for 800.00. || | Total | May | April | March | February | Over Due || || Before | 1500.00 | 100.00 | 200.00 | 300.00 | 400.00 | 500.00 || || After | 700.00 | 100.00 | 200.00 | 200.00 | 200.00 | 0.00 || The value of the receipt is deducted from the ''Total'', ''Over Due'' is zeroed and the remainder is deducted from ''February''. A receipt is raised for //-800.00//. || | Total | May | April | March | February | Over Due || || Before | 700.00 | 100.00 | 200.00 | 200.00 | 200.00 | 0.00 || || After | 1500.00 | 100.00 | 200.00 | 200.00 | 200.00 | 800.00 || The value of the receipt of ''-800.00'' is "deducted" from the ''Total'' and ''Over Due''. ** Example 4, A credit not is raised, and a refund issued. ** A credit note is raised for 150.00. || | Total | May | April | March | February | Over Due || || Before | 1500.00 | 100.00 | 200.00 | 300.00 | 400.00 | 500.00 || || After | 1250.00 | -50.00 | 200.00 | 300.00 | 400.00 | 500.00 || The value of the credit was deducted from the ''Total'' and ''May''. A receipt is raised for //-150.00//. || | Total | May | April | March | February | Over Due || || Before | 1300.00 | -50.00 | 200.00 | 300.00 | 400.00 | 500.00 || || After | 1500.00 | -50.00 | 200.00 | 300.00 | 400.00 | 650.00 || The value of the receipt of ''-150.00'' is "deducted" from the ''Total'' and ''Over Due''.