WorkOrderInvoiceFinalized
Consumed by this service. AR: a client invoice was finalized. Creates and (if
Document.Commit) commits the sales tax document.
When
PVC Connect finalized a client invoice (AR). The service creates the sales-tax document and commits it when document.commit is true.
How it is handled
Same idempotency as POST /api/v1/tax/documents: redelivery or resending the same content is harmless. Results come back as TaxDocumentSaved/TaxDocumentCommitted, TaxCalculationDeferred or TaxCalculationFailed. Invalid payloads (same rules as the REST request, and direction must be Receivable) go to the _error queue without retries, with a Fault<WorkOrderInvoiceFinalized> naming the fields.
Routing
Publish to exchange pvc.integrations.work-order-invoice-finalized; it is bound to this service's queue work-order-invoice-finalized.
Fields
| Field | Type | Meaning |
|---|---|---|
document | CreateTaxDocumentRequest | The invoice, exactly as for POST /api/v1/tax/documents (direction must be Receivable). |