feat(server): wip sale invoice tax rates

This commit is contained in:
Ahmed Bouhuolia
2023-08-29 19:12:19 +02:00
parent 09d73db20f
commit 6535424d0f
15 changed files with 219 additions and 49 deletions

View File

@@ -37,6 +37,20 @@ export default class TaxRateTransaction extends mixin(TenantModel, [
* Relationship mapping.
*/
static get relationMappings() {
return {};
const TaxRate = require('models/TaxRate');
return {
/**
* Belongs to the tax rate.
*/
taxRate: {
relation: Model.BelongsToOneRelation,
modelClass: TaxRate.default,
join: {
from: 'tax_rate_transactions.taxRateId',
to: 'tax_rates.id',
},
},
};
}
}