Skip to content

Commit 85c28d3

Browse files
committed
clean up
1 parent a0340ed commit 85c28d3

104 files changed

Lines changed: 725 additions & 730 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

satcfdi/render/environment.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525

2626

2727
def finalize(s):
28+
if s is None:
29+
return do_mark_safe(" ")
30+
2831
if isinstance(s, Decimal):
2932
return s.__format__(",f")
3033

@@ -107,6 +110,8 @@ def sort_order(x):
107110

108111
@self.glob
109112
def tasa_cuota(factor, s):
113+
if factor == "Exento":
114+
return "Exento"
110115
if factor == "Tasa":
111116
return "{:%}".format(s)
112117
return s

satcfdi/render/templates/Conceptos.html

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,8 @@ <h5>Conceptos</h5>
5151
<td>{% if loop.first %}<b>+&nbsp;Traslados</b>{% endif %}</td>
5252
<td>{{ v.Base }}</td>
5353
<td>{{ v.Impuesto | desc }}</td>
54-
{% if v.TipoFactor == 'Exento' %}
55-
<td>Exento</td>
56-
<td></td>
57-
{% else %}
5854
<td>{{ tasa_cuota( v.TipoFactor, v.TasaOCuota) }}</td>
5955
<td>{{ v.Importe }}</td>
60-
{% endif %}
6156
</tr>
6257
{% endfor %}
6358
{% endif %}
@@ -105,13 +100,8 @@ <h5>Conceptos</h5>
105100
{% endif %}
106101
</td>
107102
<td>{{ v.Impuesto | desc }}</td>
108-
{% if v.TipoFactor == 'Exento' %}
109-
<td>Exento</td>
110-
<td></td>
111-
{% else %}
112103
<td>{{ tasa_cuota( v.TipoFactor, v.TasaOCuota) }}</td>
113104
<td>{{ v.Importe }}</td>
114-
{% endif %}
115105
</tr>
116106
{% endfor %}
117107
{% endif %}

tests/test_cfdi/comprobante33/cfdv33-base.xml.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ <h5>Conceptos</h5>
439439
<td><b>+&nbsp;Traslados</b></td>
440440
<td>33.00</td>
441441
<td>IVA</td>
442-
<td>&nbsp;</td>
442+
<td>Exento</td>
443443
<td>&nbsp;</td>
444444
</tr>
445445
</table>

tests/test_cfdi/comprobante33/cfdv33-detallista-min.xml.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,5 +292,5 @@ <h5>Conceptos</h5>
292292
</table><div><br></div>
293293
<h4>Detallista</h4>
294294
<table><tr><td class='htd'>Request for Payment Identification:</td><td><table><tr><td class='htd'>Entity Type:</td><td>INVOICE</td></tr></table></td></tr><tr><td class='htd'>Special Instruction:</td><td><table><thead><tr><th>Text</th><th>Code</th></tr></thead><tbody><tr><td><ul><li>Monto de la venta</li></ul></td><td>ZZZ</td></tr></tbody></table></td></tr><tr><td class='htd'>Order Identification:</td><td><table><tr><td class='htd'>Reference Identification:</td><td><table><thead><tr><th>_text</th><th>Type</th></tr></thead><tbody><tr><td>
295-
4500536101</td><td>ON</td></tr></tbody></table></td></tr></table></td></tr><tr><td class='htd'>Additional Information:</td><td><table><thead><tr><th>_text</th><th>Type</th></tr></thead><tbody><tr><td>None</td><td>ATZ</td></tr></tbody></table></td></tr><tr><td class='htd'>Buyer:</td><td><table><tr><td class='htd'>Gln:</td><td>0000000000000</td></tr><tr><td class='htd'>Contact Information:</td><td><table><tr><td class='htd'>Person or Department Name:</td><td><table><tr><td class='htd'>Text:</td><td>000</td></tr></table></td></tr></table></td></tr></table></td></tr><tr><td class='htd'>Currency:</td><td><table><thead><tr><th>Currency Function</th><th>Currency ISO Code</th><th>Rate of Change</th></tr></thead><tbody><tr><td><ul><li>BILLING_CURRENCY</li></ul></td><td>MXN</td><td></td></tr><tr><td><ul><li>PAYMENT_CURRENCY</li></ul></td><td>USD</td><td>1.000000</td></tr></tbody></table></td></tr><tr><td class='htd'>Type:</td><td>SimpleInvoiceType</td></tr><tr><td class='htd'>Content Version:</td><td>1.3.1</td></tr><tr><td class='htd'>Document Structure Version:</td><td>AMC8.1</td></tr><tr><td class='htd'>Document Status:</td><td>ORIGINAL</td></tr></table></body>
295+
4500536101</td><td>ON</td></tr></tbody></table></td></tr></table></td></tr><tr><td class='htd'>Additional Information:</td><td><table><thead><tr><th>_text</th><th>Type</th></tr></thead><tbody><tr><td>&amp;nbsp;</td><td>ATZ</td></tr></tbody></table></td></tr><tr><td class='htd'>Buyer:</td><td><table><tr><td class='htd'>Gln:</td><td>0000000000000</td></tr><tr><td class='htd'>Contact Information:</td><td><table><tr><td class='htd'>Person or Department Name:</td><td><table><tr><td class='htd'>Text:</td><td>000</td></tr></table></td></tr></table></td></tr></table></td></tr><tr><td class='htd'>Currency:</td><td><table><thead><tr><th>Currency Function</th><th>Currency ISO Code</th><th>Rate of Change</th></tr></thead><tbody><tr><td><ul><li>BILLING_CURRENCY</li></ul></td><td>MXN</td><td></td></tr><tr><td><ul><li>PAYMENT_CURRENCY</li></ul></td><td>USD</td><td>1.000000</td></tr></tbody></table></td></tr><tr><td class='htd'>Type:</td><td>SimpleInvoiceType</td></tr><tr><td class='htd'>Content Version:</td><td>1.3.1</td></tr><tr><td class='htd'>Document Structure Version:</td><td>AMC8.1</td></tr><tr><td class='htd'>Document Status:</td><td>ORIGINAL</td></tr></table></body>
296296
</html>

tests/test_cfdi/comprobante33/cfdv33-iedu.xml.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ <h5>Conceptos</h5>
439439
<td><b>+&nbsp;Traslados</b></td>
440440
<td>33.00</td>
441441
<td>IVA</td>
442-
<td>&nbsp;</td>
442+
<td>Exento</td>
443443
<td>&nbsp;</td>
444444
</tr>
445445
</table>

tests/test_cfdi/comprobante33/cfdv33-multiples-tasas.xml.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ <h5>Conceptos</h5>
286286
<td><b>+&nbsp;Traslados</b></td>
287287
<td>100.00</td>
288288
<td>IVA</td>
289-
<td>&nbsp;</td>
289+
<td>Exento</td>
290290
<td>&nbsp;</td>
291291
</tr>
292292
</table>

tests/test_cfdi/comprobante40/cfdv40-detallista-min.xml.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,5 +303,5 @@ <h5>Conceptos</h5>
303303
</table><div><br></div>
304304
<h4>Detallista</h4>
305305
<table><tr><td class='htd'>Request for Payment Identification:</td><td><table><tr><td class='htd'>Entity Type:</td><td>INVOICE</td></tr></table></td></tr><tr><td class='htd'>Special Instruction:</td><td><table><thead><tr><th>Text</th><th>Code</th></tr></thead><tbody><tr><td><ul><li>Monto de la venta</li></ul></td><td>ZZZ</td></tr></tbody></table></td></tr><tr><td class='htd'>Order Identification:</td><td><table><tr><td class='htd'>Reference Identification:</td><td><table><thead><tr><th>_text</th><th>Type</th></tr></thead><tbody><tr><td>
306-
4500536101</td><td>ON</td></tr></tbody></table></td></tr></table></td></tr><tr><td class='htd'>Additional Information:</td><td><table><thead><tr><th>_text</th><th>Type</th></tr></thead><tbody><tr><td>None</td><td>ATZ</td></tr></tbody></table></td></tr><tr><td class='htd'>Buyer:</td><td><table><tr><td class='htd'>Gln:</td><td>0000000000000</td></tr><tr><td class='htd'>Contact Information:</td><td><table><tr><td class='htd'>Person or Department Name:</td><td><table><tr><td class='htd'>Text:</td><td>000</td></tr></table></td></tr></table></td></tr></table></td></tr><tr><td class='htd'>Currency:</td><td><table><thead><tr><th>Currency Function</th><th>Currency ISO Code</th><th>Rate of Change</th></tr></thead><tbody><tr><td><ul><li>BILLING_CURRENCY</li></ul></td><td>MXN</td><td></td></tr><tr><td><ul><li>PAYMENT_CURRENCY</li></ul></td><td>USD</td><td>1.000000</td></tr></tbody></table></td></tr><tr><td class='htd'>Type:</td><td>SimpleInvoiceType</td></tr><tr><td class='htd'>Content Version:</td><td>1.3.1</td></tr><tr><td class='htd'>Document Structure Version:</td><td>AMC8.1</td></tr><tr><td class='htd'>Document Status:</td><td>ORIGINAL</td></tr></table></body>
306+
4500536101</td><td>ON</td></tr></tbody></table></td></tr></table></td></tr><tr><td class='htd'>Additional Information:</td><td><table><thead><tr><th>_text</th><th>Type</th></tr></thead><tbody><tr><td>&amp;nbsp;</td><td>ATZ</td></tr></tbody></table></td></tr><tr><td class='htd'>Buyer:</td><td><table><tr><td class='htd'>Gln:</td><td>0000000000000</td></tr><tr><td class='htd'>Contact Information:</td><td><table><tr><td class='htd'>Person or Department Name:</td><td><table><tr><td class='htd'>Text:</td><td>000</td></tr></table></td></tr></table></td></tr></table></td></tr><tr><td class='htd'>Currency:</td><td><table><thead><tr><th>Currency Function</th><th>Currency ISO Code</th><th>Rate of Change</th></tr></thead><tbody><tr><td><ul><li>BILLING_CURRENCY</li></ul></td><td>MXN</td><td></td></tr><tr><td><ul><li>PAYMENT_CURRENCY</li></ul></td><td>USD</td><td>1.000000</td></tr></tbody></table></td></tr><tr><td class='htd'>Type:</td><td>SimpleInvoiceType</td></tr><tr><td class='htd'>Content Version:</td><td>1.3.1</td></tr><tr><td class='htd'>Document Structure Version:</td><td>AMC8.1</td></tr><tr><td class='htd'>Document Status:</td><td>ORIGINAL</td></tr></table></body>
307307
</html>

tests/test_cfdi/comprobante40/cfdv40-pagos20-all.xml.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,14 +357,14 @@ <h4>Pagos</h4>
357357
<td><b>Traslados</b></td>
358358
<td>2.00</td>
359359
<td>IEPS</td>
360-
<td>0.000001</td>
360+
<td>Exento</td>
361361
<td>1.00</td>
362362
</tr>
363363
<tr>
364364
<td><b>Retenciones</b></td>
365365
<td>2.00</td>
366366
<td>IEPS</td>
367-
<td>0.000001</td>
367+
<td>Exento</td>
368368
<td>1.00</td>
369369
</tr>
370370
</table>
@@ -377,7 +377,7 @@ <h4>Pagos</h4>
377377
<b>Traslados</b>
378378
</td>
379379
<td>IEPS</td>
380-
<td>0.00</td>
380+
<td>Exento</td>
381381
<td>0.00</td>
382382
</tr>
383383
<tr class="r">

tests/test_create_addenda/cfdi_addenda.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ <h3>CFDI de I</h3>
222222
<tr class="cen">
223223
<td>MXN</td>
224224
<td>PPD</td>
225-
<td>None</td>
225+
<td>&nbsp;</td>
226226
<td>G03</td>
227227
</tr>
228228
<tr>
@@ -231,9 +231,9 @@ <h3>CFDI de I</h3>
231231
<th colspan="2">Condiciones de Pago</th>
232232
</tr>
233233
<tr class="cen">
234-
<td>None</td>
234+
<td>&nbsp;</td>
235235
<td>01</td>
236-
<td colspan="2">None</td>
236+
<td colspan="2">&nbsp;</td>
237237
</tr>
238238
</table>
239239
<br>
@@ -260,13 +260,13 @@ <h5>Conceptos</h5>
260260
<td class="r">
261261
1.00
262262
<div class="ci">E48</div>
263-
<div class="cii">None</div>
263+
<div class="cii">&nbsp;</div>
264264
</td>
265265
<td class="r">
266266
15,390.30
267267
</td>
268268
<td class="r">
269-
None
269+
&nbsp;
270270
</td>
271271
<td class="r">
272272
15,390.30

tests/test_create_addenda/cfdi_copy.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ <h3>CFDI de I</h3>
222222
<tr class="cen">
223223
<td>MXN</td>
224224
<td>PPD</td>
225-
<td>None</td>
225+
<td>&nbsp;</td>
226226
<td>G03</td>
227227
</tr>
228228
<tr>
@@ -231,9 +231,9 @@ <h3>CFDI de I</h3>
231231
<th colspan="2">Condiciones de Pago</th>
232232
</tr>
233233
<tr class="cen">
234-
<td>None</td>
234+
<td>&nbsp;</td>
235235
<td>01</td>
236-
<td colspan="2">None</td>
236+
<td colspan="2">&nbsp;</td>
237237
</tr>
238238
</table>
239239
<br>
@@ -260,13 +260,13 @@ <h5>Conceptos</h5>
260260
<td class="r">
261261
1.00
262262
<div class="ci">E48</div>
263-
<div class="cii">None</div>
263+
<div class="cii">&nbsp;</div>
264264
</td>
265265
<td class="r">
266266
15,390.30
267267
</td>
268268
<td class="r">
269-
None
269+
&nbsp;
270270
</td>
271271
<td class="r">
272272
15,390.30

0 commit comments

Comments
 (0)