Skip to content

Commit

Permalink
Improved: variable name and comments (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Oct 18, 2023
1 parent ac43b04 commit 6cd37f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/ClosePurchaseOrderModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ export default defineComponent({
},
async updatePOItemStatus() {
// Shipment can only be created if quantity is specified for atleast one PO item.
// In some cases we don't need to create shipment instead directly need to close PO items.
if(this.isEligibileForCreatingShipment) {
const eligibleItemsForCreatingShipment = this.order.items.filter((item: any) => item.quantityAccepted > 0)
await this.store.dispatch('order/createPurchaseShipment', { items: eligibleItemsForCreatingShipment, orderId: this.order.orderId })
const eligibleItemsForShipment = this.order.items.filter((item: any) => item.quantityAccepted > 0)
await this.store.dispatch('order/createPurchaseShipment', { items: eligibleItemsForShipment, orderId: this.order.orderId })
}
const eligibleItems = this.order.items.filter((item: any) => item.isChecked && this.isPOItemStatusPending(item))
Expand Down
1 change: 0 additions & 1 deletion src/views/PurchaseOrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ import LocationPopover from '@/components/LocationPopover.vue'
import ImageModal from '@/components/ImageModal.vue';
import { copyToClipboard, hasError, productHelpers } from '@/utils';
import { Actions, hasPermission } from '@/authorization'
import emitter from "@/event-bus"
export default defineComponent({
name: "PurchaseOrderDetails",
Expand Down

0 comments on commit 6cd37f6

Please sign in to comment.