feat : ajout de colonne pour les Supplier, Address et modification du numéro de réception
This commit is contained in:
@@ -42,6 +42,10 @@ class Address
|
|||||||
#[Groups(['address:read', 'supplier:read', 'reception:read'])]
|
#[Groups(['address:read', 'supplier:read', 'reception:read'])]
|
||||||
private string $street = '';
|
private string $street = '';
|
||||||
|
|
||||||
|
#[ORM\Column(name: 'street2', length: 180, nullable: true)]
|
||||||
|
#[Groups(['address:read', 'supplier:read', 'reception:read'])]
|
||||||
|
private ?string $street2 = null;
|
||||||
|
|
||||||
#[ORM\Column(name: 'postal_code', length: 20)]
|
#[ORM\Column(name: 'postal_code', length: 20)]
|
||||||
#[Groups(['address:read', 'supplier:read', 'reception:read'])]
|
#[Groups(['address:read', 'supplier:read', 'reception:read'])]
|
||||||
private string $postalCode = '';
|
private string $postalCode = '';
|
||||||
@@ -94,6 +98,18 @@ class Address
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getStreet2(): ?string
|
||||||
|
{
|
||||||
|
return $this->street2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setStreet2(?string $street2): self
|
||||||
|
{
|
||||||
|
$this->street2 = $street2;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function getPostalCode(): string
|
public function getPostalCode(): string
|
||||||
{
|
{
|
||||||
return $this->postalCode;
|
return $this->postalCode;
|
||||||
@@ -135,8 +151,8 @@ class Address
|
|||||||
{
|
{
|
||||||
$parts = array_filter([
|
$parts = array_filter([
|
||||||
$this->street,
|
$this->street,
|
||||||
|
$this->street2,
|
||||||
trim(sprintf('%s %s', $this->postalCode, $this->city)),
|
trim(sprintf('%s %s', $this->postalCode, $this->city)),
|
||||||
$this->countryCode,
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return implode(', ', $parts);
|
return implode(', ', $parts);
|
||||||
|
|||||||
@@ -455,7 +455,7 @@ class Reception
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$number = sprintf('N-BR-%04d', $this->id);
|
$number = sprintf('P-BR-%04d', $this->id);
|
||||||
$this->identificationNumber = $number;
|
$this->identificationNumber = $number;
|
||||||
|
|
||||||
$args->getObjectManager()
|
$args->getObjectManager()
|
||||||
|
|||||||
@@ -39,6 +39,14 @@ class Supplier
|
|||||||
#[Groups(['supplier:read', 'reception:read'])]
|
#[Groups(['supplier:read', 'reception:read'])]
|
||||||
private string $name = '';
|
private string $name = '';
|
||||||
|
|
||||||
|
#[ORM\Column(length: 180, nullable: true)]
|
||||||
|
#[Groups(['supplier:read', 'reception:read'])]
|
||||||
|
private ?string $email = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 40, nullable: true)]
|
||||||
|
#[Groups(['supplier:read', 'reception:read'])]
|
||||||
|
private ?string $phone = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Collection<int, Address>
|
* @var Collection<int, Address>
|
||||||
*/
|
*/
|
||||||
@@ -70,6 +78,30 @@ class Supplier
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getEmail(): ?string
|
||||||
|
{
|
||||||
|
return $this->email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setEmail(?string $email): self
|
||||||
|
{
|
||||||
|
$this->email = $email;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPhone(): ?string
|
||||||
|
{
|
||||||
|
return $this->phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPhone(?string $phone): self
|
||||||
|
{
|
||||||
|
$this->phone = $phone;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Collection<int, Address>
|
* @return Collection<int, Address>
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user