Skip to content

Commit

Permalink
Merge pull request #398 from amansinghbais/#394
Browse files Browse the repository at this point in the history
Improved: code for allowing multi receiving shipment items in case of PO order (#394)
  • Loading branch information
ravilodhi authored Oct 14, 2024
2 parents 003a9ba + 118301a commit d7e090d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/store/modules/order/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ const actions: ActionTree<OrderState, RootState> = {

const poShipment = {
shipmentId,
items: payload.items
items: payload.items,
isMultiReceivingEnabled: true
}
await this.dispatch('shipment/receiveShipment', poShipment).catch((err) => console.error(err))
})
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/shipment/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const actions: ActionTree<ShipmentState, RootState> = {
let areAllSuccess = true;

for (const item of payload.items) {
if(item.quantityReceived === 0) {
if(payload.isMultiReceivingEnabled || item.quantityReceived === 0) {
if (!item.locationSeqId) {
console.error("Missing locationSeqId on item");
areAllSuccess = false;
Expand Down

0 comments on commit d7e090d

Please sign in to comment.