Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middleware for Spain #256

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
slug: /poscreators/middleware-doc/spain/reference-tables/ftpayitemcase
title: 'Type of Payment: ftPayItemCase'
---

# Type of Payment: ftPayItemCase

This table expands on the values provided in table [ftPayItemCase in General Part](../../general/reference-tables/reference-tables.md#type-of-payment-ftpayitemcase) with values applicable to the Spanish market.

| **Value** | **Description** | **Middleware version** |
| -------------------- | ---------------------------------------------------------------------------------------------- | ---------------------- |
| `0x4553000000000000` | **Unknown payment type for ES**<br />This is handled like a cash payment in national currency. | TBD |
| `0x4553000000000001` | **Cash payment in national currency**<br />cash | TBD |
| `0x4553000000000002` | **Cash payment in foreign currency**<br />cash | TBD |
| `0x4553000000000003` | **Crossed cheque**<br />cash | TBD |
| `0x4553000000000004` | **Debit card payment**<br />noncash | TBD |
| `0x4553000000000005` | **Credit card payment**<br />cash | TBD |
| `0x4553000000000006` | **Voucher payment (coupon) - voucher by money value**<br />cash | TBD |
| `0x4553000000000007` | **Online payment**<br />noncash | TBD |
| `0x4553000000000008` | **Customer card payment**<br />noncash | TBD |
| `0x4553000000000009` | **Other debit card**<br />noncash | TBD |
| `0x455300000000000A` | **Other credit card**<br />cash | TBD |
| `0x455300000000000B` | **Account receivable**<br />Delivery note/ settlement in foreign currency<br />internal | TBD |
| `0x455300000000000C` | **SEPA transfer**<br />noncash | TBD |
| `0x455300000000000D` | **Other transfer**<br />noncash | TBD |
| `0x455300000000000E` | **Cash book expense**<br />internal | TBD |
| `0x455300000000000F` | **Cash book contribution**<br />internal | TBD |
| `0x4553000000000010` | **Levy**<br />internal | TBD |
| `0x4553000000000011` | **Internal/ material consumption**<br />Can be used for bill<br />internal | TBD |
| `0x4553000000000012` | **Change**<br />tip<br />cash | TBD |
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
slug: /poscreators/middleware-doc/spain/reference-tables/ftreceiptcase
title: 'Type of receipt: ftReceiptCase'
---

# Type of Receipt: ftReceiptCase

The `ftReceiptCase` indicates the receipt type and defines how the fiskaltrust.SecurityMechanism should process it following Spanish law.

For Spain (ES), the country code is `0x4553`. Thus, the value of an unknown `ftReceiptCase` in Spain is `0x4553000000000000`.

| **Value** | **Description** | **Middleware version** |
|-----------|-----------------|-------------------------|
| `0x4553000000000000` | **Unknown type for country-code "ES"**<br /><br />This receipt case is handled like a "pos-receipt" (`0x4553000000000001`). See below: | TBD |
| `0x4553000000000001` | **POS receipt**<br /><br />Represents the main kind of receipt processed by a POS system. Creates a turnover and/or a change in the amount of cash in the till or similar operations. <br /><br />Use the `ftChargeItems` and `ftPayItems` to hand over details about goods, services and payments for processing. The `ftChargeItems` and `ftPayItems` should contain the full final state of the receipt. | TBD |
| `0x4553000000000002` | **Zero-receipt**<br /><br />Used for communication test and functional test of the fiskaltrust.SecurityMechanism.<br /><br />The request is only valid when the charge items block (`ftChargeItems`) and the pay items block (`ftPayItems`) in the `ftReceiptRequest` are empty arrays. | TBD |
| `0x4553000000000003` | **Initial operation receipt / start-receipt**<br /><br />The request is only valid with the same property requirements as a zero-receipt. It initializes a new fiskaltrust.SecurityMechanism<br /><br />On successful initialization, a notification is created which includes the Queue ID, SCU ID, and all locally relevant additional information.<br /><br />The request is only valid when the charge items block (`ftChargeItems`) and the pay items block (`ftPayItems`) in the `ftReceiptRequest` are empty arrays. <br /><br /> | TBD |
| `0x4553000000000004` | **Out of operation receipt / stop-receipt**<br /><br />The request is only valid with the same property requirements as a zero-receipt. It is disabling the fiskaltrust.SecurityMechanism. <br /><br />On successful deactivation, a notification is created which includes the Queue ID, SCU ID, and all locally relevant additional information.<br /><br />The request is only valid when the charge items block (`ftChargeItems`) and the pay items block (`ftPayItems`) in the `ftReceiptRequest` are empty arrays.<br /><br /> | TBD |
| `0x4553000000000005` | **Monthly-closing**<br /><br />This is a zero-receipt. It is recommended to send this receipt at the end of each month to define the time of the accounting closure. | TBD |
| `0x4553000000000006` | **Yearly-closing**<br /><br />This is a zero-receipt. It is recommended to send this receipt at the end of each year to define the time of the accounting closure. | TBD |
| `0x4553000000000007` | **Daily-closing**<br /><br />This is a zero-receipt. It is recommended to send this receipt at the end of each day to define the time of the POS system closure. | TBD |

## ftReceiptCaseFlag
This table expands on the values provided in table [ftReceiptCaseFlag in General Part](../../general/reference-tables/reference-tables.md#ftreceiptcaseflag) with values applicable to the Spanish market.

| Value | Description | Middleware-Version |
|-------|-------------|--------------------|
| 0x0000800000000000 | **Receipt request.** <br />Common behavior, see [general part](../../general/reference-tables/reference-tables.md#ftreceiptcaseflag). | TBD |
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
slug: /poscreators/middleware-doc/spain/reference-tables/ftchargeitemcase
title: 'Type of service: ftChargeItemCase'
---

# Type of Service: ftChargeItemCase

This table expands on the values provided in the table [ftChargeItemCase in General Part](../../general/reference-tables/reference-tables.md#type-of-service-ftchargeitemcase), with country-specific values applicable to the Spanish market.


| **Value** | **Description** | **Middleware Version** |
| -------------------- | -------------- | ---------------------- |
| `0x4553000000000000` | **Unknown type of service for ES**<br />With the help of the VAT-rates table saved within fiskaltrust.SecurityMechanisms, an allocation to standard /reduced-1 /reduced-2 / super-reduced/zero is attempted. | TBD |
| `0x4553000000000001` | **Undefined type of service for ES reduced**<br />(as of 1.1.2022, this is calculated with 10%). | TBD |
| `0x4553000000000003` | **Undefined type of service for ES normal**<br />(as of 1.1.2022, this is 21%. | TBD |
| `0x4553000000000004` | **Undefined type of service for ES special (super-reduced)**<br />Includes all rates that are not contained in the previous ones (as of 1.1.2022, this is 4%). | TBD |
| `0x4553000000000005` | **Undefined type of service for ES zero**<br />Includes data indicated with 0% sales tax and data where the sales tax is unknown, for example, about an outgoing invoice. Also, in cases where the sales tax should not be apparent, for example, in differential taxation, the data can be issued with this code. | TBD |
| `0x4553000000000006` | **Reverse charge**<br />Reversal of tax liability. | TBD |
| `0x4553000000000007` | **Not own sales**<br />In the data, a VAT-rate can be indicated. | TBD |
| `0x4553000000000008` | **Delivery reduced-1**<br />For processing, see (`0x4553000000000001`) | TBD |
| `0x4553000000000009` | **Delivery reduced-2**<br />For processing, see (`0x4553000000000002`) | TBD |
| `0x455300000000000A` | **Delivery normal**<br />For processing, see (`0x4553000000000003`) | TBD |
| `0x455300000000000B` | **Delivery special**<br />For processing, see (`0x4553000000000004`) | TBD |
| `0x455300000000000C` | **Delivery zero**<br />For processing, see (`0x4553000000000005`) | TBD |
| `0x455300000000000D` | **Other services reduced-1**<br />For processing, see (`0x4553000000000001`) | TBD |
| `0x455300000000000E` | **Other services reduced-2**<br />For processing, see (`0x4553000000000002`) | TBD |
| `0x455300000000000F` | **Other services normal**<br />For processing, see (`0x4553000000000003`) | TBD |
| `0x4553000000000010` | **Other services special**<br />For processing, see (`0x4553000000000004`) | TBD |
| `0x4553000000000011` | **Other services zero**<br />For processing, see (`0x4553000000000005`) | TBD |
| `0x4553000000000012` | **Catalogue services reduced-1**<br />For processing, see (`0x4553000000000001`) | TBD |
| `0x4553000000000013` | **Catalogue services reduced-2**<br />For processing, see (`0x4553000000000002`) | TBD |
| `0x4553000000000014` | **Catalogue services normal**<br />For processing, see (`0x4553000000000003`) | TBD |
| `0x4553000000000015` | **Catalogue services special**<br />For processing, see (`0x4553000000000004`) | TBD |
| `0x4553000000000016` | **Catalogue services zero**<br />For processing, see (`0x4553000000000005`) | TBD |
| `0x4553000000000017` | **Own consumption reduced-1**<br />For processing, see (`0x4553000000000001`) | TBD |
| `0x4553000000000018` | **Own consumption reduced-2**<br />For processing, see (`0x4553000000000002`) | TBD |
| `0x4553000000000019` | **Own consumption normal**<br />For processing, see (`0x4553000000000003`) | TBD |
| `0x455300000000001A` | **Own consumption special**<br />For processing, see (`0x4553000000000004`) | TBD |
| `0x455300000000001B` | **Own consumption zero**<br />For processing, see (`0x4553000000000005`) | TBD |
| `0x455300000000001C` | **Prepayment reduced-1**<br />For processing, see (`0x4553000000000001`) | TBD |
| `0x455300000000001D` | **Prepayment reduced-2**<br />For processing, see (`0x4553000000000002`) | TBD |
| `0x455300000000001E` | **Prepayment normal**<br />For processing, see (`0x4553000000000003`) | TBD |
| `0x455300000000001F` | **Prepayment special**<br />For processing, see (`0x4553000000000004`) | TBD |
| `0x4553000000000020` | **Prepayment zero**<br />For processing, see (`0x4553000000000005`) | TBD |
| `0x4553000000000021` | **Account of a third party/ third party name/ collection**<br />For processing, see (`0x4553000000000007`)| TBD |
| `0x4553000000000022` | **Obligation** | TBD |

## ftChargeItemCaseFlag
This table shows flags that can be added to each `ftChargeItemCase` with values applicable to the Spanish market.

| Value | Description | Middleware-Version |
| ------------------ | ------------------------ | ------------------ |