refactor: branches and warehouses to nestjs

This commit is contained in:
Ahmed Bouhuolia
2024-12-21 00:10:09 +02:00
parent dc52f784b6
commit cb8fd68d46
126 changed files with 5419 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
// import { Service, Inject } from 'typedi';
// import HasTenancyService from '@/services/Tenancy/TenancyService';
// import { Knex } from 'knex';
// @Service()
// export class CreditNoteActivateBranches {
// @Inject()
// private tenancy: HasTenancyService;
// /**
// * Updates all creidt notes transactions with the primary branch.
// * @param {number} tenantId
// * @param {number} primaryBranchId
// * @returns {Promise<void>}
// */
// public updateCreditsWithBranch = async (
// tenantId: number,
// primaryBranchId: number,
// trx?: Knex.Transaction
// ) => {
// const { CreditNote } = this.tenancy.models(tenantId);
// // Updates the sale invoice with primary branch.
// await CreditNote.query(trx).update({ branchId: primaryBranchId });
// };
// }