Andy Brett
691dd05028
Merge pull request #6956 from andrewpbrett/unit-price-backend
...
Provide actual unit price values in front end shop
2021-03-25 12:50:59 -07:00
Andy Brett
907c0d3e8c
rename unit_price.rb file
2021-03-25 08:51:15 -07:00
Andy Brett
7319ef7345
use better method and class names
2021-03-25 08:51:15 -07:00
Andy Brett
330839012e
add translation
2021-03-25 08:51:15 -07:00
Andy Brett
0afc2d281a
shorten UnitPrices method names
2021-03-25 08:51:15 -07:00
Andy Brett
39fc0707c3
provide unit price values in front end shop
2021-03-25 08:51:15 -07:00
Matt-Yorkley
21e0c36f4f
Update order totals after deleting shipments and payments
2021-03-23 18:19:06 +00:00
Matt-Yorkley
242ccc4fb3
Update OrderAdjustmentsFetcher
2021-03-23 18:18:36 +00:00
Matt-Yorkley
525fef14b1
Merge pull request #6974 from Matt-Yorkley/adjustments-line-item-fees
...
[Adjustments] Update line item enteprise fees
2021-03-23 19:06:02 +01:00
Pau Pérez Fabregat
a1af16ae72
Merge pull request #7116 from coopdevs/increase-invoice-renderer-coverage
...
Better test InvoiceRenderer
2021-03-18 15:54:43 +01:00
Matt-Yorkley
cafe1b5f1c
Update order totals after creating fees
...
This was being triggered by a callback in Spree::Adjustments before, but now that the adjustable is not the order, it does not get triggered by fees being added to line items...
2021-03-18 13:18:20 +00:00
Matt-Yorkley
a0a787b6ec
Delete dead code OrderAdjustmentsFetcher#line_item_adjustments
...
🎉
2021-03-18 13:18:20 +00:00
Pau Perez
ae9d8020a1
Better test InvoiceRenderer
...
This required a tiny refactoring to enable injecting the renderer. It'll
make it easier to later add the relevant specs related to the order
balance.
2021-03-18 09:17:44 +01:00
Matt-Yorkley
e62cf67be5
Add more defensive code in TaxRateFinder
2021-03-17 22:23:04 +00:00
Matt-Yorkley
baaee1baab
Update OrderAdjustmentsFetcher
2021-03-17 22:23:04 +00:00
Matt-Yorkley
80a654cef1
Merge pull request #6938 from Matt-Yorkley/paypal-adjustments-coverage
...
[Adjustments] Paypal adjustments test coverage
2021-03-16 13:16:07 +01:00
Matt-Yorkley
6c00fe44ae
Revert order permissions changes
2021-03-11 12:19:55 +00:00
Matt-Yorkley
1911d25959
Fix Sets::ModelSet spec
2021-03-11 12:19:54 +00:00
Matt-Yorkley
f28cd4a4e5
Adapt checkout FormDataAdapter
2021-03-11 12:06:00 +00:00
Matt-Yorkley
4c64aaed77
Remove callbacks in Adjustment that call order.update!
2021-03-11 11:20:01 +00:00
Matt-Yorkley
791a47d170
Merge pull request #6858 from Matt-Yorkley/adjustments-shipping-cost
...
[Adjustments] Move shipping adjustment from order to shipment
2021-03-11 12:17:14 +01:00
Matt-Yorkley
80aefa8e73
Update OrderTaxAdjustmentsFetcher
2021-03-04 14:27:02 +00:00
Andy Brett
3b15e0ee15
only complete the payment if it is in a completable state
2021-03-01 18:51:14 -08:00
Andy Brett
bc7477795c
Merge pull request #6910 from andrewpbrett/remove-order-capture
...
Make orders not capturable if they have a payment pending authorization
2021-02-24 12:20:43 -08:00
Matt-Yorkley
faf7e3c02b
Simplify filtering items with zero price
2021-02-24 12:39:10 +00:00
Matt-Yorkley
02b3636377
Extract relevant adjustments to comment-method
2021-02-24 12:39:10 +00:00
Pau Perez
116109c63d
Make /api/orders N+1 free
...
With the help of the bullet gem, and since we remove a couple of N+1s
already, remove them all was just a few keystrokes away. This commits
gets us from 42 SQL queries to 17, and 364.5ms to 253.9ms on my machine
where I just have the sample data's orders. As usual, this will have
a much bigger impact in scenarios with more data.
2021-02-23 10:26:12 -08:00
Pau Perez
20a7f2f24e
Eager load payment and subs. order associations
...
This removes the N+1 queries caused by
`Api::Admin::OrderSerialier#ready_to_capture` when used from
`Api::OrdersController#index`. While it's fine for the single-order
controller actions, it's not for this one that deals with a collection
of orders.
Fortunately, `SearchOrders` is used only in this controller action so we
can put the `includes` calls there, otherwise, we would need to refactor
it a bit to pass in a context-specific AR relation.
2021-02-23 10:26:12 -08:00
Matt-Yorkley
9852470ef6
Merge pull request #6913 from Matt-Yorkley/rails-5-backports
...
Rails 5 backports
2021-02-23 11:55:31 +01:00
Matt-Yorkley
0e3429dc35
Merge pull request #6758 from Matt-Yorkley/enterprise-fees-refactor
...
Enterprise fees refactor
2021-02-22 17:59:18 +01:00
Andy Brett
ff243c40a7
Merge pull request #6885 from andrewpbrett/fix-group-map-icons
...
Move map icons to /public
2021-02-22 08:11:54 -08:00
Matt-Yorkley
d517e5adf6
Simplify matching
2021-02-22 16:03:27 +00:00
Matt-Yorkley
ecf4332527
Use #all_adjustments scope
...
Some of the way these objects are returned by different scopes will be changing soon. This ensures we should get the same results.
2021-02-22 16:03:26 +00:00
Matt-Yorkley
20f4a5359e
Exclude all tax adjustments in item building
...
Included taxes are ignored here, and the additional tax total is is handled separately.
2021-02-22 16:02:19 +00:00
Matt-Yorkley
3ac16432c7
Refactor data representation methods
2021-02-22 16:02:19 +00:00
Matt-Yorkley
8de5ac4680
Extract itemized contents to service
2021-02-22 16:02:19 +00:00
Andy Brett
55215bb59a
Merge pull request #6899 from Matt-Yorkley/cost-price-dead-code
...
Remove cost_price and other dead code
2021-02-21 11:10:17 -08:00
Andy Brett
e7489965c5
move map icons to public/
2021-02-19 07:43:23 -08:00
Matt-Yorkley
84f56b2b44
Fix relation/array handling in OrderCycles List
2021-02-18 14:59:38 +00:00
Matt-Yorkley
81ac2c5add
Delete code related to :cost_price field
2021-02-17 14:27:51 +00:00
Andy Brett
77a3649e50
documentation
2021-02-12 13:46:05 -08:00
Andy Brett
cd2b4d2fb2
advance order after processing payment intent
2021-02-12 13:36:04 -08:00
Andy Brett
0a7396eb1c
Merge pull request #6713 from andrewpbrett/sca-subs-emails
...
Send emails when subscription payments require SCA auth
2021-02-12 08:23:32 -08:00
Maikel
9aa7dd3206
Merge pull request #6714 from luisramos0/rails5-new
...
[Rails 5] Update Gemfile_next.lock and fix app/services/permissions/order.rb
2021-02-12 12:32:39 +11:00
Andy Brett
5a8a3b8d6b
Merge pull request #6822 from arku/chore/cost-price-removal
...
Remove cost price field field from product variant form
2021-02-11 10:48:00 -08:00
Pau Perez
23b0885f4b
Turn ivars into private attr_readers
...
This makes them more changeable and robust. Ruby will raise
NoMethodError on typos while it'll silently create a new ivar without
us noticing. Also, in my experience, a reader method gives more room to
future refactorings and eases testing because methods are easier to
stub.
2021-02-11 11:04:39 +01:00
Pau Perez
e2853b9afb
Do not load order twice
...
The controller already does so, then, we can pass it to the service and
avoid that extra round-trip to the DB and save some memory. Spree::Order
is a rather bulky object (God object code smell perhaps) and it'll
surely make a difference.
2021-02-11 11:04:21 +01:00
Andy Brett
891874995b
refactor ProcessPaymentIntent to service
2021-02-10 11:22:29 -08:00
Andy Brett
ef6d1a3afb
refactor flag param to module
2021-02-10 11:06:01 -08:00
Arun Kumar Mohan
beece545de
Remove cost price field from product variant form
2021-02-06 18:48:06 -05:00