Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Canceled orders considered as 'sold' in many parts of spree #729
A canceled order will still be considered as complete by various parts of spree. This includes the order listing when (Only show completed orders is ticked), it shows on the Overview page of the admin page, but most annoyingly it also affects the InventoryUnit and the "On Hand" calculation of items.
The easiest way to reproduce is to:
So right now the on-hand value is adjusted on payment but not when the order is canceled.
So there's your problem. Just fixing it now. Ideally I'd like this to be in 0.60, 0.70 and master as a fix.
added a commit
Nov 25, 2011
I used 'many' in the subject because I was mostly too lazy to create individual bug reports (sorry) and I don't know if github allows to have a hierarchy of bugs. So besides the stocking issue I think there are some more issues and it is around some inconsistencies of the order state. Some parts of spree check for @order.state.. some use the @order.completed_at but for a canceled order the completed_at will not be NULL but the state will be set to cancel.
(arguable if I want to see canceled orders or not)
(I probably don't want to see canceled orders as their was no flow of cash)