fiskaly / fiskaly-sdk-swift

fiskaly Cloud-TSE SDK for Swift/iOS
MIT License
5 stars 5 forks source link

DSKINV-K Export 2.0 Error #31

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello sorry for opening the issue again. Following problem:

If I post the cash_point_closing over postmen or IOS it works but I get directly the state to ERROR with the error message:

CLIENT_NOT_FOUND but the client is 100% right.

JSON:

{ "cash_point_closing_export_id": 0, "head": { "export_creation_date": 1599933709, "first_transaction_export_id": "07578CA0-C276-4DF6-9363-52B3A3E32F32", "last_transaction_export_id": "2F88B2C5-E911-4C0A-8269-8AB849E0CA22" }, "cash_statement": { "business_cases": [ { "type": "Umsatz", "amounts_per_vat_id": [ { "vat_definition_export_id": 1, "incl_vat": 5.0, "excl_vat": 4.31, "vat": 0.69 } ] } ], "payment": { "full_amount": 5.0, "cash_amount": 5.0, "cash_amounts_by_currency": [ { "currency_code": "EUR", "amount": 5.0 } ], "payment_types": [ { "type": "Bar", "currency_code": "EUR", "amount": 5.0 } ] } }, "client_id": "d3b1b3c7-3cda-4fc1-b817-b5b02e0e4f2b", "transactions": [ { "head": { "tx_id": "07578CA0-C276-4DF6-9363-52B3A3E32F32", "transaction_export_id": "0QACQGEqLc6kb7nfzrnK", "closing_client_id": "d3b1b3c7-3cda-4fc1-b817-b5b02e0e4f2b", "type": "AVBestellung", "storno": false, "number": 1023, "buyer": { "name": "Kunde", "buyer_export_id": "1", "type": "Kunde" }, "timestamp_start": 1599933694, "timestamp_end": 1599933694, "name": "Love 66", "user": { "user_export_id": "wxna5ZhjNzAOTLl6R4jZ", "name": "null" }, "references": [ { "type": "InterneTransaktion", "tx_id": "07578CA0-C276-4DF6-9363-52B3A3E32F32" } ] }, "data": { "full_amount_incl_vat": 5.0, "amounts_per_vat_id": [ { "vat_definition_export_id": 1, "incl_vat": 5.0, "excl_vat": 4.31, "vat": 0.69 } ], "payment_types": [ { "type": "Bar", "currency_code": "EUR", "amount": 5.0 } ], "lines": [ { "business_case": { "type": "Umsatz", "amounts_per_vat_id": [ { "vat_definition_export_id": 1, "incl_vat": 5.0, "excl_vat": 4.31, "vat": 0.69 } ] }, "lineitem_export_id": "123", "storno": false, "text": "Love 66", "inhaus": true, "item": { "number": "0QACQGEqLc6kb7nfzrnK", "quantity": 1.0, "price_per_unit": 5.0 } } ] }, "security": { "tss_tx_id": "b586b06b-5af0-4ff7-8fdc-c1e598711460" } }, { "head": { "tx_id": "2F88B2C5-E911-4C0A-8269-8AB849E0CA22", "transaction_export_id": "123", "closing_client_id": "d3b1b3c7-3cda-4fc1-b817-b5b02e0e4f2b", "type": "Beleg", "storno": false, "number": 1023, "buyer": { "name": "Kunde", "buyer_export_id": "1", "type": "Kunde" }, "timestamp_start": 1599933695, "timestamp_end": 1599933695, "name": "null", "user": { "user_export_id": "null", "name": "null" }, "references": [ { "type": "InterneTransaktion", "tx_id": "2F88B2C5-E911-4C0A-8269-8AB849E0CA22" } ] }, "data": { "full_amount_incl_vat": 5.0, "notes": "Happy Hour", "amounts_per_vat_id": [ { "vat_definition_export_id": 1, "incl_vat": 5.0, "excl_vat": 4.31, "vat": 0.69 } ], "payment_types": [ { "type": "Bar", "currency_code": "EUR", "amount": 5.0 } ], "lines": [ { "business_case": { "type": "Umsatz", "amounts_per_vat_id": [ { "vat_definition_export_id": 1, "incl_vat": 5.0, "excl_vat": 4.31, "vat": 0.69 } ] }, "lineitem_export_id": "123", "storno": false, "text": "Love 66", "inhaus": true, "item": { "number": "0QACQGEqLc6kb7nfzrnK", "quantity": 1.0, "price_per_unit": 5.0 } } ] }, "security": { "tss_tx_id": "b586b06b-5af0-4ff7-8fdc-c1e598711460" } } ] }

Postmen response when getting details from the cash_point_closing: { "state": "ERROR", "error": { "code": "E_CLIENT_NOT_FOUND", "message": "Client not found" }, "time_creation": 1599934726, "time_update": 1599934726, "_id": "361679e0-29d1-4a5a-a83e-8812525c650f", "_type": "CASH_POINT_CLOSING", "_env": "LIVE", "_version": "0.5.0" }

ghost commented 3 years ago

Closed by self fix:

If the problem E_CLIENT_NOT_FOUND make sure to put the UUID of the Transaction in references tx_uuid :)!