Skip to content

Commit

Permalink
Merge pull request #66 from CristianoMafraJunior/dacte-cnpj-ie
Browse files Browse the repository at this point in the history
DACTE: emit cnpj and ie
  • Loading branch information
antoniospneto authored Feb 23, 2025
2 parents dcb5660 + 45451b2 commit 7f6567e
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion brazilfiscalreport/dacte/dacte.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ def _draw_header(self):
self.dh_recebto, hr_recebto = get_date_utc(
extract_text(self.prot_cte, "dhRecbto")
)
self.emit_cnpj = format_cpf_cnpj(extract_text(self.emit, "CNPJ"))
address = (
f"CNPJ: {self.emit_cnpj} IE: {extract_text(self.emit, 'IE')}\n"
f"{extract_text(self.emit, 'xLgr')}, "
f"{extract_text(self.emit, 'nro')}\n"
f"{extract_text(self.emit, 'xBairro')}\n"
Expand Down Expand Up @@ -324,7 +326,7 @@ def _draw_header(self):
self.set_xy(x=x_text, y=y_text)
self.multi_cell(w=w_text, h=5, text=self.emit_name, border=0, align="C")
self.set_font(self.default_font, "", 8)
self.set_xy(x=x_text - 3, y=y_text + 10)
self.set_xy(x=x_text - 3, y=y_text + 6)
self.multi_cell(w=w_text + 10, h=3, text=address, border=0, align="C")

y_margin = self.l_margin + 22
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/dacte_test_1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<xMun>SAO JOAO BATISTA</xMun>
<CEP>88240000</CEP>
<UF>SC</UF>
<fone>489999009</fone>
<fone>48999000066</fone>
</enderEmit>
<CRT>1</CRT>
</emit>
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/dacte_test_multi_pages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<xMun>SAO JOAO BATISTA</xMun>
<CEP>88240000</CEP>
<UF>SC</UF>
<fone>489999009</fone>
<fone>48999000066</fone>
</enderEmit>
<CRT>1</CRT>
</emit>
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/dacte_test_overload.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<xMun>SAO JOAO BATISTA</xMun>
<CEP>88240000</CEP>
<UF>SC</UF>
<fone>489999009</fone>
<fone>48999000066</fone>
</enderEmit>
<CRT>1</CRT>
</emit>
Expand Down
Binary file modified tests/generated/dacte/dacte_default.pdf
Binary file not shown.
Binary file modified tests/generated/dacte/dacte_default_aereo.pdf
Binary file not shown.
Binary file modified tests/generated/dacte/dacte_default_aquaviario.pdf
Binary file not shown.
Binary file modified tests/generated/dacte/dacte_default_dutoviario.pdf
Binary file not shown.
Binary file modified tests/generated/dacte/dacte_default_ferroviario.pdf
Binary file not shown.
Binary file modified tests/generated/dacte/dacte_default_logo.pdf
Binary file not shown.
Binary file modified tests/generated/dacte/dacte_default_multimodal.pdf
Binary file not shown.
Binary file modified tests/generated/dacte/dacte_multi_pages.pdf
Binary file not shown.
Binary file modified tests/generated/dacte/dacte_overload.pdf
Binary file not shown.

0 comments on commit 7f6567e

Please sign in to comment.