This commit is contained in:
NotII
2025-07-22 02:40:36 +01:00
parent b329c8422d
commit cb1335b8fd
2 changed files with 21 additions and 4 deletions

View File

@@ -319,10 +319,15 @@ export default function OrderTable() {
const required = order.cryptoTotal || 0;
const missing = order.underpaymentAmount || 0;
// Calculate LTC to GBP exchange rate from order data
const ltcToGbpRate = required > 0 ? order.totalPrice / required : 0;
const missingGbp = missing * ltcToGbpRate;
return {
received,
required,
missing,
missingGbp,
percentage: required > 0 ? ((received / required) * 100).toFixed(1) : 0
};
};
@@ -454,7 +459,7 @@ export default function OrderTable() {
<span>£{order.totalPrice.toFixed(2)}</span>
{underpaidInfo && (
<span className="text-xs text-red-400">
Missing: £{(underpaidInfo.missing * 100).toFixed(2)}
Missing: £{underpaidInfo.missingGbp.toFixed(2)} ({underpaidInfo.missing.toFixed(8)} LTC)
</span>
)}
</div>