Added an page for editing order informations

This commit is contained in:
Jan Böhmer 2019-08-30 14:25:05 +02:00
parent 1776cd9a77
commit 8c6342bffe
14 changed files with 504 additions and 12 deletions

View file

@ -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.
*