Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify article sorting across views #1068

Open
twothreenine opened this issue May 11, 2024 · 3 comments
Open

Unify article sorting across views #1068

twothreenine opened this issue May 11, 2024 · 3 comments

Comments

@twothreenine
Copy link
Contributor

twothreenine commented May 11, 2024

I find it quite inconvenient at times that articles are sorted differently in different menus/views.

For example, some of our suppliers print out the order PDF and use it as a basis for a delivery note / invoice (they add the actual prices or cross out articles which they can't deliver), or they write their own invoice in the same order.
When comparing such an invoice to the article PDF and/or the accounting menu, you have extra work to find each article in each list. If they were sorted in the same way, lists would be much easier to compare.

By looking at the views (in the frontend, not in the code) I determined there are 3 general sortings used:

  1. article name
  2. category, article name
  3. order number (else: article name)

Here's an incomplete list of the sortings used by each view:

view(s) primary sorting secondary sorting options
order placement (group order form, show) category article name searchable
order management (overview, edit order) category article name searchable
order management: sorted in groups/articles category (invisible) article name searchable
group PDF, article PDF, matrix PDF (for multiple orders too) article name
fax PDF order number else: article name
fax CSV, fax text category (invisible) article name
receive order number else: article name sortable by order number, name, unit
accounting: overview (edit) article name searchable
accounting: sorted in groups/articles category (invisible) article name
supplier articles management category article name searchable; sortable by name, category, unit, note
supplier articles: edit all, CSV download category article name

Since (category, article name) is the most commonly used sorting, and there's good reason to sort articles by category at least in order placement views, I'd propose to apply it to all views, resulting in the following changes:

view to apply (category, article name) sorting additional changes
group PDF, matrix PDF (for multiple orders too)
article PDF (for multiple orders too) show categories & order numbers?
fax PDF show categories?
receive show categories?
accounting: overview (edit) show categories?

Or do you think there's any good reason to prefer sorting by order number in fax PDF / receive, and apply this to accounting, fax CSV, group/article/matrix PDF etc. instead?

@wvengen
Copy link
Member

wvengen commented May 14, 2024

Lists from the supplier are often sorted by article number.
There are places where you'd put this together with Foodsoft, e.g. during receive and maybe during ordering (fax PDF), where it could be useful to order by article number.

Apart from that, I think harmonising this is great for everyone.

@twothreenine
Copy link
Contributor Author

Good point.

Perhaps the best option for that case would be to introduce two select fields which can be set for each supplier:

  • Sorting for ordering-related lists (fax PDF/CSV)
  • Sorting for various accounting/distribution lists (group/article/matrix PDF, receive, accounting)

If you only want a different sorting for receive, you could still use the sorting feature there each time.

Another option could be to make each list sortable, But for PDFs/CSVs, we would have to add more options ...

@wvengen
Copy link
Member

wvengen commented May 15, 2024

I like your two kinds of lists.
Good to hear that receive can already sort in place. I think that could actually be good enough.
There's also something with keeping the settings clean and not too overwhelming, where good defaults help.
Maybe I'd provide a good default, with the option to sort with a click by article number where useful (or would break existing use) -and document!. Maybe add the preference based on user request (so it addresses a real existing need).
Just some thoughts, not fully clear yet :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants