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

Improved: code for allowing multi receiving shipment items in case of PO order (#394) #398

Merged
merged 1 commit into from
Oct 14, 2024
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
3 changes: 2 additions & 1 deletion src/store/modules/order/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
}
return resp;
},
async createPurchaseShipment({ commit }, payload) {

Check warning on line 123 in src/store/modules/order/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'commit' is defined but never used

Check warning on line 123 in src/store/modules/order/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'commit' is defined but never used
let resp;
try {
const params = {
Expand Down Expand Up @@ -149,7 +149,8 @@

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 @@ -102,11 +102,11 @@
return Promise.reject(new Error(err))
}
},
async receiveShipmentItem ({ commit }, payload) {

Check warning on line 105 in src/store/modules/shipment/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'commit' is defined but never used

Check warning on line 105 in src/store/modules/shipment/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'commit' is defined but never used
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
Loading