mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 20:36:15 +02:00
Restore more/old display text for "specific stock entry"
This commit is contained in:
parent
903ebc7d54
commit
2d0bc7f55a
|
|
@ -197,13 +197,19 @@ $("#location_id").on('change', function(e)
|
|||
function(stockEntries)
|
||||
{
|
||||
stockEntries.forEach(stockEntry =>
|
||||
{
|
||||
{
|
||||
var openTxt = __t("Not opened");
|
||||
if (stockEntry.open == 1)
|
||||
{
|
||||
openTxt = __t("Opened");
|
||||
}
|
||||
|
||||
if (stockEntry.location_id == locationId)
|
||||
{
|
||||
$("#specific_stock_entry").append($("<option>", {
|
||||
value: stockEntry.stock_id,
|
||||
amount: stockEntry.amount,
|
||||
text: __t("Amount remaining: %1$s, Best Before: %2$s", stockEntry.amount, stockEntry.best_before_date)
|
||||
text: __t("Amount: %1$s; Expires on %2$s; Bought on %3$s", stockEntry.amount, moment(stockEntry.best_before_date).format("YYYY-MM-DD"), moment(stockEntry.purchased_date).format("YYYY-MM-DD")) + "; " + openTxt
|
||||
}));
|
||||
sumValue = sumValue + parseFloat(stockEntry.amount);
|
||||
}
|
||||
|
|
@ -213,7 +219,7 @@ $("#location_id").on('change', function(e)
|
|||
$("#specific_stock_entry").append($("<option>", {
|
||||
value: stockEntry.stock_id,
|
||||
amount: stockEntry.amount,
|
||||
text: __t("Amount remaining: %1$s, Best Before: %2$s", stockEntry.amount, stockEntry.best_before_date)
|
||||
text: __t("Amount: %1$s; Expires on %2$s; Bought on %3$s", stockEntry.amount, moment(stockEntry.best_before_date).format("YYYY-MM-DD"), moment(stockEntry.purchased_date).format("YYYY-MM-DD")) + "; " + openTxt
|
||||
}));
|
||||
sumValue = sumValue + parseFloat(stockEntry.amount);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,12 +241,18 @@ $("#location_id_from").on('change', function(e)
|
|||
{
|
||||
stockEntries.forEach(stockEntry =>
|
||||
{
|
||||
var openTxt = __t("Not opened");
|
||||
if (stockEntry.open == 1)
|
||||
{
|
||||
openTxt = __t("Opened");
|
||||
}
|
||||
|
||||
if (stockEntry.location_id == locationId)
|
||||
{
|
||||
$("#specific_stock_entry").append($("<option>", {
|
||||
value: stockEntry.stock_id,
|
||||
amount: stockEntry.amount,
|
||||
text: __t("Amount remaining: %1$s, Best Before: %2$s", stockEntry.amount, stockEntry.best_before_date)
|
||||
text: __t("Amount: %1$s; Expires on %2$s; Bought on %3$s; Price: %4$s", stockEntry.amount, moment(stockEntry.best_before_date).format("YYYY-MM-DD"), moment(stockEntry.purchased_date).format("YYYY-MM-DD")) + "; " + openTxt
|
||||
}));
|
||||
sumValue = sumValue + parseFloat(stockEntry.amount);
|
||||
}
|
||||
|
|
@ -256,7 +262,7 @@ $("#location_id_from").on('change', function(e)
|
|||
$("#specific_stock_entry").append($("<option>", {
|
||||
value: stockEntry.stock_id,
|
||||
amount: stockEntry.amount,
|
||||
text: __t("Amount remaining: %1$s, Best Before: %2$s", stockEntry.amount, stockEntry.best_before_date)
|
||||
text: __t("Amount: %1$s; Expires on %2$s; Bought on %3$s", stockEntry.amount, moment(stockEntry.best_before_date).format("YYYY-MM-DD"), moment(stockEntry.purchased_date).format("YYYY-MM-DD")) + "; " + openTxt
|
||||
}));
|
||||
sumValue = sumValue + parseFloat(stockEntry.amount);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user