mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 11:54:32 +02:00
Fixed some inspection issues
This commit is contained in:
parent
c6f1758a18
commit
8ae4e9fe05
39 changed files with 46 additions and 56 deletions
|
@ -176,7 +176,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
|
|||
*/
|
||||
public function getObsolete(): bool
|
||||
{
|
||||
return (bool) $this->obsolete;
|
||||
return $this->obsolete;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -187,7 +187,7 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
|
|||
if ($this->orderdetail && $this->orderdetail->getPart() && !$this->orderdetail->getPart()->useFloatAmount()) {
|
||||
$tmp = round($this->price_related_quantity);
|
||||
|
||||
return $tmp < 1 ? 1 : $tmp;
|
||||
return max($tmp, 1);
|
||||
}
|
||||
|
||||
return $this->price_related_quantity;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue