@@ -96,6 +96,7 @@ export function BillEnterModalLinesComponent({
|
|||||||
|
|
||||||
// Only fill actual_cost when the user forward-tabs out of Retail (actual_price)
|
// Only fill actual_cost when the user forward-tabs out of Retail (actual_price)
|
||||||
const autofillActualCost = (index) => {
|
const autofillActualCost = (index) => {
|
||||||
|
if (bodyshop.accountingconfig?.disableBillCostCalculation) return;
|
||||||
Promise.resolve().then(() => {
|
Promise.resolve().then(() => {
|
||||||
const retailRaw = form.getFieldValue(["billlines", index, "actual_price"]);
|
const retailRaw = form.getFieldValue(["billlines", index, "actual_price"]);
|
||||||
const actualRaw = form.getFieldValue(["billlines", index, "actual_cost"]);
|
const actualRaw = form.getFieldValue(["billlines", index, "actual_cost"]);
|
||||||
|
|||||||
@@ -316,9 +316,8 @@ export function ShopEmployeesFormComponent({ bodyshop }) {
|
|||||||
<LayoutFormRow grow>
|
<LayoutFormRow grow>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("employees.fields.cost_center")}
|
label={t("employees.fields.cost_center")}
|
||||||
key={`${index}`}
|
key={`${field.key}-cost_center`}
|
||||||
name={[field.name, "cost_center"]}
|
name={[field.name, "cost_center"]}
|
||||||
valuePropName="value"
|
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true
|
required: true
|
||||||
@@ -343,7 +342,7 @@ export function ShopEmployeesFormComponent({ bodyshop }) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("employees.fields.rate")}
|
label={t("employees.fields.rate")}
|
||||||
key={`${index}`}
|
key={`${field.key}-rate`}
|
||||||
name={[field.name, "rate"]}
|
name={[field.name, "rate"]}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -342,6 +342,14 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
|
</Form.Item>,
|
||||||
|
<Form.Item
|
||||||
|
key="disableBillCostCalculation"
|
||||||
|
name={["accountingconfig", "disableBillCostCalculation"]}
|
||||||
|
label={t("bodyshop.fields.disableBillCostCalculation")}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ export function VendorsFormComponent({ bodyshop, form, formLoading, handleDelete
|
|||||||
{!isPartsEntry && (
|
{!isPartsEntry && (
|
||||||
<>
|
<>
|
||||||
<Form.Item label={t("vendors.fields.discount")} name="discount">
|
<Form.Item label={t("vendors.fields.discount")} name="discount">
|
||||||
<InputNumber min={0} max={1} precision={2} step={0.01} />
|
<InputNumber min={0} max={1} precision={3} step={0.01} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item label={t("vendors.fields.due_date")} name="due_date">
|
<Form.Item label={t("vendors.fields.due_date")} name="due_date">
|
||||||
|
|||||||
@@ -339,6 +339,7 @@
|
|||||||
"require_actual_delivery_date": "Require Actual Delivery",
|
"require_actual_delivery_date": "Require Actual Delivery",
|
||||||
"templates": "Delivery Templates"
|
"templates": "Delivery Templates"
|
||||||
},
|
},
|
||||||
|
"disableBillCostCalculation": "Disable Automatic Bill Cost Calculation",
|
||||||
"dms": {
|
"dms": {
|
||||||
"apcontrol": "AP Control Number",
|
"apcontrol": "AP Control Number",
|
||||||
"appostingaccount": "AP Posting Account",
|
"appostingaccount": "AP Posting Account",
|
||||||
|
|||||||
@@ -339,6 +339,7 @@
|
|||||||
"require_actual_delivery_date": "",
|
"require_actual_delivery_date": "",
|
||||||
"templates": ""
|
"templates": ""
|
||||||
},
|
},
|
||||||
|
"disableBillCostCalculation": "",
|
||||||
"dms": {
|
"dms": {
|
||||||
"apcontrol": "",
|
"apcontrol": "",
|
||||||
"appostingaccount": "",
|
"appostingaccount": "",
|
||||||
|
|||||||
@@ -339,6 +339,7 @@
|
|||||||
"require_actual_delivery_date": "",
|
"require_actual_delivery_date": "",
|
||||||
"templates": ""
|
"templates": ""
|
||||||
},
|
},
|
||||||
|
"disableBillCostCalculation": "",
|
||||||
"dms": {
|
"dms": {
|
||||||
"apcontrol": "",
|
"apcontrol": "",
|
||||||
"appostingaccount": "",
|
"appostingaccount": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user