Fixed the conversion factor hint on the purchase page (fixes #625)

This commit is contained in:
Bernd Bestel 2020-04-12 14:09:38 +02:00
parent 6867057b6e
commit 4e5e191b22
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 6 additions and 2 deletions

View File

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

View File

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

View File

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