Creation of the fiscal module
To transfer fiscal documents (fiscal data) you've first to create a fiscal module. This can be done in several ways:
- If you use the trusted fiscal service (windows or linux service), the fiscal module will be automatically created for you by the fiscal service.
- If you plan to do the integration of the fiscal module with direct .net dll integration you have to intantiate the fiscal module by your own. A detailled description can be found below:
Create / instantiate the fiscal module
Attention: The fiscal module initializes a few submodules and should not be newly created for every receipt (e.g. self test of tss hardware (germany) needs at least 30sec.). In addition, the method is to call CloudConnect before transferring documents, otherwise cloud archiving will fail (only necessary if cloud archiving is enabled).
Transfer of documents
To transfer fiscal documents to the fiscal module you need at least 2 steps:
- CreateDocument
- StoreDocument
Independently of the country you have to call method CreateDocument in every case.
WARNING: CreateDocument must be called at the beginning of a document (when you register an article). This is absolutely necessary in order to implement fiscalization legally (e.B.: in Germany). You have to set FiscalResponse of the document to store with the FiscalResponse you got when you call the CreateDocument method.
Sample Receipt document as json:
This receipt contains:
- one item position with item "000714", "Blume grün", with a price of 4,3 EUR gross (1 piece).
- 2 payments, a position with 5 EUR in cash and the return of 0.7 eur
Note: To see how a document should be assmebled you can have a look at the fiscal service client sample (c#) which you can found in the download section (http://www.retailforce.cloud/downloads). It also show's the resulting json when you start the sample application. Please be sure to have the fiscal service installed and started on the same machine.
To cancel a previous created document you can call the method:
- CancelDocument
Attention: Each created document (with CreateDocument) has to be closed with StoreDocument or cancelled with CancelDocument.
To validate a document in front of transferring it to the fiscal module you can you call
- ValidateDocument
Info: The document itself will always be validated before it will be stored (also if it is cancelled). If a validation error occurs the StoreDocument method will fail with an exception.
Comments
0 comments
Please sign in to leave a comment.