Fiscal Implementation
Features of EFR
The EFR serves as a system interface for certified fiscal printers. It does NOT replace a fiscal printer, which is still needed to fulfill the requirements of the fiscal law.
EFR keeps secure journals, as it does for other fiscal countries.
Sales transactions have to be printed using the fiscal functions of the printer. For this to work, two elements have to be in place:
- A transaction, sent via REST web request to the EFR, which contains sales data
- A formatting file, which defines formal representation of this data.
VAT Handling
As in other countries, transaction data is normalized upon registration (details see TaxG Tax Group Assignment). Tax rates are controlled via ESR.TaxA
, while Tax.Prc
is used for eKasa or matched against the printer configuration, which is loaded with rates valid at startup system date (and after each closure).
Prc | Description | TaxG |
---|---|---|
20% | Normálne | A |
10% | Znížený | B |
0% | Zero | C |
Payment Types
It is possible to define different payment types in the Pay element with Pay.PayG
.
see Payment Groups
eKasa Fields
Following eKasa specific fields may be sent:
ESR
Name | Value |
---|---|
DN or SK_InvoiceNumber | Invoice number |
RFN | FN of original document in case of return or void |
SK_ParagonNumber (only BBOX) | Number of paragon Default: 0 |
Ctm.TaxId | [0-9a-zA-Z] 50 |
Ctm.CtmId | [0-9a-zA-Z] 50 |
Pos
Name | Value |
---|---|
RFN or SK_ReferenceReceiptId | FN of original document in case of return or void |
QtyU | Printed quantity unit |
SK_SellerIdType | Allowed values: NONE, IC_DPH or DIC Default: NONE |
SK_SellerId | [0-9a-zA-Z] 50 |
SK_SpecialRegulation | A flag that specifies which "reason" tax allocation of 0, if the item is assigned Default: NONE |
Example:
<Tra>
<ESR>
<Ctm CtmId="123456789"/>
<PosA>
<Pos Dsc="Pos 1" TaxG="A" Amt="-10.00" Qty="-1" QtyU="Pc" RFN="O-78DF3940D79F49A29F3940D79FE-TEST" />
</PosA>
</ESR>
</Tra>
Other Printer Functions
Direct Printing
Other non-fiscal prints can be sent directly to the EFR print function, no journaling or logging is performed.
Element | Description |
---|---|
URL | http://localhost:5618/peri/print |
Method | POST |
Body | plain text (plain/txt) |
If JSON or XML data is sent in the request body, you can request format transformation by specifying a pug name:
/peri/print?pug=report2
In a multi-country configuration you may have to specify ?RN= or ?Country=IT
to address the printer.
Reprint Fiscal Transaction – Varos FT5000
Element | Description |
---|---|
URL | http://localhost:5618/peri/print/reprint |
Method | POST |
Body | empty |
Query | DN (optional) |
This function invokes a reprint of the last receipt on the fiscal printer. Specific documents can be reprinted by specifying DN
as query parameter.
Line Display - Bbox eKasa
During position and payment entry the cash register application should send referring description and price/amount information immediately to the customer display:
Element | Description |
---|---|
URL | http://localhost:5618/peri/display |
Method | POST |
Body | text |
The first two text lines are sent to the standard customer display, capacity is 20 characters per line. Like with all other requests UTF-8 encoding is expected by default.
Alternatively the following call may be used:
/peri/display?text=This+is+test+line+1+Line+2
Cash Drawer
By default the cash drawer should be managed by the cash register application.
Open Drawer and Wait
Element | Description |
---|---|
URL | http://localhost:5618/peri/drawer/wait |
Method | POST |
Query | RN |
The cash drawer is opened immediately and after closing the response is sent. As the drawer might be left open for a longer time, an intermediate HTTP status "102 Processing" is sent after 60 seconds. Usually the application shows a message "OPEN DRAWER" and locks further operator actions while the drawer is open.
Open Drawer
Opens and responds immediately.
Element | Description |
---|---|
URL | http://localhost:5618/peri/drawer |
Method | POST |
Query | RN |
Poll Drawer
Element | Description |
---|---|
URL | http://localhost:5618/peri/drawer |
Method | POST |
Query | RN |
Varos FT5000 Response
{"PeriDrawer":"FT5000:open"}
Or (when request header accept=text/xml
is set):
<DrawerState>
<PeriDrawer>FT5000:open</PeriDrawer>
</DrawerState>
Until final closing
{"PeriDrawer":"FT5000"}
Bbox eKasa Response
{"PeriDrawer":"1"}
Or (when request header accept=text/xml is set):
<DrawerState>
<PeriDrawer>1</PeriDrawer>
</DrawerState>
Until final closing
{"PeriDrawer":"0"}
Printer State
States vary between different printer models, but the fields ModuleName, ErrorCode, Warning and SimpleState are unified across different printers.
Element | Description |
---|---|
URL | http://localhost:5618/peri/print/state |
Method | POST |
Query | RN |
Varos FT5000 Response
{
"ModuleName": "FT5000",
"ID": "2D195F7D-56463933-D0254E31-545424A8",
"Info": "",
"Drawer": "",
"SimpleState": {
"DrawerOpen": true,
"PaperNearEnd": false,
"PaperEnd": false,
"CoverOpen": false,
"MemAlmostFull": false,
"MemFull": false,
"CertExpires": "2022-12-11T00:00:00"
},
"PrinterState": {
"name": "realTimeStatus",
"printerBusy": false,
"readTimeout": false,
"printerStatus": {
"drawerPin": 0,
"online": true,
"waitForRecowery": false,
"paperFeed": false
},
"offlineStatus": {
"coverOpen": false,
"paperFeed": false,
"paperEnd": false,
"error": false
},
"errorStatus": {
"recoverable": false,
"autocutter": false,
"unrecoverable": false,
"autorecoverable": false
},
"sensorStatus": {
"paperNearEnd": false,
"paperError": false
}
},
"LastStateUpdate": 1643813091142,
"CHDUState": {
"name": "CHDU5000",
"printerReady": true,
"serialNumber": "2D195F7D-56463933-D0254E31-545424A8",
"spaceTotal": 7801405440,
"spaceFree": 7737188352,
"version": "1.3.0",
"type": "CHDU5001",
"lastReceipt": "22020200011",
"lastProcDate": "2022-02-02",
"certifValid": "2022-12-11",
"errorReceipt": null,
"offlineCount": 0,
"procType": "NONE"
},
"Warning": [
"Drawer: open"
]
}
Or (with request header accept=text/xml
):
<PrintState>
<ModuleName>FT5000</ModuleName>
<ID>2D195F7D-56463933-D0254E31-545424A8</ID>
<Info/>
<Drawer/>
<SimpleState>
<DrawerOpen>true</DrawerOpen>
<PaperNearEnd>false</PaperNearEnd>
<PaperEnd>false</PaperEnd>
<CoverOpen>false</CoverOpen>
<MemAlmostFull>false</MemAlmostFull>
<MemFull>false</MemFull>
<CertExpires>2022-12-11T00:00:00</CertExpires>
</SimpleState>
<PrinterState>
<name>realTimeStatus</name>
<printerBusy>false</printerBusy>
<readTimeout>false</readTimeout>
<printerStatus>
<drawerPin>0</drawerPin>
<online>true</online>
<waitForRecowery>false</waitForRecowery>
<paperFeed>false</paperFeed>
</printerStatus>
<offlineStatus>
<coverOpen>false</coverOpen>
<paperFeed>false</paperFeed>
<paperEnd>false</paperEnd>
<error>false</error>
</offlineStatus>
<errorStatus>
<recoverable>false</recoverable>
<autocutter>false</autocutter>
<unrecoverable>false</unrecoverable>
<autorecoverable>false</autorecoverable>
</errorStatus>
<sensorStatus>
<paperNearEnd>false</paperNearEnd>
<paperError>false</paperError>
</sensorStatus>
</PrinterState>
<LastStateUpdate>1643812960662</LastStateUpdate>
<CHDUState>
<name>CHDU5000</name>
<printerReady>true</printerReady>
<serialNumber>2D195F7D-56463933-D0254E31-545424A8</serialNumber>
<spaceTotal>7801405440</spaceTotal>
<spaceFree>7737190912</spaceFree>
<version>1.3.0</version>
<type>CHDU5001</type>
<lastReceipt>22020200011</lastReceipt>
<lastProcDate>2022-02-02</lastProcDate>
<certifValid>2022-12-11</certifValid>
<errorReceipt/>
<offlineCount>0</offlineCount>
<procType>NONE</procType>
</CHDUState>
<Warning>Drawer: open</Warning>
</PrintState>
Bbox eKasa Response
{
"ModuleName": "bbox",
"SimpleState": {
"DrawerOpen": true,
"PaperNearEnd": false,
"PaperEnd": false,
"CoverOpen": false,
"MemAlmostFull": false,
"MemFull": false,
"CertExpires": "2022-12-11T00:00:00"
},
"NotValidBefore": "2019-01-30T16:07:01+01:00",
"NotValidAfter": "2021-01-29T16:07:01+01:00",
"CashRegisterCode": "88812345678900001",
"StorageOnline": "true",
"PrinterWork": "true",
"MaxSpace": "13990848",
"FreeSpace": "13968864",
"DocPrintPending": "false",
"Drawer": "1",
"PaperEnd": "0",
"PaperNearEnd": "0",
"Cover": "0",
"Offline": "0"
}
Or (with request header accept=text/xml
):
<PrintState>
<ModuleName>bbox</ModuleName>
<SimpleState>
<DrawerOpen>true</DrawerOpen>
<PaperNearEnd>false</PaperNearEnd>
<PaperEnd>false</PaperEnd>
<CoverOpen>false</CoverOpen>
<MemAlmostFull>false</MemAlmostFull>
<MemFull>false</MemFull>
<CertExpires>2022-12-11T00:00:00</CertExpires>
</SimpleState>
<NotValidBefore>2019-01-30T16:07:01+01:00</NotValidBefore>
<NotValidAfter>2021-01-29T16:07:01+01:00</NotValidAfter>
<CashRegisterCode>88812345678900001</CashRegisterCode>
<StorageOnline>true</StorageOnline>
<PrinterWork>true</PrinterWork>
<MaxSpace>13990848</MaxSpace>
<FreeSpace>13968864</FreeSpace>
<DocPrintPending>false</DocPrintPending>
<Drawer>1</Drawer>
<PaperEnd>0</PaperEnd>
<PaperNearEnd>0</PaperNearEnd>
<Cover>0</Cover>
<Offline>0</Offline>
</PrintState>
Specifics
Invoice Payment
Payments for invoices are done by sending an invoice number (ESR.DN
, ESR.SK_InvoiceNumber
, or Pos.SK_InvoiceNumber
), and a Pos with 0% VAT:
<Tra>
<ESR DN="123456789">
<PosA>
<Pos PN="1" Dsc="Invoice Payment" Amt="10.00" TaxG="0%"/>
</PosA>
<PayA>
<Pay Dsc="EUR" Amt="10.00"/>
</PayA>
</ESR>
</Tra>
If no PosA is sent, the information of PayA
is used.
Void/Return
Voids and returns are done by setting Pos.Amt
to a negative value and referring to the original document by Pos.RFN
.
see business cases void