feat: wip matching bank transactions

This commit is contained in:
Ahmed Bouhuolia
2024-07-01 12:02:59 +02:00
parent da0fab9a58
commit c27458ebcc
12 changed files with 107 additions and 15 deletions

View File

@@ -29,7 +29,9 @@ export class GetMatchedTransactionsByInvoices extends GetMatchedTransactionsByTy
): Promise<MatchedTransactionsPOJO> {
const { SaleInvoice } = this.tenancy.models(tenantId);
const invoices = await SaleInvoice.query();
const invoices = await SaleInvoice.query().onBuild((q) => {
q.whereNotExists(SaleInvoice.relatedQuery('matchedBankTransaction'));
});
return this.transformer.transform(
tenantId,