Skip to content

Commit ba58858

Browse files
Merge pull request #58 from corredato/cbenef
DANFE: add cbenef in additional data
2 parents b3fd1a6 + 669636e commit ba58858

32 files changed

+5
-0
lines changed

brazilfiscalreport/danfe/danfe.py

+4
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,10 @@ def _build_inf_ad_prod(self, prod, inf_ad_prod):
296296
f"{prefix}Lote: {n_lote} Qtd: {q_lote} Fab: {d_fab} Val: {d_val}"
297297
)
298298

299+
cbenef = extract_text(prod, "cBenef")
300+
if cbenef:
301+
add_infos.append(f"cBenef: {cbenef}")
302+
299303
if self.product_description_config.display_additional_info and inf_ad_prod:
300304
add_infos.append(inf_ad_prod)
301305

tests/fixtures/nfe_test_1.xml

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
<cEAN>SEM GTIN</cEAN>
6868
<xProd>Flipover</xProd>
6969
<NCM>96100000</NCM>
70+
<cBenef>SC850065</cBenef>
7071
<CFOP>5102</CFOP>
7172
<uCom>UN</uCom>
7273
<qCom>1.0000</qCom>

tests/generated/dacce/cce.pdf

-6 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-2 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.
-6 Bytes
Binary file not shown.
Binary file not shown.
-6 Bytes
Binary file not shown.
-6 Bytes
Binary file not shown.
-6 Bytes
Binary file not shown.
-6 Bytes
Binary file not shown.
Binary file not shown.
-6 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-4 Bytes
Binary file not shown.
Binary file not shown.
34 Bytes
Binary file not shown.
-4 Bytes
Binary file not shown.
32 Bytes
Binary file not shown.
Binary file not shown.
-1 Bytes
Binary file not shown.
33 Bytes
Binary file not shown.

tests/generated/danfe/danfe_sn.pdf

-5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)