mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix: bank transactions report
This commit is contained in:
@@ -32,6 +32,9 @@ export class GetMatchedTransactionsByCashflow extends GetMatchedTransactionsByTy
|
||||
q.withGraphJoined('matchedBankTransaction');
|
||||
q.whereNull('matchedBankTransaction.id');
|
||||
|
||||
// Not categorized.
|
||||
q.modify('notCategorized');
|
||||
|
||||
// Published.
|
||||
q.modify('published');
|
||||
|
||||
@@ -69,6 +72,8 @@ export class GetMatchedTransactionsByCashflow extends GetMatchedTransactionsByTy
|
||||
.findById(transactionId)
|
||||
.withGraphJoined('matchedBankTransaction')
|
||||
.whereNull('matchedBankTransaction.id')
|
||||
.modify('notCategorized')
|
||||
.modify('published')
|
||||
.throwIfNotFound();
|
||||
|
||||
return this.transformer.transform(
|
||||
|
||||
@@ -31,7 +31,6 @@ export class DecrementUncategorizedTransactionOnMatching {
|
||||
public async decrementUnCategorizedTransactionsOnMatching({
|
||||
tenantId,
|
||||
uncategorizedTransactionId,
|
||||
matchTransactionsDTO,
|
||||
trx,
|
||||
}: IBankTransactionMatchedEventPayload) {
|
||||
const { UncategorizedCashflowTransaction, Account } =
|
||||
@@ -64,6 +63,6 @@ export class DecrementUncategorizedTransactionOnMatching {
|
||||
//
|
||||
await Account.query(trx)
|
||||
.findById(transaction.accountId)
|
||||
.decrement('uncategorizedTransactions', 1);
|
||||
.increment('uncategorizedTransactions', 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user