Pau Pérez Fabregat
2fa8cd54fd
Merge pull request #5769 from Matt-Yorkley/customer-names
...
Customer names in reports
2020-08-27 15:39:47 +02:00
Matt-Yorkley
102df28e97
Extract data masking to service
2020-08-14 20:48:33 +01:00
Matt-Yorkley
9a9538dace
Don't hide customer names if enterprise has enabled :allow_customer_names perference
2020-08-14 20:48:33 +01:00
Maikel Linke
c3e0f45f1a
Remove unused Report class from lib
...
Also removing related unused classes and their specs.
2020-08-14 15:38:10 +10:00
Cillian O'Ruanaidh
a9664e103d
Merge latest :master into :drop-blockenspiel branch and resolve conflicts related to Rubocop fixes.
2020-06-29 18:11:08 +01:00
Luis Ramos
0ba1642bd2
Fix rubocop issues
2020-06-22 17:39:20 +01:00
Luis Ramos
e574e254db
Use rubocop autocorrect to fix rubocop issue
2020-06-22 12:57:12 +01:00
Pau Pérez Fabregat
db80992326
Merge branch 'master' into drop-blockenspiel
2020-06-19 12:12:10 +02:00
Cillian O'Ruanaidh
406309c577
Move BulkCoop reports out of deprecated lib/ directory into OrderManagement engine.
...
The BulkCoop reports are not generated the same way as the EnterpriseFeeSummary report is generated yet so that may need to be updated.
2020-06-05 16:43:38 +01:00
Cillian O'Ruanaidh
d436d18d19
Fix code climate violations in removal of Blockenspiel dependency.
2020-06-05 10:13:06 +01:00
Cillian O'Ruanaidh
d02f64da06
Define bulk coop report summary row and columns with lists of method names instead of Procs.
2020-05-29 11:34:12 +01:00
Cillian O'Ruanaidh
1fba998b9e
Drop Blockenspiel and use :rules/:columns methods instead of :organise/:summary_columns DSL.
...
For https://github.com/openfoodfoundation/openfoodnetwork/issues/3231
2020-05-28 19:04:18 +01:00
Luis Ramos
384ca310a3
Merge branch 'master' into 3-0-stable-apr3
2020-04-03 18:26:26 +01:00
Matt-Yorkley
0b878dd0a2
Use named scope for finding line_items in a set of orders
2020-03-21 09:45:35 +01:00
Matt-Yorkley
e24d8d7104
Fix deprecation warning for use of #includes without #references
2020-03-12 19:12:36 +01:00
luisramos0
1e948735fb
Fix major performance problem by inverting the logic, instead of looking for line_items that are hidden, it looks for line items that are not editable using a merge statement that performs much better
...
Also, remove unnecessary if clause, merge will return an empty relation if no items are found, no need to test for empty.
The test report runs in a little over one minute instead of 8minutes
2019-11-30 22:38:03 +00:00
luisramos0
0ef4247914
Convert Report::LineItems to class and memoize orders so it's only executed once (this improves the report in 3secs for the case I am testing)
2019-11-29 21:51:54 +00:00
luisramos0
cc3368704a
Fix rubocop issues in reports_controller_decorator and in report line_items
2019-11-29 13:54:30 +00:00
luisramos0
da6d035a1d
Rename some reports permissions to order_permissions
2019-11-29 11:23:17 +00:00
Kristina Lim
a91a23aa39
Eager-load associations for Orders and Fulfillment report subtypes
2019-10-16 19:06:35 +08:00
Matt-Yorkley
a5d2579c69
Pluck line_item ids instead of all line_items
2019-10-01 15:51:45 +01:00
luisramos0
86b0d71c7e
Result of rubocop auto-correct and rebuilding rubocop_manual_todo
2019-05-28 12:57:29 +01:00
Kristina Lim
3f84d0008a
Move some in OpenFoodNetwork to engine services
...
This removes the OpenFoodNetwork namespace from these too.
2019-02-08 21:26:38 +00:00
Kristina Lim
9e035efd50
Render enterprise fee report directly in renderer
2019-02-08 21:26:38 +00:00
Kristina Lim
552bf1b9f7
Move report list to own class
2019-02-08 21:26:38 +00:00
Kristina Lim
9ce313c7f5
Define filter authorizer for enterprise fee report
2019-02-08 21:26:37 +00:00
Kristina Lim
cd3e258b59
Rename report authorizers to reflect permissions
2019-02-08 21:26:37 +00:00
Kristina Lim
7d74ddc85b
Add HTML view for enterprise fee summary report
2019-02-08 21:26:37 +00:00
Kristina Lim
418050c1b8
Remove blank strings from array report parameters
...
Remove the blank strings that Rails multiple selects add by default to
make sure that blank lists are still submitted to the server as arrays
instead of nil.
https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-select
2019-02-08 21:26:37 +00:00
Kristina Lim
6e03ab03f5
Extract general behaviour for report parameters
2019-02-08 21:26:37 +00:00
Kristina Lim
34dc16f8c9
Base filter options from initial authorizer object
2019-02-08 21:26:37 +00:00
Kristina Lim
ed2b8e9b9f
Add CSV renderer for enterprise fee summary report
2019-02-08 21:26:37 +00:00
Kristina Lim
3763cb98a3
Add data classes for Enterprise Fee Summary report
2019-02-08 21:26:37 +00:00
Maikel Linke
0fa9ca653e
Move duplicate code into its own module
2018-05-18 11:27:48 +10:00
Julius Pabrinkis
8b2b51d511
Fix code style for Rubocop
2017-07-21 12:17:13 +10:00
Julius Pabrinkis
55b2c19b64
Extract translations from lib folder
2017-07-21 12:17:12 +10:00
Rob Harrington
28ea23965b
Rubocop: Correct Lint/AmbiguousOperator offences
2017-06-23 16:49:08 +10:00
Rob Harrington
7bb58342fc
Rubocop: Auto-correct Style/EmptyLineBetweenDefs offences
2017-06-23 16:49:08 +10:00
Rob Harrington
40972cc6ec
Updating reports to use naming information from line_items directly, rather than from the original variant
2015-10-28 13:07:31 +11:00
Maikel Linke
e25805aa78
Restoring all changes of the last combined branch
...
This reverts commit 1e55e8a907 .
2015-09-10 15:03:13 +10:00
Maikel Linke
1e55e8a907
Reverting all changes of the last combined branch
...
The production server hangs on certain requests. To rule out a code bug,
we revert to the last deployed version.
2015-09-10 12:50:40 +10:00
Maikel Linke
2e2e767564
always displaying group_buy_unit_size
2015-09-09 12:22:28 +10:00
Maikel Linke
0fdd000589
Showing Bulk Unit Size in BulkCoopReport
...
The group_buy_unit_size field is now shown even if 'group buy' is not
enabled. And "Group By Unit Size" is now displayed as "Bulk Unit Size".
2015-09-03 12:26:40 +10:00
Rohan Mitchell
917c17af59
Clarify quantities used for calculations, show excess available via max_quantity
2015-07-24 18:31:49 +10:00
Rohan Mitchell
21a9681205
Do not show negative remainder when there are no purchases
2015-07-24 17:42:23 +10:00
Rohan Mitchell
54fd298e3a
Reinstate variant full name column - needed to identify variants differing only by description
2015-07-24 17:42:00 +10:00
Rohan Mitchell
211171aed4
Rename column for clarity
2015-07-24 12:49:43 +10:00
Rohan Mitchell
17fb4a7247
DRY by extracting calculation to method
2015-07-24 07:17:20 +10:00
Rohan Mitchell
3abce54115
Split variant name into number and unit columns
2015-07-24 07:07:49 +10:00
Rohan Mitchell
28de125b59
Bulk coop allocation report uses unit value rather than variant weight
2015-07-24 07:00:49 +10:00