Disallow orderdetails without supplier info.

Fixes issue #116
This commit is contained in:
Jan Böhmer 2022-07-23 21:41:54 +02:00
parent 082cd16486
commit 2ac45fd869
2 changed files with 7 additions and 0 deletions

View file

@ -113,6 +113,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
* @var Supplier
* @ORM\ManyToOne(targetEntity="App\Entity\Parts\Supplier", inversedBy="orderdetails")
* @ORM\JoinColumn(name="id_supplier", referencedColumnName="id")
* @Assert\NotNull(message="validator.orderdetail.supplier_must_not_be_null")
*/
protected $supplier;

View file

@ -221,5 +221,11 @@
<target>You must select an attachment type!</target>
</segment>
</unit>
<unit id="cDDVrWT" name="validator.orderdetail.supplier_must_not_be_null">
<segment>
<source>validator.orderdetail.supplier_must_not_be_null</source>
<target>You must select an supplier!</target>
</segment>
</unit>
</file>
</xliff>