feat(server): order tax rates by name

This commit is contained in:
Ahmed Bouhuolia
2023-09-18 18:57:54 +02:00
parent df823c0bfe
commit 1b4b656419
3 changed files with 6 additions and 3 deletions

View File

@@ -19,7 +19,8 @@ export class GetTaxRatesService {
public async getTaxRates(tenantId: number) {
const { TaxRate } = this.tenancy.models(tenantId);
const taxRates = await TaxRate.query();
// Retrieves the tax rates.
const taxRates = await TaxRate.query().orderBy('name', 'ASC');
// Transforms the tax rates.
return this.transformer.transform(