Jean-Baptiste Bellet
88fa689cbc
update the set_distribution form on the same path
...
and use the same method `OrdersController#set_distribution`
2023-04-18 11:23:47 +02:00
Jean-Baptiste Bellet
da25dd775c
Extract method on_update that will be used elsewhere
2023-04-18 11:21:46 +02:00
Jean-Baptiste Bellet
42947d2685
No need to ensure if the distribution is set on new action
...
This will be handled by validation on set_distribution action
2023-04-18 10:32:27 +02:00
Jean-Baptiste Bellet
c4d4dea032
Create a new url /orders/ORDER_ID/distribution
...
That handles the step when distributor and order_cycle must be selected
2023-04-18 10:32:27 +02:00
Konrad
f7f49377b4
Merge pull request #10297 from cyrillefr/convert-admin-order-cancellation-workflow-to-stimulus-reflex
...
Convert admin order cancellation workflow to stimulus reflex
2023-02-20 21:38:33 +01:00
Ana Nunes da Silva
8dc50caaa8
Remove print ticket action
2023-02-14 08:08:20 +00:00
cyrillefr
1682f6788d
Delete unused code
...
Delete now unused code for Angular style bulk orders cancelling
- the Angular controller file
- the bulk_cancel method from controller
- the corresponding entry in route
2023-02-07 15:40:40 +01:00
binarygit
25ae10dbe8
Create bulk orders cancellation feature
2022-10-04 16:57:31 +02:00
Jean-Baptiste Bellet
e3683d25ca
Change second step order: Customer Details instead of Order Details
...
This second step comes from a first one, which is Set Distribution
2022-07-28 09:31:42 +02:00
Jean-Baptiste Bellet
e4be757d96
use the can_invoice method that check both ABN and configuration boolean
...
+ specs Specify an empty ABN number
+ update specs
2022-07-04 15:35:49 +02:00
GeorgeThoppil
8903496a1b
Optional restocking items
2022-05-06 10:55:24 -04:00
Jean-Baptiste Bellet
6a48bdbb82
Send email cancelation by default
2022-03-29 10:12:00 +02:00
Jean-Baptiste Bellet
50f547af98
Add an attribute that conditions the sending of the cancellation email
...
true by default to not change the default behavior.
Can be set to false when sending params send_cancellation_email
2022-02-10 14:39:00 +01:00
Matt-Yorkley
a6af9b3ad5
Disable CSP on order ticket printing via QZ
2022-01-18 12:22:06 +00:00
Andy Brett
aa8067f96b
process payments separately from completing the order
2021-06-29 11:54:48 -07:00
Luis Ramos
e52937c113
Use rubocop auto correct to add frozen string literal to all files
...
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00
Matt-Yorkley
0f5c39317a
Re-apply taxes in Admin::OrdersController#update
...
Ensures taxes are updated properly when hitting the "Update and Recalculate Fees" button on the order edit page.
2021-06-06 20:16:03 +01:00
Matt-Yorkley
834140f0a2
Don't dump massive binary PDF data into the job queue
...
Here we were rendering an entire PDF, then passing that PDF into the job queue as an *argument* containing the entire binary of the PDF in a massive string. This means the job object itself would contain that entire PDF. That's bad queueing!
We now create the PDF *during* the job (not before it), and pass simple arguments.
2021-05-29 16:06:29 +01:00
Matt-Yorkley
aa013ef76a
Update redirect_back syntax for Rails 5
...
Introduced in 5.0, the old syntax is removed in 5.2
2021-05-03 14:17:54 +01:00
Matt-Yorkley
123e96eb1e
Merge pull request #7284 from jibees/styleguide
...
Implements our StyleGuide
2021-04-22 18:14:40 +02:00
Jean-Baptiste Bellet
9a670c7821
Print order needs render_with_wicked_pdf
...
and call WickedPdf::PdfHelper explicitly
2021-04-22 15:18:27 +02:00
Jean-Baptiste Bellet
259e758d6e
When suppress_error_msg is present do no validate order and redirect
...
- When creating a new order, it's not necessary to display the "Line items can't be blank" as the order has just been created and the user is rightly doing configuration about line items
2021-04-22 10:03:36 +02:00
Matt-Yorkley
4c64aaed77
Remove callbacks in Adjustment that call order.update!
2021-03-11 11:20:01 +00:00
Matt-Yorkley
ba81bd8395
Remove after_action callback in Admin:OrdersController
2021-02-19 11:17:59 +00:00
Matt-Yorkley
9abf6cdcdf
Rename expensive method Order#update_distribution_charge!
...
This method is named "update distribution charge". What this method actually does is delete all of the fee adjustments on an order and all it's line items, then recreate them all from scratch. We call this from lots of different places all the time, and it's incredibly expensive. It even gets called from inside of transactions being run inside callbacks. Renaming it hopefully will add a bit of clarity.
This needs to be a lot more granular!
2021-01-29 21:52:28 +00:00
Matt-Yorkley
ff962c1c9b
Change various Mailer invocations from #deliver_now to #deliver_later
2021-01-08 23:18:55 +00:00
Matt-Yorkley
3e6445c51c
Replace deprecated ActionMailer#deliver with ActionMailer#deliver_now
...
DEPRECATION WARNING: `#deliver` is deprecated and will be removed in Rails 5. Use `#deliver_now` to deliver immediately or `#deliver_later` to deliver through Active Job.
2021-01-08 20:35:47 +00:00
Luis Ramos
3ebc8145df
Avoid calling update with nil values
2020-11-27 13:59:46 +00:00
Matt-Yorkley
3bfa903912
Revert "Move Spree::Admin::BaseController to Admin::BaseController"
2020-11-27 14:11:57 +01:00
Andy Brett
85d99f3bf2
Merge branch 'master' into controllers
2020-11-20 08:12:03 -08:00
Andy Brett
17202ff39c
move gateway_error require to lib/spree/core.rb
2020-11-10 14:55:56 -08:00
Luis Ramos
c9972189d0
Change usage of Spree::Admin::BaseController to Admin::BaseController
2020-10-31 09:56:59 +00:00
Luis Ramos
1a513567f2
Fix easy rubocop issues
2020-09-17 13:59:41 +01:00
Luis Ramos
d5d62894a5
Use spree url helpers
2020-09-17 13:59:41 +01:00
Luis Ramos
66f27aad32
Explicitly use spree url helpers for spree routes
2020-09-17 13:59:41 +01:00
Arun Kumar Mohan
bf07da6267
Fix the order resend message translation
2020-08-29 20:47:28 -05:00
Luis Ramos
26eee4631f
Rename AdvanceOrderService to OrderWorkflow
2020-07-28 23:40:49 +01:00
Luis Ramos
1666ffb191
Remove try_spree_current_user
...
This can be done because the method is defined in OFN's ApplicationController, so spree_current_user is available in all controllers
2020-07-15 14:53:35 +01:00
Luis Ramos
f848a89a00
Rename update_attributes to update #rails4
2020-06-22 16:51:43 +01:00
Luis Ramos
8a61257547
Rename all before_filter to before_action, it's the same function with a new name
2020-06-22 13:11:57 +01:00
Luis Ramos
3b91dd9dea
Use rubocop auto-correct to fix more issues
2020-06-22 12:51:47 +01:00
Luis Ramos
a4a6431faf
Fix strong params problem where order object is not sent to controller
2020-06-01 13:42:22 +01:00
Luis Ramos
384ca310a3
Merge branch 'master' into 3-0-stable-apr3
2020-04-03 18:26:26 +01:00
Matt-Yorkley
ac38b2735c
Eager-load data in OrdersController
2020-03-23 22:38:57 +01:00
Matt-Yorkley
f77194875c
Add strong parameters to orders_controller.rb
2020-02-22 16:24:30 +01:00
luisramos0
bbb3748d3c
Simplify orders events logic
2020-02-04 11:51:13 +00:00
luisramos0
6e26841817
Fix load_order before filter and remove unused open and close adjustments actions
2020-02-04 11:50:44 +00:00
luisramos0
ab60c4a9dd
Remove unnecessary index action override because this is no longer a decorator
...
Remove useless todo comment
2020-02-04 11:50:44 +00:00
luisramos0
76b6a85509
Merge spree/admin/orders_controller and its decorator and fix a few rubocop issues
2020-02-04 11:50:03 +00:00
luisramos0
a1d4b4ee98
Add orders_controller from spree_backend so that we can now merge it with the OFN's decorator
2020-02-04 11:50:03 +00:00