From c8a1e1e25eadcd10f071c154ac491c3838441d68 Mon Sep 17 00:00:00 2001 From: Gustav Larsson Date: Wed, 31 Jan 2024 15:49:39 +0100 Subject: [PATCH] Fix sumCollectiveTransactions --- server/lib/budget.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/lib/budget.js b/server/lib/budget.js index 7d32f3ca130..0d83f8db570 100644 --- a/server/lib/budget.js +++ b/server/lib/budget.js @@ -586,7 +586,11 @@ export async function sumCollectivesTransactions( } else if (transactionType === 'CREDIT_WITH_HOST_FEE_AND_PAYMENT_PROCESSOR_FEE') { where = { ...where, - [Op.or]: [{ type: CREDIT }, { type: DEBIT, kind: 'HOST_FEE' }, { type: DEBIT, kind: 'PAYMENT_PROCESSOR_FEE' }], + [Op.or]: [ + { type: CREDIT }, + { type: DEBIT, kind: 'HOST_FEE' }, + { type: DEBIT, kind: 'PAYMENT_PROCESSOR_FEE', OrderId: { [Op.not]: null } }, + ], }; } else { where.type = transactionType;