feat(server): wip tax rates service

This commit is contained in:
Ahmed Bouhuolia
2023-08-11 01:31:52 +02:00
parent 26c6ca9e36
commit 04d134806b
16 changed files with 550 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
import { Inject, Service } from 'typedi';
import HasTenancyService from '../Tenancy/TenancyService';
@Service()
export class GetTaxRatesService {
@Inject()
private tenancy: HasTenancyService;
/**
*
* @param {number} tenantId
* @returns
*/
public async getTaxRates(tenantId: number) {
const { TaxRate } = this.tenancy.models(tenantId);
const taxRates = await TaxRate.query();
return taxRates;
}
}