-
Notifications
You must be signed in to change notification settings - Fork 39
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
Implemented: functionality which allows users to manually close purchase order items when they receive them. (#212) #258
Conversation
…ase order items when they receive them (hotwax#212)
import { defineComponent } from 'vue'; | ||
import { mapGetters, useStore } from 'vuex' | ||
import { OrderService } from "@/services/OrderService"; | ||
import { productHelpers, showToast } from '@/utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unwanted imports.
<ion-list-header>{{ $t("To close the purchase order, select all.") }}</ion-list-header> | ||
</ion-item> | ||
<ion-list> | ||
<ion-item :button="!isPOItemStatusPending(item) ? false : true" v-for="(item, index) in getPOItems()" :key="index" @click="item.isChecked = !item.isChecked"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need for ternary operator, as isPOItemStatusPending will return boolean only.
async updatePOItemStatus() { | ||
// Shipment can only be created if quantity is specified for atleast one PO item. | ||
if(this.isEligibileForCreatingShipment) { | ||
const eligibleItemsForCreatingShipment = this.order.items.filter((item: any) => item.quantityAccepted > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const eligibleItemsForCreatingShipment = this.order.items.filter((item: any) => item.quantityAccepted > 0) | |
const eligibleItemsForShipment = this.order.items.filter((item: any) => item.quantityAccepted > 0) |
Related Issues
Closes #212
Short Description and Why It's Useful
Users can currently only receive inventory for purchase orders; there is no manual control for users to close the PO items. When the promise date arrives, the PO automatically expires. Here implemented a feature where users can close all or some shipments at once.
- Receive button create shipments for the items whom quantities are changed.
- Receive and Close button create shipments and then close the items which are selected from the "closePurchaseOrder" modal.
Screenshots of Visual Changes before/after (If There Are Any)
Before
After
IMPORTANT NOTICE - Remember to add changelog entry
Contribution and Currently Important Rules Acceptance