Pricing & discounts
How a purchase order's money is worked out: each line, the subtotal, the one-time discount and the total. The rules match Money & rounding.
Who uses it
Supplier staff entering prices and discounts. The numbers also print on the PO invoice.
How it works
Unit price. A vendor's price can have up to 4 decimals, because vendors quote catch-weight rates below the cent ($16.299/LB). The price field accepts what you type and shows 47.5 as typed; everywhere it is read, it shows at least 2 decimals: $47.50, $16.299. Prices of 0 or more are allowed.
One-time discount. Switched on with Add One-time Discount when the order is created, or from Add Discount (or Edit Discount) in the header while the order is Pending or Delivered. Choose percent off or a flat off amount, and give it an optional name. The order summary shows it as "Discount (10%)" for a percentage or "Discount" for a flat amount. Clearing it removes it.
Calculations
- Each line total = pricing quantity × unit price, rounded half up to the cent. The pricing quantity is the quantity, or the received weight for a catch-weight line.
- Subtotal = the sum of the already rounded line totals, less any returns.
- Discount is worked out on the subtotal and rounded to the cent.
- Total = subtotal − discount, never below $0.00.
Each line is rounded first and the rounded lines are added, so the total always equals the lines printed on the invoice.
| Line | QTY | Unit price | Line total |
|---|---|---|---|
| Chicken thighs | 10 | $42.50 | $425.00 |
| Olive oil | 4 | $16.299 | $65.20 |
| Subtotal | $490.20 | ||
| 10% discount | −$49.02 | ||
| Total | $441.18 |
A flat $500 discount on that order would bring the total to $0.00, not below it, and an order created at $0.00 reads as Paid.
Rounding once at the end can leave a printed invoice whose lines add up a cent away from its total. Rounding each line first prevents it.
The discount follows the order: if a line is edited, the discount is recalculated on the new subtotal. A percentage stays the same percentage; a flat amount stays the same amount.
Where it shows up
New purchase order, the detail page, the PO invoice PDF and the order queue's totals. Totals, quantities and weights show at most 2 decimals; only the unit price shows up to 4.
Permissions
Full access to purchase orders to change prices or the discount.
Decisions
- Unit price carries 4 decimals; everything else stays at 2. A buyer matching a case price back to a per-pound rate needs the fourth digit.
- Rounding is half up, never banker's.
- Settled orders do not reprice on unrelated edits. Editing a note or reference number never recalculates the total.
FAQ
The unit price shows $16.299 but the total looks rounded. Is that right? Yes. The price keeps its fourth digit and the line total is rounded to the cent: 4 × $16.299 = $65.196 → $65.20.
Why did the total stop at $0.00? The discount was larger than the subtotal. The total is never negative.