Skip to main content

Fiscal Requirements

The EFR serves as a supplementary subsystem to an existing POS application to help fulfill the conditions of Inalterability, Security, Storage and Archiving of data (known as ISCA conditions) enforced by the French “VAT Anti-Fraud” Law.

EFSTA Concept

The following chapters describe the techniques used. It will be amended and improved along with development and fiscal regulations changes.

Certificate

For each EFR, a certificate is locally generated. For minimum signature data length, ECDSA is used. The curve NIST P-256 is acknowledged as safe up to the year 2030. The public key is written into the audit trail and saved to the cloud archive. As soon as the fiscal authority enables the upload of cash register public keys, this also will be performed automatically over the cloud instance.

Certificate Security

The private key of the certificate is stored, encrypted with a system local key (kept in Windows Certificate Store). So, the private key is usable on the source system only.

Electronic Signature

Ticket & Bill Signature

All transactions registered with EFR except those marked NF= (non-fiscal) are signed and chained. Special signature payload formats apply for

  • NFS="DUP"
    See "Duplicate signature" below
  • DT="FACT"
    See "Invoice signature"
  • NFS="CLO"
    Closure / balance see "Grand totals signature"
Duplicate signature

Duplicates have to be registered and signed (see Printing Duplicates / Reprint).

Invoice signature

Invoice data has to contain customer reference, which is included in the signature payload. See Invoices.

Grand totals signature

Triggered by the frontend application (on periodic closing). Referring periodic reports (per month, year) are created and signed automatically.

Technical event log signature (JET)

Events are logged both by EFR automatically and when triggered by frontend application (see Operation Tracability (JET - Journal des Évènements Techniques)).

Signature Verification

Verification of signatures and the signature chain within the fiscal data storage (e.g. in case of tax audit) can be performed locally on the EFR using the browser interface, or upon export of cloud data for selectable periods. Access to cloud data may be granted by the data owner (i.e. company) to any third party via export ticket, which contains the period decryption keys.

Reports

Reports can be accessed locally on EFR (browser interface) and from cloud via export ticket.

Storage Concept

All relevant data like fiscal transactions, closures, reports (like tax archive GT), audit records (JET) is stored in textual "Journal" files, each containing a bunch of 1000 ascending numbered records (field SeQuence number SQ) and named after the number range contained (e.g. 0002.jou for SQ 2000-2999).

Each file represents a JSON array (according to RFC 8259 and ECMA-404) with line breaks for better readability, encoding is UTF-8 (RFC 3629 and ISO/IEC 10646-1:2000 Annex D).

This concept implements a permanent, interruptible data stream from POS to efsta Cloud, and subsequently to centralize processes and data interfaces. Cloud archiving is performed immediately, i.e. parallel to storage on local disk.

Local disk space is managed automatically by EFR in the form of a circular (ring) buffer with a capacity (DiskQuota) of 1000 MB (compressed) per EFR client (RN), thus running out of disk space is avoided.

warning

Manipulation of journal files with a text editor cannot be prevented by the nature of the files, but data changes are detected and reported. Additionally, it is good practice to inhibit file system access for cash desk operators.

Journal excerpt:

{"_":"audit","SQ":14,"TS":"2018-06-14T09:18:25","Code":250,"Dsc":"VER:super-POS V3.4.5","DN":11,
"Fis":{"Payload":"audit:001/1/11,250,VER:super-POS_V3.4.5,20180613091825,,,O,-N1dW…","Signature":"rqDgm…"}},
{"_":"rep","SQ":15,"TS":"2018-06-14T09:18:25","TO":"*FISCAL_FR","TY":"CERT","TLT":"001/1","cer":"MFkwE…"},
{"_":"Tra","SQ":16,"TS":"2018-06-14T09:18:25",
"ESR":{"TL":"001","TT":"1","D":"2018-06-14T09:18:25","TN":"1","T":"20.44","DN":1,
"PosA":[{"_":"Pos","PN":"1","IN":"4012345678901","Dsc":"Vinegar 500ml","TaxG":"B","Amt":"1.99","Net":1.81},
{"_":"Mod","PN":"1","Dsc":"Special Offer","Amt":"-0.50","TaxG":"B","Net":-0.46},
{"_":"Pos","PN":"2","IN":"9023456789001","Dsc":"WHOLEWHEAT FUSILLI","TaxG":"B","Amt":"1.50","Net":1.37},
{"_":"Pos","PN":"3","IN":"9023456789001","Dsc":"WHOLEWHEAT FUSILLI","TaxG":"B","Amt":"1.50","Net":1.36},
{"_":"Pos","PN":"4","IN":"4198765432109","Dsc":"KITTEN PET FOOD 25x","TaxG":"A","Amt":"3.49","Net":2.91},
{"_":"Pos","PN":"5","Dsc":"EMMENTAL CHEESE","TaxG":"B","Amt":"3.21","Qty":"0.252","QtyU":"kg","Pri":"12.75","Net":2.92},
{"_":"Lin","LAmt":"----------"},
{"_":"Lin","Dsc":"Subtotal","LAmt":"11.19"},
{"_":"Mod","PN":"2 3","Dsc":"-25% Discount on Pasta","Amt":"-0.75","TaxG":"B","Net":-0.68},
{"_":"Pos","PN":"6","Dsc":"voucher","TaxG":"E","Amt":"10.00","Net":10}],
"TaxA":[{"_":"Tax","TaxG":"A","Prc":"20","Net":"2.91","TAmt":"0.58","Amt":"3.49"},
{"_":"Tax","TaxG":"B","Prc":"10","Net":"6.32","TAmt":"0.63","Amt":"6.95"},
{"_":"Tax","TaxG":"E","Prc":"0","Net":"10.00","TAmt":"0.00","Amt":"10.00"}],
"Fis":{"Payload":"2000:349|1000:695,1044,20180613091825,TIK:001/1/1,Vente,N,","Signature":"xA1KR…",
"Tag":[{"Label":"Date:","Value":"2018-06-14 09:18:25","Name":"Date"},
{"Label":"Numéro:","Value":"TIK:001/1/1","Name":"FN"},
"Tot":{"GT":10.44,"GT10":6.95,"GT20":3.49,"GTabs":10.44,"GTzero":10}},
{"_":"rep","SQ":17,"TS":"2018-06-14T09:18:25","TY":"GTT",
"Fis":{"Payload":"2000:349|1000:695,1044,20180613091825,TIK:001/1/1,N,","Signature":"SNppl…"}},
...

For further information on the data structures used see documentation ESR – "efsta Simple Receipt" Format. A short overview of the field names used is included in file readme.txt in each journal export (jou.zip).

Configuration

Certification requirements regulate the availability of header fields within EFR, the logging of value changes and the administration of historical data. For centralized administration, base data can be set per cash register terminal (EFR) using the efsta cloud portal, with the data being replicated to the EFR instances. Alternatively you can supply the header fields with POST http://localhost:5618/cfg. It is recommended to POST configuration on every program startup before issuing /register. Further details for /cfg can be found in Configuration.

Manual Configuration

Navigate to http://localhost:5618 in your browser and open "Donneés de base" (base data). Enter the field values required, with the data being replicated to efsta cloud.

Field reference

ElementAttributeDescriptionFIDELE label
CmpCompany header
NamCompany nameENC-TIK-SOC-ETS
CtryCountryENC-TIK-SOC-PAY
TaxIdIntra-Community VAT identifierENC-TIK-SOC-TVA
VATonPaymentVAT chargeable on receipt of payment boolean, default: false (on issuance of invoice)SOC-REF-REGTVA
FR_NAFcode NAF / APE
Nomenclature d'activités française
ENC-TIK-SOC-NAF
FR_SRNBusiness Register IdentifierSOC-SIREN
FR_RCSCity of Registration + CategorySOC-RCS
FR_TYPELegal FormSOC-TYPE
FR_CAPITALSocial CapitalSOC-CAPITAL
LocLocation (store) header
TLTransaction Location
correlating ESR.TL
AdrAddressENC-TIK-SOC-ADR
ZipPostCodeENC-TIK-SOC-CCP
CityCityENC-TIK-SOC-VIL
FR_SIRSIRET code
wikipedia.org
ENC-TIK-SOC-SIR
TrmTerminal
TTTransaction Terminal
correlating ESR.TT
ENC-TIK-CAI-NID
SWSoftware nameENC-TIK-TAG-VER
SWVersionSoftware versionENC-TIK-TAG-VER
  • If fields Loc.TL and Trm.TT are persisted using /cfg, they may be omitted in /register ESR element. For simplicity ESR.TL and ESR.TT are not shown in further example transactions in this document.

VAT Handling

Following rates are used by default if only TaxG is delivered, but no tax rate in the TaxA element:

Tax groupTaxGTax rate
NormalA20%
IntermédiareB10%
RéduitC5,5%
Super réduitD2,1%
ZeroE0%

Specifics

Document Types

Different fiscal document types can be registered with EFR by specifying the tag <ESR DT="XXX">. For each document type, a separate Document Number DN will be issued and a signature chain will be created. Recommended values include bill, invoice and ticket, but you may use any document denomination you require and are not limited to these.

Transactions without DT are marked as "TIK" ("Ticket") in the signature payload. NF and NFS are considered to be non-fiscal = not to be included in the system's grand totals.

Supporting document data – Note (Bill), Receipt (Ticket), Proof of payment

Header and Issuer Data

Sales header information is stored in configuration files cfg/loc.cfg and cfg/trm.cfg, also preserving historical settings. The fields have to be set with POST /cfg (Configuration). Header data is added automatically to the transaction upon /register.

FieldFIDELE labelESR equivalent
Unique document identifier in DatabaseENC-NIDESR.TL/TT/TN
Unique document numberENC-TIK-NUMESR.DN
Software versionENC-TIK-TAG-VERCfg.Trm.Version
Number of printsENC-TIK-PRN-NBRpersisted in dat/reprint.dat
Name of the issuerENC-TIK-SOC-ETSCfg.Cmp.Nam
Issuer's addressENC-TIK-SOC-ADRCfg.Loc.Adr
Postcode of the issuerENC-TIK-SOC-CCPCfg.Loc.Zip
City of the issuerENC-TIK-SOC-VILCfg.Loc.City
Country of the issuerENC-TIK-SOC-PAYCfg.Cmp.Ctry
Siret (France: institution number, 14 digits)ENC-TIK-SOC-SIRCfg.Loc.FR_SIR
Code NAF / APE (France: 5 characters, 1 letter + 4 digits)ENC-TIK-SOC-NAFCfg.Cmp.FR_NAF
Legal FormSOC-TYPECfg.Cmp.FR_TYPE
Social CapitalSOC-CAPITALCfg.Cmp.FR_CAPITAL
Issuer’s RCSSOC-RCSCfg.Cmp.FR_RCS
Trades Directory Registration numberSOC-METIERCfg.Cmp.FR_METIER
Intra-Community VAT numberENC-TIK-SOC-TVAProfile.TaxId
Salesperson codeENC-TIK-VEN-NIDESR.Slp
Designation of the salespersonENC-TIK-VEN-NOMESR.SlpN
Input operator code (cashier)ENC-TIK-OPS-NIDESR.Opr
Designation of the operator (cashier)ENC-TIK-OPS-NOMESR.OprN
Input operator code (cashier)ENC-TIK-CAI-NIDCfg.Trm.TT
Date and time of recording the document in DatabaseENC-TIK-HOR-GDHESR.D
Type of operation (sale, cancellation, partial return, ...)ENC-OPE-TYPwithin Fis.Payload
Type of document : note (bill), receipt (ticket), proof of payment, ...ENC-TIK-DOC-TYPESR.DT
Number of sales lines per documentENC-TIK-LIG-NBRESR.PosC
Document produced by a special function (Training/School mode/…)ENC-TIK-STAESR.Test
Electronic SignatureENC-TIK-TAG-SIGFis.Signature
Restitution of Electronic SignatureENC-TIK-TAG-RETFis.Tag[Sec]
Software nameENC-TIK-LOGCfg.FR_LOG

Due to the data stream storage architecture, records may not be updated in the journal.

Line Data

Item positions are represented as array ESR.PosA within the transaction object. Required fields which are not provided in the input data, are computed:

#FieldFIDELE LabelESR Equivalent
1Unique document identifier in DatabaseENC-NIDESR.TL/TT/TN
2Unique document numberENC-TIK-ORI-NUMESR.RTL/RTT/RTN, Pos.RPN or Pos.RTL/RTT/RTN/RPN
3Line numberENC-TIK-LIG-NUMPosA.PN
4Product/article codeENC-TIK-LIG-PRO-NIDPos.IN
5Product/article descriptionENC-TIK-LIG-PRO-LIBPos.Dsc
6Quantity of product/article per lineENC-TIK-LIG-PRO-QTEPos.Qty
7VAT codeENC-TIK-LIG-TAX-NIDPos.TaxG
8VAT rateENC-TIK-LIG-TAX-TXXPos.Prc
10Tariff amountENC-TIK-TAR-PRXPos.Amt
12Unit price incl. VATENC-TIK-LIG-PRO-TTCPos.Pri
14Discount rate (%)ENC-TIK-LIG-REM-TXXPos.ModPrc
15Discount rate (%)ENC-TIK-LIG-REM-TOTPos.ModAmt
16Total excluding VATENC-TIK-LIG-TOT-MHTPos.NMAmt - "net modified Amt"
17Total incl. VATENC-TIK-LIG-TOT-TTCPos.MAmt - "modified Amt"
18Quantity (possibly measured)ENC-TIK-LIG-QTEPos.Qty
19Unit of measurementENC-TIK-LIG-UDMPos.QtyU

Summary Data

Tax breakdown and totals are added.

#FieldFIDELE LabelESR Equivalent
3Total amount excl. tax by VAT rateENC-TIK-TOT-MHTTax.Net
4VAT codeENC-TIK-TVA-NIDTax.TaxG
5VAT rateENC-TIK-TVA-TXXTax.Prc
6Amount of VATENC-TIK-TVA-MTNTax.TAmt

General Summary

#FieldFIDELE LabelESR Equivalent
3Total excluding tax of the documentENC-TIK-TOT-MHTESR.NT
4Total incl. VAT of the piecedocumentENC-TIK-TOT-TTCESR.T
5*Total discount amountENC-TIK-REM-MTNESR.ModT
* from EFr version 2.4.2.7

Payment Data

Payment records are represented in array ESR.PayA:

#FieldFIDELE LabelESR Equivalent
3Code of the method(s) of payment
(credit card, cheque, cash, Ticket Restaurant...)
ENC-TIK-REG-TYPPay.PayG
4Name of the method of payment
(credit card, cash, cash on delivery ...)
ENC-TIK-REG-MOD-LIBPay.Dsc
5References of the method(s) of payment of the invoice
(No. cheque, type of credit card, etc.)
ENC-TIK-REG-NUMPay.UID
6Amount of the payment or customer's accountENC-TIK-REG-MTNPay.Amt
18GDH timestamp of the payment recordingENC-TIK-REG-HOR-GDHPay.TS

Return of certificate number and signature extract (only for NF525 certification)*

As proof, the printed documents issued to the customer have to contain a security tag, which can be taken from the /register response: <Tag Label="Code:" Value="B0000 zXjy (NF525)" Name="Sec"/>

The prefix "B0000" is designating product category and number of software certification, the actual number can be set in /config profile:

fis_cert_attr

Alternatively the string "B0000" can be replaced in the frontend software before printing the receipt.

Invoice

An example for invoices can be found in the business case Invoice. Invoices are required to be marked as DT="FACT" ("facture") and customer data has to be specified in tag <Ctm>. Following fields are required to be included in the signature payload:

Ctm AttributeDescriptionFIDELE Label
NamCompany name (B2B) or Customer name (B2C)TAG-FAC-CLI-NOM
ZipCustomer postcodeTAG-FAC-CLI-CCP
TaxIdIntra-community VAT identifier (B2B) / empty (B2C)TAG-FAC-CLI-TVA

If all fields are missing on registration, a warning #MISS ESR.Ctm FACT will be returned.

ElementNameMandatoryDescriptionExample
CtmCustomerYesCustomer data for fiscal invoice
Ctm.NamNameYesCustomer or Company Name"Victor HÙGO"
Ctm.Nam2Name 2NoName Extension
Ctm.AdrAddressNoCustomer or Company Address within City"123 bis Rue de Trey"
Ctm.Adr2Address 2NoAddress Extension
Ctm.ZipPostal CodeYesaccording to national rules without country prefix"25000"
Ctm.CityCityNoCity Name"Besançon"
Ctm.CtryCountryNoCountry ISO 3166 ALPHA-2"FR"
Ctm.TaxIdVAT NumberYesCompany VAT Number including eventual country prefix"FR-12345678901"
Ctm.FR_SIRSIRETYesfor B2B invoices"732 829 320 0007"
Ctm.FR_NAFNAF/APENo"47.11D"

All fields are datatype text. As with other ESR structures, additional <Ctm> fields may be specified having names longer than 4 characters.

Advance payment

If the invoice contains advance payments, they have to be sent as position with Pos.PTY=”Adv” including the full amount of the purchased item as Pos.RAmt: Example of an invoice transaction with an advance payment of 1.000 € for an item with a price of 5.000 €:

<Tra>
<ESR TL="001" TT="1" DT="FACT">
<Ctm Nam="Víctor HÙGO" Adr="Besançon" Zip="25000" TaxId="FR12345678901"/>
<PosA>
<Pos PN="1" Dsc="Item" Amt="100.00" TaxG="C"/>
<Pos PTY="Adv" PN="2" Dsc="advance payment" Amt="1000.00" TaxG="A" RAmt="5000.00"/>
</PosA>
<PayA>
<Pay Dsc="Cash" Amt="1100.00"/>
</PayA>
</ESR>
</Tra>

Response containing the remaining net amount payable as ESR.FR_AdvRemainNAmt:

<TraC SQ="8">
<ESR DT="FACT" D="2021-06-23T11:05:41" T="2000.00" TN="2" DN="1" NT="1781.2" PosC="2" FR_AdvRemainNAmt="3333.33">
...

Invoice Printing

Per invoice following fields are required:

# Field FIDELE labelESR Field
21 remaining net amount payableFAC-MTN-NE TESR.FR_AdvRemainNAmt (since v2.3.1.1)
22Invoice typology for goods, services or both FAC-TYP-BS MESR.FR_BSM
I: Items
S: Services
M: Mixed

These fields are computed, stored with the transaction and returned in the response for printing.

Per position following fields are required:

#FieldFIDELE labelESR fieldESR Field
13Unit price tax. excl ENC-TIK-LIG-PRO-MHT net tax modified pos price Pos.NPri
 18 Total tax. exclENC-TIK-LIG-TOT-MHT net tax modified pos amount Pos.NMAmt

These fields are, if delivered in ESR, stored with the transaction. If Pos.NMAmt is missing, the necessary computations are performed by ESR:

  • modifier positions are reckoned upon item positions
  • for Pos.NMAmt Tax.Net per tax group TaxG is devided to the according positions To assure congruence of position amounts to tax totals in TaxA, a summation according to Kahan Summation Algorithm is used. To allow the frontend application to print invoices with no cent differences, the transaction positions with NMAmt are returned in the response.

Special workflow

If your POS workflow requires the invoice to be printed additionally to a ticket issued before, it has to be registered with (NFS="FACT" declares it as nonfiscal = not to add a second time into Grand Totals, "FACT" generates the required signature).

Training Receipts

An example can be found in the business cases Training. Fiscal regulations require the ID of the trainer/supervisor to be stored with the training transaction, use field name FR_Trainer. Training printouts may not show any amounts and have to be marked by “NON VALABLE POUR ENCAISSEMENT”, "FACTICE", "SIMULATION", or "TEST".

For compatibility reasons <ESR Test="1" is also valid instead of <ESR NFS="TRAINING".

Reprint / Printing Duplicates

Reprints of fiscal documents have to contain a duplicate counter and a signature. Depending on whether your software handles reprints as transaction (journalized and having a Transaction Number TN) there are two ways of signing:

  1. /register a non-fiscal transaction marked NFS="DUP"
  2. /jou/reprintcnt get duplicate number and signature
  • The validity of the transaction reference (by FN or TL/TT/TN) is not checked
  • On a multiclient EFR (profile attribute RN_TT is set) counters for cross referenced transactions (registration and reprint done on different terminals) are handled
  • Else, counters cannot be shared between EFR instances
  • The frontend application is responsible for providing the data of the original transaction. EFR journal commands (/find or /retrieve; see EFR API Journal) can be used

POST /register

An example can be found in the business cases Reprints.

POST /jou/reprintcnt

ElementDescription
Request/jou/reprintcnt
MethodPOST
HeaderAccept: text/xml
(optional for XML response)
QueryRTL, RTT, RTN Id of transaction
RFN Fiscal Number
opr Id of the operator requesting the reprint
RN in multi-client mode
BodyEmpty
Example
Response
<ReprintC SQ="18" RFN="TIK:001/1/1" Cnt="1" DN="5" DT="DUP">
<Cfg FR_LOG="EFR"/>
<Result RC="OK"/>
<Fis>
<Payload>DUP:001/1/5,TIK,1,,20210623111146,TIK:001/1/1,O,__LWtmZ...</Payload>
<Signature>B_ULuvuuexG...</Signature>
<Tag Label="Numéro original:" Value="TIK:001/1/1" Name="RFN"/>
<Tag Label="Code original:" Value="B0000 YYYY" Name="RSec"/>
<Tag Label="Duplicata:" Value="1" Name="ReprintCnt"/>
<Tag Label="Numéro:" Value="DUP:001/1/5" Name="FN"/>
</Fis>
</ReprintC>

The incremental count value is delivered in Cnt.

EFR tries to retrieve the original transaction content (ESR) from local storage or cloud, whereas the data objects are included in the response and can be used for printing. A timeout of 8 secs is used for cloud access to ensure a valid response within request timeout (10 secs).

The current reprint count for a document can be retrieved with http GET, although only the count integer field is responded.

Traceability of duplicate documents

Journal:

{"_":"Reprint","SQ":44699,"TS":"2021-05-14T12:17:11","RFN":"TIK:001/1/97","Opr":"23","Rsn":"erreur d'imprimante",
"Cnt":"41","DN":51,"DT":"DUP",
"ESR":{"TL":"001","TT":"1","TN":25,"T":"528.90","D":"2021-05-11T15:00:40","DT":"TIK","DN":97,"PosC":2,"NT":444.45,
...},
"Fis":{
"Tag":[{"Label":"Numéro:","Value":"TIK:001/1/97","Name":"FN"},
"Cfg":{...},
"Fis":{"Payload":"DUP:001/1/51,TIK,41,123,20210514121711,TIK:001/1/97,O,CRoiX…","Signature":"q2d_o…",
"Tag":[{"Label":"Numéro original:","Value":"TIK:001/1/97","Name":"RFN"},
{"Label":"Duplicata:","Value":"41","Name":"ReprintCnt"},
{"Label":"Numéro:","Value":"DUP:001/1/51","Name":"FN"}]}}
}
#FieldFIDELE LabelESR Equivalent
1Identifier of the duplicateENC-DUP-NIDFis.Tag["FN"]
2Original document numberENC-DUP-ORI-NUMFis.Tag["RFN"]
3Type of original document (Invoice, Credit note, Down Payment, Pro Forma)ENC-DUP-TYPPart of RFN
4Reprint numberENC-DUP-PRN-NUMReprint.Cnt, Fis.Tag["ReprintCnt"]
5Operator code issuing the duplicateENC-GTP-HTReprint.Opr
6Date and time of issue of the duplicateENC-DUP-HOR-GDHReprint.TS
8Signature of the duplicateENC-DUP-SIGFis.Signature
10Software versionENC-DUP-VERCfg.FR_LOG
11Reason for issuing the duplicateENC-SIG-MOTIFReprint.Rsn

Voucher Handling

Basically there are two types of vouchers:

  • "Single-purpose voucher" for specific services or goods, containing VAT at time of voucher sale
  • "Multi-purpose voucher" for indifferent goods, showing VAT 0%, as the VAT rate is not yet defined

An example can be found in the business cases Voucher.

Since multi-purpose vouchers have 0% VAT, the sales amount is not added to the total field GT, but in the separate field GTvou.

Variant

In NF525 certification rules, the sale of multi-purpose vouchers is seen as a treasury transaction, marked non-fiscal NFS="Vou". The usage of the voucher can then be sent as payment <Pay/> since the sale is not regarded in the Grand Totals.

Operation Tracability (JET - Journal des Évènements Techniques)

Registration of Audit Events

Automatic (by EFR)

Audit events are logged automatically by EFR when possible, see Audit Code list below.

Optional (by POS Application)

The POS application may register optional <Audit> records on demand.

Example
<Audit Code="150" Title="Imprimante indisponible" Dsc="error 1234" Opr="99" TL="001" TT="1"/>
Response
<AuditC SQ="9">
<Result RC="OK"/>
<Fis>
<Payload>audit:001/1/4,150,error_1234,20210623112231,99,001/1,O,NhDnN-VmaTaDO...</Payload>
<Signature>o5mH1kcSMG...</Signature>
<Tag Label="Numéro:" Value="audit:001/1/4" Name="FN"/>
</Fis>
</AuditC>
AttributeNameMandatoryDescriptionDatatypeExample
AuditAudit TrailYes
CodeAudit CodeYesReferring to Audit Code table belowInteger20
TitleTitleYesAudit Code Title
it is suggested to use French wording
Text"Archivage fiscal de période"
DscDescriptionNoAdditional description of the individual event
for signature payload the content is latinized (diacritics are removed)
Text"2021-06"
OprOperator IdNoOperator-IDText"123"
DDatetimeNoDate and time of the eventDatetime"2021-05-30T13:27:54"
TLTransaction LocationYes*Business Premise / Store IDText"001"
TTTransaction TerminalYes*Cash Register Terminal NumberText"1"
TaxIdVAT NumberYes**Text"FR99999999999"

* Mandatory only if Profile RN_TT (multi client mode) is set. Alternatively can be specified in query parameter:

  • POST http://localhost:5618/register?RN=001_1
  • POST http://localhost:5618/register?TL=001&TT=1

** Mandatory only on RN_TT and if clients are of different companies

Manual (by Operator)

Audit Events also can be registered on page http://localhost:5618/control

manual_audit

Audit Codes

Modes:

  • A - Automatic (by EFR)
  • O - Optional (by POS Application)
  • M - Manual (by Operator)
  • C - Conditional (not strictly required by ruleset)
  • N - Not required (within efsta architecture, meaning usage of efsta Cloud system)
CodeCode TitleIntitulé du codeModeComments
10Changing the continuous sequence management modeChangement du mode de gestion de la séquence continueO/M/CTo be used in the event of a change in the numbering of supporting documents (change in numbering methods due to temporal or organizational changes).
20Intermediate Fiscal archivingArchivage fiscal de périodeAArchiving to cloud is done permanently
Proper function is audited after each closure <Tra NFS="Z"> and protocolled with this Code (success) or Code=70 (failure)
30Fiscal year or fiscal period end archivingArchivage fiscal d'année ou d'exerciceAArchiving to cloud is done permanently
Proper function is audited after each closure <Tra NFS="Z"> and protocolled with this Code (success) or Code=70 (failure)
40Stopping the terminal, disconnecting, logging offArrêt du terminal, déconnexion, fermeture de sessionAOn <Tra NFS="Logoff">
50Period closing (Day/Month)Clôture de période (Jour/Mois)AAfter closure <Tra NFS="Z"> of a day that had opened a new month.
The period closed and for reference the document number is recorded: "Dsc":"2021-05@TIK:001/1/101"
60Annual or Fiscal period end closingClôture annuelle ou d’exerciceAAfter closure <Tra NFS="Z"> of a day that had opened a new year.
70Start of degraded mode (offline, ...)Début de mode degrade (hors connexion, …)AAudit Code if EFR cannot connect to the cloud.
80Starting up the terminal, connecting, logging inDémarrage du terminal, connexion, ouverture de sessionAOn EFR start and on <Tra NFS="Logon">
90Detection of an integrity failure in secure data or in a fiscal tax archiveDétection d’un défaut d’intégrité dans les données sécurisées ou dans une archive fiscaleAIntegrity is broken when a secured data has been modified afterwards.
95Detection of a break in the continuous sequenceDétection d'une rupture de la séquence continueO/CConcerns the detection of the break in the continuous sequence except when changing the management mode managed by the event code 10.
100Start of execution of a special functionDébut de l'exécution d'une fonction spécialeO/CThe school and training modes are, for example, special functions.
105End of execution of a special functionFin de l'exécution d'une fonction spécialeO/CThe school and training modes are, for example, special functions.
110Data exportExportation de donnéesO/M/CThe data export does not concern the accounting export A data export can be, for example, the production of a file associated with the Z report, an export to a stock management module...
120End of degraded modeFin de mode dégradéO/CThe end of the degraded mode corresponds to a reconnection of the terminal causing the stop of the autonomous mode and the restart of the centralized/connected mode.
123Forced data forwarding to the central systemRenvoi forcé de données vers le système centralNpermanent
125Centralization of data after the end of the downgraded modeCentralisation des données après la fin du mode dégradéNpermanent
126Adding a point of sale or a user workstationRajout d’un point de vente ou d’un poste utilisateurO/M/C
127Deletion of a point of sale or user workstationSuppression d’un point de vente ou d’un poste utilisateurO/M/C
128Change of taxable entity using the softwareChangement d’assujetti utilisant le système d’encaissementAThis event occurs if a change in field value Cmp.FR_SRN is detected upon POST /cfg.
130User Authorisation/Rights ManagementHabilitation d’utilisateur/Gestion des droitsO/CAny change in user rights, profiles, types impacting certified features must be traced by this event.
140Importing external dataImportation de données externesO/CThe import of a file from a third party / external software must be recorded in this event (file from a weight scale, EDI etc...).
150Printer unavailableImprimante indisponibleO/M/CThe software may not be able to know the printer's unavailability information, in which case the editor must justify why.
155Duplicate of a note (bill)Duplicata d’une noteO/CIssuing a duplicate note (bill) necessarily involves inserting this event.
160Accounting entries recordingEnregistrement des écritures en comptabilitéO/COccurs when the software writes directly into the accounting entries records database.
170Treatment of cash register closure and balanceTraitement de fond de caisseO/C/AAutomatic on NFS=”INI” and NFS=”TRANSFER”
180Generation of an export file for accounting entriesGénération d'un fichier d'exportation des écritures comptablesO/COccurs when the software generates an exchange file for import into accounting software.
190Cancellation of a receipt (ticket)Annulation de ticketAVoid on <ESR Void="1"> or <ESR RTN="1234">
The amount of negative turnover and for reference the document number is recorded: "Dsc":"EUR-99.90@TIK:001/1/105"
200Data purgingPurge des donnéesAData may be purged automatically after archiving to the cloud.
205Partial purging of JETPurge Partielle du JETNAs JET data is recorded along with ticket data, the fiscal purging rules apply (see Code=200).
210Data recovery from other software following system changesReprise de données d’autres logiciels suite à changement de systèmesM/CFor example, before starting up.
220Restoration of a databaseRestauration d’une base de donnéesN/AAutomatic on Offline systems on /backup/restore
230Backup of a databaseSauvegarde d’une base de donnéesN/AAutomatic on Offline systems on /backup
240Follow-up of maintenance interventionsSuivi des interventions de maintenanceM/CTo ensure maintenance and to deal with errors and bugs an editor may need to intervene on the database. This can cause a break in the chain and the integrity of the security. In this case, he must enter this code MANUALLY with the reason for the maintenance. This code is therefore a "Manual" code.
250Installation of a new major version of the softwareInstallation d’une nouvelle version majeure du logicielA/MThis event occurs on a new EFR version, or if a change in field value Trm.SW is detected upon POST /cfg.
255Installation of a new minor version of the softwareInstallation d’une nouvelle version mineure du logicielCThis event can be created by the software installation program or entered manually.
260Data InitializationInitialisation des donnéesAMay occur the first time the software is used.
270Evolution of compliance parameterEvolution de paramètre de conformité aux règlesO/M/CAny change of parameters impacting the certification rules must be traced by this event code. (Example: change of location in the software parameters, activation of multi-currency input, etc.).
280Start/end of tax auditDébut/fin d’opération de contrôle fiscalAon download jou.zip
290Exchange with a chartered accountant (sending the FEC or the Z summation of the cash register)Echange avec un expert-comptable (envoi du FEC ou du Z de caisse)C
295File transfer at the request of the administrationTransfert de fichier à la demande de l'administrationO/M/C
300Parameter activation allowed and documentedActivation de paramètre autorisé et documentéCReplaced by code 270 and 410 but retained for historical purposes.
320Abandonment of a commercial sale (transaction) not yet recordedAbandon d’une opération de vente (transaction) commerciale non encore enregistréeAon <ESR NFS="ABORT">
323Cancellation/Modification of an article lineAnnulation/Modification d’une ligne d’articleA/O/CAutomatic on every line void (Pos.Void=”1”). Must be sent by POS if modifying an article line (For example, a change in price. However, it is not advisable to trace changes in quantity so as not to generate too many events of this type).
324Abandonment of a validated note (bill)Abandon d'une note validéeO/CThe note mentioned here is not a fee note but the note(bill) used in restaurants. The event memorizes abandoned notes (bills) that have been previously validated but for which no receipt (ticket) has been issued.
325Cancellation(s) of article(s) after orderAnnulation(s) d’article(s) après commandeO/C
326Return(s) of article(s) after a note (bill) has been issuedRetour(s) d'article(s) après une émission d’une noteO/C
327Change to "offered" note (bill)Passage en note « offerte »O/C
328Change to “offered” articlePassage d’article en « offert »O/C
329Unprinted note (bill)Non édition d’une noteO/Con <ESR DO=”noprint” ...
Allows you to trace unprinted notes (bills)
330Initialization of period-end closingInitialisation de la clôture de fin de périodeO/CIn the case of closures consisting of several treatments, this event allows to trace the start of the closing treatment.
400Change of fiscal period durationChangement de la durée de l’exerciceO/C
410Change of data regarding the identification of the taxable company or agentChangement de données affectant l’identification de l’assujetti ou du mandataireAon <Cfg><Loc …>
420Changing the method of payment after issuing the receipt (ticket)Changement du mode de règlement, après émission du ticketO/C
430Change of table (in restoration) already assigned to a noteChangement de table (en restauration) affectée à une noteO/C
440Transfer of the tax archive to an external mediumTransfert des archives fiscales sur support externeO/M/C
450Traceability of the change of the pair of keys used for the electronic signatureTraçabilité du changement du trousseau de clés utilisé pour signerAon fiscal key-pair change in case of initial generation or backup restore.
900-999Editor functionFonction éditeursO/CThe editor can insert its own codes to trace additional events.

Periodic Closing / Z Report

Periodically closing of the "till" is required, usually once per opening day. An example can be found in the business cases Z-Report.

Transaction totals of the day per VAT rate are delivered in element <Z> along with:

ElementDescription
PerClosure Period (month)
ZIIncremental Z report Index
LastDLast closure Date
LastSQInternal SeQuence number of last closure;
to fetch the transactions included use
GET http://localhost:5618/retrieve?_=Tra&last={LastSQ}

Month/Year Closure

Month and year closures are requested by the French fiscal regulations. They are automatically recorded (in .jou journal file and dat/bal.dat) on the first closure opening a new month. With each month's closure, a year's closure covering the last 12 months is performed as well (if data for more than one month is available). This is especially useful if a company's fiscal year differs from the calendric year.

Period reports (monthly and annual) are stored locally and can be fetched by requests:

  • GET http://localhost:5618/control/total
  • GET http://localhost:5618/control/bal

Periodic cumulative data (Grand Totals)

Daily Z Report

Grand Totals per day are triggered by a closure transaction ESR.NFS="Z".

Journal example:

{"_":"Tra","SQ":357,"TS":"2018-08-30T16:02:24",
"ESR":{"TL":"001","TT":"1","NFS":"Z","D":"2017-04-01T18:00:00","TN":"218","DN":91,
"Fis":{"Payload":"2000:1500|1000:3500,5000,20170401180000,CLO:001/1/91,O,Vi9nE…","Signature":"AJd9nE…",
"Tag":[{"Label":"Numéro:","Value":"Z:001/1/91","Name":"FN"},
"Z":{"Per":"201704","ZI":1,"T":"50.00","TN":"44.32","LastD":"2017-03-31T13:00:00","LastSQ":355,
"ZTaxA":[{"_":"ZTax","Prc":"20","Net":"1.50","Amt":"15.00"},
{"_":"ZTax","Prc":"10","Net":"31.82","Amt":"35.00"}]},
"Tot":{"GT":177,"GT20":142,"GT10":35,"GTabs":177,"GTvou":50}}
#FieldFIDELE LabelESR Equivalent
1Period IDENC-GTP-ORI-NUMZ.Per
2Amounts incl. VAT Breakdown by VAT rateENC-GTP-MTN-TVA-TTCZTax.Amt
3Amounts excluding VAT broken down by VAT ratesENC-GTP-MTN-TVA-HTZTax.Net
4Associated VAT rateENC-GTP-MTN-TVA-TAUXZTax.Prc
5Grand Total including VAT for the periodENC-GTP-TTCZ.T
6Grand Total excluding VAT for the periodENC-GTP-HTZ.NT
7Perpetual Cumulative Algebraic Grand Total (GTPCA)ENC-GTP-PER-TTCTot.GT
8Perpetual Absolute Value Grand Total (GTPVA)ENC-GTP-PER-TTC-ABSTot.GTabs
9Date/Time Grand Total Periodic RecordingENC-GTP-HOR-GDHTra.TS
10Electronic Signature of the Grand Total PeriodicENC-GTP-TAG-SIGFis.Signature
11Grand Totals of multi purpose vouchersTot.GTvou

Month/Year Totals

Created automatically with the first Z report in a new month (e.g. with closure on February 1st for January):

{"_":"rep","SQ":4651,"TS":"2018-09-01T17:11:36","TY":"MONTH","D":"2018-09-01T17:03:55",
"Z":{"Per":"201808","T":"5520.62","NT":"4848.25",
"ZTaxA":[{"_":"ZTax","Prc":"20","Net":"1960.75","Amt":"2352.90"},
{"_":"ZTax","Prc":"10","Net":"2697.93","Amt":"2967.72"},
{"_":"ZTax","Prc":"5.5","Net":"189.57","Amt":"200.00"}]},
"Fis":{"Payload":"2000:235290|1000:296772|0550:20000,552062,20180831181222,201808,O,XvxbY…","Signature":"q_syt…"},
"Tot":{"GT":62555.44,"GT0550":8420,"GT10":32546.95,"GT20":21588.49,"GTabs":65428.35}}