ficks
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user