Fixed IsPaid for Incoming

This commit is contained in:
2025-02-18 22:10:55 +01:00
parent 855e137376
commit 2a728e0ee7

View File

@@ -105,8 +105,7 @@ const getInvoiceSum = (invoice) => {
const isPaid = (item) => {
let amountPaid = 0
item.statementallocations.forEach(allocation => amountPaid += allocation.amount)
return amountPaid === Number(getInvoiceSum(item))
return Math.abs(amountPaid) === Math.abs(Number(getInvoiceSum(item)))
}