In this article you will learn how to close an open TSE transaction and how to determine which TSE transactions are still open on the TSE.
Requirements
- Fiscal client with fiscal country = Germany
Querying open TSE transactions
Queries on the REST service
The request at the REST service is made via the endpoint:
GET /api/v1/management/germany/{clientId}/tse/listTransactions
Parameter: ClientId = Id of the FiscalClient where the TSE transactions are to be queried.
Returned value: List of open TSE transactions as integer values.
The integer value represents the FiscalDocumentNo of the original FiscalResponse generated when using CreateDocument.
Queries on the .net interface (nuget)
Prerequisite: The fiscal module for the respective client is available as variable "fiscalModule".
Parameter: clientId = Id of the fiscal client where the TSE transactions are to be queried.
if (fiscalModule.ModulImplementation is TrustedFiscalModuleGermany)
{
fiscalModuleGermany = (TrustedFiscalModuleGermany)fiscalModule.ModulImplementation;
var resultList = fiscalModuleGermany.Tse.ListStartedTransactions(clientId);
}
Returned value: List of open TSE transactions as integer values.
The integer value represents the FiscalDocumentNo of the original FiscalResponse generated when using CreateDocument.
Closing open transaction(s)
Closing open TSE transactions is done by using StoreDocument (to close a finished document as in the normal process) or the CancelDocument method (to cancel an open transaction).
Closing using StoreDocument is not covered in this article as this is part of the stanard-process.
If a checkout transaction is to be cancelled, this must be done using CancelDocument. This also closes the TSE transaction.
Canceling receipts using CancelDocument is described in more detail in the following article:
Implementation of receipt cancellation
If there is no more data at all for a transaction that is still open, a document with the following minimum content must be sent to the CancelDocument method:
{
"UniqueClientId": "c1062c55-57c4-4ed2-9c53-aff1762326a4",
"DocumentGuid": "5c374337-e093-4fb5-abf4-d1c48f0428b4",
"DocumentId": "5c374337-e093-4fb5-abf4-d1c48f0428b4",
"CreateDate": "2021-03-29T06:38:26.1392038+02:00",
"BookDate": "2021-03-29T06:38:26.1392038+02:00",
"IsTraining": false,
"DocumentType": 0,
"User":
{
"Id": "123",
"Caption": "TestUser"
},
"FiscalDocumentNumber": {Rückgabe von ListStartedTransactions},
"FiscalDocumentRevision": 0,
}
The ClientId, values for DocumentGuid/Id, BookDate/CreateDate as well as the User in the code block above are example data.
If several numbers are returned by the ListTransactions method, the CancelDocument method must be called several times.
Comments
0 comments
Please sign in to leave a comment.