-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improve readability of Fax PDF (and CSV) #42
Comments
Fixed, apart from the following points:
I don't think is a good idea, as the amounts are aligned right, so if we'd have one amount with decimals and one without, the first non-decimal digit would not be aligned consistently. So I've now changed it to have exactly 2 decimals no matter how many there actually are (e.g. showing
Yes, and I think that is intentional. The text export obviously has to have hardcoded "column" sizes (currently hardcoded to eight characters). So only the rightmost column has flexible width, which is already taken by "name". The unit column would however also need to have flexible width. |
I have a problem with that: Amounts like 0.725 kg will be omitted to 0.72 or 0.73. It should work for most use cases with exactly 3 decimals, though. |
Okay - changed it to 3 decimals 👍 |
I'm still not really happy with the .000 for piece units: I think this would be easier to read, even though it's not aligned: |
Okay, this is different from what we originally agreed on. But, okay... You mean like this? But if we don't care about alignment, could we then just always display all the decimals there are? |
Yeah I wasn't happy with it when I looked at the result.
Looks like I suggested, I'll test it later.
I see a case for alignment between amounts like
just not between
however, this would also result in (a) additional decimals being ignored, and (b)
|
I am confused as to how you want it to be in the end...? Or are you just brainstorming here?
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?): Thus, I can't think of a use case, where it would make sense to configure the Apart from that - So far, we've only discussed PDF and CSV at the same time. I think however, that for CSV we could just skip the formatting/rounding all together. CSVs are usually either opened in Excel/Calc where you could just choose whichever number format you like or parsed by some other script/app for which it shouldn't make any difference either, right? |
- outsource format_units_to_order to OrderHelper - fax text: include unit, adjust column width - fax PDF & text: only include order number if any present
- outsource format_units_to_order to OrderHelper - fax text: include unit, adjust column width - fax PDF & text: only include order number if any present
I just wanted to note those potential issues but personally, I'm happy with the solution for the PDF as in your PR, I noticed that the scale of order_article.units_to_order is limited to 3 decimals anyways, so I opened #72 for the implications.
We need it for localization and I'd prefer to avoid any irrelevant digits in the CSV, so I used
I think I found a good solution by determining the length of the longest entry and setting the width to that (also for order number and amount)
|
…onvertability (#70) * On #42: Fax pdf/csv: Decimals dependant on supplier_order_unit's si convertability * Solve #42: Improve fax PDF, CSV, text - outsource format_units_to_order to OrderHelper - fax text: include unit, adjust column width - fax PDF & text: only include order number if any present * On #42: - Adapted order_txt to generalized creating the text table and added spec - Code style fixes for order_fax * On #42 Fixes error dad0bb9#r143648091 --------- Co-authored-by: twothreenine <leonard_ostler@yahoo.de>
…onvertability (#70) * On #42: Fax pdf/csv: Decimals dependant on supplier_order_unit's si convertability * Solve #42: Improve fax PDF, CSV, text - outsource format_units_to_order to OrderHelper - fax text: include unit, adjust column width - fax PDF & text: only include order number if any present * On #42: - Adapted order_txt to generalized creating the text table and added spec - Code style fixes for order_fax * On #42 Fixes error dad0bb9#r143648091 --------- Co-authored-by: twothreenine <leonard_ostler@yahoo.de>
…onvertability (#70) * On #42: Fax pdf/csv: Decimals dependant on supplier_order_unit's si convertability * Solve #42: Improve fax PDF, CSV, text - outsource format_units_to_order to OrderHelper - fax text: include unit, adjust column width - fax PDF & text: only include order number if any present * On #42: - Adapted order_txt to generalized creating the text table and added spec - Code style fixes for order_fax * On #42 Fixes error dad0bb9#r143648091 --------- Co-authored-by: twothreenine <leonard_ostler@yahoo.de>
The PDF still looks like this:
(for the weird carrots amount, see #41; also why are the units in German, this is from Foodsoft one -> #38)
I propose to:
.0
in the amount, unless there are decimals other than 0, for example0.456
(you could also make a case to include.0
for scalar units)So it would look like this: (except for the
.0
still there)Reading "3 Kilogramm Oyster mushrooms" is much more intuitive than in the example above.
Same applies to the Fax CSV, although the current order there is different than in the PDF.
In case of the Fax text, the unit column is missing:
I don't know if Fax text is used anywhere, though. It doesn't appear in the e-mail sent to the supplier (nor as attachment)
The text was updated successfully, but these errors were encountered: