From a005f1bb45585e536174c4865e9e4625c1886ff9 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Mon, 23 Mar 2026 15:52:49 -0700 Subject: [PATCH] IO-3609 Bill Cost Calculation Toggle Signed-off-by: Allan Carr --- .../components/bill-form/bill-form.lines.component.jsx | 1 + .../shop-info.responsibilitycenters.component.jsx | 8 ++++++++ client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 5 files changed, 12 insertions(+) diff --git a/client/src/components/bill-form/bill-form.lines.component.jsx b/client/src/components/bill-form/bill-form.lines.component.jsx index b9c41074c..541608ec4 100644 --- a/client/src/components/bill-form/bill-form.lines.component.jsx +++ b/client/src/components/bill-form/bill-form.lines.component.jsx @@ -96,6 +96,7 @@ export function BillEnterModalLinesComponent({ // Only fill actual_cost when the user forward-tabs out of Retail (actual_price) const autofillActualCost = (index) => { + if (bodyshop.accountingconfig?.disableBillCostCalculation) return; Promise.resolve().then(() => { const retailRaw = form.getFieldValue(["billlines", index, "actual_price"]); const actualRaw = form.getFieldValue(["billlines", index, "actual_cost"]); diff --git a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx index 87013bdd2..3a9588272 100644 --- a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx +++ b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx @@ -342,6 +342,14 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { valuePropName="checked" > + , + + ] : []), diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index a79bf0edd..76e55c8f3 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -339,6 +339,7 @@ "require_actual_delivery_date": "Require Actual Delivery", "templates": "Delivery Templates" }, + "disableBillCostCalculation": "Disable Automatic Bill Cost Calculation", "dms": { "apcontrol": "AP Control Number", "appostingaccount": "AP Posting Account", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index e1061fb2e..683e1d5b8 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -339,6 +339,7 @@ "require_actual_delivery_date": "", "templates": "" }, + "disableBillCostCalculation": "", "dms": { "apcontrol": "", "appostingaccount": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index b4b37cf62..7ca765876 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -339,6 +339,7 @@ "require_actual_delivery_date": "", "templates": "" }, + "disableBillCostCalculation": "", "dms": { "apcontrol": "", "appostingaccount": "",