Matt-Yorkley
50da77c6db
Hide tax rate selection when editing non-admin adjustments
2021-04-15 13:59:05 +01:00
Maikel
0c182c4606
Merge pull request #7259 from jibees/7193-implements-feature-toggle-with-flipper
...
Implements feature toggle with flipper
2021-04-15 11:33:12 +10:00
Matt-Yorkley
e323d016a2
Simplify arguments of #create_adjustment method
2021-04-14 12:01:21 +01:00
Matt-Yorkley
b6038c01a3
Remove references to Adjustment source
2021-04-14 12:01:21 +01:00
Matt-Yorkley
6474323282
Remove source association from Spree::Adjustment
2021-04-14 12:01:21 +01:00
Matt-Yorkley
ab4660ecd0
Fix callback in Classification and update spec
...
Fixes:
2) Spree::Classification won't destroy if classification is the primary taxon
(Used from /home/runner/work/openfoodnetwork/openfoodnetwork/spec/models/enterprise_group_spec.rb:43:in `block (3 levels) in <top (required)>')
Failure/Error: expect(classification.destroy).to be false
2021-04-13 16:54:32 -07:00
Jean-Baptiste Bellet
a4b53d6ac4
Initialize flipper with default value
...
- Use the ActiveRecord adapter
- Use a middle to cache data through memoization (see https://github.com/jnunemaker/flipper/blob/master/docs/Optimization.md )
- Create the group `admins`: only user which are admins
- Create `unit_price` feature attached to `admins` group
- Add method `flipper_id` on User
2021-04-12 18:26:18 +02:00
Pau Pérez Fabregat
0900bcadb2
Merge pull request #7330 from Matt-Yorkley/adjustments-deleted-originator
...
Update unscoping of deleted_at on Adjustment originator association
2021-04-09 09:15:46 +02:00
Pau Pérez Fabregat
0e2855ea60
Merge pull request #7328 from Matt-Yorkley/dead-scope
...
Remove included_tax scope from Adjustment
2021-04-09 09:03:47 +02:00
Pau Pérez Fabregat
a902230106
Merge pull request #7316 from Matt-Yorkley/dead-code-shipments
...
DCOTW: #ensure_updated_shipments
2021-04-09 08:03:24 +02:00
Andy Brett
199efb1e20
Merge pull request #7351 from Matt-Yorkley/dead-code-discount-order
...
Dead code: DiscountOrder
2021-04-08 12:48:38 -07:00
jibees
ca36996060
Merge pull request #7314 from Matt-Yorkley/order-payment-amount
...
Rename #charge_shipping_and_payment_fees! to #set_payment_amount!
2021-04-08 21:22:56 +02:00
Andy Brett
67d49b7486
Merge pull request #7342 from luisramos0/dead_code
...
[Rails 5.2] Delete dead code in variants list page, this is old spree logic
2021-04-08 10:47:02 -07:00
Andy Brett
b78ed85ad3
Merge pull request #7321 from Matt-Yorkley/remove-bugherd
...
Remove Bugherd
2021-04-08 10:35:17 -07:00
Matt-Yorkley
80d43c714d
Remove TagRule::DiscountOrder
...
This class was removed from the UI in 2016 and hasn't been used since...
2021-04-08 12:37:17 +01:00
Matt-Yorkley
034f452f4f
Merge pull request #7313 from jibees/7301-fix-line-breaks-on-cart-page
...
Add non-breaking space to avoid unwanted line breaks on unit price
2021-04-08 12:31:45 +02:00
Andy Brett
2128675e95
Merge pull request #7236 from Matt-Yorkley/exchange-deadlocks
...
Update Exchange touch on Enterprise to use #touch_later
2021-04-07 20:54:03 -07:00
Luis Ramos
ec6bb7f9fe
Delete dead code, this is old spree logic
2021-04-07 22:55:06 +01:00
Matt-Yorkley
d385c1ad4d
Soft-delete return authorizations
2021-04-07 18:11:06 +01:00
Matt-Yorkley
2ed1aaf575
Update unscoping of deleted_at on originator association
2021-04-07 00:26:01 +01:00
Matt-Yorkley
01e6397e27
Remove Spree::Config[:shipment_inc_vat]
...
This is now done per ShippingMethod instead of globally
2021-04-06 20:29:58 +01:00
Matt-Yorkley
61b41491fe
Remove included_tax scope from Adjustment
...
This scope is no longer used, and it's name is exactly the same as other method names and database columns on multiple objects, which is quite confusing.
2021-04-06 12:42:14 +01:00
Matt-Yorkley
03c36dfd7f
Remove Bugherd
...
🔥
2021-04-05 13:31:13 +01:00
Matt-Yorkley
96d8de35f2
Delete dead code Adjustment#set_included_tax!
2021-04-04 19:19:06 +01:00
Matt-Yorkley
903788903b
Remove Spree::Config[:shipping_tax_rate]
2021-04-04 19:19:06 +01:00
Matt-Yorkley
bbd4a33a87
Tax adjustments should be open when created
...
All adjustments get closed during `order.finalize!`, but before that point they should be open.
2021-04-04 19:19:06 +01:00
Matt-Yorkley
6d48471368
Update shipment totals updating
2021-04-04 19:19:06 +01:00
Matt-Yorkley
ac67f7391e
Update tax charging in checkout flow
2021-04-04 19:19:06 +01:00
Matt-Yorkley
2af0afafe9
Update Order#shipping_tax
2021-04-04 19:19:06 +01:00
Matt-Yorkley
db07a73bd7
Ensure Adjustment#update! returns an amount
2021-04-04 19:19:06 +01:00
Matt-Yorkley
7e0aad7c7e
Adapt current tax setup to work with shipment taxes
...
This is a temporary step...
2021-04-04 19:19:06 +01:00
Matt-Yorkley
7425ad5c4a
Include ItemAdjustments handling in Adjustment class
...
Currently only applies to shipments, but will later include line items, etc
2021-04-04 19:19:06 +01:00
Matt-Yorkley
25a739ea75
Remove Shipment #update_adjustment_included_tax
2021-04-04 19:19:06 +01:00
Matt-Yorkley
9bbe57afda
Extract method
2021-04-04 19:19:06 +01:00
Matt-Yorkley
89889bc280
Record tax totals in ItemAdjustments
2021-04-04 19:19:06 +01:00
Matt-Yorkley
605a94e3c9
Use Spree::ItemAdjustments in Shipment callbacks for updating adjustments
2021-04-04 19:19:06 +01:00
Matt-Yorkley
ac9ecdfcbc
Introduce Spree::ItemAdjustments class
2021-04-04 19:19:06 +01:00
Matt-Yorkley
8fccdbf92f
Introduce TaxCategories to ShippingMethods
2021-04-04 19:19:06 +01:00
Matt-Yorkley
c895153b58
Remove dead code: #ensure_updated_shipments
2021-04-03 19:47:34 +01:00
Matt-Yorkley
2d647be8b4
Rename #charge_shipping_and_payment_fees! to #set_payment_amount!
...
This method sets the order's payment amount during the checkout. It doesn't really have anything to do with shipping or payment fees...
2021-04-03 16:14:38 +01:00
Jean-Baptiste Bellet
6756ffcf42
Add non-breaking space to avoid unwanted line breaks
2021-04-02 16:59:50 +02:00
Pau Pérez Fabregat
003b45d4b9
Merge pull request #7294 from Matt-Yorkley/balance-missing-methods
...
OrderBalance missing methods
2021-04-01 19:34:57 +02:00
Matt-Yorkley
f94fe452f0
Merge pull request #7191 from mkllnk/fix-deprecation-gateway-mode
...
Replace ActiveMerchant's deprecated gateway_mode
2021-04-01 13:29:10 +02:00
Matt-Yorkley
c40928d805
Merge pull request #7167 from Matt-Yorkley/adjustments-returns
...
[Adjustments] Update return adjustments
2021-03-31 21:33:45 +02:00
Matt-Yorkley
bb0cf65ecc
Handle OrderBalance comparison operators
...
These operators get used on the object returned by order_balance in a few places, and were not working correctly.
2021-03-31 13:23:13 +01:00
Matt-Yorkley
a02c505e62
Delegate #to_f and #to_d to #amount in OrderBalance
2021-03-31 13:23:13 +01:00
Matt-Yorkley
77506caca1
Rename OrderBalance methods for clarity
2021-03-31 13:09:17 +01:00
Pau Pérez Fabregat
9c468f0557
Merge pull request #7240 from Matt-Yorkley/escalating-paranoia
...
Escalating paranoia
2021-03-30 22:24:13 +02:00
Matt-Yorkley
7882c427f7
Simplify creation of negative amounts
2021-03-30 16:39:40 +01:00
Matt-Yorkley
e71f47a2e3
Use underscore in unused arguments
2021-03-30 16:39:40 +01:00