Automatic values and checks
Much of what a document shows is not typed by anyone. OnERP fills in values, checks every save, keeps running figures from other documents, and finishes some work in the background. Each of these belongs to a kind of business object, so it applies the same way on every screen, through the assistant and through every integration.
Values OnERP fills in
Section titled “Values OnERP fills in”An automatic value (determination) is worked out from other fields and updates as you edit:
- choosing a customer brings the currency, payment terms and payment method, and the addresses;
- choosing a product brings the line text, the unit and the price;
- every line gets its amount and tax, and the document its totals;
- the tax handling is decided from where you sell from and where the goods go;
- an invoice’s due date and cash discount date follow from its payment terms;
- a document gets its number at release.
Some of these are proposals that can be changed by hand, such as a price or the tax handling. A changed value stays until one of the facts it was worked out from changes. Totals and numbers cannot be typed over. The concrete rules are in How a price is chosen and How tax is decided.
Checks that refuse a save
Section titled “Checks that refuse a save”A check (validator) looks at the whole order, invoice or product before it is saved and refuses the save when something does not fit, naming the field and the reason. It never changes anything. Examples:
- a goods movement needs at least one line, and a transfer cannot move stock onto the location it came from;
- a document’s currency cannot change once it has lines;
- a product’s base unit cannot change once stock has been booked for it;
- a sale that needs an OSS registration is refused at release without one.
A draft skips the checks until it is released. See Lifecycle.
Running figures
Section titled “Running figures”Some fields are running figures (rollup): they add up what other documents did, and change whenever one of those documents does:
- Invoiced Quantity on a sales order line counts what released invoices bill for, less what cancellations take back;
- Credited Net Amount on an invoice line counts what cancellations and corrections have credited;
- Credited Amount and Paid Amount on an invoice count what credits took back and what payments settled, and give the Open Amount;
- Picked Quantity on a sales order line counts what the warehouse has picked.
They cannot be typed, and they change even on a document that is otherwise locked. They are what decide, for example, how much of an order is still open to invoice. See Sales order status and Invoices, credits and payments.
Work after the change
Section titled “Work after the change”Some background work (workflow) starts once a change is saved. A released invoice gets its PDF rendered and stored a moment after release.
Such a change shows in the history as made by OnERP (automatic). See History and editing together.
Every kind of business object lists its automatic values under Rules and its checks under Checks in the data model.