Filipe
c0a4bccb3e
Merge pull request #11156 from Matt-Yorkley/product-tax-category
...
[Product Refactor] Tax category
2023-08-03 10:29:40 +01:00
Matt-Yorkley
e2094665c5
Update enterprise fee report tax_category fetching
2023-07-31 09:23:20 +10:00
Matt-Yorkley
4934d09a4c
Update delegation and method chaining between product and tax_category
2023-07-31 09:23:20 +10:00
Neal Chambers
60cd84d565
Safely autocorrect Naming/BlockForwarding
...
Inspecting 1480 files
...................................................................................................................................................................C.......C..........C...............................................................................................................................................................................................................C...........................................................................................................C.........C...............................................................................................................................................................................................................................................................C........................................CC...C............................................................................................................................................................................................................................................................................................................................C.....................................................................................................................................................................................................C..............C.........C..CC.......C.....................................................................................................C...............
Offenses:
app/helpers/application_helper.rb:41:32: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def ng_form_for(name, *args, &block)
^^^^^^
app/helpers/application_helper.rb:44:75: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
form_for(name, *(args << options.merge(builder: AngularFormBuilder)), &block)
^^^^^^
app/helpers/application_helper.rb:49:37: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def method_missing(method, *args, &block)
^^^^^^
app/helpers/link_helper.rb:4:57: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def link_to_service(baseurl, name, html_options = {}, &block)
^^^^^^
app/helpers/link_helper.rb:8:51: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
link_to ext_url(baseurl, name), html_options, &block
^^^^^^
app/helpers/spree/admin/base_helper.rb:6:56: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def field_container(model, method, options = {}, &block)
^^^^^^
app/helpers/spree/admin/base_helper.rb:13:29: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
capture(&block),
^^^^^^
app/reflexes/application_reflex.rb:29:19: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def with_locale(&block)
^^^^^^
app/reflexes/application_reflex.rb:30:43: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
I18n.with_locale(current_user.locale, &block)
^^^^^^
app/services/cache_service.rb:8:43: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def self.cache(cache_key, options = {}, &block)
^^^^^^
app/services/cache_service.rb:9:48: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
Rails.cache.fetch cache_key.to_s, options, &block
^^^^^^
app/services/cache_service.rb:14:58: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def self.cached_data_by_class(cache_key, cached_class, &block)
^^^^^^
app/services/cache_service.rb:16:23: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
&block
^^^^^^
app/services/cache_service.rb:25:34: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def self.home_stats(statistic, &block)
^^^^^^
app/services/cache_service.rb:28:47: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
race_condition_ttl: 10, &block)
^^^^^^
app/services/current_order_locker.rb:12:31: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def self.around(controller, &block)
^^^^^^
app/services/current_order_locker.rb:13:55: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
lock_order_and_variants(controller.current_order, &block)
^^^^^^
lib/reporting/reports/enterprise_fee_summary/scope.rb:392:28: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def chain_to_scope(&block)
^^^^^^
lib/reporting/reports/enterprise_fee_summary/scope.rb:393:41: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
@scope = @scope.instance_eval(&block)
^^^^^^
lib/spree/core/controller_helpers/respond_with.rb:7:34: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def respond_with(*resources, &block)
^^^^^^
lib/spree/core/controller_helpers/respond_with.rb:13:64: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
return unless (collector = retrieve_collector_from_mimes(&block))
^^^^^^
lib/spree/core/delegate_belongs_to.rb:80:39: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def class_def(name, method = nil, &blk)
^^^^
lib/spree/core/delegate_belongs_to.rb:81:54: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
class_eval { method.nil? ? define_method(name, &blk) : define_method(name, method) }
^^^^
lib/spree/core/environment_extension.rb:22:31: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def create_method(name, &block)
^^^^^^
lib/spree/core/environment_extension.rb:23:51: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
self.class.__send__(:define_method, name, &block)
^^^^^^
spec/models/enterprise_caching_spec.rb:144:13: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def later(&block)
^^^^^^
spec/models/enterprise_caching_spec.rb:145:36: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
Timecop.travel(1.day.from_now, &block)
^^^^^^
spec/support/embedded_pages_helper.rb:5:26: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def on_embedded_page(&block)
^^^^^^
spec/support/embedded_pages_helper.rb:6:28: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
within_frame :frame, &block
^^^^^^
spec/support/preferences_helper.rb:11:31: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def reset_spree_preferences(&config_block)
^^^^^^^^^^^^^
spec/support/preferences_helper.rb:16:33: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
configure_spree_preferences(&config_block) if block_given?
^^^^^^^^^^^^^
spec/support/request/shop_workflow.rb:87:37: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def within_variant(variant = nil, &block)
^^^^^^
spec/support/request/shop_workflow.rb:90:22: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
within(selector, &block)
^^^^^^
spec/support/request/ui_component_helper.rb:4:23: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def browse_as_small(&block)
^^^^^^
spec/support/request/ui_component_helper.rb:5:39: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
browse_with_window_size(640, 480, &block)
^^^^^^
spec/support/request/ui_component_helper.rb:8:24: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def browse_as_medium(&block)
^^^^^^
spec/support/request/ui_component_helper.rb:9:40: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
browse_with_window_size(1024, 768, &block)
^^^^^^
spec/support/request/web_helper.rb:52:23: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def within_row(num, &block)
^^^^^^
spec/support/request/web_helper.rb:53:54: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
within("table.index tbody tr:nth-child(#{num})", &block)
^^^^^^
spec/swagger_helper.rb:77:19: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def param(args, &block)
^^^^^^
spec/swagger_helper.rb:78:45: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
public_send(:let, args) { instance_eval(&block) }
^^^^^^
spec/system/support/capybara_setup.rb:20:27: C: [Corrected] Naming/BlockForwarding: Use anonymous block forwarding.
def using_session(name, &block)
^^^^^^
1480 files inspected, 42 offenses detected, 42 offenses corrected
2023-07-30 21:29:19 +09:00
Neal Chambers
ae8a5b7f93
Safely autocorrect Lint/UnusedMethodArgument
...
Inspecting 1480 files
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................W...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Offenses:
lib/reporting/queries/query_interface.rb:18:30: W: [Corrected] Lint/UnusedMethodArgument: Unused method argument - default. If it's necessary, use _ or _default as an argument name to indicate that it won't be used. If it's unnecessary, remove it.
def sum_grouped(field, default = 0)
^^^^^^^
lib/reporting/queries/query_interface.rb:22:26: W: [Corrected] Lint/UnusedMethodArgument: Unused method argument - default. If it's necessary, use _ or _default as an argument name to indicate that it won't be used. If it's unnecessary, remove it.
def sum_new(field, default = 0)
^^^^^^^
1480 files inspected, 2 offenses detected, 2 offenses corrected
2023-07-30 21:29:19 +09:00
Jean-Baptiste Bellet
a094a89c09
Mark "Inventory (on hand)" report as deprecated
...
Co-Authored-By: Maikel <maikel@email.org.au >, @dacook
2023-07-21 09:27:07 +02:00
Jean-Baptiste Bellet
28fe479f53
Unhide on_demand & on_hand columns by default
...
+ update specs as well
2023-07-21 09:27:07 +02:00
Konrad
bddc10626b
Merge pull request #11148 from cillian/fix-duplicate-rows-in-customer-addresses-report
...
Don't return duplicate rows in the customer addresses report
2023-07-13 20:32:01 +02:00
David Cook
17da66b72a
Update contents of variable directly
...
Also, it makes the line shorter, allowing us to use one-line if syntax :)
2023-07-07 14:22:36 +10:00
Matt-Yorkley
ad6d0c1c73
Add nil safety in reports for zero priced orders with no payment method
2023-07-04 13:13:05 +01:00
Cillian O'Ruanaidh
bf44284237
Don't return duplicate rows in the customer addresses report
2023-06-30 17:10:44 +01:00
Maikel
014fb69d4b
Merge pull request #10964 from macanudo527/fix_linelength_bundle1
...
Fix Layout/LineLength - Bundle 1
2023-06-26 12:10:39 +10:00
Cillian O'Ruanaidh
40b0bfb433
Add an OFN UID column to the Users & Enterprises report
2023-06-25 19:01:42 +02:00
Maikel
e065910d2d
Merge pull request #10939 from Matt-Yorkley/master-variants
...
Remove master variants
2023-06-23 13:42:58 +10:00
Neal Chambers
1e4034534c
Fix Layout/LineLength
2023-06-23 09:08:04 +09:00
Matt-Yorkley
1daab8994d
Remove is_master and not_master scopes
2023-06-16 21:23:44 +01:00
Mohamed ABDELLANI
68503e4e8b
remove useless variable
2023-06-16 06:54:11 +01:00
Mohamed ABDELLANI
c21a35a9fc
fix typo on lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_order.rb
2023-06-16 06:38:15 +01:00
Mohamed ABDELLANI
c8c3e65498
Update lib/reporting/reports/list.rb
...
Co-authored-by: Maikel <maikel@email.org.au >
2023-06-16 06:35:01 +01:00
Mohamed ABDELLANI
3e61830b40
optimize total_excl_tax & enterprise_fee_adjustemnt_ids
2023-06-16 06:35:01 +01:00
Mohamed ABDELLANI
542811b9ad
implement filtering by entreprise fee owner
2023-06-16 06:35:01 +01:00
Mohamed ABDELLANI
9d53d775a6
add filtering by fee name
2023-06-16 06:35:01 +01:00
Mohamed ABDELLANI
e9367b1f86
add enterprise fees with tax report by order
2023-06-16 06:35:01 +01:00
Mohamed ABDELLANI
a120329aa6
rename EnterpriseFeeSummary::Base to EnterpriseFeeSummary::FeeSummary
2023-06-16 06:35:01 +01:00
Maikel
989a88e252
Merge pull request #10848 from mkllnk/totals-report
...
Fix error on summarising total_units in Order Cycle Supplier Totals report
2023-06-14 13:59:48 +10:00
Maikel Linke
6803e0a8f9
Fix error on summarising total_units
2023-06-09 09:55:33 +10:00
Neal Chambers
b04879604a
Rewrite Ternary Expression to Prevent Layout/LineLength
2023-06-08 15:20:04 +10:00
Matt-Yorkley
a20277c3a7
Completely remove option_values and option_types from the codebase
2023-06-01 10:12:19 +01:00
Maikel
0b03152f3b
Merge pull request #10697 from mkllnk/rubocop-config-update
...
Update Rubocop config and replace deprecated TimeWithZone#to_s with argument
2023-04-19 11:23:34 +10:00
Konrad
e91e827f29
Merge pull request #10664 from abdellani/fix-remove-duplicated-cusomter-from-mailing-list-report
...
Fix Repeated customer entries on Mailing List Report
2023-04-16 21:17:33 +02:00
Konrad
8f201c830a
Merge pull request #10665 from abdellani/fix-remove-duplicated-cusomter-from-addresses-list-report
...
Fix Repeated customer entries on Addresses List Report
2023-04-16 20:40:56 +02:00
Maikel Linke
efb2ae6843
Style Rails/Pick - rubocop passes completely
2023-04-14 16:22:46 +10:00
Maikel Linke
407fca17cb
Style Rails/IndexWith
2023-04-14 16:19:21 +10:00
Mohamed ABDELLANI
061fc321b4
group records before rending the report
2023-04-07 18:44:19 +01:00
Mohamed ABDELLANI
5201e54f82
group orders before rendering the report
2023-04-07 18:16:12 +01:00
Jean-Baptiste Bellet
e74328f1d7
Add i18n for payment state key
...
+ update spec
2023-04-06 10:28:44 +02:00
Jean-Baptiste Bellet
6abd652251
Factorize into inherited method from Base: payment_state(order)
2023-04-06 09:50:50 +02:00
David Cook
c27974c5a3
Add marker for summary rows
...
This can be enabled in the reports API with the hidden parameter `fields_to_show[]=report_row_type` to help with parsing summary row output.
2023-03-22 11:47:26 +00:00
David Cook
6f41a4168d
Allow headers and footers for JSON format
...
You wouldn't want it by default, but it can be enabled with a parameter like display_summary_row=true
2023-03-22 11:47:26 +00:00
David Cook
db7ac904e9
Allow column formatting and header/footer stripping to be specified independently
...
This will allow us to change the options in the following commit.
2023-03-22 11:47:26 +00:00
Maikel
890ab6796e
Merge pull request #10413 from mkllnk/reports-params
...
Fix background processing of Enterprise Fee Summary report
2023-02-28 13:07:59 +11:00
Maikel Linke
800ccf5037
Remove unused method
2023-02-24 10:40:09 +11:00
Maikel Linke
8c7b4f73f7
Detect transaction fee even if fee name is missing
...
The Enterprise Fee Summary report is not always providing a fee name.
While that may be a bug on its own, we handle that gracefully now.
2023-02-24 10:40:09 +11:00
Mohamed ABDELLANI
c43834915d
sales_tax_totals_by_order report
2023-02-20 14:19:08 +01:00
Maikel Linke
4aa6898ecb
Reduce line length for easier reading
2023-02-14 12:33:29 +11:00
Maikel Linke
180434c5bd
Avoid renaming params within report
...
I changed the used parameter names within the report so that we don't
have to rename the given parameter names when the report runs. This
avoids modifying the `params` object and therefore other problems.
2023-02-14 12:33:29 +11:00
Maikel Linke
7fe913713a
Use same parameters for report job as for original
...
The Enterprise Fee Summary report modified the `params` object. So when
we pass the same `params` a second time to the report class it doesn't
find the same values. In some cases that would lead to a server error.
The next commit implements a better solution though.
2023-02-14 12:33:29 +11:00
Filipe
d0897ec677
Merge pull request #10248 from jibees/10117-reports-in-order-cycle-customer-totals-incorrect-sorting-when-lastname-first-letter-isnt-capitalized
...
Reports, Orders and fulfillment: Sort by customer lastname + firstname case insensitive
2023-02-02 14:39:10 +00:00
Filipe
678c60c9b6
Merge pull request #10175 from abdellani/tax_totals_with_rates_by_producer_report
...
Tax Totals with Rates by Producer Report
2023-01-30 13:56:48 +00:00
Mohamed ABDELLANI
19df15d75b
move item group instruction from db to rails
2023-01-21 18:40:27 +01:00