API Reference sefaz_danfe v#0.1.0

Copy Markdown View Source

Modules

The printed auxiliary documents of the Brazilian electronic fiscal documents, drawn from the authorized XML: the DANFE of an NF-e (model 55), the DANFE NFC-e (model 65), the DACTE of a CT-e (57) or CT-e OS (67) and the DAMDFE of an MDF-e (58).

Code 128 subset C (ISO/IEC 15417), the barcode the DANFE prints for the access key.

The contingency of a document, read from its ide: tpEmis (the emission type) and, when the XML has them, dhCont (when the contingency began) and xJust (why).

The additional barcode of the documents printed in contingency on the security form (FS-DA, and FS-IA of the NF-e): "Dados da NF-e" (MOC 7.0, Anexo II, item 2.9.2) and "Dados do CT-e" (MOC 3.00a of the DACTE, item 2.18.2). It is a Code 128 subset C of 36 digits, and the same 36 digits in nine blocks of four go printed in the box next to it.

The data of a DACTE, read from the cteProc (or cteOSProc) SEFAZ authorized: what the PDF is drawn from.

The Brazilian presentation of the values of a DANFE: tax ids, CEP, dates, money, quantities and the access key. Every function takes what the XML holds (text, nil when absent) and answers text, or nil when there is nothing to show, so a missing field stays blank.

The data of a DAMDFE, read from the mdfeProc SEFAZ authorized (with the closeout appended, once it is registered): what the PDF is drawn from.

The data of a DANFE NFC-e, read from the nfeProc SEFAZ authorized: what the 80 mm or 58 mm receipt is drawn from.

The data of a DANFE, read from the nfeProc SEFAZ authorized: what the PDF is drawn from.

A QR Code (ISO/IEC 18004, model 2) encoder for the DANFE NFC-e: byte mode, error correction level M (the level the NFC-e manual asks for), versions 1 to 14, the best of the eight masks.

Draws the PDF of a document from the data SefazDanfe.data/2 reads: the one place that calls Typst.