Show the plural form of stock QU unit when showing purchase to stock conversion factor on purchase page when QU units are different (references #169)

This commit is contained in:
Bernd Bestel
2019-03-09 17:04:34 +01:00
parent bfd29def8d
commit 47a6260d27

View File

@@ -114,7 +114,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
} }
else else
{ {
$('#amount_qu_unit').text(productDetails.quantity_unit_purchase.name + " (" + L("will be multiplied a factor of #1 to get #2", parseInt(productDetails.product.qu_factor_purchase_to_stock).toString(), productDetails.quantity_unit_stock.name) + ")"); $('#amount_qu_unit').text(productDetails.quantity_unit_purchase.name + " (" + L("will be multiplied a factor of #1 to get #2", parseInt(productDetails.product.qu_factor_purchase_to_stock).toString(), Pluralize(2, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural)) + ")");
} }
if (productDetails.product.allow_partial_units_in_stock == 1) if (productDetails.product.allow_partial_units_in_stock == 1)