diff --git a/client/item/src/summary/item-summary.html b/client/item/src/summary/item-summary.html index 71c5c720b0..7ad31fd9da 100644 --- a/client/item/src/summary/item-summary.html +++ b/client/item/src/summary/item-summary.html @@ -32,14 +32,20 @@ - Tags - - {{tag.tag.name}}: {{tag.value}} + Tax + + {{tax.country.country}}: {{tax.taxClass.description}} + + Tags + + {{tag.tag.name}}: {{tag.value}} + + Nicho diff --git a/client/item/src/summary/item-summary.js b/client/item/src/summary/item-summary.js index 054a5d0f36..401d70f0a9 100644 --- a/client/item/src/summary/item-summary.js +++ b/client/item/src/summary/item-summary.js @@ -17,6 +17,25 @@ class ItemSummary { }); } + _getTaxes() { + let filter = { + fields: ['id', 'countryFk', 'taxClassFk'], + include: [{ + relation: 'country', + scope: {fields: ['country']} + }, { + relation: 'taxClass', + scope: {fields: ['id', 'description']} + }] + }; + + let urlFilter = encodeURIComponent(JSON.stringify(filter)); + let url = `/item/api/Items/${this.item.id}/taxes?filter=${urlFilter}`; + this.$http.get(url).then(json => { + this.taxes = json.data; + }); + } + _getBotanical() { let filter = { where: {itemFk: this.item.id}, @@ -58,6 +77,7 @@ class ItemSummary { this._getTags(); this._getBarcodes(); this._getNiches(); + this._getTaxes(); if (!this.item.botanical) this._getBotanical(); }
- {{tag.tag.name}}: {{tag.value}} +
+ {{tax.country.country}}: {{tax.taxClass.description}}
+ {{tag.tag.name}}: {{tag.value}} +