From 4941df8131e8e50f251b03b4677b05c85a1ab364 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Wed, 1 Apr 2026 11:41:50 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20remove=20decimal=20points=20from=20margi?= =?UTF-8?q?n=20percentage=20=E2=80=94=20whole=20numbers=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../fusion_woocommerce/static/src/js/product_mapping.js | 4 ++-- .../fusion_woocommerce/static/src/xml/product_mapping.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fusion-woo-odoo/fusion_woocommerce/static/src/js/product_mapping.js b/fusion-woo-odoo/fusion_woocommerce/static/src/js/product_mapping.js index 1cdf5847..41541d7d 100644 --- a/fusion-woo-odoo/fusion_woocommerce/static/src/js/product_mapping.js +++ b/fusion-woo-odoo/fusion_woocommerce/static/src/js/product_mapping.js @@ -236,7 +236,7 @@ export class ProductMapping extends Component { formatMargin(cost, price) { const m = this.calcMargin(cost, price); if (m === null) return "—"; - return m.toFixed(1) + "%"; + return Math.round(m) + "%"; } // ------------------------------------------------------------------------- @@ -653,7 +653,7 @@ export class ProductMapping extends Component { args: [[product.odoo_product_id], { list_price: rounded }], kwargs: {}, }); - this.notification.add("Sale price set to $" + rounded.toFixed(2) + " (" + value.toFixed(1) + "% margin).", { type: "success" }); + this.notification.add("Sale price set to $" + rounded.toFixed(2) + " (" + Math.round(value) + "% margin).", { type: "success" }); await this._loadMapped(); return; } diff --git a/fusion-woo-odoo/fusion_woocommerce/static/src/xml/product_mapping.xml b/fusion-woo-odoo/fusion_woocommerce/static/src/xml/product_mapping.xml index e91aa9fa..5734db4d 100644 --- a/fusion-woo-odoo/fusion_woocommerce/static/src/xml/product_mapping.xml +++ b/fusion-woo-odoo/fusion_woocommerce/static/src/xml/product_mapping.xml @@ -231,7 +231,7 @@ -