From bf31e2a1b674ca8f9156aa87e982925047c01805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt?= Date: Fri, 19 Jun 2026 21:54:26 +0200 Subject: [PATCH] shopinvader_schema_sale: Add untaxed_without_discount in sale schema --- shopinvader_schema_sale/schemas/amount.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shopinvader_schema_sale/schemas/amount.py b/shopinvader_schema_sale/schemas/amount.py index 98b14e64c6..88cb6d00c0 100644 --- a/shopinvader_schema_sale/schemas/amount.py +++ b/shopinvader_schema_sale/schemas/amount.py @@ -13,6 +13,7 @@ class SaleAmount(StrictExtendableBaseModel): total: float = Field(description="Total amount") discount_total: float total_without_discount: float + untaxed_without_discount: float @classmethod def from_sale_order(cls, sale_order): @@ -22,6 +23,9 @@ def from_sale_order(cls, sale_order): total_without_discount=float_round( sale_order.price_total_no_discount, precision ), + untaxed_without_discount=float_round( + sale_order.price_subtotal_no_discount, precision + ), tax=float_round(sale_order.amount_tax, precision), untaxed=float_round(sale_order.amount_untaxed, precision), total=float_round(sale_order.amount_total, precision), @@ -35,6 +39,9 @@ def from_sale_order_line(cls, order_line): total_without_discount=float_round( order_line.price_total_no_discount, precision ), + untaxed_without_discount=float_round( + order_line.price_subtotal_no_discount, precision + ), tax=float_round(order_line.price_tax, precision), untaxed=float_round(order_line.price_subtotal, precision), total=float_round(order_line.price_total, precision),