mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-29 13:10:06 +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
|
@ -151,6 +151,15 @@ trait InstockTrait
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true, if the total instock amount of this part is less than the minimum amount.
|
||||
* @return bool
|
||||
*/
|
||||
public function isNotEnoughInstock(): bool
|
||||
{
|
||||
return $this->getAmountSum() < $this->getMinAmount();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the summed amount of this part (over all part lots)
|
||||
* Part Lots that have unknown value or are expired, are not used for this value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue