From 6abf60209901bd7cb33d0cafbde272bd2e8a8996 Mon Sep 17 00:00:00 2001 From: Kurt Riddlesperger Date: Thu, 15 Oct 2020 12:30:44 -0500 Subject: [PATCH] product card clarity --- public/viewjs/components/productcard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/viewjs/components/productcard.js b/public/viewjs/components/productcard.js index c20994e7..3a946423 100644 --- a/public/viewjs/components/productcard.js +++ b/public/viewjs/components/productcard.js @@ -95,7 +95,7 @@ Grocy.Components.ProductCard.Refresh = function(productId) { if (productDetails.last_qu_factor_purchase_to_stock > 1) { - $('#productcard-product-last-price').text(Number.parseFloat(productDetails.last_price).toLocaleString() + ' ' + Grocy.Currency + ' per 1 ' + productDetails.quantity_unit_purchase.name + ' of ' + productDetails.last_qu_factor_purchase_to_stock + ' ' + productDetails.quantity_unit_stock.name_plural); + $('#productcard-product-last-price').text(Number.parseFloat(productDetails.last_price * productDetails.last_qu_factor_purchase_to_stock).toLocaleString() + ' ' + Grocy.Currency + ' per 1 ' + productDetails.quantity_unit_purchase.name + ' of ' + productDetails.last_qu_factor_purchase_to_stock + ' ' + productDetails.quantity_unit_stock.name_plural); } else { @@ -109,7 +109,7 @@ Grocy.Components.ProductCard.Refresh = function(productId) if (productDetails.avg_price !== null) { - $('#productcard-product-average-price').text(Number.parseFloat(productDetails.avg_price).toLocaleString() + ' ' + Grocy.Currency); + $('#productcard-product-average-price').text(Number.parseFloat(productDetails.avg_price).toLocaleString() + ' ' + Grocy.Currency + ' per ' + productDetails.quantity_unit_stock.name); } else {