Commit Graph

16 Commits

Author SHA1 Message Date
luisramos0
09f8df6340 Reorganize LineItemsController's destroy line item specs to separate contexts with different test orders (completed_with_total and completed_with_fees) 2018-10-25 18:06:48 +01:00
Rob Harrington
82072c8970 Explicitly specifying 'type: :controller' for all controller specs 2017-11-10 08:47:12 +11:00
Enrico Stano
4a989f705b No more order.payment 2017-09-08 23:55:49 +10:00
Rob Harrington
3e6e3173ee Fixing line item controller issue by setting data up correctly 2017-09-08 23:55:49 +10:00
Pau Perez
1028b49719 Stop using Order#shipment as it will be deprecated
Spree 2.0 adds a deprecation warning to it and Spree 2.1 removes it.
2017-07-05 16:33:04 +10:00
Rob Harrington
22b5dafad2 Further tweaks to LineItemsController 2017-05-17 12:27:29 +10:00
Rob Harrington
61cb78fc93 Tweaks to LineItemsController, renaming #index to #bought 2017-05-12 16:29:15 +10:00
Rob Harrington
5eadb33db9 Using changes_allowed? to authorize cancellation of line_items 2017-05-05 14:20:57 +10:00
Rob Harrington
f977a05b08 Fixing broken spec for fetching list of bought items as json 2017-05-05 14:20:57 +10:00
Rob Harrington
217eda8362 Shipping and payment fees are updated for completed orders when the order changes 2017-05-05 14:20:57 +10:00
Maikel Linke
db4a528ba3 Update shipment to re-calculate included tax
And re-create tax charges on the order. (untested)
2017-05-05 14:19:32 +10:00
Maikel Linke
479c7ba24b Update transaction fees of completed orders
The adjustments associated to incomplete payments are re-calculated when
a line item is removed from a completed order.
2017-05-05 14:19:32 +10:00
Maikel Linke
1f08729df3 Update shipping fees after removing item
After removing an item from a completed order, update the shipping fees
of all shipments that are pending or ready (not completed).
2017-05-05 14:19:32 +10:00
Maikel Linke
219ad4a3a7 Reload bought products after choosing order cycle 2017-05-05 14:19:32 +10:00
Maikel Linke
d49469a3e6 Show bought items only if changes are allowed
An enterprise can decide to allow changes to orders in open order
cycles. The items of these orders are then displayed in the shopping
cart and can be removed on the cart edit page.
2017-05-05 14:19:32 +10:00
Maikel Linke
4835ef067f Add feature to remove line items from open order cycle
- Add JS controller to send delete requests.
- Add resource controller to destroy items.
- Add authorisation check to abilities.
- Update fees after removing line item.
2017-05-05 14:19:32 +10:00