TC-BIL-007: Discounts, Adjustments & Void

🆕 New on stage — 2026-06-29 → 2026-07-01. This TC covers the invoice-discount and void features shipped after the prior guide freeze: the Apply-Discount control + discount line rendering (#494), ₱0 fully-discounted invoices no longer hidden from the list (#495), the discount cap now counting only settled allocations (#497/#498), and void lifted to all invoice sources — dues, event, manual (#503). See the Test Plan banners and the Jun 29 / Jul 1 release notes.

Module: Billing & Invoicing — Discounts / Void

Primary Test User: treasurer@demo.membervu.com / Treasurer123! (Finance Manager)

Priority: P1 (money-adjacent — discount cap correctness and void guards)

Objectives

  1. Apply a discount (PERCENTAGE or FIXED) to an OUTSTANDING invoice and confirm a discount line renders with the balance dropping by the exact amount.
  2. Fully discount an invoice to ₱0 and confirm it still appears in the invoice list (not silently hidden).
  3. Confirm the discount cap counts only SETTLED allocations — a PENDING/UNDER_REVIEW allocation must not inflate amountPaidCents or let a discount slip below the genuinely-paid amount.
  4. Void an invoice from each source — dues, event, manual — and confirm the action is available and succeeds for all three (subject to the refund-first guard on SUCCEEDED payment allocations).

Scenario summary

IDScenarioKey data assertion
BIL7-01Apply PERCENTAGE discountPOST /api/billing/admin/invoices/:invoiceId/discount returns 200; invoice amountCents drops to the exact net; a discount line/badge with reason is visible on detail; originalAmountCents is preserved.
BIL7-02Apply FIXED discountBalance drops by exactly the fixed cents amount, not a rounded/approximate figure.
BIL7-03Fully-discounted ₱0 invoice still listedAfter discounting to ₱0, the invoice remains in GET /api/billing/invoices/tenant results and is visible in the admin invoice list UI — not filtered out.
BIL7-04Discount cap ignores PENDING allocationWith a PENDING/UNDER_REVIEW manual-payment allocation on the invoice, a discount that would take net below the settled paid amount is rejected 409; a discount that only conflicts with the (uncounted) pending amount succeeds.
BIL7-05Void a DUES-source invoicePOST /api/billing/admin/invoices/:invoiceId/void200, status VOID.
BIL7-06Void an EVENT-source invoiceSame endpoint succeeds for an event-sourced invoice — no source-based rejection.
BIL7-07Void a MANUAL/OTHER-source invoiceSame endpoint succeeds for a manually-created invoice.
BIL7-08Void blocked on SUCCEEDED paymentVoiding an invoice with a SUCCEEDED payment allocation is rejected — refund-first guard still applies regardless of source.

➡️ Full click-by-click steps: TC-BIL-007 (Detailed).