foodcoopsat / foodsoft_hackathon

Other
1 stars 2 forks source link

Implications of scale of order_article.units_to_order limited to 3 decimals #72

Open twothreenine opened 4 months ago

twothreenine commented 4 months ago

from our discussion on #42:

[...] 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:

https://github.com/foodcoopsat/foodsoft_hackathon/blob/de3eb39ae071d959d3c1776c279d1445cc7d9796/db/schema.rb#L368

Suggestions:

lentschi commented 3 months ago

@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?

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.