Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: wrong excluded atp calcuation and updated the job card title on details page(#240) #241

Merged
merged 4 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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