spree-product-assembly
spree-product-assembly copied to clipboard
Not tracking inventory correctly when same product in multiple bundles
Gem is failing to create multiple inventory units when there are multiple in the order. This will throw off all inventory when there is a product in multiple bundles and a user checks out with those bundles.
For Example: Bundle 1 => { Prod A x 1, Prod B x 1 } Bundle 2 => { Prod A x 1, Prod B x 1, Prod C x 1}
If I checkout with both bundles, the system only creates InventoryUnits and StockMovements as follows: Prod A -> qty 1 Prod B -> qty 1 Prod C -> qty 1
It should be Prod A -> qty 2 Prod B -> qty 2 Prod C -> qty 1
I first noticed this in the Shipment manifest as it was only rendering "qty 1" for the three distinct products instead of the correct amounts.