Don't remove products from stock overview on consuming all and the product has a min. stock amount & show it again on undo

This commit is contained in:
Bernd Bestel
2019-09-26 13:55:42 +02:00
parent a2b6d9ae39
commit b8f9d09afc
2 changed files with 23 additions and 2 deletions

View File

@@ -298,8 +298,21 @@ RefreshContextualTimeago = function()
$("time.timeago").each(function()
{
var element = $(this);
if (!element.hasAttr("datetime"))
{
element.text("")
return
}
var timestamp = element.attr("datetime");
if (timestamp.isEmpty())
{
element.text("")
return
}
var isNever = timestamp && timestamp.substring(0, 10) == "2999-12-31";
var isToday = timestamp && timestamp.substring(0, 10) == moment().format("YYYY-MM-DD");
var isDateWithoutTime = element.hasClass("timeago-date-only");