mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
27 lines
813 B
TypeScript
27 lines
813 B
TypeScript
// 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 });
|
|
// };
|
|
// }
|