mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-06 00:14:36 +02:00
Added an page for editing order informations
This commit is contained in:
parent
1776cd9a77
commit
8c6342bffe
14 changed files with 504 additions and 12 deletions
|
@ -128,8 +128,8 @@ class Part extends AttachmentContainingDBElement
|
|||
|
||||
/**
|
||||
* @var Orderdetail[]
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\PriceInformations\Orderdetail", mappedBy="part")
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\PriceInformations\Orderdetail", mappedBy="part", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
* @ColumnSecurity(prefix="orderdetails", type="object")
|
||||
*/
|
||||
protected $orderdetails;
|
||||
|
@ -279,6 +279,7 @@ class Part extends AttachmentContainingDBElement
|
|||
{
|
||||
parent::__construct();
|
||||
$this->partLots = new ArrayCollection();
|
||||
$this->orderdetails = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -510,6 +511,19 @@ class Part extends AttachmentContainingDBElement
|
|||
return $this->orderdetails;
|
||||
}
|
||||
|
||||
public function addOrderdetail(Orderdetail $orderdetail) : Part
|
||||
{
|
||||
$orderdetail->setPart($this);
|
||||
$this->orderdetails->add($orderdetail);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeOrderdetail(Orderdetail $orderdetail) : Part
|
||||
{
|
||||
$this->orderdetails->removeElement($orderdetail);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all devices which uses this part.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue