mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
22 lines
486 B
TypeScript
22 lines
486 B
TypeScript
import { Inject, Service } from 'typedi';
|
|
import HasTenancyService from '../Tenancy/TenancyService';
|
|
|
|
@Service()
|
|
export class GetTaxRatesService {
|
|
@Inject()
|
|
private tenancy: HasTenancyService;
|
|
|
|
/**
|
|
* Retrieves the tax rates list.
|
|
* @param {number} tenantId
|
|
* @returns {Promise<ITaxRate[]>}
|
|
*/
|
|
public async getTaxRates(tenantId: number) {
|
|
const { TaxRate } = this.tenancy.models(tenantId);
|
|
|
|
const taxRates = await TaxRate.query();
|
|
|
|
return taxRates;
|
|
}
|
|
}
|