Search

saveInventoryWriteOff

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.

Input parameters

Parameter nameDescriptionPossible valueRequired
inventoryWriteOffIDInventory 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-
creatorIDCompany user unique IDInteger
reasonIDID of the reason. See getReasonCodes.Integer yes
warehouseIDID of the warehouseInteger yes
recipientIDID of the recipient of goodsInteger
currencyCodeCurrency code: EUR, USD. Currency must be present in the system.
If omitted, default currency will be used.
String
dateeg. 2010-01-29
If omitted, current date will be used.
Date
commentsString
confirmedBy default 10 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 lineDecimal 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

Response

Field nameTypeDescription
inventoryWriteOffIDIntegerID of the newly-created item