"subItems" can be used to depict set items, menu items or similar in RetailForce. For example, when a product is sold together with a service as a single product, or a set menu at a single price comprising a starter, a main course and a dessert.
The respective sub-items are always located within the relevant item, in the "subItems" element of the JSON payload, and are defined by the "type": "[1] = SubItem" of the "positions" element.
The structure of the individual subItems corresponds to that of the item positions ("type": "[0] = Item"), but must NOT contain the "UseSubItemVatCalculation" property.
AutomaticVatCalculation
The setting via the "AutomaticVatCalculation" property also applies to subItems. Depending on which calculation method has been selected,
- "NoCalculation" = 0
- "NetValueCalculation" = 1
- "GrossValueCalculation" = 2
either all elements must be present, or certain values may be omitted. The "vatPercent" (resp. "vatPercent2") and "vatIdentification" elements must always be specified.
| Calculation type | "netValue" | "grossValue" | "taxValue" ("taxValue2") |
| "NoCalculation" | Mandatory field | Mandatory field | Mandatory field |
| "NetValueCalculation" | is calculated | Mandatory field | is calculated |
| "GrossValueCalculation" | Mandatory field | is calculated | is calculated |
Further details regarding the calculation of values for sub-items can be found in the article Property "UseSubItemVatCalculation".
Numbering of subItems positions
SubItem positions may be numbered as desired.
Examples of permitted numbering schemes for sub-items:
- the same numbering as for items - consecutive numbering of subItem positions from 0 to n
- numbering starting with {item position number}.{subItem sequence number}: e.g. 0.1, 0.2, 0.3
However, the numbering must be consistent within each item. This means that, within each item, the numbering of subItems must start from the beginning and the same numbering conventions must be used.
Example of subItems
The following example shows only the “positions” element and not a complete document!
"Positions": [
{
"PositionNumber": 0,
"ItemCaption": "Lunch menu",
"ItemShortCaption": "MM-DO",
"ItemSerialNumber": null,
"Type": 0,
"Quantity": 2.0,
"QuantityUnit": {
"Id": "STK"
},
"ItemType": 0,
"ItemId": "MM-DO",
"ItemTaxType": 0,
"useSubItemVatCalculation": true,
"InHouse": true,
"ItemGroupId": "1000",
"ItemGroupCaption": "Set menu",
"BusinessTransactionType": 0,
"CostPrice": 10.00,
"BaseNetValue": 28.91,
"BaseGrossValue": 31.80,
"BaseTaxValue": 2.89,
"Discounts": [],
"VatIdentification": 0,
"VatPercent": 0,
"NetValue": 28.91,
"GrossValue": 31.80,
"TaxValue": 2.89,
"AdditionalFields": {},
"ExternalIdentifier": [],
"subItems": [
{
"PositionNumber": 0,
"ItemCaption": "Cream of Garlic Soup",
"ItemShortCaption": "KC-Soup",
"ItemSerialNumber": null,
"Type": 1,
"Quantity": 2.0,
"QuantityUnit": {
"Id": "STK"
},
"ItemType": 0,
"ItemId": "KC-Soup",
"ItemTaxType": 0,
"InHouse": true,
"ItemGroupId": "2000",
"ItemGroupCaption": "Starters",
"BusinessTransactionType": 0,
"CostPrice": 3.80,
"BaseNetValue": 6.91,
"BaseGrossValue": 7.60,
"BaseTaxValue": 0.69,
"Discounts": [
{
"Identifier": "MM-R",
"Caption": "Lunch menu discount",
"Type": 1,
"DiscountOrder": 0,
"DiscountValue": 1.2920,
"TypeValue": 17
}
],
"VatIdentification": 2,
"VatPercent": 10.0,
"NetValue": 5.74,
"GrossValue": 6.31,
"TaxValue": 0.57,
"AdditionalFields": {},
"ExternalIdentifier": []
},
{
"PositionNumber": 1,
"ItemCaption": "Viennese Schnitzel",
"ItemShortCaption": "VienneseS",
"ItemSerialNumber": null,
"Type": 1,
"Quantity": 2.0,
"QuantityUnit": {
"Id": "STK"
},
"ItemType": 0,
"ItemId": "VienneseS",
"ItemTaxType": 0,
"InHouse": true,
"ItemGroupId": "1000",
"ItemGroupCaption": "Main courses",
"BusinessTransactionType": 0,
"CostPrice": 12.00,
"BaseNetValue": 21.82,
"BaseGrossValue": 24.00,
"BaseTaxValue": 2.18,
"Discounts": [
{
"Identifier": "MM-R",
"Caption": "Lunch menu discount",
"Type": 1,
"DiscountOrder": 0,
"DiscountValue": 4.3200,
"TypeValue": 18
}
],
"VatIdentification": 2,
"VatPercent": 10.0,
"NetValue": 17.89,
"GrossValue": 19.68,
"TaxValue": 1.79,
"AdditionalFields": {},
"ExternalIdentifier": []
},
{
"PositionNumber": 2,
"ItemCaption": "Mixed ice cream sundae",
"ItemShortCaption": "EB-gem",
"ItemSerialNumber": null,
"Type": 1,
"Quantity": 2.0,
"QuantityUnit": {
"Id": "STK"
},
"ItemType": 0,
"ItemId": "EB-gem",
"ItemTaxType": 0,
"InHouse": true,
"ItemGroupId": "5000",
"ItemGroupCaption": "Deserts",
"BusinessTransactionType": 0,
"CostPrice": 3.50,
"BaseNetValue": 6.36,
"BaseGrossValue": 7.00,
"BaseTaxValue": 0.64,
"Discounts": [
{
"Identifier": "MM-R",
"Caption": "Lunch menu discount",
"Type": 1,
"DiscountOrder": 0,
"DiscountValue": 1.1900,
"TypeValue": 17
}
],
"VatIdentification": 2,
"VatPercent": 10.0,
"NetValue": 5.28,
"GrossValue": 5.81,
"TaxValue": 0.53,
"AdditionalFields": {},
"ExternalIdentifier": []
}
]
},
Comments
0 comments
Please sign in to leave a comment.