Show formatted amount values on part info page.

This commit is contained in:
Jan Böhmer 2019-08-26 15:09:05 +02:00
parent f5ebce2a77
commit 5cc08af7b6
5 changed files with 147 additions and 6 deletions

View file

@ -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;
}