mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 08:34:48 +00:00
Test/review/rework (and hopefully finalized) new price handling
This commit is contained in:
@@ -180,11 +180,6 @@ var calendar = $("#calendar").fullCalendar({
|
||||
productDetails.last_price = 0;
|
||||
}
|
||||
|
||||
if (productDetails.last_qu_factor_purchase_to_stock === null)
|
||||
{
|
||||
productDetails.last_qu_factor_purchase_to_stock = 1;
|
||||
}
|
||||
|
||||
element.attr("data-product-details", event.productDetails);
|
||||
|
||||
var productOrderMissingButtonDisabledClasses = "disabled";
|
||||
@@ -210,7 +205,7 @@ var calendar = $("#calendar").fullCalendar({
|
||||
var costsAndCaloriesPerServing = ""
|
||||
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
{
|
||||
costsAndCaloriesPerServing = '<h5 class="small text-truncate"><span class="locale-number locale-number-currency">' + productDetails.last_price / productDetails.last_qu_factor_purchase_to_stock * mealPlanEntry.product_amount + '</span> / <span class="locale-number locale-number-generic">' + productDetails.product.calories * mealPlanEntry.product_amount + '</span> kcal ' + '<h5>';
|
||||
costsAndCaloriesPerServing = '<h5 class="small text-truncate"><span class="locale-number locale-number-currency">' + productDetails.last_price * mealPlanEntry.product_amount + '</span> / <span class="locale-number locale-number-generic">' + productDetails.product.calories * mealPlanEntry.product_amount + '</span> kcal ' + '<h5>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user