FEAT: correccion IVA y Boletas, filtro categorias, vista previa evidencia y proveedor de servicios

This commit is contained in:
Nachou-u
2026-09-09 14:35:10 -03:00
parent acb3a1eaad
commit 522d5337f4
8 changed files with 112 additions and 13 deletions
+2 -1
View File
@@ -154,7 +154,8 @@ class PurchaseOrder(models.Model):
def recalculate_totals(self):
neto = sum(item.subtotal_net for item in self.items.all())
iva = (neto * Decimal('0.19')).quantize(Decimal('1'))
iva_rate = Decimal(str(self.tax_rate or '19.00')) / Decimal('100.0')
iva = (neto * iva_rate).quantize(Decimal('1'))
total = neto + iva
self.net_amount_clp = neto
self.tax_amount_clp = iva