Skip to content

Commit

Permalink
remove commit in estimate storage
Browse files Browse the repository at this point in the history
  • Loading branch information
yashkanakiya committed Aug 25, 2023
1 parent 27660c6 commit 4fc67c7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions resources/scripts/admin/stores/estimate.js
Expand Up @@ -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) => {
Expand Down

0 comments on commit 4fc67c7

Please sign in to comment.