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

Localize numbers in article CSV download (decimal comma vs. point) #82

Open
twothreenine opened this issue Jul 22, 2024 · 0 comments
Open
Labels
enhancement New feature or request
Milestone

Comments

@twothreenine
Copy link
Contributor

So far (in upstream as well), numbers like prices etc. are not localized in the exported article CSV. Therefore, you have to select an English locale when opening the CSV in a spreadsheet editor, or else they won't be recognized as numbers.

Fix example: number_with_precision(article.minimum_order_quantity, strip_insignificant_zeros: true) etc. in

article.availability ? I18n.t('simple_form.yes') : I18n.t('simple_form.no'),
article.order_number,
article.name,
article.note,
article.manufacturer,
article.origin,
article.unit,
article.price,
article.tax,
article.deposit,
ArticleUnitsLib.get_translated_name_for_code(article.supplier_order_unit),
ArticleUnitsLib.get_translated_name_for_code(article.price_unit),
ArticleUnitsLib.get_translated_name_for_code(article.group_order_unit),
article.group_order_granularity,
article.minimum_order_quantity,
ArticleUnitsLib.get_translated_name_for_code(article.billing_unit),
article.article_category.try(:name),
get_csv_ratios(article)

(beware this also limits numbers to 3 decimals, I couldn't find a number i18n method which does just that)

Depends on #81.

@twothreenine twothreenine added the enhancement New feature or request label Jul 22, 2024
@twothreenine twothreenine added this to the Post-merge milestone Jul 22, 2024
twothreenine added a commit that referenced this issue Jul 22, 2024
- rearrange CSV columns as I suggested in #47
- add locales for column headings according to my suggestions in #50 (to do: adjust terms across menus -- post-merge?)
- update documentation of CSV layout (#46)

TO DO:
#83, #81 (more important)
#80, #82 (less important)
twothreenine added a commit that referenced this issue Jul 22, 2024
- rearrange CSV columns as I suggested in #47
- add locales for column headings according to my suggestions in #50 (to do: adjust terms across menus -- post-merge?)
- update documentation of CSV layout (#46)

TO DO:
#83, #81 (more important)
#80, #82 (less important)
any adaptations for rearranged tables necessary which I've overlooked? (for example sync feature)
twothreenine added a commit that referenced this issue Jul 22, 2024
- rearrange CSV columns as I suggested in #47
- add locales for column headings according to my suggestions in #50 (to do: adjust terms across menus -- post-merge?)
- update documentation of CSV layout (#46)

TO DO:
#83, #81 (more important)
#80, #82 (less important)
any adaptations for rearranged tables necessary which I've overlooked? (for example sync feature)
twothreenine added a commit that referenced this issue Jul 24, 2024
- rearrange CSV columns as I suggested in #47
- add locales for column headings according to my suggestions in #50 (to do: adjust terms across menus -- post-merge?)
- update documentation of CSV layout (#46)

TO DO:
#83, #81 (more important)
#80, #82 (less important)
any adaptations for rearranged tables necessary which I've overlooked? (for example sync feature)
twothreenine added a commit that referenced this issue Jul 24, 2024
- rearrange CSV columns as I suggested in #47
- add locales for column headings according to my suggestions in #50 (to do: adjust terms across menus -- post-merge?)
- update documentation of CSV layout (#46)

TO DO:
#83, #81 (more important)
#80, #82 (less important)
any adaptations for rearranged tables necessary which I've overlooked? (for example sync feature)
lentschi pushed a commit that referenced this issue Jul 26, 2024
- rearrange CSV columns as I suggested in #47
- add locales for column headings according to my suggestions in #50 (to do: adjust terms across menus -- post-merge?)
- update documentation of CSV layout (#46)

TO DO:
#83, #81 (more important)
#80, #82 (less important)
any adaptations for rearranged tables necessary which I've overlooked? (for example sync feature)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant