mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-04 23:44:33 +02:00
Highlight amount sum in part tables and part info page, when amount is less than minAmount
This commit is contained in:
parent
69fdc85c99
commit
5330476dbe
4 changed files with 29 additions and 5 deletions
|
@ -202,6 +202,12 @@ final class PartsDataTable implements DataTableTypeInterface
|
|||
htmlspecialchars($this->amountFormatter->format($expiredAmount, $context->getPartUnit())));
|
||||
}
|
||||
|
||||
//When the amount is below the minimum amount, we highlight the number red
|
||||
if ($context->isNotEnoughInstock()) {
|
||||
$ret = sprintf('<b class="text-danger" title="%s">%s</b>',
|
||||
$this->translator->trans('part.info.amount.less_than_desired'),
|
||||
$ret);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue