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
Description
Cannot complete an order payment via admin
Steps to reproduce
On a stock tracked product (onHand = 3 onHold = 0) enter an order for a quantity of 2
After the checkout is completed we have onHand = 3 and onHold = 2 (so far so good)
When trying to complete the order payment via the admin we get the error 'The payment cannot be completed due to insufficient stock of the product.
Possible Solution
The payment via admin triggers the PaymentPreCompleteListener which calls the availabityChecker isStockSufficient method.
isStocksufficient returns false because the order quantity is greater than the variant onHand - onHold quantities.
That seems wrong at that step since the order quantity is already accounted for in the variant onHold quantity and that the check should be done against onHold quantity.
The text was updated successfully, but these errors were encountered:
Updated the 'isStockSufficient' function in the AvailabilityChecker class to include an optional argument for deferring payment check. Also adjusted the logic in PaymentPreCompleteListener accordingly.
Updated the 'isStockSufficient' function in the AvailabilityChecker class to include an optional argument for deferring payment check. Also adjusted the logic in PaymentPreCompleteListener accordingly.
Sylius version affected: 1.12.14
Description
Cannot complete an order payment via admin
Steps to reproduce
On a stock tracked product (onHand = 3 onHold = 0) enter an order for a quantity of 2
After the checkout is completed we have onHand = 3 and onHold = 2 (so far so good)
When trying to complete the order payment via the admin we get the error 'The payment cannot be completed due to insufficient stock of the product.
Possible Solution
The payment via admin triggers the PaymentPreCompleteListener which calls the availabityChecker isStockSufficient method.
isStocksufficient returns false because the order quantity is greater than the variant onHand - onHold quantities.
That seems wrong at that step since the order quantity is already accounted for in the variant onHold quantity and that the check should be done against onHold quantity.
The text was updated successfully, but these errors were encountered: