Matt-Yorkley
5840b0e33c
Adapt adjustment interface for payment's adjustment being singular
...
Payments only have one adjustment, all other adjustable objects have adjustments (plural).
2021-03-23 18:19:37 +00:00
Matt-Yorkley
e237727ba2
Migrate payment fee adjustments to payment objects
2021-03-23 18:19:37 +00:00
Matt-Yorkley
5d1d72b36b
Update Admin::OrdersHelper#order_adjustments_for_display
2021-03-23 18:19:37 +00:00
Matt-Yorkley
21e0c36f4f
Update order totals after deleting shipments and payments
2021-03-23 18:19:06 +00:00
Matt-Yorkley
5a7792bebc
Update Checkout Restart spec
2021-03-23 18:19:06 +00:00
Matt-Yorkley
3294b33431
Update Payment spec
2021-03-23 18:19:06 +00:00
Matt-Yorkley
2ccaf80013
Update EnterpriseFeeSummary report scopes
2021-03-23 18:19:06 +00:00
Matt-Yorkley
242ccc4fb3
Update OrderAdjustmentsFetcher
2021-03-23 18:18:36 +00:00
Matt-Yorkley
8abfd7c3f3
Update Checkout spec
2021-03-23 18:17:50 +00:00
Matt-Yorkley
cb179c794b
Update Paypal spec
2021-03-23 18:17:50 +00:00
Matt-Yorkley
a0e6b64e98
Update Order serializer
2021-03-23 18:17:50 +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
Pau Pérez Fabregat
5a16b86ac9
Merge pull request #7178 from andrewpbrett/rebalance-ci
...
Robustify CI
2021-03-23 16:32:54 +01:00
filipefurtad0
36ab3825e9
covers unit variant changes; adds test to #7180
2021-03-23 15:30:15 +00:00
Pau Pérez Fabregat
ac164df514
Merge pull request #7181 from openfoodfoundation/transifex
...
Transifex
2021-03-23 16:25:26 +01:00
Andy Brett
e9c259ec98
remove unnecessary type check
2021-03-23 08:12:26 -07:00
Transifex-Openfoodnetwork
cdc40f1b88
Updating translations for config/locales/en_FR.yml
2021-03-23 22:36:35 +11:00
Transifex-Openfoodnetwork
e97135f138
Updating translations for config/locales/en_FR.yml
2021-03-23 22:33:36 +11:00
Transifex-Openfoodnetwork
bf3e9b56c7
Updating translations for config/locales/fr.yml
2021-03-23 22:32:50 +11:00
Pau Pérez Fabregat
07d52bb44f
Merge pull request #7173 from Matt-Yorkley/adjustments-indexes
...
Add indexes on adjustments polymorphic associations
2021-03-23 11:55:30 +01:00
Pau Pérez Fabregat
393ea92dc7
Merge pull request #7177 from coopdevs/fix-balances-order-cycle-report-regression
...
Fix balances order cycle report regression
2021-03-23 10:08:11 +01:00
Pau Pérez Fabregat
14104cba57
Merge pull request #7171 from openfoodfoundation/transifex
...
Transifex
2021-03-23 09:38:17 +01:00
Pau Perez
199d48123b
Fully qualify table columns in query object
...
This fixes the error UK's is experiencing:
```
PG::AmbiguousColumn: ERROR: column reference "state" is ambiguous LINE
1: SELECT DISTINCT spree_orders.*, CASE WHEN state IN ('cancele...
^ : SELECT DISTINCT spree_orders.*, CASE WHEN state IN ('canceled',
'returned') THEN payment_total WHEN state IS NOT NULL THEN payment_total
- total ELSE 0 END AS balance_value, spree_orders.* FROM "spree_orders"
INNER JOIN "spree_shipments"
```
See
https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/6058c45989d37300079e8312?event_id=6058ccd30075af73bcb20000&i=sk&m=nw .
2021-03-23 09:37:47 +01:00
Pau Perez
c7b85a3591
Sum balances in Payments report implementing #+
...
This avoids consumers of `OrderBalance` having to couple with the inner
details of this abstraction, which makes the code more changeable.
2021-03-23 09:28:40 +01:00
Andy Brett
eff832c583
cleaner formatting
...
Co-authored-by: Maikel <maikel@email.org.au >
2021-03-22 20:47:12 -07:00
Andy Brett
3dc627995f
Merge pull request #7138 from luisramos0/rails52commits
...
Rails52commits
2021-03-22 18:13:01 -07:00
Andy Brett
e8f00f3d8c
Merge branch 'master' into rails52commits
2021-03-22 17:43:34 -07:00
Andy Brett
50296458b8
Merge pull request #7097 from luisramos0/rails-5-2-rspec-params
...
Rails 5 2 update Rspec controller syntax
2021-03-22 17:29:29 -07:00
Andy Brett
aab1a5e5d5
Merge pull request #7147 from Matt-Yorkley/deprecations-2
...
Deprecations 2
2021-03-22 17:28:11 -07:00
Andy Brett
f784db0127
Merge pull request #7100 from luisramos0/view_spec_in_rails5
...
Rails 5-2 - View spec in rails5
2021-03-22 16:42:56 -07:00
Luis Ramos
13b8b3d4a5
Fix rubocop issues
2021-03-22 23:24:01 +00:00
Andy Brett
2fbc5afce6
add rake task to catch all subfolders under /spec
2021-03-22 16:18:19 -07:00
Luis Ramos
3853aed718
Make validator work in rails 5 and rails 5.2 by adding a proc
2021-03-22 22:45:04 +00:00
Transifex-Openfoodnetwork
58a5a694a9
Updating translations for config/locales/en_US.yml
2021-03-23 08:19:44 +11:00
Luis Ramos
e2ce6634df
Adapt specs to new rspec syntax without xhr
2021-03-22 20:43:48 +00:00
Luis Ramos
c224396e71
Correct helper name needed in this spec
2021-03-22 20:38:14 +00:00
Pau Perez
ec4bae3995
Reproduce regression in a test
2021-03-22 19:01:17 +01:00
Andy Brett
dbe06e206c
Merge pull request #7048 from andrewpbrett/fix-sub-manifests
...
Verify line item when placing sub order (Fix #6680 )
2021-03-22 10:24:20 -07:00
Andy Brett
f021e5e074
add --profile to all jobs
2021-03-22 09:37:03 -07:00
Andy Brett
8cc6e60ed1
include specs that start with numbers
2021-03-22 09:31:52 -07:00
Matt-Yorkley
3e9d1bfe1f
Add defensive more code in not_hidden_for scope
2021-03-22 14:52:42 +00:00
Pau Perez
1a1552a6ed
Make OrderUpdater use new balance implementation
...
In this class we properly calculated the balance taking into account the
orders in cancellation state so we need to use the new implementation if
we don't want to introduce a regression by using
`#old_oustanding_balance`.
I was initially a bit dubious because this method was checking
`order.payments` as well but now I see that was redundant. Is on
`payment_total` to take into account whether or not the order is paid or
any other payment related details.
2021-03-22 11:45:12 +01:00
Pau Perez
f494b720f8
Fix spec
2021-03-22 11:45:12 +01:00
Pau Perez
9762275555
Use old_outstanding_balance on disabled toggle
...
No need to go through the `OrderBalance` in this context since we
already check for the toggle.
2021-03-22 11:45:12 +01:00
Pau Perez
5082b6dc99
Make BalanceCalculator use old balance calculation
...
This class is currently used and it gets skipped when the
:customer_balance toggle is enabled, so there's no point on abstracting
the balance with `OrderBalance`. It'll never go through its
`#new_outstanding_balance` branch and it'll be removed once we active
that toggle to everyone.
2021-03-22 11:45:12 +01:00
Pau Perez
5815d1a4a4
Make #outstanding_balance return an OrderBalance
...
This will let us branch by abstraction. All existing calls to
`#outstanding_balance` will go through `OrderBalance` hence, will
check the feature toggle.
Note that by default, `OrderBalance` will end up calling
`#old_outstanding_balance`. As the name states, that's exactly what
`#outstanding_balance` was so far. This means no consumers will see any
change in behavior. We just added on item in the call stack (sort of).
2021-03-22 11:45:12 +01:00
Transifex-Openfoodnetwork
0d58701b07
Updating translations for config/locales/en_GB.yml
2021-03-22 20:11:05 +11:00
Transifex-Openfoodnetwork
471d2ea25d
Updating translations for config/locales/es.yml
2021-03-22 19:57:33 +11:00