applyAdvanceBilling Mutation
Applies an advance bill to a posted customer invoice: Dr the deferred revenue account / Cr accounts receivable, relieving the deferral against the receivable that invoice raised and reducing the invoice balance. Revenue is recognized by the invoice, so nothing is credited to revenue here — the application draws from the same deferred pool the recognition schedule draws from, and the recognition periods it consumes are reduced by the same amounts. Access: signed-in members of the advance billing's workspace with the billingInvoiceGenerate permission, in a workspace where finance is enabled. Errors: advance billing not found; the advance bill posted no issuance journal, so the deferral this would relieve was never credited; amount not greater than zero; amount above the unapplied balance; amount above the deferred revenue still held (revenue already recognized cannot be deferred again); source is not a posted customer invoice; invoice belongs to another customer; accounting period not found or not open; posting batch not found; posting date inside closed books; the advance billing, its invoice, or one of its recognition periods changed while it was being applied; and a refusal to post at all when the deployment cannot run the write in a transaction. Repeating a call with the same idempotencyKey returns the first result.
Arguments
#
Response
#
Returns AdvanceBilling !.
Example
#
applyActionTemplate