From a8e3b5d69b13ee951c0fd0fac92c51794eddc0b5 Mon Sep 17 00:00:00 2001 From: Hardik Date: Wed, 27 May 2026 03:34:54 +0530 Subject: [PATCH] fix(diff): show GST rate strikethrough when submitter changes it on edit qtyChanged/priceChanged/nameChanged were tracked for the diff view but gstChanged was missing, so an edited GST % showed only the new value with no strikethrough of the old one. Added gstChanged detection and two-line rendering (old % struck through, new % in amber) to match the other diff columns. Co-Authored-By: Claude Sonnet 4.6 --- App/components/po/po-line-items-editor.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/App/components/po/po-line-items-editor.tsx b/App/components/po/po-line-items-editor.tsx index 1caeead..7fd3fbd 100644 --- a/App/components/po/po-line-items-editor.tsx +++ b/App/components/po/po-line-items-editor.tsx @@ -282,6 +282,7 @@ export function LineItemsEditor({ const qtyChanged = orig && Number(orig.quantity) !== item.quantity; const priceChanged = orig && Number(orig.unitPrice) !== item.unitPrice; const nameChanged = orig && orig.name !== item.name; + const gstChanged = orig && Number(orig.gstRate ?? 0.18) !== (item.gstRate ?? 0.18); const taxableAmt = item.quantity * item.unitPrice; const gstAmt = taxableAmt * (item.gstRate ?? 0.18); const acct = item.accountId ? accountMap[item.accountId] : null; @@ -305,7 +306,10 @@ export function LineItemsEditor({ {formatCurrency(item.unitPrice)} {formatCurrency(taxableAmt)} - {Math.round((item.gstRate ?? 0.18) * 100)}% + + {gstChanged && {Math.round((orig.gstRate ?? 0.18) * 100)}%} + {Math.round((item.gstRate ?? 0.18) * 100)}% + {formatCurrency(taxableAmt + gstAmt)} {showAccount && (