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 && (