Allow to specify an informational field during a part stock operation, where the user can specify, when this operation was really performed

Fixes issue #416
This commit is contained in:
Jan Böhmer 2023-11-25 19:10:18 +01:00
parent 6cff19358a
commit b447a69dae
6 changed files with 89 additions and 16 deletions

View file

@ -193,6 +193,10 @@ class LogEntryExtraFormatter
htmlspecialchars($this->elementTypeNameGenerator->getLocalizedTypeLabel(PartLot::class))
.' ' . $context->getMoveToTargetID();
}
if ($context->getActionTimestamp()) {
$formatter = new \IntlDateFormatter($this->translator->getLocale(), \IntlDateFormatter::SHORT, \IntlDateFormatter::SHORT);
$array['log.part_stock_changed.timestamp'] = $formatter->format($context->getActionTimestamp());
}
}
return $array;