SefazDanfe.Cte.Data (sefaz_danfe v0.1.0)

Copy Markdown View Source

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

Pure: it takes the XML (SefazNfe.Builder.parse_cte/2, parse_cte_os/2) and answers a map with string keys that the JSON encoder takes as is. Every value is already presented the Brazilian way (SefazDanfe.Format) and is nil when the XML does not have it: nothing is computed or invented. The blocks follow the DACTE of the MOC (road modal): the identification of the document at the top with the protocol of the authorization, the emitter, the taker and the parties of the service (sender, recipient, dispatcher, receiver), the amounts of the service and its icms, the cargo with the NF-e it carries (a CT-e) or the service (a CT-e OS), the road modal and the additional_info.

Summary

Functions

The DACTE data of the cteProc of a document of model (57 or 67) in xml.

Types

t()

@type t() :: %{required(String.t()) => term()}

Functions

from_xml(xml, int)

@spec from_xml(String.t(), 57 | 67) :: {:ok, t()} | {:error, term()}

The DACTE data of the cteProc of a document of model (57 or 67) in xml.