Remove modifi precition in decimal context

This commit is contained in:
Mauricio Baeza 2021-09-01 21:45:21 -05:00
parent 4aad1a94eb
commit 25e86cd28c
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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,