Understand G/L account costs in Account Sale settlements
When a cost template contains G/L account cost lines — lines where the selected trade plan is configured with a G/L Account No. — the Account Sale settlement calculation reads the G/L entries linked to the item ledger entries in scope and includes those amounts as cost lines in the settlement.
G/L account-based costs are only populated for settlements with the Accounting Method field set to Account Sale. For Pooling and Consignment, G/L account cost lines in the cost template are skipped during calculation and no cost is populated.
G/L account costs in Account Sale settlements require Aptean Trade Management to be installed. The G/L account values and the link between G/L entries and item ledger entries are established by Trade Management during transaction processing.
How the calculation works
When an Account Sale settlement is calculated, the system processes each G/L account cost template line as follows:
-
The system builds a line trace for the settled purchase lines — a set of item ledger entry numbers that represent the inventory movements in scope for the settlement.
-
For each G/L account cost template line, the system queries the G/L Entry Extension table filtered by those item ledger entry numbers. This table links individual G/L entries to the item ledger entries that caused them, allowing the system to identify exactly which G/L amounts originated from the movements in scope.
-
The amounts are grouped by G/L account:
- Amounts on the G/L Account No. account are used as the Cost Amount (Expected).
- Amounts on the G/L Account No. (Actual) account are used as the Cost Amount (Actual).
-
The Cost Application Method on the cost template line determines which amount is included in the settlement:
- Actual if one exists: when the same cost is applied more than once — for example, a trade plan cost with Accrual Type set to Actual Cost posted on multiple item ledger entries in scope — and at least one of those postings has been invoiced, the actual (invoiced) amount from that one posting is used as the entire cost, instead of summing the individual postings. If none of the postings have been invoiced yet, the expected amount is used for the whole cost instead.
- Actual if exists: unlike Actual if one exists, each individual G/L entry in scope is evaluated separately — using its actual amount if it has been invoiced, otherwise its expected amount — and these values are summed across all the entries. When the cost is split across multiple purchase documents, this means the total is the sum of the actual amount for documents already invoiced and the expected amount for documents not yet invoiced.
- Expected: always uses the expected amount from the expected G/L account.
- Actual: always uses the actual amount from the actual G/L account.
-
If no G/L entries are found for either account for the item ledger entries in scope, no cost line is created in the settlement — zero amounts are not shown.
Traceability
Each G/L account cost line in the settlement can be traced to its originating G/L entries. To view the individual G/L entries that contributed to a cost line, select the amount on the Account Sale page to open the Account Sale Detail Lines page. Each row represents one G/L entry, with the Source Document No. identifying the originating transaction.
For setup information, see Set up cost calculation templates.