mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-22 15:50:32 +00:00
wip
This commit is contained in:
@@ -9,7 +9,7 @@ export class ValidateBulkDeleteCreditNotesService {
|
||||
private readonly deleteCreditNoteService: DeleteCreditNoteService,
|
||||
@Inject(TENANCY_DB_CONNECTION)
|
||||
private readonly tenantKnex: () => Knex,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
public async validateBulkDeleteCreditNotes(creditNoteIds: number[]): Promise<{
|
||||
deletableCount: number;
|
||||
@@ -27,7 +27,10 @@ export class ValidateBulkDeleteCreditNotesService {
|
||||
|
||||
for (const creditNoteId of creditNoteIds) {
|
||||
try {
|
||||
await this.deleteCreditNoteService.deleteCreditNote(creditNoteId);
|
||||
await this.deleteCreditNoteService.deleteCreditNote(
|
||||
creditNoteId,
|
||||
trx,
|
||||
);
|
||||
deletableIds.push(creditNoteId);
|
||||
} catch (error) {
|
||||
nonDeletableIds.push(creditNoteId);
|
||||
|
||||
Reference in New Issue
Block a user