Create an Inventory Write-Off or update an existing one.
Inventory Write-Off is a document that removes products from inventory; it has a list of items and quantities.
Non-stock products and bundles cannot be on Inventory Write-Offs (these items do not have inventory).
Products can be added to stock with Inventory Registrations (see getInventoryRegistrations and saveInventoryRegistration) and moved between locations with Inventory Transfers (see getInventoryTransfers and saveInventoryTransfer).
To retrieve a list of Inventory Write-Offs, see getInventoryWriteOffs.
|Parameter name||Description||Possible value||Required|
|inventoryWriteOffID||Inventory write-off ID.
Set this parameter to update an existing Inventory Write-Off.
If the Erply account has upgraded inventory module (indicated by the (i) signifier at the lower right corner, after version number, in Erply backend), and the write-off is already in confirmed status, it is no longer possible to change:
|creatorID||Company user unique ID||Integer|
|reasonID||ID of the reason. See
|warehouseID||ID of the warehouse||Integer||yes|
|stocktakingID||ID of the inventory stocktaking act, returns error 1186 if provided inventory stocktaking is already connected with inventory write-off.||Integer|
|recipientID||ID of the recipient of goods||Integer|
|currencyCode||Currency code: EUR, USD. Currency must be present in the system.
If omitted, default currency will be used.
If omitted, current date will be used.
|confirmed||By default 1||0 or 1|
|*****||Document lines (rows). Send document lines as a flat list, each line defined by the following set of parameters. Replace # with set number (1, 2, 3, ...). For example: productID1, amount1, price1 for the first Inventory Write-Off row, productID2, amount2, price2 for the second one and so on.|
|productID#||Product ID for this document line.||Integer||yes|
|amount#||Amount for this document line||Decimal||yes|
|price#||Unit cost. NB! It is typically unnecessary to set this field, because Erply removes items from stock according to FIFO principle (items are subtracted from the oldest batch currently in stock) and the cost is taken automatically from that batch.||Decimal|
|inventoryWriteOffID||Integer||ID of the newly-created item|