From 4fc67c74e4b36a8f980713e69483dc12434fb57d Mon Sep 17 00:00:00 2001 From: yashkanakiya Date: Fri, 25 Aug 2023 09:44:43 +0530 Subject: [PATCH] remove commit in estimate storage --- resources/scripts/admin/stores/estimate.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/scripts/admin/stores/estimate.js b/resources/scripts/admin/stores/estimate.js index a49f182b..1021faef 100644 --- a/resources/scripts/admin/stores/estimate.js +++ b/resources/scripts/admin/stores/estimate.js @@ -144,16 +144,16 @@ export const useEstimateStore = (useWindow = false) => { .get(`/api/v1/estimates/${id}`) .then((response) => { Object.assign(this.newEstimate, response.data.data) - // if (this.newEstimate.discount_per_item === 'NO') { - // this.newEstimate.items.forEach((_i, index) => { - // if (_i.discount_type === 'fixed') - // this.newEstimate.items[index].discount = _i.discount / 100 - // }) - // } - // else { - // if (this.newEstimate.discount_type === 'fixed') - // this.newEstimate.discount = this.newEstimate.discount / 100 - // } + if (this.newEstimate.discount_per_item === 'NO') { + this.newEstimate.items.forEach((_i, index) => { + if (_i.discount_type === 'fixed') + this.newEstimate.items[index].discount = _i.discount / 100 + }) + } + else { + if (this.newEstimate.discount_type === 'fixed') + this.newEstimate.discount = this.newEstimate.discount / 100 + } resolve(response) }) .catch((err) => {