Which one to use
Apply the same rules to the sales invoice and to the matching purchase invoice lines of an order, so both sides stay consistent.
Cancel an invoice
finalized invoice can be cancelled. Nocotax sets its status to cancelled and creates a credit note with the same items. order_reference and period are copied from the invoice and its lines to the credit note.
Partial correction
Create a credit note that references the invoice, and repeat theorder_reference and period of the line you correct:
"flow": "purchases" and supplier_id. Amounts are positive: the document type gives the sign, and exports show credit notes as negative.
Why the references matter
- The credit note has its own invoice date (the day you finalize it). If it only carried that date, a December correction finalized in January would be attributed to January.
order_referenceties the correction to the original order, so margin per order is net of refunds.periodtells which service period the correction relates to. See Accounting periods.
Refunding the money
Once a credit note is finalized, attach the money movement to it:transaction_type is refund, transfer_reversal or balance_adjustment. Without transaction_data, the full remaining amount is credited.