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: closing purchase order item in sync and in batches instead of async (#386) #411

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

amansinghbais
Copy link
Contributor

Related Issues

#386

Short Description and Why It's Useful

Migrated the purchase order item closing logic to sync approach from the async.

Screenshots of Visual Changes before/after (If There Are Any)

Contribution and Currently Important Rules Acceptance

let hasFailedItems = false;
let completedItems = [] as any;

for(const item of eligibleItems) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of making synchronous calls, we can update items in batches. Let's say there are N items to update. We can process N−1 items in batches, and then update the final item synchronously after all batch processing is complete. This way PO status get updated correctly after all items are completed.

Later we can think of some api or csv data import mechanism to update order item status in bulk.

@amansinghbais amansinghbais changed the title Improved: closing purchase order item in sync instead of async (#386) Improved: closing purchase order item in sync and in batches instead of async (#386) Nov 13, 2024
@ymaheshwari1 ymaheshwari1 merged commit 8e5a9d0 into hotwax:main Nov 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants