Los SubItems permiten componer un artículo principal en un recibo a partir de varias partes. Un ejemplo típico es un menú que se vende como un solo artículo pero que contiene, por ejemplo, una hamburguesa, patatas fritas y una bebida. El artículo principal tiene un precio total, y los SubItems se registran con sus propios precios, tipos impositivos e información de inventario.
1. Estructura técnica y campos clave
Artículo principal
El artículo principal es un Position objeto de tipo Type: 0 (Artículo). Para los SubItems, son obligatorios los siguientes campos:
| Propiedad | Tipo | Descripción |
|---|---|---|
| UseSubItemVatCalculation | boolean | (Obligatorio) Debe establecerse en «true» para que los valores del IVA se calculen a partir de los SubItems. |
| VatIdentification | entero | (Obligatorio) Debe ser 0 cuando UseSubItemVatCalculation esté activo. |
| VatPercent | decimal | (Obligatorio) Debe ser 0 cuando UseSubItemVatCalculation esté activo. |
| SubItems | Array<subitem></subitem> | (Obligatorio) Contiene los SubItems con su propio precio e información fiscal. |
Nota: NetValue, GrossValue y TaxValue del elemento principal deben ser iguales a la suma de los SubItems.
SubItems
| Propiedad | Tipo | Descripción |
|---|---|---|
| tipo | cadena | (Obligatorio) Debe ser «SubItem ». |
| Cantidad | decimal | (Obligatorio) Cantidad del subartículo. |
| VatIdentification | entero | (Obligatorio) N.º de identificación a efectos del Vat del subartículo. |
| VatPercent | decimal | (Obligatorio) Tipo impositivo del subartículo. |
| NetValue , TaxValue , GrossValue | decimal | (Obligatorio) Información sobre el precio de cada SubItem. GrossValue = NetValue + TaxValue . |
2. Ejemplo: Payload completo
La siguiente storeDocument solicitud contiene un elemento principal («Elemento de prueba 1 (Menú)») con dos SubItems:
{
"fiscalDocumentNumber": "2",
"fiscalDocumentStartTime": 1755507048,
"FiscalDocumentRevision": 1,
"ModelVersion": "1.4.0",
"UniqueClientId": "8ccedd62-9f72-4cda-b101-7e5e62fb37dc",
"AutomaticVatCalculation": 1,
"DocumentGuid": "08679cec-0df2-4ee0-a138-7ddf55ed2372",
"DocumentId": "08679cec-0df2-4ee0-a138-7ddf55ed2372",
"documentNumber": "08679cec-0df2-4ee0-a138-7ddf55ed2372",
"AllowedVatDeviation": 0.01,
"isTraining": true,
"CreateDate": "2025-08-18T08:52:37Z",
"BookDate": "2025-08-18T08:52:37Z",
"DocumentType": 0,
"positionCount": 2,
"User": {
"Id": "test",
"Caption": "test"
},
"Positions": [
{
"PositionNumber": 0,
"ItemCaption": "Testartikel 1 (Menü)",
"Type": 0,
"InHouse": false,
"Quantity": 1,
"ItemId": "Artikel1",
"VatIdentification": 0,
"VatPercent": 0,
"BusinessTransactionType": 0,
"BaseNetValue": 0.84,
"BaseGrossValue": 1,
"BaseTaxValue": 0.16,
"Discounts": [],
"NetValue": 0.84,
"GrossValue": 1,
"TaxValue": 0.16,
"useSubItemVatCalculation": true,
"subItems": [
{
"type": "SubItem",
"positionNumber": 1,
"ItemCaption": "Unterposition 1.1",
"ItemId": "SubArtikel1-1",
"Quantity": 1,
"VatIdentification": "1",
"VatPercent": 19,
"BusinessTransactionType": 0,
"NetValue": 0.50,
"GrossValue": 0.60,
"TaxValue": 0.10
},
{
"type": "SubItem",
"positionNumber": 2,
"ItemCaption": "Unterposition 1.2",
"ItemId": "SubArtikel1-2",
"Quantity": 1,
"VatIdentification": "1",
"VatPercent": 19,
"BusinessTransactionType": 0,
"NetValue": 0.34,
"GrossValue": 0.40,
"TaxValue": 0.06
}
]
},
{
"PositionNumber": 1,
"ItemCaption": "Testartikel 2",
"Type": 0,
"InHouse": false,
"Quantity": 1,
"ItemId": "Artikel2",
"VatIdentification": "1",
"VatPercent": 19,
"BusinessTransactionType": 0,
"BaseNetValue": 0.84,
"BaseGrossValue": 1,
"BaseTaxValue": 0.16,
"Discounts": [],
"NetValue": 0.84,
"GrossValue": 1,
"TaxValue": 0.16
}
],
"Payments": [
{
"Amount": 2,
"CurrencyIsoCode": "EUR",
"paymentType": "cash",
"caption": "Barzahlung",
"uniqueReadablePaymentIdentifier": "CASH/EUR",
"ExternalIdentifier": []
}
]
}
3. Lista de comprobación
✓ El artículo principal contiene "subItems".
✓ "useSubItemVatCalculation": true está configurado.
✓ VatIdentification y VatPercent del elemento principal son 0.
✓ Cada subelemento dispone "type": "SubItem".
✓ Los SubItems disponen de su propia información sobre impuestos y precios.
✓ Los totales de los SubItems coinciden con los valores del artículo principal.
Este artículo ha sido traducido automáticamente.
Comentarios
0 comentarios
Inicie sesión para dejar un comentario.