mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-01 14:04:30 +02:00
Allow to import orderdetails and partLots of parts
This commit is contained in:
parent
a7ea12d07d
commit
27b43041f9
3 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,7 @@ trait InstockTrait
|
||||||
* @ORM\OneToMany(targetEntity="PartLot", mappedBy="part", cascade={"persist", "remove"}, orphanRemoval=true)
|
* @ORM\OneToMany(targetEntity="PartLot", mappedBy="part", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||||
* @Assert\Valid()
|
* @Assert\Valid()
|
||||||
* @ORM\OrderBy({"amount" = "DESC"})
|
* @ORM\OrderBy({"amount" = "DESC"})
|
||||||
* @Groups({"extended", "full"})
|
* @Groups({"extended", "full", "import"})
|
||||||
*/
|
*/
|
||||||
protected $partLots;
|
protected $partLots;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ trait OrderTrait
|
||||||
* @ORM\OneToMany(targetEntity="App\Entity\PriceInformations\Orderdetail", mappedBy="part", cascade={"persist", "remove"}, orphanRemoval=true)
|
* @ORM\OneToMany(targetEntity="App\Entity\PriceInformations\Orderdetail", mappedBy="part", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||||
* @Assert\Valid()
|
* @Assert\Valid()
|
||||||
* @ORM\OrderBy({"supplierpartnr" = "ASC"})
|
* @ORM\OrderBy({"supplierpartnr" = "ASC"})
|
||||||
* @Groups({"extended", "full"})
|
* @Groups({"extended", "full", "import"})
|
||||||
*/
|
*/
|
||||||
protected $orderdetails;
|
protected $orderdetails;
|
||||||
|
|
||||||
|
|
|
@ -344,7 +344,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
|
||||||
public function setSupplierProductUrl(string $new_url): self
|
public function setSupplierProductUrl(string $new_url): self
|
||||||
{
|
{
|
||||||
//Only change the internal URL if it is not the auto generated one
|
//Only change the internal URL if it is not the auto generated one
|
||||||
if ($new_url === $this->supplier->getAutoProductUrl($this->getSupplierPartNr())) {
|
if ($this->supplier && $new_url === $this->supplier->getAutoProductUrl($this->getSupplierPartNr())) {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue