12th December 2018
Amended 21st March 2024
Accounts receivable is an account in the General Ledger that shows money owed to a business entity by customers who have purchased goods or services from the entity on credit.
The accounts receivable process starts when a business entity sells a good or service and notes the expected payment terms, discounts and credit guidelines on a commercial invoice to the customer. When a payment arrives from the customer, it needs to be recorded and the business entity may also need to issue a payment receipt or tax invoice document. Payments may be made in many different forms including cash, cheques, electronic funds transfers and credit or debit card transactions. Those payments may be made on or delivered directly to the business entity's premises or may be handled by third parties such as agents or banks acting on the entity's behalf.
Business entities need to have meticulous rules for issuing credit and collecting debts in a timely manner, and they need to keep good data on customers. To maintain accurate accounts receivable, payments also need to be applied to the correct customer and precise invoice. Additional business processes include tracking accounts receivable to determine if they are overdue, dunning customers to speed payments and responding to customer queries.
A business entity's collections department would use an ageing report to track and list unpaid customer invoices and the length of time each invoice has remained unpaid, usually in increments of 30, 60 and 90 days, or more. An ageing report is a way to determine if a business entity is collecting money from customers and reducing accounts receivable efficiently.
Business entities can also leverage their accounts receivable by using unpaid bills as an asset to obtain credit through what is known as "asset-based lending". In seeking to win credit backed by the money it is owed, a business entity's accounts receivable turnover ratio becomes an important factor. The ratio counts the number of times the entity collects its average accounts receivable over a year and is a way to determine its skill at converting receivables into cash. An asset-based lender might look at the turnover ratio to determine the likelihood of being repaid or set an interest rate for lending money to the business entity based on its accounts receivable.
Accounts receivable are also important because they can be sold by a company to a "factor," such as a bank or other financier. Factoring, or the sale of accounts receivable, raises money for a business entity and boosts the seller's cash flow, but it also involves paying a fee to the factor in return for faster turnover. The factor pays the business entity for its accounts receivable and then collects the money due from customers.
The PARTY, ORGANISATION and PERSON tables contain entries for every organisation or person which is required to be known to the GM-X application.
At least one of these parties is an organisation which is the "client" and it is the one for which the application is being run. This organisation is known as the "functional unit" and can be identified by adding it to the PARTY and ORGANISATION tables using a single party_id. This data provides the following:
It is also possible for a GM-X installation to handle the business for a group of organisations which do business under separate names, possibly using different functional currencies. Those organisations can be added as functional units to the PARTY and ORGANISATION tables. Each of them is identified in those tables by its own party_id.
The GM-X application can maintain separate general ledgers for these organisations. In this case each of those organisations must be added as a business entity to the FUNCTIONAL_UNIT table using its party_id, in addition to the PARTY and ORGANISATION tables.
When managing accounts receivable, each of those functional units has relationships with external parties which are defined on the AR_PARTY_RELATIONSHIP table for various role types including:
When the GM-X installation handles business for a group of related functional units, it is possible for any of those functional units to be customers, agents, asset-based lenders or factors of the others, and these intercompany relationships may also be defined on the AR_PARTY_RELATIONSHIP and PARTY_RELATIONSHIP tables. In these situations, accounts receivable owed by related parties are usually carried separately on each functional unit's accounts in order to segregate the cumulative effects of business transactions attributable to internal parties from those of external parties.
This is an important consideration when drawing up consolidated financial statements, because intercompany business transactions must offset one another during the consolidation process. For example, an amount owed to one functional unit (the creditor) by a related functional unit (the debtor) would be treated as an asset by the creditor and an offsetting liability by the debtor which eliminates the amount from the group's consolidated balance sheet. Similarly, revenues derived by one functional unit from supplying goods and services to a related functional unit would be treated as revenues by the supplier and as offsetting expenses by the customer which eliminate the revenues from the group's consolidated income statement. The accounts reserved exclusively for intercompany transactions are known as "elimination accounts" and may be identified as such in the GM-X general ledger subsystem.
The parties in internal as well as external trading relationships may utilise the same or different functional currencies. When the functional currencies are different, both parties must agree to use a single currency for invoicing and payment purposes whenever goods and services are sold. When the agreed currency is also the functional currency of one party, the opposite party in the relationship bears the entire foreign exchange risk; but when the agreed currency is neither party's functional currency, both parties bear the risk. Unless those risks are hedged through forward future contract instruments, each risk-bearing party must periodically revalue its accounts receivable which are not denominated in its functional currency to account for the effects of exchange rate fluctuations, and the revaluation gains or losses must be accumulated in a book foreign exchange gains or losses account. When the customer makes a payment, cumulative revaluation gains or losses attributable to the payment must be cleared from the book gains or losses account and written off to crystallised foreign exchange gains or losses, and any further differences in functional currency amounts received which are attributable to exchange rate fluctuations since the last revaluation (if any) must also be written off to crystallised foreign exchange gains or losses in order to fully clear accounts receivable.
In addition to the trading relationships described above, personnel who carry out accounts receivable processes for or on behalf of each functional unit, either as employees or as contractors to whom the work is outsourced, have relationships with the functional units which may be defined on the PARTY_RELATIONSHIP table for various role types and subtypes such as salesperson, data enterer, payment processor, approver, collector, credit analyst, controller and chief financial officer.
Figure 1 - Organisational Structure for Accounts Receivable: Business Entities and Customers
This extends the existing PARTY_RELATIONSHIP table of the PARTY subsystem.
Tasks are available to users of the FINANCE-AR subsystem to create, enquire, update and delete AR_PARTY_RELATIONSHIP records for customers. These will perform the same functions as the existing tasks available to users of the PARTY subsystem to create, enquire, update and delete PARTY_RELATIONSHIP records, and in addition will allow the extra fields to be maintained. Together with the existing PARTY subsystem tasks for creating, enquiring, updating and deleting PERSON and ORGANISATION records, these tasks are functionally equivalent to the customer master data management functions of traditional ERP systems. This serves the purpose of allowing master data maintenance tasks performed on customer relationships to be completed in a single step, rather than two.
Although the order in which two parties are specified in a PARTY_RELATIONSHIP does not matter, in this instance the functional unit (supplier) will always be party_id_1 and the customer will always be party_id_2. Values to be used in role_type_id_1, role_subtype_id_1, role_type_id_2 and role_subtype_id_2 will be defined within the application.
Field | Type | Description |
---|---|---|
party_id_1 | number | This identifies an organisation which is a functional unit for which a balanced set of books is kept in the GL_ACCOUNT_PERIOD_BALANCE table. Links to an entry on the FUNCTIONAL_UNIT table. |
party_id_2 | number | This identifies the party (person or organisation) which is a customer. Links to an entry on the PARTY table. |
seq_no | number | Unique number generated by the system. |
relationship_name | string | Optional. If more than one relationship exists for a combination of party_id_1 and party_id_2 (with a different value for seq_no) this optional description can be used to differentiate one relationship with another. |
identity_type_id | string | The value for this column is set to "ALTERNATIVE". Together with party_id_2 this links to an entry on the PARTY_IDENTIFICATION table in order to provide, in the id_value column, the customer account number assigned by the functional unit which is entirely different from the internally generated party_id. This will allow the record on the PARTY_IDENTIFICATION table to be accessible via the FINANCE-AR screens without having to use the separate task in the PARTY subsystem. |
credit_limit | number | Optional. This is the maximum value of open orders and accounts receivable allowed for party_id_2. Never negative. Blank signifies unlimited credit. Nonblank values are denominated in the customer's functional currency which is the currency_code of the entry on the PARTY table for party_id_2. |
payment_days_average | number | Optional. This is automatically calculated and updated by the system whenever payments from party_id_2 are posted to party_id_1. |
party_id_trading_organisation | number | Optional. This identifies the sales organisation responsible for managing the relationship with party_id_2. Links to an entry on the PARTY table. This entry would ordinarily be needed only when party_id_1 has two or more sales organisations which manage relationships with different groups of customers. |
party_id_collector | number | Optional. This identifies the bank or agency, if any, responsible for collecting funds from party_id_2 on behalf of party_id_1. Links to an entry on the PARTY table. |
is_payment_receipt_issuer | boolean | A YES/NO switch with an initial value of NO. It indicates if the party_id_collector is responsible for preparing and issuing payment receipt or tax invoice documents to party_id_2, or not. |
task_id_payment_receipt | string | Optional. The identity of the OUTPUT3 task which prepares the payment receipt or tax invoice document in PDF format. |
party_id_lender | number | Optional. This identifies the asset based lender, if any, to whom accounts receivable owed to party_id_1 by party_id_2 may be pledged as collateral. Links to an entry on the PARTY table. |
is_commission_accrued | boolean | A YES/NO switch with an initial value of NO. It indicates if sales commissions accrue on sales to party_id_2 or not. |
party_id_commission | number | Optional. This identifies the party (person or organisation) which earns sales commissions on sales to party_id_2, if different from the party_id_commission value in the entry on the FUNCTIONAL_UNIT table for party_id_1. Links to an entry on the PARTY table. If sales commissions earned on sales to party_id_2 are split between multiple persons or organisations then this field must refer to an organisation (such as a sales team) having its own PARTY_RELATIONSHIP records for the persons or organisations who receive split commissions. In this case the percentage split for each such person or organisation is determined by its rel_weighting_factor on those records. |
commission_percent | number | Optional. This is the sales commission percentage on sales to party_id_2, if different from the commission_percent value in the entry on the FUNCTIONAL_UNIT table for party_id_1. |
je_template_id_invoice | number | Optional. This is the subsystem journal entry template number to be used as the account distribution template for new customer invoices issued by party_id_1 to party_id_2. Links to an entry on the SUBSYSTEM_JE_TEMPLATE_HEADER table. |
je_template_id_credit_note | number | Optional. This is the identity of the account distribution template to be used for new customer credit notes issued by party_id_1 to party_id_2. Links to an entry on the SUBSYSTEM_JE_TEMPLATE_HEADER table. |
je_template_id_debit_note | number | Optional. This is the identity of the account distribution template to be used for new customer debit notes issued by party_id_1 to party_id_2. Links to an entry on the SUBSYSTEM_JE_TEMPLATE_HEADER table. |
je_template_id_payment | number | Optional. This is the identity of the account distribution template to be used for payments received by party_id_1 to party_id_2. Links to an entry on the SUBSYSTEM_JE_TEMPLATE_HEADER table. |
party_id_tax_authority | number | Optional. This identifies the tax authority, an organisation which collects sales, use, value-added tax (VAT) and/or withholding taxes on transactions between party_id_1 and party_id_2. Links to an entry on the PARTY table. If multiple tax authorities have the power to impose such taxes on the same transactions, they must be separately identified as the party_id_transacting on two or more of the SUBSYSTEM_JE_TEMPLATE_ITEM records belonging to the je_template_id_invoice, je_template_id_credit_note, je_template_id_debit_note and/or je_template_id_payment. |
is_tax_due_on_accrual | boolean | A YES/NO switch with an initial value of NO. It indicates if the sales, use and/or value-added tax (VAT) becomes due and payable to the party_id_tax_authority upon issuance of the commercial invoice, credit note or debit note, or not. If not, such taxes (if any) become due and payable upon payment or settlement of the commercial invoice, credit note or debit note. |
is_withholding_tax_applicable | boolean | A YES/NO switch with an initial value of NO. It indicates if party_id_2 is required to withhold corporate or personal income tax from payments to party_id_1, or not. |
is_withholding_tax_final | boolean | A YES/NO switch with an initial value of NO. It indicates if amounts withheld by party_id_2 are considered a final corporate or personal income tax (i.e. gross receipts tax) paid by party_id_1, or not. |
Settlements of open customer invoices and customer debit notes using customer payments and customer credit notes are recorded on the SETTLEMENT_HEADER, SETTLEMENT_ITEM and SETTLEMENT_ITEM_APPLIED tables. The SETTLEMENT_ITEM table holds an entry for each invoice/credit note/debit note component which is to be settled with this payment. The SETTLEMENT_ITEM_APPLIED table holds an entry whenever a settlement amount is reduced or replaced by an amount which is applied from a credit note. If the amount being applied matches the amount being settled then there is no payment.
Should the need arise to void a settlement (for e.g. in the event a customer payment is not honoured upon presentation to the bank) then a separate SETTLEMENT_HEADER and one or more SETTLEMENT_ITEM records must be recorded which reverse the effects of the original settlement.
Each settlement has at least two states, pending and posted. After a settlement is posted, its amounts and accounts must not be changed. Instead, if corrections are needed, two new settlements should be entered and posted, one to reverse the settlement (same as voiding a settlement) and the other consisting of the corrected customer invoices, customer debit notes, customer payments, customer credit notes and amounts.
Figure 2a - Accounts Receivable Settlements
Field | Type | Description |
---|---|---|
party_id_functional | number | This identifies an organisation which is a functional unit for which a balanced set of books is kept in the GL_ACCOUNT_PERIOD_BALANCE table. Links to an entry on the FUNCTIONAL_UNIT table. |
settlement_number | number | This is the settlement number which is generated by the system. Each functional unit will have its own numbering sequence. |
posting_date | date | This is the date which determines the fiscal period to which the journal entry created from this settlement was (or will be) posted. Today's date by default. |
transaction_date | date | This is the date when the transaction underlying this journal entry occurred. Today's date by default. |
settlement_desc | string | Long description of the settlement. This is also the default description for each of this settlement's items. |
payment_reference | string | Optional. This is the identity of the payment instrument which may include, but is not necessarily limited to, any of the following:
|
party_id_bill_to | number | Links to the party_id_2 column on an entry on the AR_PARTY_RELATIONSHIP table. This identifies the customer who is the subject of this settlement. Filled in automatically if VendorTxCode or invoice_id_applied is supplied, otherwise it must be entered manually. All the financial documents referenced in the related SETTLEMENT_ITEM records must belong to the same party. |
relationship_seq_no | number | Links to the seq_no column on an entry on the AR_PARTY_RELATIONSHIP table. |
VendorTxCode | string | Optional. Links to an entry on the ORDER_PAYMENT table which is used for payments which are made before the sales order can be processed, such as via a credit card through a customer-facing website. |
invoice_type_applied | string | Optional. This identifies the type of document, if any, which was applied by this settlement, which can be one of the following:
|
invoice_id_applied | number | Optional. When combined with invoice_type_applied this links to an entry on the INVOICE_HEADER table. This entry can only be used for one of the following:
|
currency_code_tx | string | Read-only. This is the currency in which the payment or invoice_id_applied is denominated. Links to an entry on the CURRENCY_CODE table. The default is the functional currency of the party_id_functional, but this will be changed to the currency of the party identified in party_id_bill_to if different. |
total_settlement_value_tx | number | This is the total value of the settlement in the transaction currency, which must be the same as the currency_code of all settled invoices. If payment_reference is non-blank then this must be entered manually. If either of VendorTxCode or invoice_id_applied is non-blank then this value will be supplied by that document. |
total_settlement_value_fn | number | This is the total value of the settlement in the functional currency of the party_id_functional. If currency_code is the same as the functional currency of party_id_functional then this will automatically be set to the same value as total_settlement_value_tx, otherwise one of the following will apply:
|
exchange_rate_actual | number | Optional. Read-only. This is the actual rate of exchange at which the total_settlement_value_fn amount was purchased using the total_settlement_value_tx amount, before the deduction of financial intermediary fees and currency conversion commissions. Blank if the currency_code is the same as the functional currency of the party_id_functional otherwise one of the following will apply:
|
commission_fee_fn | number | Optional. This is the total value of financial intermediary fees and currency conversion commissions in the functional currency of party_id_functional, which were deducted from the total_settlement_value_fn before the net proceeds of the customer payment were received by the beneficiary. |
fiscal_calendar_id | number | Optional. Links to an entry on the JOURNAL_ENTRY_HEADER table. |
fiscal_year | number | Optional. Links to an entry on the JOURNAL_ENTRY_HEADER table. |
fiscal_period | number | Optional. Links to an entry on the JOURNAL_ENTRY_HEADER table. |
journal_number | number | Optional. Links to an entry on the JOURNAL_ENTRY_HEADER table. |
settlement_status_type_id | string | This is the current settlement status. Values used by the system are:
Other entries may be defined on the SETTLEMENT_STATUS_TYPE table. |
is_posted | boolean | A YES/NO switch with an initial value of NO. Indicates if the settlement has been posted by creating a journal entry for the General Ledger, or not. Once is_posted is YES for a settlement, the settlement cannot be modified or deleted. |
is_void_posted | boolean | A YES/NO switch with an initial value of NO. Indicates if voiding the payment has been posted by reversing the original journal entry for the General Ledger, or not. Once is_void_posted is YES for a settlement, the settlement cannot be voided again. |
This holds information about each of the customer payments, customer credit notes and/or customer debit notes used to settle a customer invoice or customer debit note.
Field | Type | Description |
---|---|---|
party_id_functional | number | Links to an entry on the SETTLEMENT_HEADER table. |
settlement_number | number | Links to an entry on the SETTLEMENT_HEADER table. |
settlement_line_item | number | This is the settlement line item number which is generated by the system. Line item numbers start at 1 for the first line item entered, and are incremented by 1 for each subsequent line item. |
settlement_item_desc | string | Optional. Long description. If blank then the default description from the settlement header is displayed instead. |
invoice_type | string | This identifies the document type of the invoice, credit note or debit note which was settled by this item, with positive amounts. Links to an entry on the INVOICE_HEADER table. |
invoice_id | number | This is the identity number of the invoice which was settled by this item, in whole or in part. Links to an entry on the INVOICE_HEADER table. |
invoice_adjustment_seq_no | number | Optional. This is the identity of the invoice adjustment which was settled by this item, if any, in whole or in part. Links to an entry on the INVOICE_ADJUSTMENT table. |
invoice_item_seq_no | number | Optional. This is the identity of the credit invoice item which was settled by this item, if any, in whole or in part. Links to an entry on the INVOICE_ITEM table. |
invoice_item_prod_feature_id | number | Optional. This is the identity of the invoice item product feature which settled by this item, if any, in whole or in part. Links to an entry on the INVOICE_ITEM_FEATURE table. |
invoice_item_adjustment_seq_no | number | Optional. This is the identity of the invoice item adjustment which was settled by this item, if any, in whole or in part. Links to an entry on the INVOICE_ITEM_ADJUSTMENT table. |
settlement_value_fn | number | This is the value of this settlement item in the functional currency of the party_id_functional. Read-only. Calculated by the system as the product of settlement_value_tx multiplied by exchange_rate_actual from the parent SETTLEMENT_HEADER record, or settlement_value_tx if exchange_rate_actual from the parent SETTLEMENT_HEADER record is blank. |
settlement_value_tx | number | This is the value of this settlement item in the transaction currency, which must be the same as the currency_code_tx of the settled invoice. |
balance_fn | number | Read-only. This is the outstanding balance, in functional currency, of this invoice component which is due to be settled by the value in settlement_value_fn. |
balance_tx | number | Read-only. This is the outstanding balance, in transaction currency, of this invoice component which is due to be settled by the value in settlement_value_tx. |
realised_gain_loss | number | Read-only. This is the difference, if any, between the original value of this part of the invoice in the functional currency of the party_id_functional, and the settlement_value_fn. Calculated by the system. Refer to Journal Entries Constructed from Settlements. |
days_to_settle | number | This is the number of days it took to settle this part of the invoice. Read-only. Calculated by the system based on the invoice_date of the settled INVOICE_HEADER record. |
This identifies when all or part of a settlement amount comes from either a debit note or credit note. Each record must point to one and only one of the 4 invoice components which must also be the same type of component on the parent SETTLEMENT_ITEM record. Each applied_value_tx will reduce the amount which will be received from the customer.
Note that the values for applied_value_tx and applied_value_fn will be accumulated into the corresponding columns on the parent SETTLEMENT_ITEM table.
Field | Type | Description |
---|---|---|
party_id_functional | number | Links to an entry on the SETTLEMENT_ITEM table. |
settlement_number | number | Links to an entry on the SETTLEMENT_ITEM table. |
settlement_line_item | number | Links to an entry on the SETTLEMENT_ITEM table. |
applied_line_item | number | This is the line item number which is generated by the system. Line item numbers start at 1 for the first line item entered, and are incremented by 1 for each subsequent line item. |
invoice_type | string | This identifies the type of document which is being applied to this settlement item. It must be one of the following:
|
invoice_id | number | This is the identity number of the document which was applied to this settlement item.
Links to an entry on the INVOICE_HEADER table. |
invoice_adjustment_seq_no | number | Optional. This is the identity of the invoice adjustment which was applied to this settlement item.
Links to an entry on the INVOICE_ADJUSTMENT table. |
invoice_item_seq_no | number | Optional. This is the identity of the invoice item which was applied to this settlement item.
Links to an entry on the INVOICE_ITEM table. |
invoice_item_prod_feature_id | number | Optional. This is the identity of the invoice item feature which was applied to this settlement item.
Links to an entry on the INVOICE_ITEM_FEATURE table. |
invoice_item_adjustment_seq_no | number | Optional. This is the identity of the invoice item adjustment which was applied to this settlement item.
Links to an entry on the INVOICE_ITEM_ADJUSTMENT table. |
applied_value_tx | number | Read-only. This is the amount, in transaction currency, of this invoice component which will be applied to this SETTLEMENT_ITEM. |
applied_value_fn | number | Read-only. This is the amount, in functional currency, of this invoice component which will be applied to this SETTLEMENT_ITEM. |
balance_fn | number | Read-only. This is the outstanding balance, in functional currency, of this invoice component which is due to be settled by the value in applied_value_fn. |
balance_tx | number | Read-only. This is the outstanding balance, in transaction currency, of this invoice component which is due to be settled by the value in applied_value_tx. |
realised_gain_loss | number | Read-only. This is the difference, if any, between the original value of this part of the invoice in the functional currency of the party_id_functional, and the applied_value_fn. Calculated by the system. Refer to Journal Entries Constructed from Settlements. |
Figure 2b - Accounts Receivable Settlement Status
This holds user-definable settlement status values. Values used by the software are defined in a system file and cannot be altered.
Field | Type | Description |
---|---|---|
settlement_status_type_id | string | Unique identity. |
settlement_status_type_name | string | Short Name |
settlement_status_type_desc | string | Optional. Long description. |
sort_seq | number | Optional. Used for sorting entries in the dropdown list. |
Here are the values used by the system which cannot be altered:
Id | Sort Seq | Description |
---|---|---|
PEND | 1 | Pending, not yet complete. The settlement amount does not match the document balances. |
COMP | 2 | Complete. The settlement amount matches the document balances. The balances are ready to be updated. |
BUPD | 3 | Balances Updated. The settlement amount has been used to reduce the balances on the selected documents. |
POST | 4 | Posted. The settlement has been posted to the General Ledger. |
VOID | 5 | Void. The effects of this settlement have been reversed and the document balances reset to what they were. |
This holds the status history for each settlement.
Field | Type | Description |
---|---|---|
party_id_functional | number | This identifies an organisation which is a functional unit for which a balanced set of books is kept in the GL_ACCOUNT_PERIOD_BALANCE table. Links to an entry on the SETTLEMENT_HEADER table. |
settlement_number | number | This identifies the fiscal calendar. Links to an entry on the SETTLEMENT_HEADER table. |
seq_no | number | Sequence number which is generated by the system. |
settlement_status_type_id | string | Links to an entry on the SETTLEMENT_STATUS_TYPE table. |
status_date | date | The date on which this change was made. |
The SUBSYSTEM_JE_TEMPLATE_HEADER and SUBSYSTEM_JE_TEMPLATE_ITEM tables are used together with general ledger accounts defined on the FUNCTIONAL_UNIT table to construct journal entries from the GM-X INVOICE and FINANCE-AR subsystems. The FUNC_UNIT_PRICE_COMPONENT, FUNC_UNIT_PROD_CAT and FUNC_UNIT_FEATURE_CAT tables can be used to provide alternative account_ids for certain entries.
Figure 3 - Journals originating from the INVOICE and FINANCE-AR subsystem
Together these tables implement account determination logic for invoices, credit notes, debit notes and settlements.
The specifications below refer to a "First Column" and a "Contra Column":
Journal entries constructed from customer invoices, customer credit notes and customer debit notes can have as many as 5 segments. Segment 1 is required, and the other segments are optional depending upon the circumstances described below.
Segment | Option | First Side Column Usage | Contra Column Usage |
---|---|---|---|
1 | a. Revenue and Direct Cost | trade_receivables | sales_use
sales_supply sales_service |
cogs | inventory | ||
b. Work in Progress | trade_receivables | wip | |
2 | Reimbursable Expenses | trade_receivables | exp_recovery |
3 | Sales Tax | trade_receivables | tax_recovery |
tax_reimb | sales_tax_payable
- OR - sales_tax_liability (see Note 1) |
||
4 | Sales Commission | commission_expense | commission_liability |
5 | Employer Pension Expense | pension_expense | pension_payable |
Note 1: The account to use depends on the value of the is_tax_due_on_accrual field in the AR_PARTY_RELATIONSHIP table. If the value of this field is YES then a 'sales_tax_payable' account is used; otherwise a 'sales_tax_liability' account is used.
To extract the account for a particular usage, the logic for all segments searches first for an account_id on a SUBSYSTEM_JE_TEMPLATE_ITEM entry for that usage. These are the junior items of the SUBSYSTEM_JE_TEMPLATE_HEADER entries linked to the AR_PARTY_RELATIONSHIP entry for the party_id_bill_to on the INVOICE_HEADER. The SUBSYSTEM_JE_TEMPLATE_HEADER entry utilised is based on:
If an account_id exists, it will be extracted, and no further logic is required.
Otherwise, in the event that the applicable SUBSYSTEM_JE_TEMPLATE_HEADER entry is blank, or no account_id is found in a SUBSYSTEM_JE_TEMPLATE_ITEM entry for that usage, the account logic may next search for accounts on the FUNC_UNIT_FEATURE_CAT, FUNC_UNIT_PRICE_COMPONENT and/or FUNC_UNIT_PROD_CAT tables for the party_id_bill_ from, and extract the first such account found. The subsections below provide detailed specifications for those searches. If an account is extracted in this manner, no further logic is required.
Otherwise, the determination logic will attempt to extract the account for that usage from the FUNCTIONAL_UNIT table for the party_id_bill_from.
If the determination logic cannot extract an account by any of the above means, then an error message will be thrown.
A separate Segment 1 is constructed for each component of a customer invoice, customer credit note or customer debit note. A component is a row in the INVOICE_ADJUSTMENT, INVOICE_ITEM, INVOICE_ITEM_ADJUSTMENT or INVOICE_ITEM_FEATURE table having the same invoice_type and invoice_id values as the INVOICE_HEADER.
Each INVOICE_ITEM_ADJUSTMENT and INVOICE_ITEM_FEATURE entry is linked to an INVOICE_ITEM which may have a product_id that links to an entry on the PRODUCT table. The product_subtype field on the PRODUCT table had two possible values: 'G' (Good) or 'S' (Service). In this situation, therefore, the determination logic will search by default for:
However, when the price_type of the applicable PRICE_COMPONENT (if any) for the product_id is 'H' (Hire Charge) instead of 'B' (Base Price) then the determination logic will ignore the product_subtype and will search for the 'sales_use' usage instead.
Alternatively, the product_id field on the INVOICE_ITEM may be blank. In this situation Segment 1 is not constructed for the INVOICE_ITEM; refer instead to Segment 2, below.
Entries on the INVOICE_ADJUSTMENT table which do not represent tax surcharges are not linked to any particular PRODUCT. In this situation the determination logic will search for:
Based on the foregoing, the detailed account determination logic for each Segment 1 is set out in the tables below.
Component | Account Usage | Determination Logic |
---|---|---|
Invoice Adjustment
(see Note 2) |
trade_receivables | IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'trade_receivables', and the account_id on that entry is nonblank, then extract that account_id.
ELSE extract the account_id_trade_receivables value on the FUNCTIONAL_UNIT entry for the party_id_bill_from. |
wip | IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'wip', and the account_id on that entry is nonblank, then extract that account_id to create a journal entry with Segment 1(b).
ELSE IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'wip', then: IF prod_cat_id is nonblank and a FUNC_UNIT_PROD_CAT entry exists for that prod_cat_id and party_id_bill_from, and its account_id_wip field is nonblank, then extract that account_id_wip to create a journal entry with Segment 1(b).
ELSE create a journal entry with Segment 1(a) for sales_supply or sales_service, next.ELSE IF account_id_wip is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_wip to create a journal entry with Segment 1(b). ELSE create a journal entry with Segment 1(a) for sales_supply or sales_service, next. |
|
sales_supply
- OR - sales_service |
IF searching for 'sales_supply' then:
IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'sales_supply', and the account_id on that entry is nonblank, then extract that account_id.
ELSE
ELSE IF price_component_id is nonblank, then: IF a FUNC_UNIT_PRICE_COMPONENT entry exists for that price_component_id and party_id_bill_from, and its account_id_sales_supply field is nonblank, then extract that account_id_sales_supply.
ELSE evaluate prod_cat_id, next.
IF prod_cat_id is nonblank and a FUNC_UNIT_PROD_CAT entry exists for that prod_cat_id and party_id_bill_from, and its account_id_sales_supply field is nonblank, then extract that account_id_sales_supply.
ELSE IF account_id_sales_supply is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_sales_supply. ELSE throw a 'Journal entry cannot be constructed for xxx' error, where 'xxx' identifies the invoice_type, invoice_id and adjustment_seq_no. Use the same determination logic as if searching for 'sales_supply', above, but evaluate for account_usage = 'sales_service' on the SUBSYSTEM_JE_TEMPLATE_ITEM table, and evaluate account_id_sales_service on the FUNC_UNIT_PRICE_COMPONENT, FUNC_UNIT_PROD_CAT and/or FUNCTIONAL_UNIT tables.
|
|
cogs | Not applicable. | |
inventory | Not applicable. |
Note 2: This includes all INVOICE_ADJUSTMENT entries except those linked to an ORDER_ADJUSTMENT_TYPE entry having an order_adjustment_type_id that begins with 'TAX' or 'DELIVERY', and those linked to a PRICE_COMPONENT entry having a price_type of 'C' (Commission), 'E' (Early Settlement Discount) or 'W' (Withholding Tax).
Component | Account Usage | Determination Logic |
---|---|---|
Invoice Item
(see Note 3) |
trade_receivables | Use the same account determination logic as for Invoice Adjustment, above. |
wip | IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'wip', and the account_id on that entry is nonblank, then extract that account_id.
ELSE IF the product_id (if applicable) is not blank AND at least one PROD_CAT_CLASS entry exists for that product_id having a start_date <= today and end_date >= today then: Evaluate the PROD_CAT_CLASS entries meeting these conditions, starting with the entry having primary_flag = YES, then any entry having second_flag = YES, then any entry having third_flag = YES, and then any remaining entries. For each entry:
ELSE IF account_id_wip is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_wip.
IF a FUNC_UNIT_PROD_CAT entry exists for that prod_cat_id and party_id_bill_from, and its account_id_wip field is nonblank, then extract that account_id_wip and disregard any remaining PROD_CAT_CLASS entries.
ELSE IF no remaining PROD_CAT_CLASS entries exist then evaluate account_id_wip on the FUNCTIONAL_UNIT entry, next.ELSE throw a 'Journal entry cannot be constructed for xxx' error, where 'xxx' identifies the invoice_type, invoice_id, invoice_item_seq_no, adjustment_seq_no (if applicable) and/or prod_feature_id (if applicable). | |
sales_supply
- OR - sales_service - OR - sales_use |
IF searching for 'sales_supply' then:
IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'sales_supply', and the account_id on that entry is nonblank, then extract that account_id.
ELSE IF searching for 'sales_service' then:
ELSE IF at least one PROD_CAT_CLASS entry exists for that product_id having a start_date <= today and end_date >= today then: Evaluate the PROD_CAT_CLASS entries meeting these conditions, starting with the entry having primary_flag = YES, then any entry having second_flag = YES, then any entry having third_flag = YES, and then any remaining entries. For each entry:
ELSE IF account_id_sales_supply is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_sales_supply.
IF a FUNC_UNIT_PROD_CAT entry exists for that prod_cat_id and party_id_bill_from, and its account_id_sales_supply field is nonblank, then extract that account_id_sales_supply and disregard any remaining PROD_CAT_CLASS entries.
ELSE IF no remaining PROD_CAT_CLASS entries exist then evaluate account_id_sales_supply on the FUNCTIONAL_UNIT entry, next.ELSE throw a 'Journal entry cannot be constructed for xxx' error, where 'xxx' identifies the invoice_type, invoice_id, invoice_item_seq_no, adjustment_seq_no (if applicable) and/or prod_feature_id (if applicable). Use the same determination logic as if searching for 'sales_supply', above, but evaluate for account_usage = 'sales_service' on the SUBSYSTEM_JE_TEMPLATE_ITEM table, and evaluate account_id_sales_service on the FUNC_UNIT_PROD_CAT and/or FUNCTIONAL_UNIT tables.
ELSE:
Use the same determination logic as if searching for 'sales_supply', above, but evaluate for account_usage = 'sales_use' on the SUBSYSTEM_JE_TEMPLATE_ITEM table, and evaluate account_id_sales_use on the FUNC_UNIT_PROD_CAT and/or FUNCTIONAL_UNIT tables. |
|
cogs
(see Note 4) |
Use the same determination logic as if searching for 'sales_supply', above, but evaluate for account_usage = 'cogs' on the SUBSYSTEM_JE_TEMPLATE_ITEM table, and evaluate account_id_cogs on the FUNC_UNIT_PROD_CAT and/or FUNCTIONAL_UNIT tables. | |
inventory
(see Note 5) |
Use the same determination logic as if searching for 'sales_supply', above, but evaluate for account_usage = 'inventory' on the SUBSYSTEM_JE_TEMPLATE_ITEM table, and evaluate account_id_inventory on the FUNC_UNIT_PROD_CAT and/or FUNCTIONAL_UNIT tables. |
Note 3: This includes all INVOICE_ITEM entries except those having a blank product_id.
Note 4: Not applicable for customer credit notes, customer debit notes, journal entries created with Segment 1(b) (wip) or INVOICE_ITEM entries having a nonblank product_id which is not a Good.
Note 5: Not applicable for customer credit notes, customer debit notes, journal entries created with Segment 1(b) (wip) or INVOICE_ITEM entries having a nonblank product_id which is not a Good.
Component | Account Usage | Determination Logic |
---|---|---|
Invoice Item Adjustment
(see Note 6) |
trade_receivables | Use the same account determination logic as for Invoice Adjustment, above. |
wip | Use the same account determination logic as for Invoice Item, above. | |
sales_supply
- OR - sales_service - OR - sales_use |
IF searching for 'sales_supply' then:
IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'sales_supply', and the account_id on that entry is nonblank, then extract that account_id.
ELSE IF searching for 'sales_service' then:
ELSE IF price_component_id is nonblank, then: IF a FUNC_UNIT_PRICE_COMPONENT entry exists for that price_component_id and party_id_bill_from, and its account_id_sales_supply field is nonblank, then extract that account_id_sales_supply.
ELSE use the same account determination logic as for Invoice Item (sales_product - OR - sales_service - OR - sales_use), above, for the INVOICE_ITEM entry having the same invoice_type, invoice_id and invoice_item_seq_no. (i.e. the discounts and surcharges for an INVOICE_ITEM affect the same accounts as the base price of the product.)ELSE use the same account determination logic as for Invoice Item, next. Use the same determination logic as if searching for 'sales_supply', above, but evaluate for account_usage = 'sales_service' on the SUBSYSTEM_JE_TEMPLATE_ITEM table, and evaluate account_id_sales_service on the FUNC_UNIT_PRICE_COMPONENT and/or FUNCTIONAL_UNIT tables.
ELSE use the same account determination logic as for Invoice Item (sales_product - OR - sales_service - OR - sales_use), above, for the INVOICE_ITEM entry having the same invoice_type, invoice_id and invoice_item_seq_no. (i.e. the discounts and surcharges for an INVOICE_ITEM affect the same accounts as the base price of the product.) |
|
cogs | Not applicable. | |
inventory | Not applicable. |
Note 6: This includes all INVOICE_ITEM_ADJUSTMENT entries except those linked to a PRICE_COMPONENT entry having a price_type of 'C' (Commission), 'E' (Early Settlement Discount) or 'W' (Withholding Tax).
Component | Account Usage | Determination Logic |
---|---|---|
Invoice Item Feature | trade_receivables | Use the same account determination logic as for Invoice Adjustment, above. |
wip | Use the same account determination logic as for Invoice Item, above. | |
sales_supply
- OR - sales_use |
IF searching for 'sales_supply' then:
IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'sales_supply', and the account_id on that entry is nonblank, then extract that account_id.
ELSE
ELSE get the prod_feature_cat_id on the PRODUCT_FEATURE entry linked to the prod_feature_id. IF a FUNC_UNIT_FEATURE_CAT entry exists for that prod_feature_cat_id and party_id_bill_from, and its account_id_sales_supply field is nonblank, then extract that account_id_sales_supply. ELSE use the same account determination logic as for Invoice Item (sales_product - OR - sales_service - OR - sales_use), above, for the INVOICE_ITEM entry having the same invoice_type, invoice_id and invoice_item_seq_no. (i.e. the features for an INVOICE_ITEM affect the same accounts as the base price of the product.) Use the same determination logic as if searching for 'sales_supply', above, but evaluate for account_usage = 'sales_use' on the SUBSYSTEM_JE_TEMPLATE_ITEM table, and evaluate account_id_sales_use on the FUNC_UNIT_FEATURE_CAT tables. |
|
cogs | Not applicable. | |
inventory | Not applicable. |
For recovery of delivery costs, an INVOICE_ADJUSTMENT linked to an ORDER_ADJUSTMENT_TYPE having an order_adjustment_type_id that begins with 'DELIVERY' is required. In this situation a Segment 2 must be constructed from each such INVOICE_ADJUSTMENT.
Also, the product_id field on the INVOICE_ITEM must be blank when the INVOICE_ITEM represents the recovery of nontax expenses from customers. In this situation a Segment 2 must be constructed from each such INVOICE_ITEM.
Component | Account Usage | Determination Logic |
---|---|---|
Invoice Adjustment
(see Note 7) |
trade_receivables | Use the same account determination logic as for Segment 1 Invoice Adjustment, above. |
exp_recovery | IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'exp_recovery', and the account_id on that entry is nonblank, then extract that account_id.
ELSE IF price_component_id is nonblank, then: IF a FUNC_UNIT_PRICE_COMPONENT entry exists for that price_component_id and party_id_bill_from, and its account_id_exp_recovery field is nonblank, then extract that account_id_exp_recovery.
IF prod_cat_id is nonblank and a FUNC_UNIT_PROD_CAT entry exists for that prod_cat_id and party_id_bill_from, and its account_id_exp_recovery field is nonblank, then extract that account_id_exp_recovery.
ELSE evaluate prod_cat_id, next. ELSE IF account_id_sales_supply is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_exp_recovery. ELSE throw a 'Journal entry cannot be constructed for xxx' error, where 'xxx' identifies the invoice_type, invoice_id and adjustment_seq_no. |
|
Invoice Item
(see Note 8) |
trade_receivables | Use the same account determination logic as for Segment 1 Invoice Adjustment, above. |
exp_recovery | IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'exp_recovery', and the account_id on that entry is nonblank, then extract that account_id.
ELSE IF account_id_sales_supply is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_exp_recovery. ELSE throw a 'Journal entry cannot be constructed for xxx' error, where 'xxx' identifies the invoice_type, invoice_id and invoice_item_seq_no. |
Note 7: This includes only INVOICE_ADJUSTMENT entries linked to an ORDER_ADJUSTMENT_TYPE entry having an order_adjustment_type_id that begins with 'DELIVERY'.
Note 8: This includes only INVOICE_ITEM entries having a blank product_id on the INVOICE_ITEM.
For recovery of sales taxes, or other taxes such as duties or use taxes, an INVOICE_ADJUSTMENT linked to an ORDER_ADJUSTMENT_TYPE having an order_adjustment_type_id that begins with 'TAX' is required. In this situation a Segment 3 must be constructed from each such INVOICE_ADJUSTMENT.
Component | Account Usage | Determination Logic |
---|---|---|
Invoice Adjustment
(see Note 9) |
trade_receivables | Use the same account determination logic as for Segment 1 Invoice Adjustment, above. |
tax_recovery | IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'tax_recovery', and the account_id on that entry is nonblank, then extract that account_id.
ELSE IF price_component_id is nonblank, then: IF a FUNC_UNIT_PRICE_COMPONENT entry exists for that price_component_id and party_id_bill_from, and its account_id_tax_recovery field is nonblank, then extract that account_id_tax_recovery.
ELSE IF account_id_tax_recovery is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_tax_recovery.
ELSE evaluate account_id_tax_recovery on the FUNCTIONAL_UNIT entry, next. ELSE throw a 'Journal entry cannot be constructed for xxx' error, where 'xxx' identifies the invoice_type, invoice_id and adjustment_seq_no. |
|
tax_reimb | Use the same determination logic as if searching for 'tax_recovery', above, but evaluate for account_usage = 'tax_reimb' on the SUBSYSTEM_JE_TEMPLATE_ITEM table, and evaluate account_id_tax_reimb on the FUNC_UNIT_PRICE_COMPONENT and/or FUNCTIONAL_UNIT tables. | |
sales_tax_payable
- OR - sales_tax_liability (see Note 10) |
Use the same determination logic as if searching for 'tax_recovery', above, but evaluate for account_usage = 'sales_tax_payable' or 'sales_tax_liability' on the SUBSYSTEM_JE_TEMPLATE_ITEM table, and evaluate account_id_sales_tax_payable or account_id_sales_tax_liability on the FUNC_UNIT_PRICE_COMPONENT and/or FUNCTIONAL_UNIT tables. |
Note 9: This includes only INVOICE_ADJUSTMENT entries linked to an ORDER_ADJUSTMENT_TYPE entry having an order_adjustment_type_id that begins with 'TAX'.
Note 10: The account to use depends on the value of the is_tax_due_on_accrual field in the AR_PARTY_RELATIONSHIP table. If the value of this field is YES then a 'sales_tax_payable' account is used; otherwise a 'sales_tax_liability' account is used.
This segment accounts for any sales commissions earned by salespersons or sales organisations upon issuance of the invoice.
Determination of whether or not any sales commissions were earned is done at two levels. First, certain PRICE_COMPONENT entries linked to the INVOICE_ADJUSTMENT and/or INVOICE_ITEM_ADJUSTMENT components of an invoice may have the price_type value 'C' (Commission). If any such PRICE_COMPONENT entries exist then a Segment 4 must be constructed for each such INVOICE_ADJUSTMENT and INVOICE_ITEM_ADJUSTMENT, but only if the is_commission_accrued indicator on the AR_PARTY_RELATIONSHIP entry for the party_id_bill_to is YES.
Alternatively, if the is_commission_accrued indicator on the AR_PARTY_RELATIONSHIP entry for the party_id_bill_to is YES, but no Segment 4 journal entries were constructed for INVOICE_ADJUSTMENT or INVOICE_ITEM_ADJUSTMENT components as described in the preceding paragraph, then a Segment 4 must be constructed for the INVOICE_HEADER.
Component | Account Usage | Determination Logic |
---|---|---|
Invoice Header | commission_expense | IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'commission_expense', and the account_id on that entry is nonblank, then extract that account_id.
ELSE IF account_id_commission_expense is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_commission_expense. ELSE throw a 'Journal entry cannot be constructed for xxx' error, where 'xxx' identifies the invoice_type and invoice_id. |
commission_liability | IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'commission_liability', and the account_id on that entry is nonblank, then extract that account_id.
ELSE IF account_id_commission_liability is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_commission_liability. ELSE throw a 'Journal entry cannot be constructed for xxx' error, where 'xxx' identifies the invoice_type and invoice_id. |
|
Invoice Adjustment
(see Note 11) |
commission_expense | Use the same account determination logic as for commission_expense, above. |
commission_liability | Use the same account determination logic as for commission_liability, above. | |
Invoice Item Adjustment
(see Note 12) |
commission_expense | Use the same account determination logic as for commission_expense, above. |
commission_liability | Use the same account determination logic as for commission_liability, above. |
Note 11: This includes only those INVOICE_ADJUSTMENT entries linked to a PRICE_COMPONENT entry having a price_type of 'C' (Commission).
Note 12: This includes only those INVOICE_ITEM_ADJUSTMENT entries linked to a PRICE_COMPONENT entry having a price_type of 'C' (Commission).
This segment accounts for any employer-paid pension expenses incurred and accrued when salespersons earn commissions as described for Segment 4, above.
If the pension_percent field on the FUNCTIONAL_UNIT entry for the party_id_bill_from is not blank and greater than zero then a Segment 5 must be constructed for the INVOICE_HEADER.
Component | Account Usage | Determination Logic |
---|---|---|
Invoice Header | pension_expense | IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'pension_expense', and the account_id on that entry is nonblank, then extract that account_id.
ELSE IF account_id_pension_expense is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_pension_expense. ELSE throw a 'Journal entry cannot be constructed for xxx' error, where 'xxx' identifies the invoice_type and invoice_id. |
pension_payable | IF a SUBSYSTEM_JE_TEMPLATE_ITEM entry exists where account_usage = 'pension_payable', and the account_id on that entry is nonblank, then extract that account_id.
ELSE IF account_id_pension_payable is nonblank on the FUNCTIONAL_UNIT entry for the party_id_bill_from, then extract that account_id_pension_payable. ELSE throw a 'Journal entry cannot be constructed for xxx' error, where 'xxx' identifies the invoice_type and invoice_id. |
This procedure applies when a payment has been completed and is posted to the General Ledger. Each amount on each invoice component has to be linked with a General Ledger Account before it can be added to an entry on the JOURNAL_ENTRY_ITEM table.
Each settlement will have a SETTLEMENT_HEADER entry and may have one or more related SETTLEMENT_ITEM entries. Additionally, each of those SETTLEMENT_ITEM entries (if any) may have one or more related SETTLEMENT_ITEM_APPLIED entries.
Each of those SETTLEMENT_ITEM and SETTLEMENT_ITEM_APPLIED entries (if any) will refer to a component of a document which is a customer invoice, customer credit note or customer debit note. Each of those components is represented as an entry on one of the following database tables:
Note that the INVOICE_ADJUSTMENT table has different rules for tax and non-tax entries.
Note also that INVOICE_ADJUSTMENT entries linked to a PRICE_COMPONENT having a price_type of 'C' (Commission) do *NOT* have entries on the SETTLEMENT_ITEM and SETTLEMENT_ITEM_APPLIED tables, so will have to be processed separately.
When an entry on any of these four database tables is settled, either by receipt of money or by applying another entry from one of these four database tables, this action will require two or more entries to be written to the JOURNAL_ENTRY_ITEM table. Every input will require an output for the account_id which has been associated with the usage 'trade_receivables' as a contra side entry, plus one or more additional usages which are identified as required because of relevant data which exists in other database tables.
There are six situations which may cause additional entries to be written to the JOURNAL_ENTRY_ITEM table:
In situations involving receipt of money every input will require an output for the account_id which has been associated with the usage 'cash_in_bank' as a first side entry, plus one or more additional usages which can be provided by the logic described in Traversing the SUBSYSTEM_JE_TEMPLATE table (receipts).
In all of the above cases, because only one additional usage is ever identified for a particular monetary value then the value used in the contra side entry can be reversed and used in a single first side entry.
When dealing with customer invoices where the transaction currency is different from the functional currency the exchange rate used when the invoice was created may be different from that which is calculated when the invoice is settled. This results in a different functional currency amount, and this difference must be recorded in the ledger as either a gain or a loss. This revaluation may occur in two different places:
When payors are legally required to deduct taxes such as withholding taxes or taxes on gross business receipts at the source (i.e. 'tax deducted at source') then this condition is indicated when the is_withholding_tax_applicable field in the AR_PARTY_RELATIONSHIP table for the party_id_bill_to and party_id_bill_from is YES. In this case an INVOICE_ADJUSTMENT linked to a PRICE_COMPONENT having a price_type of 'W' (Withholding Tax) is required, and a Segment 5 must be constructed from each such INVOICE_ADJUSTMENT.
In some situations these are considered final tax assessments, so the payee must recognise them as an expense. This condition is indicated when the is_withholding_tax_final field in the AR_PARTY_RELATIONSHIP table for the party_id_bill_to and party_id_bill_from is YES.
Otherwise those taxes are considered an advance payment of personal or corporate income tax due to the tax authority, so the payee can recognise them as an asset which can be used to clear accrued income taxes. This condition is indicated when the is_withholding_tax_final field in the AR_PARTY_RELATIONSHIP table for the party_id_bill_to and party_id_bill_from is NO.
When payments are received from debtors, the bank or collector may deduct service fees or, for foreign currency payments, currency exchange commissions before remitting the net proceeds to the beneficiary account. The value of any such fees is held in the commission_fee_fn field of the SETTLEMENT_HEADER table and it is always denominated in the functional currency of the party_id_bill_from. In this situation a Segment 6 is required to account for the commission and fee expense.
Lastly, Segment 7 transfers accrued sales commission liabilities to sales commissions payable, when commissionable customer invoices, credit notes and debit notes are settled.
This procedure takes place whenever a different value for exchange_rate_actual has been calculated due to a value being entered for total_settlement_value_fn, on the SETTLEMENT_HEADER table. It involves cycling through the associated SETTLEMENT_ITEM and SETTLEMENT_ITEM_APPLIED entries each of which is linked to one of the four invoice components - INVOICE_ADJUSTMENT, INVOICE_ITEM, INVOICE_ITEM_ADJUSTMENT and INVOICE_ITEM_FEATURE. Each of these entries must be processed EXCEPT the following entries which must ALWAYS be skipped and for which settlement gains or losses are *NEVER* calculated:
The calculation is slightly different for each payment component. Note that the SETTLEMENT_ITEM_APPLIED entries must be processed before their parent SETTLEMENT_ITEM entries as the latter will require the results produced by the former.
Note also that it is possible for a settlement to deal with two different currencies:
The SETTLEMENT_HEADER record stores exactly one exchange rate. It is exchange_rate_actual which is used to convert total_settlement_value_tx into functional currency.
If the functional and transaction currencies are different, then the value for exchange_rate_actual must be calculated as total_settlement_value_fn / total_settlement_value_tx.
The identity of the records to be read is held in je_template_id_payment on the AR_PARTY_RELATIONSHIP table for the party_id_bill_to and relationship_seq_no values of the SETTLEMENT_HEADER.
Note that even though a value for je_template_id may be provided, there may or may not be any eligible records on the SUBSYSTEM_JE_TEMPLATE_ITEM table.
Each valid record read from the SUBSYSTEM_JE_TEMPLATE_ITEM table will result in a record being written to the JOURNAL_ENTRY_ITEM table for each document component.
All the available records must be read and processed one at a time. Note that any record with an account_usage which does not appear in the following table for a relevant segment is to be ignored.
Segment | Option | First Side Column Usage | Contra Column Usage |
---|---|---|---|
1 | Settled Customer Invoice, Credit Note or Debit Note | book_gain_loss | crystallised_gain_loss |
cash_in_bank | trade_receivables | ||
2 | Financial Discount Offered | debtor_fin_dsc_offered | trade_receivables |
3 | Unapplied Cash | cash_in_bank | customer_deposit |
4 | Sales Tax (see Note 15a) | sales_tax_liability | sales_tax_payable |
5 | Withholding Tax (see Note 15b) | tax_wh_prepaid
- OR - tax_wh_final (see Note 15c) |
cash_in_bank |
6 | Bank Commissions and Fees | commissions_fees | cash_in_bank |
7 | Sales Commission | commission_liability | commission_payable |
Note 15a: Whether or not Segment 4 is required depends on the value of the is_tax_due_on_accrual field in the AR_PARTY_RELATIONSHIP table. If the value of this field is NO then Segment 4 is required; otherwise Segment 4 is NOT required.
Note 15b: Whether or not Segment 5 is required depends on the value of the is_withholding_tax_applicable field in the AR_PARTY_RELATIONSHIP table. If the value of this field is YES for BOTH the party_id_bill_to and party_id_bill_from then Segment 5 is required; otherwise Segment 5 is NOT required.
Note 15c: The account to use depends on the value of the is_withholding_tax_final field in the AR_PARTY_RELATIONSHIP table. If the value of this field is YES then a 'tax_wh_final' account is used; otherwise a 'tax_wh_prepaid' account is used.
To extract the account for a particular usage, the logic for all segments searches first for an account_id on a SUBSYSTEM_JE_TEMPLATE_ITEM entry for that usage. These are the junior items of the SUBSYSTEM_JE_TEMPLATE_HEADER entry linked by the je_template_id_payment field to the AR_PARTY_RELATIONSHIP entry for the party_id_bill_to on the INVOICE_HEADER.
If an account_id exists, it will be extracted, and no further logic is required.
Otherwise, in the event that the applicable SUBSYSTEM_JE_TEMPLATE_HEADER entry is blank, or no account_id is found in a SUBSYSTEM_JE_TEMPLATE_ITEM entry for that usage, the account logic may next search for accounts on the FUNC_UNIT_PRICE_COMPONENT table for the party_id_bill_from, and extract the first such account found. The subsections below provide detailed specifications for those searches. If an account is extracted in this manner, no further logic is required.
Otherwise, the determination logic will attempt to extract the account for that usage from the FUNCTIONAL_UNIT table for the party_id_bill_from.
If the determination logic cannot extract an account by any of the above means, then an error message will be thrown.
Examination of these tables will stop when it finds a record containing a non-blank account_id for the selected account_usage.
This procedure is used to convert an account_usage into an account_id. This value may be provided on any one of a number of records which must be searched in the following sequence:
Note that some of these tables can only be read if the input record from the INVOICE subsystem contains the primary key for that table.
As soon as the first non-blank value for account_id is found then the account determination process will be terminated. If at the end there is no value for account_id then an error message will be thrown.
Note that the PRICE_COMPONENT table can only be used for percentage rates (such as tax rates) and sale prices, it cannot be used to provide purchase prices as they are always entered manually.
The "contra side" (or "opposite side") refers to the side (debit side, or credit side) of a JOURNAL_ENTRY_ITEM entry which identifies the trade receivables asset account affected by the document component. The credit_functional or debit_functional value comes from:
Monetary amounts for the four invoice components, the INVOICE_ADJUSTMENT, INVOICE_ITEM, INVOICE_ITEM_ADJUSTMENT and INVOICE_ITEM_FEATURE entries for a customer invoice or customer debit note are positive numbers for prices and surcharges, or negative numbers for discounts. This means:
Monetary amounts on the INVOICE_ADJUSTMENT, INVOICE_ITEM, INVOICE_ITEM_ADJUSTMENT and INVOICE_ITEM_FEATURE entries for a customer credit note are negative numbers for prices and surcharges, or positive numbers for discounts. This means:
Relative to the contra side entry for a document component, the "first side" refers to the side of its mandatory and opposite entry. Each first side entry must affect a different account than its corresponding contra side entry. Therefore:
This is for sales taxes, other taxes such as duties or use taxes. Only applies when the settlement_value_fn (for SETTLEMENT_ITEM entries) or applied_value_fn (for SETTLEMENT_ITEM_APPLIED entries) are non-zero.
Note that for INVOICE_ADJUSTMENT records (tax) the procedure begins with Segment 5 construction (if required) because each Segment 5 eliminates the posting of values to the 'trade_receivables' and 'cash_in_bank' accounts for Segment 1 constructed from the same INVOICE_ADJUSTMENT record (tax). For this purpose it will be necessary to initialise the temporary variable is_segment_5_posted to FALSE for each INVOICE_ADJUSTMENT record (tax).
Note that in the following paragraphs the settlement_value_fn column is taken from the SETTLEMENT_ITEM table and the applied_value_fn column is taken from the SETTLEMENT_ITEM_APPLIED table when the INVOICE_ADJUSTMENT was found on that table.
To construct each Segment 1:
To construct each Segment 4:
This includes all INVOICE_ADJUSTMENT entries except those linked to an ORDER_ADJUSTMENT_TYPE entry having an order_adjustment_type_id that begins with 'TAX', and those linked to a PRICE_COMPONENT entry having a price_type of 'C' (Commission). It also excludes any entry where product_id_free is non-blank as that product will have its own entry in the INVOICE_ITEM table, and where the settlement_value_fn (for SETTLEMENT_ITEM entries) or applied_value_fn (for SETTLEMENT_ITEM_APPLIED entries) are zero.
For each INVOICE_ADJUSTMENT record meeting the criteria described in the preceding paragraph:
Note 15d: This design supports only the "gross method" accounting treatment for financial discounts, also known as "cash discounts" or "early settlement discounts". Under the gross method, invoices, credit notes and debit notes which are open and outstanding are carried on the books at full face value until settled, and financial discounts are recognised as a business expense only when customers take the financial discounts offered. Market research indicates that nearly all businesses use gross method instead of the "net method", under which open invoices, credit notes and debit notes are carried on the books at net value after the financial discount offered.
Note that for INVOICE_ADJUSTMENT records (non-tax) the construction of a Segment 2 (if required) is performed before a Segment 1 because each Segment 2 eliminates the posting of values to the 'trade_receivables' and 'cash_in_bank' accounts for Segment 1 constructed from the same INVOICE_ADJUSTMENT record (non-tax). For this purpose it will be necessary to initialise the temporary variable is_segment_2_posted to FALSE for each INVOICE_ADJUSTMENT record (non-tax).
To construct each Segment 2:
To construct each Segment 1:
To construct each Segment 5:
This section includes all INVOICE_ITEM, INVOICE_ITEM_ADJUSTMENT and INVOICE_ITEM_FEATURE components which are attached to an entry on the SETTLEMENT_ITEM_APPLIED or SETTLEMENT_ITEM table, except those INVOICE_ITEM_ADJUSTMENT entries linked to a PRICE_COMPONENT entry having a price_type of 'C' (Commission).
To construct each Segment 1:
This includes all SETTLEMENT_HEADER entries having a non-zero commission_fee_fn value.
A Segment 6 must be constructed for any such entry:
This includes all SETTLEMENT_HEADER entries for which the total_settlement_value_fn value on the SETTLEMENT_HEADER entry is not equal to the sum of all settlement_value_fn values on the related SETTLEMENT_ITEM entries, less the sum of all applied_value_fn values on their related SETTLEMENT_ITEM_APPLIED entries.
A Segment 3 must be constructed for any such entry:
Segment 7 transfers accrued sales commission liabilities to sales commissions payable, when commissionable customer invoices, credit notes and debit notes are settled (see Note 23, below). Determination of whether or not any sales commissions were earned is done at two levels:
A Segment 7 must be constructed for any such entry:
This information exists within a shared table in the MENU database and not a separate table within the FINANCE_AR database. It holds values which can be varied to suit that particular installation. The current values are as follows:
Id | Description | Value (example) |
---|---|---|
JOURNAL_DESC_INVOICE | To be used as the default Journal Entry Description for Documents. | |
JOURNAL_DESC_SETTLEMENT | To be used as the default Journal Entry Description for Settlements. | |
MAX_ALLOWABLE_VARIANCE | A percentage value to be used as the maximum allowable variance for settlements. Any discrepancy between the outstanding balance and the settlement amount which does not exceed this value will be automatically cleared with the creation of either a Credit Note or a Debit Note. | 0.1% |
Date created: 12th December 2018
21 Mar 2024 | Updated SETTLEMENT_HEADER table to include the is_void_posted column. |
7th Feb 2024 | Updated the SETTLEMENT_HEADER table to correct the list of settlement_status_type_id values.
Updated the SETTLEMENT_STATUS_TYPE table to correct the list of values used by the system. |
21st Nov 2023 | Updated Steps 3a and 3b and added Step 3c of INVOICE_ADJUSTMENT records (tax), updated Steps 3a and 3b and added Step 3c of INVOICE_ADJUSTMENT records (non-tax), and updated Steps 3 and 4 and added Step 5 of INVOICE_ITEM, INVOICE_ITEM_ADJUSTMENT and INVOICE_ITEM_FEATURE records (payments) to correct the data sources for the contra side and first side entries. |
31 Aug 2023 | Updated Journal Entries Constructed from Settlements to include the calculations for the values which need to be posted. |
20 Dec 2020 | Updated the AR_PARTY_RELATIONSHIP table to include the relationship_name column.
Updated the SETTLEMENT_HEADER table to include the relationship_seq_no column. |
13 Nov 2020 | Move columns from the SETTLEMENT_ITEM table to the SETTLEMENT_ITEM_APPLIED table. |
04 Sep 2020 | Added the SETTLEMENT_ITEM_APPLIED table. |
25 Apr 2019 | Updated the determination logic descriptions for the 'wip' account usage in Segment 1 - Invoice/CN/DN components (Invoice Item, Invoice Item Adjustment and Invoice Item Feature components). |
14 Jan 2019 | Updated the SETTLEMENT_ITEM table by adding the balance and balance_tx columns. |
03 Jan 2019 | Updated the SETTLEMENT_HEADER table by adding the party_id_bill_to column. |
Copyright © 1999-2024 by Geoprise Technologies Licensing, All Rights Reserved.