In some advanced cases the items in Order detail, Invoice detail, Proforma invoice detail and Credit note detail responses differ to the Administration view or PDF export.
In case of coupon discount with absolute value (e. g. 100 Kč) or in case of a volume discount (in Administration only – both percentual and absolute) and products with multiple VAT rates in the order, than:
The difference is based on how data is internally stored and presented. To support also the presentation form, we have added a new array displayPrices
to each item in the items
array:
"itemPrice": {
"withVat": "-200.00",
"withoutVat": "-200.00",
"vat": "0.00",
"vatRate": "0.00"
},
"displayPrices": [
{
"withVat": "-187.60",
"withoutVat": "-155.04",
"vat": "-32.56",
"vatRate": "21.00"
},
{
"withVat": "-12.40",
"withoutVat": "-11.27",
"vat": "-1.13",
"vatRate": "10.00"
}
]
The itemPrice
is the data-based view, as used by API (for example for Order insertion), whereas the displayPrices
can be used for accounting purposes or own order (or invoice) rendering. In all other cases than described above, there will be only one item in the displayPrices
array and it will be the same as the itemPrice
.