-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
Only display Supplier column in Order Cycle Report email if there is more than one supplier #11798
Only display Supplier column in Order Cycle Report email if there is more than one supplier #11798
Conversation
- if @distributors_pickup_times.many? | ||
%td | ||
#{raw(line_items.first.product.supplier.name)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this PR but I'm wondering why the name is raw here. It looks like it got copied from the text template without knowing that it's introducing a security issue. A supplier could inject HTML in the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be addressed here #11801
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one 👍
Hey @cillian, Below a summary of my findings:
I'm a bit hesitant to merge this one: it would remove the column in most cases, but perhaps best to fix the summary row indentation before shipping? Also, would be great if we could remove the Suppliers column from the table which groups orders by customer. Would it be ok to address these two points, within this PR? The alternative would be to split this and create separate issues, but perhaps it is doable. Please let me know what you think. Moving back to in dev.
|
…more than one supplier
…er of columns in totals row by one too to keep columns aligned
…orders grouped by customer part of the order cycle report
98c27b0
to
b96110e
Compare
@filipefurtad0 Thanks, that's fixed now, I should have spotted that. BeforeAfterBefore (with customers)After (with customers) |
Hi @cillian, Regarding Filipe's findings
Those are both fixed now, as we can see here: HOWEVERI think there is another misunderstanding underlying here. In this email
Conclusion
I may be totally wrong, but this is my conclusion for today. I think we can safely merge this because it is an improvement. What do you think, Cillian? Does this make sense? I will add the feedback needed label for now until we know how to move on. Thanks again! 🙏 |
Hi @drummer83 Nice catch, yes I think displaying the distributor makes more sense. One other thing I noticed, I think the same product can be sold for multiple distributors (not 100% sure about this e.g. maybe my local data not setup correctly). So I was wondering if there is multiple distributors do we need to show a list for each distributor like in this following example? This would show people the total amount of each product for each distributor, which could be for multiple customers. Note, the potatoes quantity is 2 because it was sold at multiple distributors. And here is an example with just one distributor: |
Yes! In FR, distributors are often just a pickup places so some managers can have OC with over 10 distributors 🙈
No idea! maybe @kirstenalarsen has some hints? But I concur that it would make sense to display distributors when there are more than one. I think this could be open as a new papercut straight in main repo 👍 |
What? Why?
Note, the failing test on this branch is one that is failing on the
master
branch.What should we test?
Notify producers
button and check that the Order Cycle Report email contains a 'Supplier' column.Notify producers
button and check that the Order Cycle Report email does not contain a 'Supplier' column.Release notes
Changelog Category (reviewers may add a label for the release notes):