Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1894 - Created by dedhaz -
Sat Apr 09 21:21:13 UTC 2011
Spree 0.60.99 (but the same is in 0.40.xx, 0.50.xx)
In Admin config Inventory Settings - Backordering not allowed.
But if I trying to add to cart more items than I have in stock, I can do it at any moment without any errors (from item view or from cart).
After that I can go to checkout and make order. But in final view (/checkout/update/payment), after payment procedure I see page with error.
RuntimeError in CheckoutsController#update
Cannot request back orders when backordering is disabled
Request
Parameters:
{"utf8"=>"вњ“",
"_method"=>"put",
"authenticity_token"=>"q7xqrle/HF8BdgY3bM1UZhWu074aEkStjry0Z8NApoo=",
"order"=>{"payments_attributes"=>[{"payment_method_id"=>"1",
"amount"=>#<BigDecimal:f21f9d0,
'0.472E3',
4(12)>}]},
"state"=>"payment"}
After that (in cusomer view) I have not empty cart, and I can't empty cart by pressing button.
If I try to do this...
NoMethodError in OrdersController#empty
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.sort_by
Request
Parameters:
{"utf8"=>"вњ“",
"_method"=>"put",
"authenticity_token"=>"q7xqrle/HF8BdgY3bM1UZhWu074aEkStjry0Z8NApoo="}
In admin view, in orders I see complete order with backorder:
2011-04-09 R813778007 complete balance due
Also when I trying to delete items from order there is nothig do (visual), but deleted backorders items add to item qty.
For example.
I have 1 item in stock.
Customer make order with 3 items (with error screen).
After taht I have -2 items on hand.
Admin trying delete items from this order.
I have in stock 1 items.
Admin cant see any change sin order screen, press second time button.
After that I have 4 items on hand.