<?php
namespace App\Entity;
use App\Repository\GestiondestockRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: GestiondestockRepository::class)]
class Gestiondestock
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $num = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $date = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totaleqte = null;
#[ORM\OneToMany(targetEntity: Articlegestion::class, mappedBy: 'gestiondestock', cascade: ["remove", "persist"])]
private Collection $articlegestions;
#[ORM\ManyToOne(inversedBy: 'gestiondestocks')]
private ?Produits $produit = null;
#[ORM\Column(nullable: true)]
private ?bool $IsArchive = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $societe = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totaletva = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totalettc = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totaleht = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $titer = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $image = null;
#[ORM\OneToMany(targetEntity: Articlefichetechnique::class, mappedBy: 'gestiondestock')]
private Collection $articlefichetechniques;
#[ORM\Column(length: 255, nullable: true)]
private ?string $typeClient = null;
#[ORM\OneToMany(targetEntity: BonDeLivraison::class, mappedBy: 'gestiondestock')]
private Collection $bonDeLivraisons;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prixhtvente = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $tva = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prixttcvente = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totalstock = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totalerouleaux = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nbroleaux = null;
public function __toString(): string
{
return (string) $this->id; // Ou une autre valeur unique
}
public function __construct()
{
$this->articlegestions = new ArrayCollection();
$this->articlefichetechniques = new ArrayCollection();
$this->bonDeLivraisons = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNum(): ?string
{
return $this->num;
}
public function setNum(?string $num): static
{
$this->num = $num;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): static
{
$this->date = $date;
return $this;
}
public function getTotaleqte(): ?string
{
return $this->totaleqte;
}
public function setTotaleqte(?string $totaleqte): static
{
$this->totaleqte = $totaleqte;
return $this;
}
/**
* @return Collection<int, Articlegestion>
*/
public function getArticlegestions(): Collection
{
return $this->articlegestions;
}
public function addArticlegestion(Articlegestion $articlegestion): static
{
if (!$this->articlegestions->contains($articlegestion)) {
$this->articlegestions->add($articlegestion);
$articlegestion->setGestiondestock($this);
}
return $this;
}
public function removeArticlegestion(Articlegestion $articlegestion): static
{
if ($this->articlegestions->removeElement($articlegestion)) {
// set the owning side to null (unless already changed)
if ($articlegestion->getGestiondestock() === $this) {
$articlegestion->setGestiondestock(null);
}
}
return $this;
}
public function getProduit(): ?Produits
{
return $this->produit;
}
public function setProduit(?Produits $produit): static
{
$this->produit = $produit;
return $this;
}
public function isIsArchive(): ?bool
{
return $this->IsArchive;
}
public function setIsArchive(bool $IsArchive): static
{
$this->IsArchive = $IsArchive;
return $this;
}
public function getSociete(): ?string
{
return $this->societe;
}
public function setSociete(?string $societe): static
{
$this->societe = $societe;
return $this;
}
public function getTotaletva(): ?string
{
return $this->totaletva;
}
public function setTotaletva(?string $totaletva): static
{
$this->totaletva = $totaletva;
return $this;
}
public function getTotalettc(): ?string
{
return $this->totalettc;
}
public function setTotalettc(?string $totalettc): static
{
$this->totalettc = $totalettc;
return $this;
}
public function getTotaleht(): ?string
{
return $this->totaleht;
}
public function setTotaleht(?string $totaleht): static
{
$this->totaleht = $totaleht;
return $this;
}
public function getTiter(): ?string
{
return $this->titer;
}
public function setTiter(?string $titer): static
{
$this->titer = $titer;
return $this;
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage(?string $image): static
{
$this->image = $image;
return $this;
}
/**
* @return Collection<int, Articlefichetechnique>
*/
public function getArticlefichetechniques(): Collection
{
return $this->articlefichetechniques;
}
public function addArticlefichetechnique(Articlefichetechnique $articlefichetechnique): static
{
if (!$this->articlefichetechniques->contains($articlefichetechnique)) {
$this->articlefichetechniques->add($articlefichetechnique);
$articlefichetechnique->setGestiondestock($this);
}
return $this;
}
public function removeArticlefichetechnique(Articlefichetechnique $articlefichetechnique): static
{
if ($this->articlefichetechniques->removeElement($articlefichetechnique)) {
// set the owning side to null (unless already changed)
if ($articlefichetechnique->getGestiondestock() === $this) {
$articlefichetechnique->setGestiondestock(null);
}
}
return $this;
}
public function getTypeClient(): ?string
{
return $this->typeClient;
}
public function setTypeClient(?string $typeClient): static
{
$this->typeClient = $typeClient;
return $this;
}
/**
* @return Collection<int, BonDeLivraison>
*/
public function getBonDeLivraisons(): Collection
{
return $this->bonDeLivraisons;
}
public function addBonDeLivraison(BonDeLivraison $bonDeLivraison): static
{
if (!$this->bonDeLivraisons->contains($bonDeLivraison)) {
$this->bonDeLivraisons->add($bonDeLivraison);
$bonDeLivraison->setGestiondestock($this);
}
return $this;
}
public function removeBonDeLivraison(BonDeLivraison $bonDeLivraison): static
{
if ($this->bonDeLivraisons->removeElement($bonDeLivraison)) {
// set the owning side to null (unless already changed)
if ($bonDeLivraison->getGestiondestock() === $this) {
$bonDeLivraison->setGestiondestock(null);
}
}
return $this;
}
public function getPrixhtvente(): ?string
{
return $this->prixhtvente;
}
public function setPrixhtvente(?string $prixhtvente): static
{
$this->prixhtvente = $prixhtvente;
return $this;
}
public function getTva(): ?string
{
return $this->tva;
}
public function setTva(?string $tva): static
{
$this->tva = $tva;
return $this;
}
public function getPrixttcvente(): ?string
{
return $this->prixttcvente;
}
public function setPrixttcvente(?string $prixttcvente): static
{
$this->prixttcvente = $prixttcvente;
return $this;
}
public function getTotalstock(): ?string
{
return $this->totalstock;
}
public function setTotalstock(?string $totalstock): static
{
$this->totalstock = $totalstock;
return $this;
}
public function getTotalerouleaux(): ?string
{
return $this->totalerouleaux;
}
public function setTotalerouleaux(?string $totalerouleaux): static
{
$this->totalerouleaux = $totalerouleaux;
return $this;
}
public function getNbroleaux(): ?string
{
return $this->nbroleaux;
}
public function setNbroleaux(?string $nbroleaux): static
{
$this->nbroleaux = $nbroleaux;
return $this;
}
}