|
+
+
+
0)
+ if (!!values.total && !!values.billlines && values.billlines.length > 0) {
totals = CalculateBillTotal(values);
- if (totals)
+ }
+
+ if (totals) {
return (
// TODO: Align is not correct
// eslint-disable-next-line react/no-unknown-property
@@ -414,7 +416,7 @@ export function BillFormComponent({
);
+ }
return null;
}}
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 d1fb03369..73b0a21a9 100644
--- a/client/src/components/bill-form/bill-form.lines.component.jsx
+++ b/client/src/components/bill-form/bill-form.lines.component.jsx
@@ -90,6 +90,7 @@ export function BillEnterModalLinesComponent({
});
};
+ // Only fill actual_cost when the user forward-tabs out of Retail (actual_price)
const autofillActualCost = (index) => {
Promise.resolve().then(() => {
const retailRaw = form.getFieldValue(["billlines", index, "actual_price"]);
@@ -164,10 +165,9 @@ export function BillEnterModalLinesComponent({
}}
allowRemoved={form.getFieldValue("is_credit_memo") || false}
onSelect={(value, opt) => {
- const d = normalizeDiscount(discount);
- const retail = Number(opt.cost);
- const computedActual = Number.isFinite(retail) ? round2(retail * (1 - d)) : null;
-
+ // IMPORTANT:
+ // Do NOT autofill actual_cost here. It should only fill when the user forward-tabs
+ // from Retail (actual_price) -> Actual Cost (actual_cost).
setFieldsValue({
billlines: (getFieldValue("billlines") || []).map((item, idx) => {
if (idx !== index) return item;
@@ -178,7 +178,7 @@ export function BillEnterModalLinesComponent({
quantity: opt.part_qty || 1,
actual_price: opt.cost,
original_actual_price: opt.cost,
- actual_cost: isBlank(item.actual_cost) ? computedActual : item.actual_cost,
+ // actual_cost intentionally untouched here
cost_center: opt.part_type
? bodyshopHasDmsKey(bodyshop)
? opt.part_type !== "PAE"
@@ -251,9 +251,9 @@ export function BillEnterModalLinesComponent({
autofillActualCost(index)}
+ // NOTE: Autofill should only happen on forward Tab out of Retail
onKeyDown={(e) => {
- if (e.key === "Tab") autofillActualCost(index);
+ if (e.key === "Tab" && !e.shiftKey) autofillActualCost(index);
}}
/>
),
@@ -329,7 +329,7 @@ export function BillEnterModalLinesComponent({
disabled={disabled}
controls={false}
style={{ width: "100%", height: CONTROL_HEIGHT }}
- onFocus={() => autofillActualCost(index)}
+ // NOTE: No auto-fill on focus/blur; only triggered from Retail on Tab
/>
@@ -517,7 +517,11 @@ export function BillEnterModalLinesComponent({
formItemProps: (field) => ({
key: `${field.name}fedtax`,
valuePropName: "checked",
- name: [field.name, "applicable_taxes", "federal"]
+ name: [field.name, "applicable_taxes", "federal"],
+ initialValue: InstanceRenderManager({
+ imex: true,
+ rome: false
+ })
}),
formInput: () =>
}
diff --git a/client/src/components/card-payment-modal/card-payment-modal.component.jsx b/client/src/components/card-payment-modal/card-payment-modal.component.jsx
index ab3384fce..11aed2922 100644
--- a/client/src/components/card-payment-modal/card-payment-modal.component.jsx
+++ b/client/src/components/card-payment-modal/card-payment-modal.component.jsx
@@ -57,7 +57,6 @@ const CardPaymentModalComponent = ({
QUERY_RO_AND_OWNER_BY_JOB_PKS,
{
fetchPolicy: "network-only",
- notifyOnNetworkStatusChange: true
}
);
diff --git a/client/src/components/chat-popup/chat-popup.component.jsx b/client/src/components/chat-popup/chat-popup.component.jsx
index f0805345a..1a3c03f2d 100644
--- a/client/src/components/chat-popup/chat-popup.component.jsx
+++ b/client/src/components/chat-popup/chat-popup.component.jsx
@@ -47,7 +47,6 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh
const [getConversations, { loading, data, refetch, called }] = useLazyQuery(CONVERSATION_LIST_QUERY, {
fetchPolicy: "network-only",
nextFetchPolicy: "network-only",
- notifyOnNetworkStatusChange: true,
...(pollInterval > 0 ? { pollInterval } : {})
});
diff --git a/client/src/components/dashboard-components/total-production-hours/total-production-hours.component.jsx b/client/src/components/dashboard-components/total-production-hours/total-production-hours.component.jsx
index 5c29a1962..b9716e84b 100644
--- a/client/src/components/dashboard-components/total-production-hours/total-production-hours.component.jsx
+++ b/client/src/components/dashboard-components/total-production-hours/total-production-hours.component.jsx
@@ -36,7 +36,7 @@ export function DashboardTotalProductionHours({ bodyshop, data, ...cardProps })
diff --git a/client/src/components/dms-post-form/cdklike-dms-post-form.jsx b/client/src/components/dms-post-form/cdklike-dms-post-form.jsx
index 43003a45f..9e006534b 100644
--- a/client/src/components/dms-post-form/cdklike-dms-post-form.jsx
+++ b/client/src/components/dms-post-form/cdklike-dms-post-form.jsx
@@ -404,7 +404,7 @@ export default function CdkLikePostForm({ bodyshop, socket, job, logsRef, mode,
=
|