diff --git a/changelog/58_UNRELEASED_2020-xx-xx.md b/changelog/58_UNRELEASED_2020-xx-xx.md index a4fa7de2..63166a42 100644 --- a/changelog/58_UNRELEASED_2020-xx-xx.md +++ b/changelog/58_UNRELEASED_2020-xx-xx.md @@ -12,6 +12,7 @@ ### Recipe fixes - Fixed that when editing an ingredient with "Only check if a single unit is in stock" set, the quantity unit was always set to the products stock quantity unit regardless if a different one was selected for that ingredient - Fixed a PHP notice on the recipes page when there are no recipes (thanks @mrunkel) +- Fixed the conversion factor hint to display also decimal places on the purchase page (only displayed when the product has a different purchase/stock quantity unit) ### Calendar fixes - Fixed that the "Share/Integrate calendar (iCal)" button did not work (thanks @tsia) diff --git a/localization/strings.pot b/localization/strings.pot index ef8f74e7..3816da0e 100644 --- a/localization/strings.pot +++ b/localization/strings.pot @@ -1070,7 +1070,7 @@ msgstr "" msgid "Changelog" msgstr "" -msgid "will be multiplied a factor of %1$s to get %2$s" +msgid "will be multiplied by a factor of %1$s to get %2$s" msgstr "" msgid "The given date is earlier than today, are you sure?" @@ -1777,3 +1777,6 @@ msgstr "" msgid "Mark this stock entry as open" msgstr "" + +msgid "" +msgstr "" diff --git a/public/viewjs/purchase.js b/public/viewjs/purchase.js index e1ee287b..78027cf9 100644 --- a/public/viewjs/purchase.js +++ b/public/viewjs/purchase.js @@ -167,7 +167,7 @@ if (Grocy.Components.ProductPicker !== undefined) } else { - $('#amount_qu_unit').text(productDetails.quantity_unit_purchase.name + " (" + __t("will be multiplied a factor of %1$s to get %2$s", parseInt(productDetails.product.qu_factor_purchase_to_stock).toString(), __n(2, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural)) + ")"); + $('#amount_qu_unit').text(productDetails.quantity_unit_purchase.name + " (" + __t("will be multiplied by a factor of %1$s to get %2$s", parseFloat(productDetails.product.qu_factor_purchase_to_stock).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: 2 }), __n(2, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural)) + ")"); } if (productDetails.product.allow_partial_units_in_stock == 1)