From 1e08cea66f4b4b3e4664f09986b1e41d0ba57830 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Thu, 19 Oct 2023 16:03:57 +0700 Subject: Add rounding total weight on get user checkout --- indoteknik_custom/models/website_user_cart.py | 1 + 1 file changed, 1 insertion(+) diff --git a/indoteknik_custom/models/website_user_cart.py b/indoteknik_custom/models/website_user_cart.py index 2721d66f..bbc14c88 100644 --- a/indoteknik_custom/models/website_user_cart.py +++ b/indoteknik_custom/models/website_user_cart.py @@ -95,6 +95,7 @@ class WebsiteUserCart(models.Model): tax = round(subtotal * 0.11) grand_total = subtotal + tax total_weight = sum(x['weight'] * x['quantity'] for x in products) + total_weight = round(total_weight, 2) result = { 'total_purchase': total_purchase, 'total_discount': total_discount, -- cgit v1.2.3