Skip to main content

Invoices

Invoices and the accountant workflow over them: matching to a purchase order, PO reconciliation, tax validation, booking proposal, allocations, and hand-over to accounting.

๐Ÿ“„๏ธManually mark an invoice as a duplicate of another

Parks the invoice in DUPLICATE status, links it DUPLICATE_OF the named original, skips journal entry and PO advancement, and notifies the Buyer. Works regardless of the invoice_duplicate_guard flag. Requires the invoices.mark-duplicate write grant (Buyer, Accountant, Admin); the service further restricts to invoices the caller can access, and refuses the park once the invoice's workflow has progressed into accounting (READY_FOR_EXPORT_PREPARATION onward) or already ended (409).

๐Ÿ“„๏ธGet PO candidates for an invoice

Returns the stored purchase-order candidates for an invoice, narrowed to what this caller may act on. A caller holding the ACCOUNTANT role receives the stored set as it is. Every other caller receives only the orders they requested or buy, and also loses any candidate whose purchase order no longer resolves. A row withheld here is a row that caller could not have selected, so an absent row does not mean the matcher found no candidate. The stored set itself is drawn from a tenant-wide search only for an invoice that reached no personal inbox; for one that did, the search is scoped to that recipient's own orders, and only an order the document or a card charge named is stored past that scope.