<?php
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\CommandeAchatRepository;
#[ORM\Entity(repositoryClass: CommandeAchatRepository::class)]
#[ORM\Table(name: 'CommandeAchat')]
class CommandeAchat
{
public const STATUT_BROUILLON = 'brouillon';
public const STATUT_VALIDE = 'valide';
public const STATUT_ANNULE = 'annule';
public const STATUT_PARTIEL = 'partiel';
public const STATUT_TERMINE = 'termine';
public const STATUT_REJETE = 'rejeté';
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(name: 'id', type: Types::INTEGER)]
private ?int $id = null;
#[ORM\ManyToOne(targetEntity: ContratCadre::class, inversedBy: 'bonsDeCommande')]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
private ?ContratCadre $contratCadre = null;
#[ORM\ManyToOne(targetEntity: demAchat::class)]
#[ORM\JoinColumn(nullable: false)]
private ?demAchat $achat = null;
#[ORM\ManyToOne(targetEntity: Fournisseur::class)]
private ?Fournisseur $fournisseur = null;
#[ORM\Column(name: 'article', type: Types::STRING, length: 20, nullable: true)]
private ?string $article = null;
#[ORM\Column(name: 'description', type: Types::STRING, length: 20, nullable: true)]
private ?string $description = null;
#[ORM\Column(name: 'quantite', type: Types::INTEGER, nullable: true)]
private ?int $quantite = null;
#[ORM\Column(name: 'prixU', type: Types::FLOAT, nullable: true)]
private ?float $prixU = null;
#[ORM\Column(name: 'numCA', type: Types::INTEGER)]
private ?int $numCA = null;
#[ORM\Column(name: 'dateCA', type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $dateCA = null;
#[ORM\Column(name: 'adresseV', type: Types::STRING, length: 255, nullable: true)]
private ?string $adresseV = null;
#[ORM\Column(name: 'telV', type: Types::STRING, length: 20, nullable: true)]
private ?string $telV = null;
#[ORM\Column(name: 'remarque', type: Types::STRING, length: 255, nullable: true)]
private ?string $remarque = null;
#[ORM\Column(name: 'taxe', type: Types::INTEGER, nullable: true)]
private ?int $taxe = null;
#[ORM\Column(name: 'arretSomme', type: Types::STRING, length: 255, nullable: true)]
private ?string $arretSomme = null;
#[ORM\Column(name: 'signePrepare', type: Types::INTEGER, nullable: true)]
private ?int $signePrepare = null;
#[ORM\Column(name: 'signeVerifie', type: Types::INTEGER, nullable: true)]
private ?int $signeVerifie = null;
#[ORM\Column(name: 'signeValide', type: Types::INTEGER, nullable: true)]
private ?int $signeValide = null;
#[ORM\Column(name: 'signeApprouve', type: Types::INTEGER, nullable: true)]
private ?int $signeApprouve = null;
#[ORM\Column(name: 'drapoPrepare', type: Types::BOOLEAN)]
private ?bool $drapoPrepare = false;
#[ORM\Column(name: 'drapoVerifie', type: Types::BOOLEAN)]
private ?bool $drapoVerifie = false;
#[ORM\Column(name: 'drapoValideDaf', type: Types::BOOLEAN)]
private ?bool $drapoValideDaf = false;
#[ORM\Column(name: 'drapoApprouve', type: Types::BOOLEAN)]
private ?bool $drapoApprouve = false;
#[ORM\Column(name: 'drapoVerifieRejet', type: Types::BOOLEAN)]
private ?bool $drapoVerifieRejet = false;
#[ORM\Column(name: 'drapoValideDafRejet', type: Types::BOOLEAN)]
private ?bool $drapoValideDafRejet = false;
#[ORM\Column(name: 'drapoApprouveRejet', type: Types::BOOLEAN)]
private ?bool $drapoApprouveRejet = false;
#[ORM\Column(name: 'datePrepare', type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $datePrepare = null;
#[ORM\Column(name: 'dateVerifie', type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateVerifie = null;
#[ORM\Column(name: 'dateApprouve', type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateApprouve = null;
#[ORM\Column(name: 'dateValide', type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateValide = null;
#[ORM\Column(name: 'drapoRecu', type: Types::BOOLEAN)]
private ?bool $drapoRecu = false;
#[ORM\Column(name: 'category', type: Types::INTEGER, nullable: true)]
private ?int $category = null;
#[ORM\Column(name: 'nomApprouvDaf', type: Types::STRING, length: 255, nullable: true)]
private ?string $nomApprouvDaf = null;
#[ORM\Column(name: 'nomApprouvRR', type: Types::STRING, length: 255, nullable: true)]
private ?string $nomApprouvRR = null;
#[ORM\Column(name: 'posteApprouvDaf', type: Types::STRING, length: 255, nullable: true)]
private ?string $posteApprouvDaf = null;
#[ORM\Column(name: 'posteApprouvRR', type: Types::STRING, length: 255, nullable: true)]
private ?string $posteApprouvRR = null;
#[ORM\Column(name: 'drapoTraite', type: Types::BOOLEAN)]
private ?bool $drapoTraite = false;
#[ORM\Column(name: 'drapoRejete', type: Types::BOOLEAN)]
private ?bool $drapoRejete = false;
#[ORM\Column(name: 'drapoCumul', type: Types::BOOLEAN)]
private ?bool $drapoCumul = false;
#[ORM\Column(name: 'remise', type: Types::INTEGER, nullable: true)]
private ?int $remise = null;
#[ORM\Column(name: 'quantRecuRes', type: Types::INTEGER, nullable: true)]
private ?int $quantRecuRes = null;
#[ORM\Column(name: 'delaisFour', type: Types::STRING, length: 20, nullable: true)]
private ?string $delaisFour = null;
#[ORM\Column(name: 'numPai', type: Types::STRING, length: 20, nullable: true)]
private ?string $numPai = null;
#[ORM\Column(name: 'totalHTTTC', type: Types::STRING, length: 20, nullable: true)]
private ?string $totalHTTTC = null;
#[ORM\Column(name: 'autreTax', type: Types::INTEGER, nullable: true)]
private ?int $autreTax = null;
#[ORM\Column(name: 'signeDAF', type: Types::STRING, length: 50, nullable: true)]
private ?string $signeDAF = null;
#[ORM\Column(name: 'signeRR', type: Types::STRING, length: 50, nullable: true)]
private ?string $signeRR = null;
#[ORM\Column(name: 'detail', type: Types::STRING, length: 255, nullable: true)]
private ?string $detail = null;
#[ORM\Column(name: 'montantImputeContrat', type: Types::FLOAT, nullable: true)]
private ?float $montantImputeContrat = null;
#[ORM\Column(length: 20)]
private ?string $statut = self::STATUT_BROUILLON;
#[ORM\Column(name: 'statutReception',length: 20)]
private ?string $statutReception = null;
#[ORM\Column(type: 'boolean')]
private bool $drapoMasque = false;
#[ORM\Column(name: 'quantite_groupee', type: Types::INTEGER, nullable: true)]
private ?int $quantiteGroupee = null;
#[ORM\Column(name: 'drapoReceptionTerminer')]
private ?bool $drapoReceptionTerminer = false;
#[ORM\Column(name: 'drapo_valide')]
private ?bool $drapoValide = false;
#[ORM\Column(name: 'drapo_depuis_cotation')]
private ?bool $drapoDepuisCotation = false;
#[ORM\Column(name: 'drapo_etat')]
private ?bool $drapoEtat = false;
public function __construct()
{
$this->dateCA = new \DateTime();
$this->drapoVerifie = false;
$this->drapoCumul = false;
$this->drapoPrepare = false;
$this->drapoApprouve = false;
$this->taxe = 0;
$this->drapoRecu = false;
$this->drapoTraite = false;
$this->drapoRejete = false;
}
public function getId(): ?int
{
return $this->id;
}
public function getAchat(): ?demAchat
{
return $this->achat;
}
public function setAchat(?demAchat $achat): static
{
$this->achat = $achat;
return $this;
}
public function getFournisseur(): ?Fournisseur
{
return $this->fournisseur;
}
public function setFournisseur(?Fournisseur $fournisseur): static
{
$this->fournisseur = $fournisseur;
return $this;
}
public function getArticle(): ?string
{
return $this->article;
}
public function setArticle(?string $article): static
{
$this->article = $article;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): static
{
$this->description = $description;
return $this;
}
public function getQuantite(): ?int
{
return $this->quantite;
}
public function setQuantite(?int $quantite): static
{
$this->quantite = $quantite;
return $this;
}
public function getPrixU(): ?float
{
return $this->prixU;
}
public function setPrixU(?float $prixU): static
{
$this->prixU = $prixU;
return $this;
}
public function getNumCA(): ?int
{
return $this->numCA;
}
public function setNumCA(?int $numCA): static
{
$this->numCA = $numCA;
return $this;
}
public function getDateCA(): ?\DateTimeInterface
{
return $this->dateCA;
}
public function setDateCA(\DateTimeInterface $dateCA): static
{
$this->dateCA = $dateCA;
return $this;
}
public function getAdresseV(): ?string
{
return $this->adresseV;
}
public function setAdresseV(?string $adresseV): static
{
$this->adresseV = $adresseV;
return $this;
}
public function getTelV(): ?string
{
return $this->telV;
}
public function setTelV(?string $telV): static
{
$this->telV = $telV;
return $this;
}
public function getRemarque(): ?string
{
return $this->remarque;
}
public function setRemarque(?string $remarque): static
{
$this->remarque = $remarque;
return $this;
}
public function getArretSomme(): ?string
{
return $this->arretSomme;
}
public function setArretSomme(?string $arretSomme): static
{
$this->arretSomme = $arretSomme;
return $this;
}
public function getSignePrepare(): ?int
{
return $this->signePrepare;
}
public function setSignePrepare(?int $signePrepare): static
{
$this->signePrepare = $signePrepare;
return $this;
}
public function getSigneVerifie(): ?int
{
return $this->signeVerifie;
}
public function setSigneVerifie(?int $signeVerifie): static
{
$this->signeVerifie = $signeVerifie;
return $this;
}
public function getTaxe(): ?int
{
return $this->taxe;
}
public function setTaxe(?int $taxe): static
{
$this->taxe = $taxe;
return $this;
}
public function getSigneApprouve(): ?int
{
return $this->signeApprouve;
}
public function setSigneApprouve(?int $signeApprouve): static
{
$this->signeApprouve = $signeApprouve;
return $this;
}
public function getDrapoPrepare(): ?bool
{
return $this->drapoPrepare;
}
public function setDrapoPrepare(bool $drapoPrepare): static
{
$this->drapoPrepare = $drapoPrepare;
return $this;
}
public function getDrapoVerifie(): ?bool
{
return $this->drapoVerifie;
}
public function setDrapoVerifie(bool $drapoVerifie): static
{
$this->drapoVerifie = $drapoVerifie;
return $this;
}
public function getDrapoApprouve(): ?bool
{
return $this->drapoApprouve;
}
public function setDrapoApprouve(bool $drapoApprouve): static
{
$this->drapoApprouve = $drapoApprouve;
return $this;
}
public function getDatePrepare(): ?\DateTimeInterface
{
return $this->datePrepare;
}
public function setDatePrepare(?\DateTimeInterface $datePrepare): static
{
$this->datePrepare = $datePrepare;
return $this;
}
public function getDateVerifie(): ?\DateTimeInterface
{
return $this->dateVerifie;
}
public function setDateVerifie(?\DateTimeInterface $dateVerifie): static
{
$this->dateVerifie = $dateVerifie;
return $this;
}
public function getDateApprouve(): ?\DateTimeInterface
{
return $this->dateApprouve;
}
public function setDateApprouve(?\DateTimeInterface $dateApprouve): static
{
$this->dateApprouve = $dateApprouve;
return $this;
}
public function getDrapoRecu(): ?bool
{
return $this->drapoRecu;
}
public function setDrapoRecu(bool $drapoRecu): static
{
$this->drapoRecu = $drapoRecu;
return $this;
}
public function getCategory(): ?int
{
return $this->category;
}
public function setCategory(?int $category): static
{
$this->category = $category;
return $this;
}
public function getNomApprouvDaf(): ?string
{
return $this->nomApprouvDaf;
}
public function setNomApprouvDaf(?string $nomApprouvDaf): static
{
$this->nomApprouvDaf = $nomApprouvDaf;
return $this;
}
public function getNomApprouvRR(): ?string
{
return $this->nomApprouvRR;
}
public function setNomApprouvRR(?string $nomApprouvRR): static
{
$this->nomApprouvRR = $nomApprouvRR;
return $this;
}
public function getPosteApprouvDaf(): ?string
{
return $this->posteApprouvDaf;
}
public function setPosteApprouvDaf(?string $posteApprouvDaf): static
{
$this->posteApprouvDaf = $posteApprouvDaf;
return $this;
}
public function getPosteApprouvRR(): ?string
{
return $this->posteApprouvRR;
}
public function setPosteApprouvRR(?string $posteApprouvRR): static
{
$this->posteApprouvRR = $posteApprouvRR;
return $this;
}
public function getDrapoTraite(): ?bool
{
return $this->drapoTraite;
}
public function setDrapoTraite(bool $drapoTraite): static
{
$this->drapoTraite = $drapoTraite;
return $this;
}
public function getDrapoRejete(): ?bool
{
return $this->drapoRejete;
}
public function setDrapoRejete(bool $drapoRejete): static
{
$this->drapoRejete = $drapoRejete;
return $this;
}
public function getDrapoCumul(): ?bool
{
return $this->drapoCumul;
}
public function setDrapoCumul(bool $drapoCumul): static
{
$this->drapoCumul = $drapoCumul;
return $this;
}
public function getRemise(): ?int
{
return $this->remise;
}
public function setRemise(?int $remise): static
{
$this->remise = $remise;
return $this;
}
public function getQuantRecuRes(): ?int
{
return $this->quantRecuRes;
}
public function setQuantRecuRes(?int $quantRecuRes): static
{
$this->quantRecuRes = $quantRecuRes;
return $this;
}
public function getDelaisFour(): ?string
{
return $this->delaisFour;
}
public function setDelaisFour(?string $delaisFour): static
{
$this->delaisFour = $delaisFour;
return $this;
}
public function getNumPai(): ?string
{
return $this->numPai;
}
public function setNumPai(?string $numPai): static
{
$this->numPai = $numPai;
return $this;
}
public function getTotalHTTTC(): ?string
{
return $this->totalHTTTC;
}
public function setTotalHTTTC(?string $totalHTTTC): static
{
$this->totalHTTTC = $totalHTTTC;
return $this;
}
public function getAutreTax(): ?int
{
return $this->autreTax;
}
public function setAutreTax(?int $autreTax): static
{
$this->autreTax = $autreTax;
return $this;
}
public function getSigneDAF(): ?string
{
return $this->signeDAF;
}
public function setSigneDAF(?string $signeDAF): static
{
$this->signeDAF = $signeDAF;
return $this;
}
public function getSigneRR(): ?string
{
return $this->signeRR;
}
public function setSigneRR(?string $signeRR): static
{
$this->signeRR = $signeRR;
return $this;
}
// Getters et setters pour les propriétés non mappées (privées)
public function getListnum10()
{
return $this->listnum10;
}
public function setListnum10($listnum10): static
{
$this->listnum10 = $listnum10;
return $this;
}
public function getListnum11()
{
return $this->listnum11;
}
public function setListnum11($listnum11): static
{
$this->listnum11 = $listnum11;
return $this;
}
public function getListnum12()
{
return $this->listnum12;
}
public function setListnum12($listnum12): static
{
$this->listnum12 = $listnum12;
return $this;
}
public function getListnum13()
{
return $this->listnum13;
}
public function setListnum13($listnum13): static
{
$this->listnum13 = $listnum13;
return $this;
}
public function getListnum14()
{
return $this->listnum14;
}
public function setListnum14($listnum14): static
{
$this->listnum14 = $listnum14;
return $this;
}
public function getListnum15()
{
return $this->listnum15;
}
public function setListnum15($listnum15): static
{
$this->listnum15 = $listnum15;
return $this;
}
public function getFour()
{
return $this->four;
}
public function setFour($four): static
{
$this->four = $four;
return $this;
}
public function getDetail(): ?string
{
return $this->detail;
}
public function setDetail(?string $detail): static
{
$this->detail = $detail;
return $this;
}
public function getContratCadre(): ?ContratCadre
{
return $this->contratCadre;
}
public function setContratCadre(?ContratCadre $contratCadre): self
{
$this->contratCadre = $contratCadre;
return $this;
}
public function getMontantImputeContrat(): ?float
{
return $this->montantImputeContrat;
}
public function setMontantImputeContrat(?float $montantImputeContrat): static
{
$this->montantImputeContrat = $montantImputeContrat;
return $this;
}
public function getStatut(): ?string
{
return $this->statut;
}
public function setStatut(string $statut): self
{
$this->statut = $statut;
return $this;
}
public function getDrapoValide(): ?bool
{
return $this->drapoValide;
}
public function setDrapoValide(bool $drapoValide): static
{
$this->drapoValide = $drapoValide;
return $this;
}
public function getDrapoMasque(): ?bool
{
return $this->drapoMasque;
}
public function setDrapoMasque(bool $drapoMasque): static
{
$this->drapoMasque = $drapoMasque;
return $this;
}
public function getQuantiteGroupee(): ?int
{
return $this->quantiteGroupee;
}
public function setQuantiteGroupee(?int $quantiteGroupee): static
{
$this->quantiteGroupee = $quantiteGroupee;
return $this;
}
public function getSigneValide(): ?int
{
return $this->signeValide;
}
public function setSigneValide(?int $signeValide): self
{
$this->signeValide = $signeValide;
return $this;
}
public function getDrapoValideDaf(): ?bool
{
return $this->drapoValideDaf;
}
public function setDrapoValideDaf(bool $drapoValideDaf): self
{
$this->drapoValideDaf = $drapoValideDaf;
return $this;
}
public function getDateValide(): ?\DateTimeInterface
{
return $this->dateValide;
}
public function setDateValide(?\DateTimeInterface $dateValide): self
{
$this->dateValide = $dateValide;
return $this;
}
public function getDrapoValideDafRejet(): ?bool
{
return $this->drapoValideDafRejet;
}
public function setDrapoValideDafRejet(bool $drapoValideDafRejet): self
{
$this->drapoValideDafRejet = $drapoValideDafRejet;
return $this;
}
public function getDrapoVerifieRejet(): ?bool
{
return $this->drapoVerifieRejet;
}
public function setDrapoVerifieRejet(bool $drapoVerifieRejet): self
{
$this->drapoVerifieRejet = $drapoVerifieRejet;
return $this;
}
public function getDrapoApprouveRejet(): ?bool
{
return $this->drapoApprouveRejet;
}
public function setDrapoApprouveRejet(bool $drapoApprouveRejet): self
{
$this->drapoApprouveRejet = $drapoApprouveRejet;
return $this;
}
public function getStatutReception(): ?string
{
return $this->statutReception;
}
public function setStatutReception(string $statutReception): self
{
$this->statutReception = $statutReception;
return $this;
}
public function getDrapoReceptionTerminer(): ?bool
{
return $this->drapoReceptionTerminer;
}
public function setDrapoReceptionTerminer(bool $drapoReceptionTerminer): self
{
$this->drapoReceptionTerminer = $drapoReceptionTerminer;
return $this;
}
public function getDrapoDepuisCotation(): bool
{
return $this->drapoDepuisCotation;
}
public function setDrapoDepuisCotation(bool $drapoDepuisCotation): self
{
$this->drapoDepuisCotation = $drapoDepuisCotation;
return $this;
}
public function getDrapoEtat(): bool
{
return $this->drapoEtat;
}
public function setDrapoEtat(bool $drapoEtat): self
{
$this->drapoEtat = $drapoEtat;
return $this;
}
}