mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-06 08:24:35 +02:00
Show formatted amount values on part info page.
This commit is contained in:
parent
f5ebce2a77
commit
5cc08af7b6
5 changed files with 147 additions and 6 deletions
|
@ -727,7 +727,7 @@ class Part extends AttachmentContainingDBElement
|
|||
{
|
||||
//TODO: Find a method to do this natively in SQL, the current method could be a bit slow
|
||||
$sum = 0;
|
||||
foreach($this->getPartLots() as $lot) {
|
||||
foreach ($this->getPartLots() as $lot) {
|
||||
//Dont use the instock value, if it is unkown
|
||||
if ($lot->isInstockUnknown()) {
|
||||
continue;
|
||||
|
@ -736,7 +736,7 @@ class Part extends AttachmentContainingDBElement
|
|||
$sum += $lot->getAmount();
|
||||
}
|
||||
|
||||
if(!$this->useFloatAmount()) {
|
||||
if ($this->useFloatAmount()) {
|
||||
return $sum;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue