You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[...] this would also result in (a) additional decimals being ignored [...]
Is that really a problem? I think we need to consider the use cases leading up to the "fax" export - I wasn't in the project when this was designed - here's what I guess:
Use case no. 1 (and the only one I can think of - do you have more?):
"As a foodsoft user I want to send the list of articles ordered by ordergroups to a supplier for them to be delivered."
We have to consider the use case of automatically sending the order to the supplier, either by end action or by clicking the button "send to supplier," but without taking a look at how the fax PDF looks like. Which means the order organizers might not be aware of such a problem.
I noticed the scale is limited to 3 decimals anyways:
t.decimal"units_to_order",precision: 8,scale: 3,default: "0.0",null: false,comment: "stored in `article_versions.supplier_order_unit`"
Suggestions:
add a hint (in a tooltip and/or documentation) that the collective order amount will be rounded to 3 decimals and the supplier order unit should be chosen accordingly
or add such a warning only for when a user tries to set a group order granularity that could result in such a case, like 0.001 x g with kg as supplier order unit, or due to conversation factor (e.g. 1 x kg with lb as supplier order unit)
but I think that would be too much effort for that rare case
The text was updated successfully, but these errors were encountered:
@twothreenine Good thinking. Where would you add those warnings?
It's obvious to put them in the release notes and documentation at least.
But other than that?
In the article master data form?
Pro: Easy to display as a warning under some field (Which one though?). Will probably be seen.
Con: That one administering the article data might be someone else than the one sending the PDF. 🤔
Tooltip on the send button?
Pro: Right where the trouble might arise.
Con: Who waits for the tooltip to appear?
Maybe the best solution would be turning the one-click solutions (end order, send button) into one with a preview that includes the warning, if any values had to be rounded. But that would also be the solution requiring the highest effort.
from our discussion on #42:
We have to consider the use case of automatically sending the order to the supplier, either by end action or by clicking the button "send to supplier," but without taking a look at how the fax PDF looks like. Which means the order organizers might not be aware of such a problem.
I noticed the scale is limited to 3 decimals anyways:
foodsoft_hackathon/db/schema.rb
Line 368 in de3eb39
Suggestions:
0.001 x g
with kg as supplier order unit, or due to conversation factor (e.g.1 x kg
with lb as supplier order unit)but I think that would be too much effort for that rare case
The text was updated successfully, but these errors were encountered: