mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat: tax rates crud service
This commit is contained in:
@@ -26,10 +26,11 @@ export class EditTaxRateService {
|
||||
private validators: CommandTaxRatesValidators;
|
||||
|
||||
/**
|
||||
*
|
||||
* Edits the given tax rate.
|
||||
* @param {number} tenantId
|
||||
* @param {number} taxRateId
|
||||
* @param {IEditTaxRateDTO} taxRateEditDTO
|
||||
* @returns {Promise<ITaxRate>}
|
||||
*/
|
||||
public editTaxRate(
|
||||
tenantId: number,
|
||||
@@ -40,6 +41,7 @@ export class EditTaxRateService {
|
||||
|
||||
const oldTaxRate = TaxRate.query().findById(taxRateId);
|
||||
|
||||
// Validates the tax rate existance.
|
||||
this.validators.validateTaxRateExistance(oldTaxRate);
|
||||
|
||||
return this.uow.withTransaction(tenantId, async (trx: Knex.Transaction) => {
|
||||
|
||||
Reference in New Issue
Block a user