Commit Graph

1691 Commits

Author SHA1 Message Date
Cillian O'Ruanaidh
4e6d64c0a1 Let people choose which payment methods are available to customers on order cycles 2022-10-21 17:21:31 +01:00
Maikel Linke
c22f6cb805 Add more fields to revenue report as used by Aus
We currently maintain our own CSV generation script which could be
replaced if we got all this information here.
2022-10-18 12:51:13 +11:00
Maikel
058a45f4e5 Merge pull request #9442 from jibees/8904-display-fees-name-instead-of-type-on-invoices
Display fees name instead of type on invoices
2022-10-10 13:15:01 +11:00
Maikel Linke
bc26a3aa07 Add used feature toggles to appear in the admin UI
The admin UI shows only features which were added to the database. We
always had to look up a feature's name add it manually before we could
enable it. Now it will appear in the UI after some code asked if it was
enabled.

This only adds a database query once when the feature doesn't exist yet.
The `feature.exist?` call only performs an in-memory lookup in the
memoizer.
2022-10-08 16:23:17 +02:00
Jean-Baptiste Bellet
7b57f2358c Create a new key instead of modifying the old one
it could lead to issues when key is not updated and we should avoid that kind of issue.
2022-10-08 10:00:57 +02:00
Jean-Baptiste Bellet
0cc8349c71 Use fee name for the adjustment label instead of type
+ update specs as well
2022-10-08 10:00:57 +02:00
Maikel Linke
c8cfbbb0b2 Use standard ApplicationRecord in task class
It's best practice to use the ApplicationRecord. But when Rake is
loaded, our application is not loaded yet and the ApplicationRecord
class wasn't available yet. Requiring within the task solves the problem
because Rake loads the Rails environment before executing this task.

I also removed the unused highline loading.
2022-09-29 11:56:10 +10:00
Jean-Baptiste Bellet
53978de632 Create a new report that show revenues (incl. or excl. taxes) by hub
+ Create spec
2022-09-08 09:04:44 +02:00
Philipp Winkler
bf53a02270 Add api key toggle view checkbox 2022-08-07 09:48:49 +02:00
Maikel Linke
0ebc803e22 Simplify reports SQL query 2022-07-26 11:05:41 +10:00
Jean-Baptiste Bellet
09adc8f690 In Enterprise Fees Summary report, SUM column should be numeric
+ update specs as well
2022-07-25 15:08:39 +02:00
Jean-Baptiste Bellet
2a35c48498 Do not format price as currency, but as number
for all the `Packing Reports`, ie
Pack By Customer
Pack By Supplier
Pack By Product
2022-07-22 09:28:36 +02:00
Jean-Baptiste Bellet
ce0031934a Do not format sum_total as currency, but as number
For the `Bulk Co-op Supplier Report` report
2022-07-22 09:27:52 +02:00
Filipe
45214ed923 Merge pull request #9325 from jibees/8899-shopfront-display-fee-name-in-the-tooltip-of-a-price-product-
In the shopfront, display fee name in the tooltip of a price product breakdown
2022-06-24 20:49:32 +01:00
Maikel
165456b8c8 Merge pull request #9229 from mkllnk/report-currency-formatting
Format money amounts in report spreadsheets as numbers
2022-06-23 12:18:02 +10:00
Filipe
6b00319e4a Merge pull request #9191 from jibees/9186-inverse-hide-columns-UX-by-a-columns-to-show
Admin, Reports: Inverting logic from "Columns to hide" to "Columns to show"
2022-06-21 17:34:31 +01:00
Jean-Baptiste Bellet
976e326bbd Add method fees_name_by_type_for that returns fees name for a variant 2022-06-21 14:20:59 +02:00
Maikel Linke
e37ec4b552 Avoid auto-formatting currencies
Each report can define formats for each column. But currency formatting
was also applied to all columns that had "price" in the name. Removing
this automation gives us more control and we can decide for each case.

At the moment, the currency formatting in Excel spreadsheets is not
ideal and it's easier to keep it as number.

This PR introduces a visual regression as prices are not formatted as
nicely but the columns can be used in calculations.
2022-06-20 13:18:41 +10:00
Rachel Arnould
40f3d4df4f Merge pull request #9312 from filipefurtad0/revert_9268_supplier_totals
Splits results per supplier on OC Distributor Totals by Supplier report
2022-06-17 10:53:19 +02:00
jibees
19b57aa74e Merge pull request #9246 from jibees/9228-do-not-include-shipping-method-in-the-summary-row-for-Order-Cycle-Distributer-Totals-by-Supplier-report
Do not include shipping method in the summary row for the Order Cycle Distributer Totals by Supplier report
2022-06-17 09:30:31 +02:00
filipefurtad0
0a70e091cd Reverts #9268 for supplier totals 2022-06-15 13:50:22 +01:00
Jean-Baptiste Bellet
8ba8a95eb7 Convert key to sym, as it could be a string (in case of dynamic header)
ie. the tax rate

Update specs to check this case when feature toggle is activated or not
2022-06-14 15:39:06 +02:00
Rachel Arnould
9e1226be28 Merge pull request #9268 from jibees/9267-Wrong-report-when-selecting-multiple-shops
Split orders across several shops of same order cycle instead of aggregating in several Orders and Fulfilment reports
2022-06-09 18:03:13 +02:00
Jean-Baptiste Bellet
bcc4ec365d Format date in summary row as it's formatted in a row
for order cycle customer totals report

+ update specs
2022-06-08 12:18:50 +02:00
Jean-Baptiste Bellet
3defd81ca6 Group by e.order.distributor_id on Orders & Fulfillment Reports 2022-06-08 09:47:09 +02:00
Jean-Baptiste Bellet
2c2c48071d Since query_result method is the same, use inheritance 2022-06-07 10:53:25 +02:00
Maikel Linke
bea080a9b1 Remove Paperclip
It has been replaced by Active Storage.
2022-06-01 17:16:55 +10:00
Maikel Linke
b7efa1b018 Replace Paperclip on Spree::Image 2022-06-01 17:16:55 +10:00
Maikel Linke
f29e569f1b Remove Paperclip migration code 2022-06-01 17:16:54 +10:00
Maikel Linke
727eef3c4f Replace Paperclippable ContentConfig
The old Paperclip configuration was very clever and easy to use but it
was also a complicated implementation building on the complicated Spree
preference system.

I simplified this with Active Storage, storing simple references to blob
ids and default URLs as backup.
2022-06-01 17:16:54 +10:00
Jean-Baptiste Bellet
a6dc19f717 Introduce FeatureToggle for columns logic
Key is `report_inverse_columns_logic`

This commit is relative to 985893667 commit
2022-05-31 15:57:38 +02:00
Jean-Baptiste Bellet
9858936677 Starts transforming fields_to_hide to fields_to_show 2022-05-30 15:34:08 +02:00
Jean-Baptiste Bellet
ec338bca9c Do not include shipping method in the summary row 2022-05-30 11:14:29 +02:00
lin-d-hop
fb2279d26d Draft PR with potential fix to the reports S1. Untested. 2022-05-25 22:08:05 +01:00
Rachel Arnould
cb6cb05eca Merge pull request #9192 from jibees/9127-distinct-line-items-with-different-price
For all `orders_and_fulfillment` reports, distinct product by `variant`, `price` & `order_id`
2022-05-25 12:44:22 +02:00
Jean-Baptiste Bellet
e32797d2fd Do not group by order 2022-05-25 11:42:06 +02:00
Jean-Baptiste Bellet
f34b68a6e3 Add order date range to packing reports 2022-05-25 10:28:38 +02:00
Jean-Baptiste Bellet
be88b95e8c orders_and_fulfillment reports, distinct product by variant & price 2022-05-19 10:42:53 +02:00
Maikel
9992f9c83b Merge pull request #9150 from mkllnk/active-storage-fix
Correct checksum in Paperclip migration task
2022-05-17 16:14:03 +10:00
Sebastian Castro
1be3b508bf Reports restore original results ordering 2022-05-12 16:54:14 +02:00
Sebastian Castro
294f7c2fb5 Reports restore original columns ordering 2022-05-12 16:54:14 +02:00
Sebastian Castro
89212736e9 Reports fix formatting cells 2022-05-12 16:54:14 +02:00
Sebastian Castro
35b5ca3a51 Csv Report: translate headers 2022-05-12 16:54:14 +02:00
Sebastian Castro
56fab26235 Reports: refactor to easily provide default_params 2022-05-12 16:54:14 +02:00
Sebastian Castro
b7991e5ae8 Packing Report: use field name as columns headers in spreadsheet export 2022-05-12 16:54:14 +02:00
Sebastian Castro
2008c10c6f Reports: use field name as header instead of translated value for raw renders (csv, json) 2022-05-12 16:54:14 +02:00
Sebastian Castro
0218f75f34 Packing Report: hide by default phone and price column to avoid breaking changes 2022-05-12 16:54:14 +02:00
Sebastian Castro
0545c9de28 Packing Report: revert column order change 2022-05-12 16:54:14 +02:00
Sebastian Castro
b54ec4354a Report TaxRate fix 2022-05-12 16:54:14 +02:00
Sebastian Castro
767afe1fba Reports Renderer: whitelist report formats 2022-05-12 16:54:14 +02:00