IO-3609 Bill Cost Calculation Toggle
Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
@@ -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"]);
|
||||
|
||||
@@ -342,6 +342,14 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>,
|
||||
<Form.Item
|
||||
key="disableBillCostCalculation"
|
||||
name={["accountingconfig", "disableBillCostCalculation"]}
|
||||
label={t("bodyshop.fields.disableBillCostCalculation")}
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
]
|
||||
: []),
|
||||
|
||||
Reference in New Issue
Block a user