mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat(server): wip tax rates service
This commit is contained in:
21
packages/server/src/services/TaxRates/GetTaxRates.ts
Normal file
21
packages/server/src/services/TaxRates/GetTaxRates.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user