From 79a90bb9ee669c848eaacd4929da193d1a5bada1 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 27 Apr 2023 17:13:37 -0700 Subject: [PATCH] IO-2257 PBS Export of Credits Amounts less then 0 (ie all credits) would not get pushed to transactionObject. Expand to be both sides of zero to allow for credits within transactionObject --- server/accounting/pbs/pbs-ap-allocations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/accounting/pbs/pbs-ap-allocations.js b/server/accounting/pbs/pbs-ap-allocations.js index 8c4ebad11..10b11cb9b 100644 --- a/server/accounting/pbs/pbs-ap-allocations.js +++ b/server/accounting/pbs/pbs-ap-allocations.js @@ -164,7 +164,7 @@ async function PbsCalculateAllocationsAp(socket, billids) { let APAmount = Dinero(); Object.keys(billHash).map((key) => { - if (billHash[key].Amount.getAmount() > 0) { + if (billHash[key].Amount.getAmount() > 0 || billHash[key].Amount.getAmount() < 0) { transactionObject.Posting.Lines.push({ ...billHash[key], Amount: billHash[key].Amount.toFormat("0.00"),