Hey, thanks for this great module at first.
Currently I'm working on reports for ERPAL Platform distributive.
We are using Commerce reports tax module to calculate taxes for our orders, because it great module and Commerce and ERPAL Platform work together very well.
In our system we are using several order types and each order type may have custom statuses. But in Tax reports we have hardcoded statuses: 'pending', 'processing', 'completed'. So tax doesn't calculate for my orders because some of them don't have such statuses at all.
It would be really nice to have these statuses configurable.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | commerce_reports-configurable_statuses-2380219-3.patch | 4.26 KB | skdrupal88 |
| #3 | states_and_statuses.png | 57.24 KB | skdrupal88 |
Comments
Comment #1
skdrupal88I implemented it in my patch, but check please titles and descriptions for status settings fields, maybe you could define better titles.
Comment #2
mglamanThanks for the patch! You think it'd be more effective to selectively rekey based in status versus state? What state are your statuses attached to?
I can't rember where 'processsing' status gets made (which contrib) but I know I see it often. Would like to see it still in there by default. Pending and processing use the same state, which identifies checkout has been completed - or that actions have been completed, ready to be closed out and marked 'completed'
Comment #3
skdrupal88I tried to don't change previous module structure, thats why I used such default statuses, from patch:
I changed foreach to get statuses, patch in attachments.

States/statuses I use:
Comment #4
torgospizzaWhy don't we just use "post-checkout" states rather than having to configure statuses every time? e.g.,
I would also recommend replacing the function commerce_reports_tax_order_statuses() with a similar $post_checkout_states array-building function.
EDIT: I'm also noticing that it appears "status" and "state" are being confused all over the Commerce Reports module, so this might be part of a larger issue.
Comment #5
mglamantorgosPizza, you're right they are being confused across the module. 7.x-3.x relied on the status of an order. In 7.x-4.x I have tried to move over to state. All of the Views should use state now. The more "codified" submodules may not have been - such as tax and stock. My primary goal for those was to improve code and bring it up to speed and may have missed that.
I would much rather prefer order states versus status.
Comment #6
mglamanMarking this under the beta2 release plan #2425267: [META] 4.0 Beta2 Release Plan
Comment #8
mglamanCommitted! Thanks for patch.
I added the system_settings_form_submit callback to the generate button's submit callbacks. This way we don't need to worry about variable logic in the generation callback.
Also, in reference to #4. Across the module there is discrepancy on status and state. In my opinion the Views should be based on Order State since it comes configured with no (simple) front facing configuration. Tax, however, has a front facing configuration and Order Status is much simpler than introducing Order State to user UI. AFAIK Commerce doesn't really make Order State a front facing feature, more so for back end simplification.
Comment #12
mglamanMoving on.