You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
current apples in stock: 50
currently being allocated: 20
order
apple x 10, delivery date 10/10/2021 (in memory product variant with allocated: 20)
apple x 5, delivery date 10/12/2021 (in memory product variant with allocated: 20)
because apple are considered as two order items due to different delivery dates, however, they are the same product variant, current code will use the allocated number that is stored in memory to calculate new stock.
after the first loop:
the allocated number is 20 + 10 = 30 allocated,
however, the second loop will cause a bug because it is still using the old allocated number in memory to calculate new allocation: 20 + 5 = 25 instead of 30 + 5 = 35, the correct allocated number should be 20 + 10 + 5 = 35.
To Reproduce
Steps to reproduce the behavior:
Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
A clear and concise description of what you expected to happen.
Environment (please complete the following information):
@vendure/core version:
Nodejs version
Database (mysql/postgres etc):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
current apples in stock: 50
currently being allocated: 20
order
because apple are considered as two order items due to different delivery dates, however, they are the same product variant, current code will use the allocated number that is stored in memory to calculate new stock.
after the first loop:
the allocated number is 20 + 10 = 30 allocated,
however, the second loop will cause a bug because it is still using the old allocated number in memory to calculate new allocation: 20 + 5 = 25 instead of 30 + 5 = 35, the correct allocated number should be 20 + 10 + 5 = 35.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: