mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 14:08:11 +00:00
fix
This commit is contained in:
@@ -57,7 +57,8 @@ export class FirstMileInvoiceService {
|
||||
return null;
|
||||
}
|
||||
|
||||
const totalAmount = record.remainingPayment || 0;
|
||||
// numeric columns come back as strings — coerce before the finite/>0 check.
|
||||
const totalAmount = Number(record.remainingPayment) || 0;
|
||||
if (!Number.isFinite(totalAmount) || totalAmount <= 0) {
|
||||
this.logger.warn(
|
||||
`Skipping invoice for first-mile record ${record.id}: no remaining payment.`,
|
||||
|
||||
Reference in New Issue
Block a user