Documents, headers and line items
How a transactional document is put together, why its totals always agree with its lines, and when the lines stop changing.
Every transactional document opens onto a detail page: a header summary above, line-item grids below, reached from the Detail action on its list. The header can be edited in place from that page — which is where you are standing when you have just read the document and seen what is wrong with it.
Lines are a grid, not a blob
Lines are entered in a grid: pick the item or the GL account from a dropdown, type the quantity, watch the running total. Documents whose header and lines are written together — journals, requisitions, purchase orders, supplier invoices, opportunities — carry that same grid inside the creation form, so the document is made in one act rather than created empty and filled afterwards.
| Module | Document | What the lines are |
|---|---|---|
| Accounting | Journals | Posted lines: account, debit, credit. Immutable. |
| Accounting | AP and AR invoices | Costed lines with item, GL account and tax. |
| CRM | Opportunities | Product lines, which become the AR invoice on Closed Won. |
| CRM | Field work orders | Tasks with labour and technician, plus parts drawn from inventory. |
| Supply Chain | Requisitions and purchase orders | Item lines showing received and outstanding quantities. |
| Supply Chain | Receipts | Received quantities by bin and lot. Immutable. |
| HRMS | Payroll runs | A payslip per employee: gross, tax, deductions, net. |
| Manufacturing | Production orders | BOM-exploded components and routing operations. |
| Manufacturing | Quality inspections | Measured characteristics against their spec limits. |
| EHR | Encounters | Billable charge lines. |
| Student Lifecycle | Term billing | Charges from registration, netted against accepted aid. |
Two rules enforced in the API, not merely in the screen
- Header totals are derived. Adding, changing or deleting a line recalculates the header subtotal, tax and total in the same database transaction. The header can never disagree with its lines, whatever route the change arrived by.
- Lines freeze with the document. Once an invoice is posted, a purchase order received, a work order completed or an encounter billed, its lines are read-only — those states have already produced journal entries and stock movements. They freeze with a closed fiscal period too, for the same reason.
The grid tells you which of the two it is rather than letting you type and then failing on save. "Posted" and "the period is closed" are different problems with different answers, and being told the wrong one costs an afternoon.