322 — should re-render item amounts under each rounding option¶
Description¶
Verifies that switching the invoice rounding option (Nearest tenth → one → ten → hundred → thousand) re-formats the item's unit price, price, discount, total, and the invoice subtotal/grand total at the correct decimal precision, including with an invoice-level €50 discount applied on top.
Preconditions¶
- Signed-in tenant with
Client 01, two billable time records totalling €3,360.00, and the user on the new invoice form past the client step.
Steps¶
- Click Add item, name it, open the Time records picker, click Select all, save. Expected: time-records total reads
3,360.00. - Toggle Has unit on; set units
3.6, unit price100.7, unit name. Expected: item price362.52and final price362.52. - Switch item discount type to Amount and value
50. Expected: final price312.52. Save the item. Expected: the grid shows 1 item. - Expected: subtotal
€312.52, grand total€312.52. Switch the invoice-level discount type to Amount and value50. Expected: subtotal stays€312.52, grand total becomes€262.52. - Set rounding to Nearest tenth. Expected: unit price
€100.7, price362.5, discount€50.0, total€312.5, items total discount€50.0, items total€312.5, subtotal€312.5, grand total€262.5. - Set rounding to Nearest one. Expected: unit price
€101, price364, discount€50, total€314, items total€314, subtotal€314, grand total€264. - Set rounding to Nearest ten. Expected: unit price
€100, price360, discount€50, total€310, subtotal€310, grand total€260. - Set rounding to Nearest hundred. Expected: unit price
€100, price400, discount€100, total€300, subtotal€300, grand total€200. - Set rounding to Nearest thousand. Expected: unit price
€0, price0, discount€0, total€0, subtotal€0, grand total€0.
Related¶
- Spec:
playwright/tests/integration/invoice.spec.ts(line 615)