Skip to content

Commit

Permalink
Improved: condition to check atp type(#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Oct 9, 2023
1 parent d20e117 commit 678d288
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/catalog-product-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ export default defineComponent({
if (hasError(resp[1]) && resp[1]?.data?.error !== "No record found") showToast(this.$t("Something went wrong, could not fetch", { data: 'online ATP' }))
else this.atpCalcDetails.onlineAtp = resp[1].data?.onlineAtp
if (typeof this.atpCalcDetails.totalQOH === 'number' && typeof this.atpCalcDetails.onlineAtp === 'number') {
if (typeof resp[0].data?.availableToPromiseTotal === 'number' && typeof this.atpCalcDetails.onlineAtp === 'number') {
this.atpCalcDetails.excludedAtp = resp[0].data?.availableToPromiseTotal - resp[1].data?.onlineAtp
}
} catch (error) {
Expand Down

0 comments on commit 678d288

Please sign in to comment.