closeAdvanceBilling Mutation
Drafts the revenue invoice that closes out an advance bill's unapplied balance, in one call instead of hand-authoring it. The draft goes through the same writer every generated invoice uses, so it is freely editable, never auto-sent, and each line carries the derivation an adjustment receipt is a diff against. It posts nothing: the deferral is relieved when a human posts the draft and applies the advance to it, which is the existing two-step rail. The close line credits the revenue account the advance bill stamped at issuance — the one its recognition schedule credits — so closing cannot recognize a single deferral into two accounts. Naming an item overrides that at posting, since an item states where its own revenue is earned. 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 member may not write the books the advance bill is filed in; the advance bill posted no issuance journal, so the application this draft exists for could never relieve it; nothing left unapplied; the advance bill is billed in a currency the draft-invoice rail cannot total; and a live closing draft already exists — post, edit or void it first, which is what stops the same deferred balance being asked for twice.
Arguments
#
input
Response
#
Returns CustomerInvoice !.
Example
#
closeAccountingPeriod
closeOpportunity