InvoiceCancellationPreview
A side-effect-free preview of cancelling an invoice: whether it can be cancelled, what blocks it, and the payments, credit notes, stock and commission effects.
type InvoiceCancellationPreview {
allocations: [InvoiceCancellationAllocationPreview!]!
blockers: [String!]!
canCancel: Boolean!
cancelledCreditNotes: [InvoiceCancellationCreditNotePreview!]!
commissionImpact: InvoiceCancellationCommissionImpactPreview
creditUsedElsewhere: [InvoiceCancellationCreditUsedElsewherePreview!]!
creditUsedElsewhereAmount: Float
currentOrderStatus: String
currentStatus: String!
estimatedCreditNoteAmount: Float
estimatedDebitNoteAmount: Float
invoiceId: ID!
invoiceNumber: String!
lineRestorations: [InvoiceCancellationLineRestorePreview!]!
orderId: ID
orderNumber: String
paidOnInvoiceAmount: Float
projectedOrderStatus: String
reopenedCreditNotes: [InvoiceCancellationCreditNotePreview!]!
requiresReverseAllocationsFlag: Boolean!
stockMovements: [InvoiceCancellationStockMovementPreview!]!
totalAllocatedAmount: Float!
}
Fields
InvoiceCancellationPreview.allocations ● [InvoiceCancellationAllocationPreview!]! non-null object
The payment allocations the cancellation reverses.
InvoiceCancellationPreview.blockers ● [String!]! non-null scalar
Reasons the invoice cannot be cancelled. Empty when it can.
InvoiceCancellationPreview.canCancel ● Boolean! non-null scalar
False when blockers is not empty.
InvoiceCancellationPreview.cancelledCreditNotes ● [InvoiceCancellationCreditNotePreview!]! non-null object
Credit notes raised on this invoice and applied only to it, which are cancelled with it.
InvoiceCancellationPreview.commissionImpact ● InvoiceCancellationCommissionImpactPreview object
The effect on commission for the order. Null when none.
InvoiceCancellationPreview.creditUsedElsewhere ● [InvoiceCancellationCreditUsedElsewherePreview!]! non-null object
Credit from this invoice that was already used on other invoices and is netted off.
InvoiceCancellationPreview.creditUsedElsewhereAmount ● Float scalar
The total of creditUsedElsewhere. Null for a purchase invoice.
InvoiceCancellationPreview.currentOrderStatus ● String scalar
The status of the order now.
InvoiceCancellationPreview.currentStatus ● String! non-null scalar
The status of the invoice now.
InvoiceCancellationPreview.estimatedCreditNoteAmount ● Float scalar
The amount of the credit note the cancellation issues for cash paid, less credit already used on other invoices. Null when nothing is given back.
InvoiceCancellationPreview.estimatedDebitNoteAmount ● Float scalar
The amount of the debit note the cancellation issues. Null when none is issued.
InvoiceCancellationPreview.invoiceId ● ID! non-null scalar
The ID of the invoice.
InvoiceCancellationPreview.invoiceNumber ● String! non-null scalar
The number of the invoice.
InvoiceCancellationPreview.lineRestorations ● [InvoiceCancellationLineRestorePreview!]! non-null object
The order lines whose invoiced quantity is restored.
InvoiceCancellationPreview.orderId ● ID scalar
The ID of the order the invoice was raised from.
InvoiceCancellationPreview.orderNumber ● String scalar
The number of that order.
InvoiceCancellationPreview.paidOnInvoiceAmount ● Float scalar
The cash paid on this sales invoice. Null for a purchase invoice.
InvoiceCancellationPreview.projectedOrderStatus ● String scalar
The status the order moves to once the invoiced quantities are restored.
InvoiceCancellationPreview.reopenedCreditNotes ● [InvoiceCancellationCreditNotePreview!]! non-null object
Credit notes raised on another invoice whose application to this invoice is reopened.
InvoiceCancellationPreview.requiresReverseAllocationsFlag ● Boolean! non-null scalar
True when money is settled on the invoice, through payments or applied credit notes. Pass reverseAllocations: true to cancel.
InvoiceCancellationPreview.stockMovements ● [InvoiceCancellationStockMovementPreview!]! non-null object
The completed stock movements from this invoice that the cancellation reverses.
InvoiceCancellationPreview.totalAllocatedAmount ● Float! non-null scalar
The total of those allocations.