The problem
In Brazil you cannot ship goods without an authorised NF-e. The XML goes to the state SEFAZ, comes back with a protocolo de autorização and an access key, and only then may the DANFE travel with the load. If SEFAZ rejects the file — a wrong CFOP, an NCM that does not match the tax treatment, an inconsistent CST — the truck waits.
Behind that sits the hardest part: tax determination. ICMS varies by origin state, destination state, the nature of the operation and the customer's taxpayer status, with substitution (ICMS-ST), DIFAL on interstate sales to non-taxpayers, and FCP layered on top. IPI depends on the NCM classification and whether you are an industrial establishment. PIS and COFINS depend on your regime. A single sale to a customer one state away can carry a materially different tax stack than the identical sale in-state, and the ERP has to get it right before the file is transmitted, not after.
Services are a separate regime entirely: NFS-e is municipal, ISS rates and rules vary by município, and the webservice differs city by city. Meanwhile a stock SAP Business One installation has no CFOP field, no NCM, no CST, no código de município, no SEFAZ connection and no DANFE layout.
What ECOSIRE builds
We build a fiscal add-on for your SAP Business One tenant, developed against the Service Layer and DI API. Fiscal attributes are delivered as UDFs on Business Partners, Items and marketing documents; the fiscal rule tables as UDTs; and the fiscal document itself as a UDO so the NF-e has a real form, status, authorisations and audit trail in the B1 client rather than living as columns bolted onto a Delivery.
NF-e generation and SEFAZ transmission
On posting a Delivery or A/R Invoice, depending on the trigger you choose, the add-on assembles the NF-e XML from the document, the Business Partner fiscal master data, the item NCM and CEST, and the determined tax figures. It signs the file with your A1 certificate and transmits it to the appropriate SEFAZ endpoint, then handles the asynchronous authorisation response, storing the access key, protocol number and authorisation timestamp back on the source document and on the NF-e UDO.
Contingency is part of the build, not an afterthought: when the state webservice is unavailable, the add-on supports the contingency path your operation uses so dispatch is not blocked, and reconciles the document once SEFAZ returns.
Tax determination engine
This is where most of the build effort goes. We deliver a rule table driven by operation nature, origin and destination UF, customer taxpayer status and regime tributário, item NCM, and the CFOP that results. From that we determine ICMS including ICMS-ST with MVA, DIFAL splits on interstate sales to end consumers, FCP, IPI by NCM, and PIS/COFINS per your regime — with the corresponding CST and CSOSN codes written to each line. Determined values post to SAP Business One tax codes and G/L accounts you nominate, so the fiscal figures and the accounting figures are the same figures.
DANFE and DANFSE printing
The DANFE is delivered as a Crystal Report in the mandated layout, carrying the barcode, access key, protocol data and the fiscal legends, printing through the standard B1 preview and print flow. DANFSE for services follows the layout of the município in scope.
NFS-e for services
Service invoicing is built against the specific municipal webservices you operate in — this is scoped explicitly, because a build covering one município is not a build covering five. ISS determination handles the rate, whether the tax is withheld at source (ISS retido), and the service code list of that município.
Cancellation, CC-e and inutilização
Cancellation within the legal window is submitted to SEFAZ with a justification and the result reflected on the document. Carta de Correção Eletrônica is supported for the fields the law permits correcting — and only those. Number range gaps are closed with inutilização requests, because an unexplained gap in your NF-e series is an audit finding waiting to happen.
Inbound and controls
Where in scope, we ingest supplier NF-e XML and manifest it, matching it to your Purchase Order and creating the Goods Receipt PO and A/P Invoice with the supplier's fiscal figures preserved. Every SEFAZ exchange is logged with request, response and protocol; rejections land in an exception queue with the SEFAZ rejection code translated into a usable message. Fiscal documents above a threshold, or corrections, can route through B1 approval procedures.
Who this is for
Manufacturers, distributors and importers operating in Brazil on SAP Business One, and foreign groups whose Brazilian subsidiary must file locally while consolidating into a group instance. It suits businesses selling interstate, where DIFAL and ICMS-ST make manual tax determination unworkable, and businesses with both goods and services obligations who currently run NF-e and NFS-e in two disconnected places.
How delivery works
1. Scoping call. We go through your regime tributário, the states you ship from and to, whether ICMS-ST applies to your NCM range, which municípios you invoice services in, your certificate type, whether inbound manifestation is in scope, and the current state of your item and Business Partner fiscal master data.
2. Fixed quote. A written scope and a fixed price before development. Each additional município for NFS-e, inbound manifestation, and unusual ST regimes are priced as explicit line items.
3. Build. Developed against your SAP Business One version, database platform and the SEFAZ and municipal endpoints in your scope. Nothing is pre-built; typical lead time is one working week from signed scope, longer where the tax matrix or município count is large.
4. Install into test. Installed into your test company database and transmitted against the SEFAZ homologation environment, running your real operations — interstate sale, ST operation, service invoice, cancellation, CC-e — with your fiscal team present. Tax determination is validated line by line against their expectations before anything goes live.
5. Install into production. After sign-off, installed into production with your live certificate and series configuration, and the first live authorisations run alongside your team.
6. Support. A defined support window for defect correction and configuration adjustment, on the terms in your quote. Brazilian fiscal rules change frequently; ongoing maintenance is a support arrangement.