From c9e50bb8449b398a54be74c54fd2899269d37f38 Mon Sep 17 00:00:00 2001 From: sinergia Date: Sun, 3 Sep 2023 19:57:00 -0500 Subject: [PATCH] se agrega subtotal --- sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sale.py b/sale.py index 213c657..58d6068 100644 --- a/sale.py +++ b/sale.py @@ -80,8 +80,7 @@ class Sale(metaclass=PoolMeta): if (sale.state in cls._states_cached and sale.untaxed_amount_cache is not None and sale.tax_amount_cache is not None - and sale.total_amount_cache is not None - and sale.total_discount is not None): + and sale.total_amount_cache is not None): untaxed_amount[sale.id] = sale.untaxed_amount_cache total_discount[sale.id] = sale.total_discount_cache if compute_taxes: @@ -174,6 +173,7 @@ class Sale(metaclass=PoolMeta): data["untaxed_amount"] = str(record.untaxed_amount) data["tax_amount"] = str(record.tax_amount) data["total"] = str(record.total_amount) + data["state"] = "SUBTOTAL" if record.state == "draft" else "CUENTA FINAL" if record.payments: data['payments'] = [{