Skip to main content

When creating a receipt in the API, the last price is not populated in the item.

Use of previousValue in recipient - API

Written by Petr Pech

You may be accustomed to the desktop application automatically pre-filling the last price (from the stock card) when creating a goods receipt (or when adding an item to it).

This does not happen by default in the API — Flexi expects that in such cases the user will always enter the price manually.

However, automatic population of the last price can be achieved by using the previousValue parameter in the cenik element — for example, <cenik previousValue="">code:KOD_CENIK</cenik>.

The complete XML used to create a goods receipt with an item whose last price will be automatically populated may look like this, for example:

<winstrom>
<skladovy-pohyb>
<typPohybuK>typPohybu.prijem</typPohybuK>
<typDokl>code:STANDARD</typDokl>
<sklad>code:SKLAD</sklad>
<skladovePolozky>
<skladovy-pohyb-polozka>
<cenik previousValue="">code:KOD_CENIK</cenik>
<sklad>code:SKLAD</sklad>
<mnozMj>10</mnozMj>
</skladovy-pohyb-polozka>
</skladovePolozky>
</skladovy-pohyb>
</winstrom>
Did this answer your question?