Invoice Lifecycle¶
Models the lifecycle of a commercial Invoice (both supplier/purchase invoices and customer/sales invoices) from creation through approval, payment, and archiving. Covers dispute handling and credit note issuance.
Object: invoice ·
States: 9 ·
Transitions: 11
State Diagram¶
flowchart LR
%% ── classDef palette ─────────────────────────────────────
classDef stInit fill:#0d9488,stroke:#0f766e,color:#fff,font-weight:bold
classDef stNorm fill:#3b82f6,stroke:#2563eb,color:#fff
classDef stOk fill:#16a34a,stroke:#15803d,color:#fff,font-weight:bold
classDef stFail fill:#dc2626,stroke:#b91c1c,color:#fff,font-weight:bold
classDef stHold fill:#d97706,stroke:#b45309,color:#fff
%% ── nodes ───────────────────────────────────────────────
draft(["Draft"])
issued["Issued"]
under_review["Under Review"]
approved["Approved"]
partially_paid["Partially Paid"]
paid[["Paid"]]
disputed["Disputed"]
credit_noted["Credit Noted"]
cancelled[["Cancelled"]]
%% ── transitions ─────────────────────────────────
draft -->|"payment-captured"| issued
issued -->|"payment-captured"| under_review
under_review -->|"payment-captured"| approved
under_review -->|"payment-refunded"| disputed
approved -->|"payment-captured"| partially_paid
approved -->|"payment-settled"| paid
partially_paid -->|"payment-settled"| paid
disputed -->|"payment-captured"| approved
disputed -->|"payment-refunded"| credit_noted
credit_noted -->|"payment-settled"| paid
draft -->|"order-cancelled"| cancelled
%% ── class assignments ───────────────────────────
class draft stInit
class issued,under_review,approved,partially_paid,disputed,credit_noted stNorm
class paid stOk
class cancelled stFail
States¶
| State | Label | Description | Initial | Terminal |
|---|---|---|---|---|
draft |
Draft | Invoice created but not yet issued or sent. May be modified. | ✓ | |
issued |
Issued | Invoice sent to recipient. Payment terms clock started. | ||
under-review |
Under Review | Invoice received by payee and being validated against PO/GR (three-way match). | ||
approved |
Approved | Invoice validated and approved for payment. In payment queue. | ||
partially-paid |
Partially Paid | Partial payment received or made. Remaining balance outstanding. | ||
paid |
Paid | Invoice fully settled. Accounting entry closed. | ✓ | |
disputed |
Disputed | Invoice contested by payer (price variance, missing goods, quality issue). Payment on hold pending resolution. | ||
credit-noted |
Credit Noted | Credit note issued to offset invoice amount. Net balance adjusted. | ||
cancelled |
Cancelled | Invoice voided before payment (e.g. order cancelled, error corrected). | ✓ |
Transitions¶
| From | To | Trigger | Guards |
|---|---|---|---|
draft |
issued |
payment-captured |
All mandatory fields complete; Tax calculation applied |
issued |
under-review |
payment-captured |
Invoice received by accounts payable; Three-way match process initiated |
under-review |
approved |
payment-captured |
PO, GR, and invoice quantities and prices match within tolerance |
under-review |
disputed |
payment-refunded |
Variance found beyond tolerance; Dispute reason documented |
approved |
partially-paid |
payment-captured |
Payment amount less than invoice total |
approved |
paid |
payment-settled |
Payment amount equals invoice total |
partially-paid |
paid |
payment-settled |
Remaining balance settled |
disputed |
approved |
payment-captured |
Dispute resolved (price adjusted or credit note agreed) |
disputed |
credit-noted |
payment-refunded |
Supplier issues credit note for disputed amount |
credit-noted |
paid |
payment-settled |
Net amount after credit note settled |
draft |
cancelled |
order-cancelled |
Invoice not yet issued; Corresponding order cancelled |