mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-23 12:24:45 +02:00
Applied symplify rules to codebase.
This commit is contained in:
parent
2f20d90041
commit
388e847b17
136 changed files with 1370 additions and 789 deletions
|
@ -72,14 +72,6 @@ class Pricedetail extends DBElement
|
|||
|
||||
public const PRICE_PRECISION = 5;
|
||||
|
||||
/**
|
||||
* @var Orderdetail
|
||||
* @ORM\ManyToOne(targetEntity="Orderdetail", inversedBy="pricedetails")
|
||||
* @ORM\JoinColumn(name="orderdetails_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
protected $orderdetail;
|
||||
|
||||
/**
|
||||
* @var string The price related to the detail. (Given in the selected currency)
|
||||
* @ORM\Column(type="decimal", precision=11, scale=5)
|
||||
|
@ -116,6 +108,14 @@ class Pricedetail extends DBElement
|
|||
*/
|
||||
protected $manual_input = true;
|
||||
|
||||
/**
|
||||
* @var Orderdetail
|
||||
* @ORM\ManyToOne(targetEntity="Orderdetail", inversedBy="pricedetails")
|
||||
* @ORM\JoinColumn(name="orderdetails_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
protected $orderdetail;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
bcscale(static::PRICE_PRECISION);
|
||||
|
@ -280,6 +280,7 @@ class Pricedetail extends DBElement
|
|||
* quantity to 100. The single price (20$/100 = 0.2$) will be calculated automatically.
|
||||
*
|
||||
* @param float $new_price_related_quantity the price related quantity
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPriceRelatedQuantity(float $new_price_related_quantity): self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue