fix: Delete bank account with uncategorized transactions

This commit is contained in:
Ahmed Bouhuolia
2024-08-18 14:20:23 +02:00
parent 4ba1c0aa22
commit fb8118bea8
8 changed files with 131 additions and 13 deletions

View File

@@ -26,7 +26,7 @@ export class DeleteBankRuleSerivce {
* @param {number} ruleId
* @returns {Promise<void>}
*/
public async deleteBankRule(tenantId: number, ruleId: number): Promise<void> {
public async deleteBankRule(tenantId: number, ruleId: number, trx?: Knex.Transaction): Promise<void> {
const { BankRule, BankRuleCondition } = this.tenancy.models(tenantId);
const oldBankRule = await BankRule.query()
@@ -51,6 +51,6 @@ export class DeleteBankRuleSerivce {
ruleId,
trx,
} as IBankRuleEventDeletedPayload);
});
}, trx);
}
}