Skip to content

Commit

Permalink
Merge pull request #241 from ymaheshwari1/preorder/#240
Browse files Browse the repository at this point in the history
Fixed: wrong excluded atp calcuation and updated the job card title on details page(#240)
  • Loading branch information
ravilodhi authored Oct 9, 2023
2 parents 97b4c84 + 17c01af commit e688d95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"Cancel orders": "Cancel orders",
"Catalog": "Catalog",
"Category": "Category",
"Category and brokering jobs": "Category and brokering jobs",
"Change": "Change",
"Change time zone": "Change time zone",
"Click the backdrop to dismiss.": "Click the backdrop to dismiss.",
Expand Down Expand Up @@ -166,6 +165,7 @@
"Product not found": "Product not found",
"Purchase orders": "Purchase orders",
"Quantity on hand": "Quantity on hand",
"Related jobs": "Related jobs",
"Release": "Release",
"Release item": "Release item",
"Release orders": "Release orders",
Expand Down
6 changes: 3 additions & 3 deletions src/views/catalog-product-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
<ion-card>
<ion-card-header>
<ion-card-title>
<h3>{{ $t('Category and brokering jobs') }}</h3>
<h3>{{ $t('Related jobs') }}</h3>
</ion-card-title>
</ion-card-header>
<div v-if="!isCtgryAndBrkrngJobsLoaded">
Expand Down Expand Up @@ -733,8 +733,8 @@ 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') {
this.atpCalcDetails.excludedAtp = resp[0].data?.quantityOnHandTotal - resp[1].data?.onlineAtp
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) {
showToast(translate('Something went wrong'))
Expand Down

0 comments on commit e688d95

Please sign in to comment.