Matt-Yorkley
581217ea2d
Merge pull request #7239 from Matt-Yorkley/paranoia-scopes
...
Update default scopes with acts_as_paranoid
2021-03-29 15:24:44 +02:00
Pau Pérez Fabregat
b8815d2c56
Merge pull request #7159 from Matt-Yorkley/dead-code-adjustment
...
DCOTW: LineItemBasedAdjustmentHandling
2021-03-29 11:46:23 +02:00
Maikel
74b06d16b8
Merge pull request #7209 from openfoodfoundation/dependabot/bundler/rubocop-1.12.0
...
Bump rubocop from 1.11.0 to 1.12.0
2021-03-29 10:59:38 +11:00
Matt-Yorkley
28ee6a66a0
Update line item adjustments spec
...
The `adjustable` and `source` associations are basically the same now, and we'll be deleting the latter soon.
2021-03-27 18:59:50 +00:00
Matt-Yorkley
1b19d4bdee
Update default scopes with acts_as_paranoid
...
Fixes an issue where the LineItem :sorted_by_name_and_unit_value scope was not working with removal of the default scopes on line item and variant, which meant that the join in the scope was excluding soft-deleted items that should not have been excluded.
2021-03-26 18:22:05 +00:00
Andy Brett
19c2c9c1c5
Merge pull request #7175 from openfoodfoundation/7130-notify-on-payment-intent-error
...
Record invalid payment states for debugging
2021-03-26 08:33:07 -07:00
Matt-Yorkley
0f5af2d9f1
Merge pull request #6927 from Matt-Yorkley/adjustments-payment-fee
...
[Adjustments] Payment fee adjustment
2021-03-25 17:40:53 +01:00
Maikel Linke
ffb4ba5ef5
Style numeric predicate use with Rubocop
2021-03-25 18:07:11 +11:00
Matt-Yorkley
0ab43d23f9
Replace deprecated reloading by passing true to an association
...
object.relation(true) -> object.relation.reload
2021-03-24 17:51:22 +00:00
Matt-Yorkley
3294b33431
Update Payment spec
2021-03-23 18:19:06 +00:00
Matt-Yorkley
a42651d543
Update Payment fee adjustment
2021-03-23 18:17:50 +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
Andy Brett
b539015647
Merge pull request #7025 from Matt-Yorkley/adjustments-order-taxes
...
[Adjustments] Simplify order tax adjustments
2021-03-23 09:37:44 -07:00
Andy Brett
aab1a5e5d5
Merge pull request #7147 from Matt-Yorkley/deprecations-2
...
Deprecations 2
2021-03-22 17:28:11 -07:00
Maikel Linke
fce8d3a2f8
Record invalid payment states for debugging
...
We observed invalid payment states in Bugsnag but we don't actually know
in which state the payment intent was in. From the context we can guess
that it was "succeeded" but it would be good to validate this. And in
the future it would be good to know if there are other invalid states we
can end up in.
The notification to Bugsnag happens in another part of the code.
2021-03-22 16:35:22 +11:00
Maikel Linke
3dac451e5b
Add spec for StripeSCA payment gateway
...
We didn't actually have a unit test for this.
2021-03-22 16:35:22 +11:00
Matt-Yorkley
49f1e44999
Simplify Order#total_tax to cover all taxes from all sources
2021-03-18 14:05:29 +00:00
Matt-Yorkley
2f262f70e1
Update #subject syntax
2021-03-18 13:19:16 +00:00
Matt-Yorkley
bd81289240
Use persisted order is order spec
2021-03-18 13:18:20 +00:00
Matt-Yorkley
2c7d6453ce
Fix adjustment test setup in Order spec
...
Missing order associations...
2021-03-18 13:18:20 +00:00
Matt-Yorkley
f2627dff0b
Loosen scope in adjustment spec to include enterprise fees on line items
2021-03-18 13:18:20 +00:00
Matt-Yorkley
f67a8e4af3
Update and simplify LineItem#price_with_adjustments
2021-03-18 13:18:20 +00:00
Matt-Yorkley
5bbe768827
Update order total in test setup
2021-03-18 13:16:19 +00:00
Matt-Yorkley
be3e184651
Merge pull request #6973 from Matt-Yorkley/adjustments-line-item-taxes
...
[Adjustments] Update line item taxes
2021-03-18 11:50:01 +01:00
Matt-Yorkley
064f7582cc
Update line_item included taxes
...
Drops use of the `spree_adjustments.included_tax` database field (when summing line item tax), which we are slowly deprecating before eventual removal
2021-03-17 22:23:04 +00:00
Andy Brett
9d33b36799
Merge pull request #7024 from Matt-Yorkley/dead-code-auto-capture
...
DCOTW: Spree::Config[:auto_capture]
2021-03-17 09:31:00 -07:00
Luis Ramos
333a488dc8
Fix deprecation warning
2021-03-17 16:23:53 +00:00
Matt-Yorkley
29e0786906
Fix inheritance of Migration object in spec
...
Fixes:
Spree::Preferences::Preferable persisted preferables requires a valid id but returns default values
Failure/Error:
class CreatePrefTest < ActiveRecord::Migration
def self.up
create_table :pref_tests do |t|
t.string :col
end
end
def self.down
drop_table :pref_tests
end
StandardError:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class CreatePrefTest < ActiveRecord::Migration[4.2]
# ./spec/models/spree/preferences/preferable_spec.rb:225:in `block (3 levels) in <top (required)>'
2021-03-17 15:22:22 +00:00
Pau Pérez Fabregat
51f63060a4
Merge pull request #6879 from coopdevs/customer-balance-bulk-coop-report
...
Customer balance bulk coop report
2021-03-17 12:08:44 +01:00
Matt-Yorkley
2d9d293405
Replace deprecated use of :reload argument
2021-03-16 12:04:35 +00:00
Matt-Yorkley
321da76005
Update regression test
...
This error is no longer thrown by the payment object creation
2021-03-11 12:23:00 +00:00
Matt-Yorkley
6bb85e9acd
Fix payment and shipment states issue
...
For some reason the order objects were stale here when calling order.update! from either a payment or shipment callback, which was overwriting those states as nil on the order.
2021-03-11 12:23: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
Andy Brett
05a074d33a
Merge pull request #7041 from Matt-Yorkley/adjustments-set-eligibility
...
[Adjustments] Remove Adjustment#set_eligibility
2021-03-09 13:33:21 -08:00
Pau Pérez Fabregat
6b111561e8
Merge pull request #7000 from Matt-Yorkley/dead-code-tax-total
...
DCOTW: Order#tax_total
2021-03-08 16:57:59 +01:00
Matt-Yorkley
c99a9f4ee1
Remove Adjustment#set_eligibility
2021-03-08 15:29:04 +00:00
Pau Pérez Fabregat
876c378e4f
Merge pull request #7028 from Matt-Yorkley/dead-code-available-shipment
...
DCOTW: Order#has_available_shipment
2021-03-08 15:25:39 +01:00
Matt-Yorkley
af29c67ea5
Update Order#ship_total
2021-03-06 14:14:56 +00:00
Matt-Yorkley
f894473e03
Delete dead code: Order#item_count
2021-03-06 00:04:46 +00:00
Matt-Yorkley
68e752ef32
Delete dead code: Order#has_available_shipment
2021-03-05 23:42:08 +00:00
Matt-Yorkley
365700615a
Remove dead code: Spree::Config.auto_capture
...
We set this value to `true` unconditionally in an initializer, and then check the value in various places via Spree::Config. It's never false, and it's not configurable, so we can just drop it and remove the related conditionals. 🔥
2021-03-05 16:03:07 +00:00
Matt-Yorkley
3396319f29
Fix test setup in Order spec
2021-03-04 14:27:02 +00:00
Matt-Yorkley
945605e3a8
Rename Shipment #adjustment to #fee_adjustment for clarity
2021-03-04 14:27:02 +00:00
Matt-Yorkley
eed71d795e
Use persisted shipment in shipping adjustment test
2021-03-04 14:27:02 +00:00
Matt-Yorkley
f956aca82f
Use shipping fee adjustment as single source of truth, and persist it on the shipment :cost field when it changes.
2021-03-04 14:27:02 +00:00
Matt-Yorkley
aa16c64f20
Update Order#finalize! to include all adjustments
2021-03-04 14:27:02 +00:00
Matt-Yorkley
c0b33de0f0
Move #adjustment_label to shipment
2021-03-04 14:27:02 +00:00
Matt-Yorkley
d4c9d70caa
Update Adjustment specs
2021-03-04 14:27:02 +00:00
Matt-Yorkley
f0aa43e198
Update Order shipment adjustments fetching
2021-03-04 14:27:01 +00:00