From 16be12ff696adbeaf1bfaab08dc990df0b9bbc80 Mon Sep 17 00:00:00 2001 From: Fadli Date: Wed, 12 Oct 2022 10:24:30 +0700 Subject: [PATCH] - fix total commision query --- src/transaction/transaction.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transaction/transaction.service.ts b/src/transaction/transaction.service.ts index ac0f21c..47a94a2 100644 --- a/src/transaction/transaction.service.ts +++ b/src/transaction/transaction.service.ts @@ -2109,9 +2109,9 @@ export class TransactionService { const { total_expense } = await baseQuery .select('SUM(transaction_journal.amount) as total_expense') .innerJoin('transactions.transactionJournal', 'transaction_journal') - .innerJoin('transactions', 'transactions') + .innerJoin('user', 'user') .where( - `transaction_journal.type = '0' and transaction_journal.amount < product_price.price and transactions.status = 1 and partner_trx_id is NULL`, + `transaction_journal.type = '0' and transaction_journal.amount < product_price.price and transactions.status = 1 and user.partner_id is NULL`, ) .getRawOne();