Skip to main content

Fiscal Requirements

Features of EFR

The EFR serves as system interfacing to certified fiscal printers. It does not replace a fiscal printer, this is still needed to fulfil the requirements of Polish 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, and
  • a formatting file, which defines formal representation of this data.

Application Requirements

  • For normal transactions the fiscal printer does not allow mixing of positive and negative positions (quantities), except voids directly following an item sale, because returns have to be printed non fiscal. Else the registration will be rejected with RC="BAD".
  • Return transactions may contain negative position amounts only. A non fiscal receipt is printed
  • Transactions with zero value are not accepted. It is not possible to close sales phase when receipt total is equal zero.
  • In a case of power failure, printer mechanism failure or lack of paper printing receipt will be continued after removing the cause of failure.

VAT Handling

As in other countries transaction data is normalized upon registration (details see EFR Reference: ESR Format). Tax rates are controlled via ESR.TaxA, Tax.Prc is matched against the printer configuration, which is loaded with rates valid before the first transaction on a day.

Current rates are:

PrcDescrizioneTaxG
23%standardA
8%zredukowanyB
5%zredukowanyC
0%zeroD
0%wyjątekE
nieużywanyF
nieużywanyG

Other Printing Functions

Line Display

Display Item

During position and payment entry the cash register application should send referring description and price/amount information immediately to the customer display:

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

Display Idle

A function for displaying texts while idle is planned with the next EFR version.

Cash Drawer

By default the cash drawer should be managed by the cash register application.

Open Drawer and Wait

URL:          http://localhost:5618/peri/drawer/wait
Method:   POST

The cash drawer is opened immediately, after closing the response is sent. As the drawer might be left open longer time, an intermediate HTTP status "102 Processing" is sent within every 30 seconds till final closing "200 OK". Usually the application shows a message DRAWER OPEN and locks further operator actions while the drawer is open.

Open Drawer and Poll

Opens and responds immediately

URL:          http://localhost:5618/peri/drawer
Method:   POST

Afterwards you can poll the drawer state using request

URL:          http://localhost:5618/peri/drawer
Method:   GET (e.g. once per second), which will signal

{"PeriDrawer":0}

or (when request header accept=text/xml is set):

<DrawerState>
<PeriDrawer>0</PeriDrawer>
</DrawerState>

until final closing

{"PeriDrawer":1}

Manual Drawer Open

Manual drawer open (with key) and close events are logged in the transaction journal.

Printer State

URL:          http://localhost:5618/peri/print/state
Method:   GET

Response:

{
"ModuleName": "FP_T88FVA",
"ID": "ZAE1901005432",
"Info": "",
"Drawer": 1,
"Serial": "ZAE1901005432",
"ZI": 12,
"LastZIUpdate": 1643813861663,
"PrinterState": {
"drawer": 1,
"online": 0,
"cover": 0,
"feed": 0,
"nearEnd": 0,
"paperEnd": 0
},
"CashRegisterState": {
"openDay": 1,
"openReceipt": 0,
"printerFiscal": 1,
"vat": 1,
"memAlmostFull": 0,
"memFull": 0,
"fiscal": 1,
"busy": 0,
"display": 1
},
"LastStateUpdate": 1643813886925,
"SimpleState": {
"DrawerOpen": false,
"PaperNearEnd": false,
"PaperEnd": false,
"CoverOpen": false,
"MemAlmostFull": false,
"MemFull": false,
"CertExpires": null
}
}

or (with request header accept=text/xml):

<PrintState>
<ModuleName>FP_T88FVA</ModuleName>
<ID>ZAE1901005432</ID>
<Info/>
<Drawer>1</Drawer>
<Serial>ZAE1901005432</Serial>
<ZI>12</ZI>
<LastZIUpdate>1643813983285</LastZIUpdate>
<PrinterState>
<drawer>1</drawer>
<online>0</online>
<cover>0</cover>
<feed>0</feed>
<nearEnd>0</nearEnd>
<paperEnd>0</paperEnd>
</PrinterState>
<CashRegisterState>
<openDay>1</openDay>
<openReceipt>0</openReceipt>
<printerFiscal>1</printerFiscal>
<vat>1</vat>
<memAlmostFull>0</memAlmostFull>
<memFull>0</memFull>
<fiscal>1</fiscal>
<busy>0</busy>
<display>1</display>
</CashRegisterState>
<LastStateUpdate>1643814003358</LastStateUpdate>
<SimpleState>
<DrawerOpen>false</DrawerOpen>
<PaperNearEnd>false</PaperNearEnd>
<PaperEnd>false</PaperEnd>
<CoverOpen>false</CoverOpen>
<MemAlmostFull>false</MemAlmostFull>
<MemFull>false</MemFull>
<CertExpires/>
</SimpleState>
</PrintState>

Specifics

Daily Closure / Chiusura / Z-report

The fiscal printer's closure function ("Z") is invoked by sending a non-fiscal signed transaction.

see business case Z-Report / End of Day

Response for Italy

<TraC SQ="7757">
<Result RC="OK"/>
<ESR D="2019-07-05T13:20:12" TN="271"/>
<Z T="5799.00">
<ZTaxA>
<ZTax TaxG="A" Prc="23.00" TAmt="850.00" Amt="4545.00"/>
<ZTax TaxG="B" Prc="8.00" TAmt="68.00" Amt="923.00"/>
<ZTax TaxG="C" Prc="5.00" TAmt="3.00" Amt="78.00"/>
<ZTax TaxG="D" Prc="0.00" TAmt="0.00" Amt="244.00"/>
<ZTax TaxG="E" Prc="" TAmt="0.00" Amt="6.00"/>
<ZTax TaxG="F" Prc="" TAmt="0.00" Amt="0.00"/>
<ZTax TaxG="G" Prc="" TAmt="0.00" Amt="0.00"/>
</ZTaxA>
</Z>
</TraC>

ZTax elements are given per TaxG.

Customer’s NIP

To print a customer’s NIP send the value as ESR.Ctm.TaxId:

<Tra>
<ESR TL="01" TT="1" TN="1234">
<Ctm TaxId="PL123456789"/>

Invoice

To print a fiscal invoice tag the transaction with Document Type ("Invoice") and Document Number (max. 20 ASCII characters) and include customer information as ESR.Ctm:

see business case Invoice

For printing with DT= a referring layout file (Invoice.pug) is required.