“Centralizes percentage calculations so invoice discounts and taxes use the same helper. Existing billing tests are green.”
Finance found that a one-cent adjustment at exactly 50% sometimes disappears. Billing policy requires round half up for positive cent amounts.
Review the patch as you would at work:
- Flag the line where the rounding contract is violated.
- Explain the failure in one or two sentences.
- Fix the implementation without converting money to binary floating-point.
invoice.py and tax.py are read-only callers that reveal the shared contract. Keep ordinary percentages and zero-value adjustments working.