Magidoc

discardWipBatch
Mutation

Discards a prepared (draft) WIP batch. Drafts hold no journal and claim no worksheet lines, so nothing is released or reversed; a posted batch is unposted, not discarded. The reason is sanitized, and one made only of whitespace or markup is stored as no reason at all. Access: signed-in members of the batch's workspace with the accountingPost permission, in a workspace where finance is enabled. Errors: WIP batch not found; batch is not prepared — a posted batch is unposted instead, and an already-discarded one cannot be discarded twice; and a concurrency refusal when the batch leaves the prepared state while this discard is running.

Arguments

#

batchId

ID !
Non-null

reason

Response

#

Returns WipPostingBatch !.

Example

#