fiskaltrust / middleware

The fiskaltrust.Middleware is an integrated set of highly configurable software components for POS systems to abstract the complexity of national fiscalization laws.
https://docs.fiskaltrust.eu
European Union Public License 1.2
8 stars 4 forks source link

Protocol receipts should not be signed in Austria #292

Open TSchmiedlechner opened 4 months ago

TSchmiedlechner commented 4 months ago

Problem

When using the ftReceiptcase 0x415400000000000D ("protocol"), it is signed if it includes ftChargeItems and the ftPayItems are empty. This means that these receipts are also included in the DEP7 export, but they shouldn't. This is incorrect according to the RKSV regulations and has been criticized by auditors in two cases now.

Solution

Protocol receipts without pay items shouldn't be signed either (and neither should be those with pay items, but that's already the case).

[!WARNING]
We will only change this behavior in 1.3 in this issue.

Tasks

Sample

Request:

{
    "ftCashBoxID": "620cc7c3-78ab-4f70-b75b-63fad09e4b78",
    "ftPosSystemId": "b3dc6573-96d9-e611-80f7-5065f38adae1",
    "cbTerminalID": "18566",
    "cbReceiptReference": "489fda45-4994-4bb4-b206-2656483561aa",
    "cbReceiptMoment": "2023-12-12T20:58:55.083Z",
    "cbChargeItems": [
        {
            "Quantity": 1.0000,
            "Description": "Süß gsp 1/4",
            "Amount": 3.50000000000000000000000000,
            "VATRate": 20.0000,
            "ftChargeItemCase": 4707387510509010947,
            "ftChargeItemCaseData": "",
            "VATAmount": 0.5833333333333333333333333333,
            "CostCenter": "2",
            "ProductGroup": "Wein",
            "ProductNumber": "5014",
            "ProductBarcode": "",
            "Unit": "Liter",
            "Moment": "2023-12-12T20:58:38.833Z"
        },
        {
            "Quantity": 1.0000,
            "Description": "Karpfen geb",
            "Amount": 14.90000000000000000000000000,
            "VATRate": 10.0000,
            "ftChargeItemCase": 4707387510509010945,
            "ftChargeItemCaseData": "",
            "VATAmount": 1.354545454545454545454545455,
            "CostCenter": "2",
            "ProductGroup": "Fisch",
            "ProductNumber": "14004",
            "ProductBarcode": "",
            "Unit": "Stk",
            "Moment": "2023-12-12T20:58:30.897Z"
        },
        {
            "Quantity": 1.0000,
            "Description": "Somgsp Weiß 1/2",
            "Amount": 4.20000000000000000000000000,
            "VATRate": 20.0000,
            "ftChargeItemCase": 4707387510509010947,
            "ftChargeItemCaseData": "",
            "VATAmount": 0.70000000000000000000000000,
            "CostCenter": "2",
            "ProductGroup": "Wein",
            "ProductNumber": "5004",
            "ProductBarcode": "",
            "Unit": "Liter",
            "Moment": "2023-12-12T20:58:35.893Z"
        },
        {
            "Quantity": 1.0000,
            "Description": "Verlängerter",
            "Amount": 3.00000000000000000000000000,
            "VATRate": 20.0000,
            "ftChargeItemCase": 4707387510509010947,
            "ftChargeItemCaseData": "",
            "VATAmount": 0.50000000000000000000000000,
            "CostCenter": "2",
            "ProductGroup": "Kaffee",
            "ProductNumber": "4007",
            "ProductBarcode": "",
            "Unit": "Stk",
            "Moment": "2023-12-12T20:58:42.067Z"
        },
        {
            "Quantity": 1.0000,
            "Description": "Schweincordon",
            "Amount": 14.50000000000000000000000000,
            "VATRate": 10.0000,
            "ftChargeItemCase": 4707387510509010945,
            "ftChargeItemCaseData": "",
            "VATAmount": 1.318181818181818181818181818,
            "CostCenter": "2",
            "ProductGroup": "Hauptspeisen",
            "ProductNumber": "13017",
            "ProductBarcode": "",
            "Unit": "Stk",
            "Moment": "2023-12-12T20:58:30.133Z"
        },
        {
            "Quantity": 1.0000,
            "Description": "Somgsp Weiß 1/4",
            "Amount": 2.40000000000000000000000000,
            "VATRate": 20.0000,
            "ftChargeItemCase": 4707387510509010947,
            "ftChargeItemCaseData": "",
            "VATAmount": 0.40000000000000000000000000,
            "CostCenter": "2",
            "ProductGroup": "Wein",
            "ProductNumber": "5005",
            "ProductBarcode": "",
            "Unit": "Liter",
            "Moment": "2023-12-12T20:58:36.103Z"
        },
        {
            "Quantity": 1.0000,
            "Description": "GartenRadler 0,5",
            "Amount": 4.70000000000000000000000000,
            "VATRate": 20.0000,
            "ftChargeItemCase": 4707387510509010947,
            "ftChargeItemCaseData": "",
            "VATAmount": 0.7833333333333333333333333333,
            "CostCenter": "2",
            "ProductGroup": "Bier",
            "ProductNumber": "1004",
            "ProductBarcode": "",
            "Unit": "Liter",
            "Moment": "2023-12-12T20:58:46.903Z"
        },
        {
            "Quantity": 1.0000,
            "Description": "Cola 0,33",
            "Amount": 3.50000000000000000000000000,
            "VATRate": 20.0000,
            "ftChargeItemCase": 4707387510509010947,
            "ftChargeItemCaseData": "",
            "VATAmount": 0.5833333333333333333333333333,
            "CostCenter": "2",
            "ProductGroup": "Alkoholfrei",
            "ProductNumber": "2022",
            "ProductBarcode": "",
            "Unit": "Liter",
            "Moment": "2023-12-12T20:58:44.99Z"
        }
    ],
    "cbPayItems": [],
    "ftReceiptCase": 4707387510509010957,
    "cbReceiptAmount": 50.70,
    "cbUser": "Ernst"
}

Response:

{
    "ftCashBoxID": "620cc7c3-78ab-4f70-b75b-63fad09e4b78",
    "ftQueueID": "cb5ee991-a682-41e4-b066-2c18477677b4",
    "ftQueueItemID": "e9b083d9-ad54-48f7-bf26-50c913044abc",
    "ftQueueRow": 95900,
    "cbTerminalID": "18566",
    "cbReceiptReference": "489fda45-4994-4bb4-b206-2656483561aa",
    "ftCashBoxIdentification": "rk-01",
    "ftReceiptIdentification": "ft1769B#91036",
    "ftReceiptMoment": "2023-12-12T20:58:55.189502Z",
    "ftSignatures": [
        {
            "ftSignatureFormat": 3,
            "ftSignatureType": 4707387510509010945,
            "Caption": www.fiskaltrust.at,
            "Data": "_R1-AT1_rk-01_ft1769B#91036_2023-12-12T21:58:55_21,30_29,40_0,00_0,00_0,00_PTaI8H0=_588fa483_Jjzb06c1fyA=_J7BuwN0wJJLokEPixJn58ttBvLBAHff6qSmSctbb8VZsBQxyc1ChTAqflI2DJon3e1fjRZnFDTABtutzPUf5DA=="
        }
    ],
    "ftState": 4707387510509010944
}
TSchmiedlechner commented 4 months ago

https://fiskaltrust.sharepoint.com/:x:/r/sites/market-de/Freigegebene%20Dokumente/z_archive_project-germany/project-germany/Technik-%20TSE/ft-Gesch%C3%A4ftsvorf%C3%A4lle%20AT.xlsm?d=w0245edcbf544429e8c9ebb2cde6a01a2&csf=1&web=1&e=BGd3uX