diff --git a/source/app/controllers/pycfdi.py b/source/app/controllers/pycfdi.py index f098330..d023490 100644 --- a/source/app/controllers/pycfdi.py +++ b/source/app/controllers/pycfdi.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 from decimal import Decimal, getcontext -getcontext().prec = 6 +# ~ getcontext().prec = 6 import lxml.etree as ET from requests.structures import CaseInsensitiveDict as CIDict diff --git a/source/app/models/main.py b/source/app/models/main.py index a1d006b..59ec507 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -5049,7 +5049,9 @@ class Facturas(BaseModel): (total_trasladados or 0) - (total_retenciones or 0) \ + locales_traslados - locales_retenciones total = round(total, DECIMALES) + # ~ exchange_rate = float(invoice.tipo_cambio) total_mn = round(total * invoice.tipo_cambio, DECIMALES) + # ~ total_mn = round(total * exchange_rate, DECIMALES) data = { 'subtotal': subtotal, 'descuento': descuento_cfdi,