Skip to main content

Creating a Receipt in API with the Last Price

Can an item be automatically inserted into a goods receipt with the last price at which it was received?

Written by Petr Pech

In both the desktop and web application, the standard workflow loads the last price at which an item was received as soon as that item is added to a receipt.

This price can always be changed, of course. However, it can be used until the actual price is known — and the actual price will likely differ from the current price by less than a zero price would.

This workflow is also available via the API by using the "previousValue" parameter with an empty value "" on the price list object. See the example below for details.

<winstrom>
<skladovy-pohyb>
<typDokl>code:STANDARD</typDokl>
<typPohybuK>typPohybu.prijem</typPohybuK>
<kod>12345</kod>
<sklad>code:PLZEŇ</sklad>
<skladovePolozky>
<skladovy-pohyb-polozka>
<cenik previousValue="">code:XK 654501</cenik>
<sklad>code:PLZEŇ</sklad>
</skladovy-pohyb-polozka>
</skladovePolozky>
</skladovy-pohyb>
</winstrom>
Did this answer your question?