src/Entity/Devis.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DevisRepository;
  4. use DateTimeInterface;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassDevisRepository::class)]
  10. class Devis
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $vendeur null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $adresse null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $telphvendeur1 null;
  22.     #[ORM\Column(length255nullabletrue)]
  23.     private ?string $telphvendeur2 null;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     private ?string $rc null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $mf null;
  28.     #[ORM\Column(length255nullabletrue)]
  29.     private ?string $nomclient null;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?string $adresseclient null;
  32.     #[ORM\Column(length255nullabletrue)]
  33.     private ?string $telphclient null;
  34.     #[ORM\Column(length255nullabletrue)]
  35.     private ?string $faxclient null;
  36.     #[ORM\Column(length255nullabletrue)]
  37.     private ?string $mfclient null;
  38.     #[ORM\Column(length255nullabletrue)]
  39.     private ?string $num null;
  40.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  41.     private ?DateTimeInterface $date null;
  42.     #[ORM\Column(length255nullabletrue)]
  43.     private ?string $reference null;
  44.     #[ORM\Column(length255nullabletrue)]
  45.     private ?string $code null;
  46.     #[ORM\Column(length255nullabletrue)]
  47.     private ?string $base null;
  48.     #[ORM\Column(length255nullabletrue)]
  49.     private ?string $taux null;
  50.     #[ORM\Column(length255nullabletrue)]
  51.     private ?string $montant null;
  52.     #[ORM\Column(length255nullabletrue)]
  53.     private ?string $total null;
  54.     #[ORM\Column(length255nullabletrue)]
  55.     private ?string $totalht null;
  56.     #[ORM\Column(length255nullabletrue)]
  57.     private ?string $qttotal null;
  58.     #[ORM\Column(length255nullabletrue)]
  59.     private ?string $totalttc null;
  60.     #[ORM\Column(typeTypes::DECIMALprecision15scale3nullabletrue)]
  61.     private ?string $montantNet null;
  62.     #[ORM\OneToMany(mappedBy'devis'targetEntityProduit::class, cascade: ["remove""persist"])]
  63.     private Collection $produit;
  64.     #[ORM\Column(length255nullabletrue)]
  65.     private ?string $statut null;
  66.     #[ORM\ManyToOne(inversedBy'devis')]
  67.     private ?Vendeur $vendeurs null;
  68.     #[ORM\ManyToOne(inversedBy'devis')]
  69.     private ?Client $client null;
  70.     #[ORM\OneToMany(mappedBy'devis'targetEntityPaymentdevi::class, cascade: ["remove""persist"])]
  71.     private Collection $paymentdevis;
  72.     #[ORM\Column(length255nullabletrue)]
  73.     private ?string $timbre null;
  74.     #[ORM\Column(length255nullabletrue)]
  75.     private ?string $idfacture null;
  76.     #[ORM\Column(length255nullabletrue)]
  77.     private ?string $oldtype null;
  78.     #[ORM\Column(typeTypes::ARRAY, nullabletrue)]
  79.     private ?array $retour null;
  80.     #[ORM\Column(length255nullabletrue)]
  81.     private ?string $frtour null;
  82.     #[ORM\Column(length255nullabletrue)]
  83.     private ?string $fav null;
  84.     #[ORM\OneToMany(mappedBy'devis'targetEntityIntervention::class, cascade: ['persist'])]
  85.     private Collection $intervention;
  86.     #[ORM\ManyToOne(inversedBy'devis')]
  87.     private ?User $user null;
  88.     #[ORM\Column(nullabletrue)]
  89.     private ?bool $lu null;
  90.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  91.     private ?DateTimeInterface $datecreation null;
  92.     #[ORM\Column(length255nullabletrue)]
  93.     private ?string $demandedevisold null;
  94.     #[ORM\Column(length255nullabletrue)]
  95.     private ?string $iddevisold null;
  96.     #[ORM\OneToMany(mappedBy'devis'targetEntityHistoriqueintervention::class, cascade: ["remove""persist"])]
  97.     private Collection $historiqueinterventions;
  98.     #[ORM\Column(length255nullabletrue)]
  99.     private ?string $iduerold null;
  100.     #[ORM\Column(length255nullabletrue)]
  101.     private ?string $idintervold null;
  102.     #[ORM\Column(length255nullabletrue)]
  103.     private ?string $username null;
  104.     #[ORM\Column(length255nullabletrue)]
  105.     private ?string $adressp null;
  106.     #[ORM\Column(length255nullabletrue)]
  107.     private ?string $telpp null;
  108.     #[ORM\ManyToOne(inversedBy'devis')]
  109.     private ?Fournisseur $fournisseur null;
  110.     #[ORM\OneToMany(mappedBy'fichevente'targetEntityArchivearticle::class)]
  111.     private Collection $archivearticles;
  112.     #[ORM\Column(length255nullabletrue)]
  113.     private ?string $idsfacts null;
  114.     public function __toString()
  115.     {
  116.         // Retourne l'ID du Devis comme chaîne de caractères
  117.         // Vous pouvez remplacer cela par n'importe quel autre champ significatif
  118.         return strval($this->id);
  119.     }
  120.     public function __construct()
  121.     {
  122.         $this->produit = new ArrayCollection();
  123.         $this->paymentdevis = new ArrayCollection();
  124.         $this->intervention = new ArrayCollection();
  125.         $this->historiqueinterventions = new ArrayCollection();
  126.         $this->archivearticles = new ArrayCollection();
  127.     }
  128.     /**
  129.      * @return string|null
  130.      */
  131.     public function getIdfacture(): ?string
  132.     {
  133.         return $this->idfacture;
  134.     }
  135.     /**
  136.      * @param string|null $idfacture
  137.      */
  138.     public function setIdfacture(?string $idfacture): void
  139.     {
  140.         $this->idfacture $idfacture;
  141.     }
  142.     public function getId(): ?int
  143.     {
  144.         return $this->id;
  145.     }
  146.     public function getVendeur(): ?string
  147.     {
  148.         return $this->vendeur;
  149.     }
  150.     public function setVendeur(?string $vendeur): self
  151.     {
  152.         $this->vendeur $vendeur;
  153.         return $this;
  154.     }
  155.     public function getAdresse(): ?string
  156.     {
  157.         return $this->adresse;
  158.     }
  159.     public function setAdresse(?string $adresse): self
  160.     {
  161.         $this->adresse $adresse;
  162.         return $this;
  163.     }
  164.     public function getTelphvendeur1(): ?string
  165.     {
  166.         return $this->telphvendeur1;
  167.     }
  168.     public function setTelphvendeur1(?string $telphvendeur1): self
  169.     {
  170.         $this->telphvendeur1 $telphvendeur1;
  171.         return $this;
  172.     }
  173.     public function getTelphvendeur2(): ?string
  174.     {
  175.         return $this->telphvendeur2;
  176.     }
  177.     public function setTelphvendeur2(?string $telphvendeur2): self
  178.     {
  179.         $this->telphvendeur2 $telphvendeur2;
  180.         return $this;
  181.     }
  182.     public function getRc(): ?string
  183.     {
  184.         return $this->rc;
  185.     }
  186.     public function setRc(?string $rc): self
  187.     {
  188.         $this->rc $rc;
  189.         return $this;
  190.     }
  191.     public function getMf(): ?string
  192.     {
  193.         return $this->mf;
  194.     }
  195.     public function setMf(?string $mf): self
  196.     {
  197.         $this->mf $mf;
  198.         return $this;
  199.     }
  200.     public function getNomclient(): ?string
  201.     {
  202.         return $this->nomclient;
  203.     }
  204.     public function setNomclient(?string $nomclient): self
  205.     {
  206.         $this->nomclient $nomclient;
  207.         return $this;
  208.     }
  209.     public function getAdresseclient(): ?string
  210.     {
  211.         return $this->adresseclient;
  212.     }
  213.     public function setAdresseclient(?string $adresseclient): self
  214.     {
  215.         $this->adresseclient $adresseclient;
  216.         return $this;
  217.     }
  218.     public function getTelphclient(): ?string
  219.     {
  220.         return $this->telphclient;
  221.     }
  222.     public function setTelphclient(?string $telphclient): self
  223.     {
  224.         $this->telphclient $telphclient;
  225.         return $this;
  226.     }
  227.     public function getFaxclient(): ?string
  228.     {
  229.         return $this->faxclient;
  230.     }
  231.     public function setFaxclient(?string $faxclient): self
  232.     {
  233.         $this->faxclient $faxclient;
  234.         return $this;
  235.     }
  236.     public function getMfclient(): ?string
  237.     {
  238.         return $this->mfclient;
  239.     }
  240.     public function setMfclient(?string $mfclient): self
  241.     {
  242.         $this->mfclient $mfclient;
  243.         return $this;
  244.     }
  245.     public function getNum(): ?string
  246.     {
  247.         return $this->num;
  248.     }
  249.     public function setNum(?string $num): self
  250.     {
  251.         $this->num $num;
  252.         return $this;
  253.     }
  254.     public function getDate(): ?DateTimeInterface
  255.     {
  256.         return $this->date;
  257.     }
  258.     public function setDate(?DateTimeInterface $date): self
  259.     {
  260.         $this->date $date;
  261.         return $this;
  262.     }
  263.     public function getReference(): ?string
  264.     {
  265.         return $this->reference;
  266.     }
  267.     public function setReference(?string $reference): self
  268.     {
  269.         $this->reference $reference;
  270.         return $this;
  271.     }
  272.     public function getCode(): ?string
  273.     {
  274.         return $this->code;
  275.     }
  276.     public function setCode(?string $code): self
  277.     {
  278.         $this->code $code;
  279.         return $this;
  280.     }
  281.     public function getBase(): ?string
  282.     {
  283.         return $this->base;
  284.     }
  285.     public function setBase(?string $base): self
  286.     {
  287.         $this->base $base;
  288.         return $this;
  289.     }
  290.     public function getTaux(): ?string
  291.     {
  292.         return $this->taux;
  293.     }
  294.     public function setTaux(?string $taux): self
  295.     {
  296.         $this->taux $taux;
  297.         return $this;
  298.     }
  299.     public function getMontant(): ?string
  300.     {
  301.         return $this->montant;
  302.     }
  303.     public function setMontant(?string $montant): self
  304.     {
  305.         $this->montant $montant;
  306.         return $this;
  307.     }
  308.     public function getTotal(): ?string
  309.     {
  310.         return $this->total;
  311.     }
  312.     public function setTotal(?string $total): self
  313.     {
  314.         $this->total $total;
  315.         return $this;
  316.     }
  317.     public function getTotalht(): ?string
  318.     {
  319.         return $this->totalht;
  320.     }
  321.     public function setTotalht(?string $totalht): self
  322.     {
  323.         $this->totalht $totalht;
  324.         return $this;
  325.     }
  326.     public function getQttotal(): ?string
  327.     {
  328.         return $this->qttotal;
  329.     }
  330.     public function setQttotal(?string $qttotal): self
  331.     {
  332.         $this->qttotal $qttotal;
  333.         return $this;
  334.     }
  335.     public function getTotalttc(): ?string
  336.     {
  337.         return $this->totalttc;
  338.     }
  339.     public function setTotalttc(?string $totalttc): self
  340.     {
  341.         $this->totalttc $totalttc;
  342.         return $this;
  343.     }
  344.     public function getMontantNet(): ?string
  345.     {
  346.         return $this->montantNet;
  347.     }
  348.     public function setMontantNet(?string $montantNet): self
  349.     {
  350.         $this->montantNet $montantNet;
  351.         return $this;
  352.     }
  353.     /**
  354.      * @return Collection<int, Produit>
  355.      */
  356.     public function getProduit(): Collection
  357.     {
  358.         return $this->produit;
  359.     }
  360.     public function addProduit(Produit $produit): self
  361.     {
  362.         if (!$this->produit->contains($produit)) {
  363.             $this->produit->add($produit);
  364.             $produit->setDevis($this);
  365.         }
  366.         return $this;
  367.     }
  368.     public function removeProduit(Produit $produit): self
  369.     {
  370.         if ($this->produit->removeElement($produit)) {
  371.             // set the owning side to null (unless already changed)
  372.             if ($produit->getDevis() === $this) {
  373.                 $produit->setDevis(null);
  374.             }
  375.         }
  376.         return $this;
  377.     }
  378.     public function getStatut(): ?string
  379.     {
  380.         return $this->statut;
  381.     }
  382.     public function setStatut(?string $statut): self
  383.     {
  384.         $this->statut $statut;
  385.         return $this;
  386.     }
  387.     public function getVendeurs(): ?Vendeur
  388.     {
  389.         return $this->vendeurs;
  390.     }
  391.     public function setVendeurs(?Vendeur $vendeurs): self
  392.     {
  393.         $this->vendeurs $vendeurs;
  394.         return $this;
  395.     }
  396.     public function getClient(): ?Client
  397.     {
  398.         return $this->client;
  399.     }
  400.     public function setClient(?Client $client): self
  401.     {
  402.         $this->client $client;
  403.         return $this;
  404.     }
  405.     /**
  406.      * @return Collection<int, Paymentdevi>
  407.      */
  408.     public function getPaymentdevis(): Collection
  409.     {
  410.         return $this->paymentdevis;
  411.     }
  412.     public function addPaymentdevi(Paymentdevi $paymentdevi): static
  413.     {
  414.         if (!$this->paymentdevis->contains($paymentdevi)) {
  415.             $this->paymentdevis->add($paymentdevi);
  416.             $paymentdevi->setDevis($this);
  417.         }
  418.         return $this;
  419.     }
  420.     public function removePaymentdevi(Paymentdevi $paymentdevi): static
  421.     {
  422.         if ($this->paymentdevis->removeElement($paymentdevi)) {
  423.             // set the owning side to null (unless already changed)
  424.             if ($paymentdevi->getDevis() === $this) {
  425.                 $paymentdevi->setDevis(null);
  426.             }
  427.         }
  428.         return $this;
  429.     }
  430.     public function getTimbre(): ?string
  431.     {
  432.         return $this->timbre;
  433.     }
  434.     public function setTimbre(?string $timbre): static
  435.     {
  436.         $this->timbre $timbre;
  437.         return $this;
  438.     }
  439.     public function getOldtype(): ?string
  440.     {
  441.         return $this->oldtype;
  442.     }
  443.     public function setOldtype(?string $oldtype): static
  444.     {
  445.         $this->oldtype $oldtype;
  446.         return $this;
  447.     }
  448.     public function getRetour(): ?array
  449.     {
  450.         return $this->retour;
  451.     }
  452.     public function setRetour(?array $retour): static
  453.     {
  454.         $this->retour $retour;
  455.         return $this;
  456.     }
  457.     public function getFrtour(): ?string
  458.     {
  459.         return $this->frtour;
  460.     }
  461.     public function setFrtour(?string $frtour): static
  462.     {
  463.         $this->frtour $frtour;
  464.         return $this;
  465.     }
  466.     public function getFav(): ?string
  467.     {
  468.         return $this->fav;
  469.     }
  470.     public function setFav(?string $fav): static
  471.     {
  472.         $this->fav $fav;
  473.         return $this;
  474.     }
  475.     /**
  476.      * @return Collection<int, Intervention>
  477.      */
  478.     public function getIntervention(): Collection
  479.     {
  480.         return $this->intervention;
  481.     }
  482.     public function addIntervention(Intervention $intervention): static
  483.     {
  484.         if (!$this->intervention->contains($intervention)) {
  485.             $this->intervention->add($intervention);
  486.             $intervention->setDevis($this);
  487.         }
  488.         return $this;
  489.     }
  490.     public function removeIntervention(Intervention $intervention): static
  491.     {
  492.         if ($this->intervention->removeElement($intervention)) {
  493.             // set the owning side to null (unless already changed)
  494.             if ($intervention->getDevis() === $this) {
  495.                 $intervention->setDevis(null);
  496.             }
  497.         }
  498.         return $this;
  499.     }
  500.     public function getUser(): ?User
  501.     {
  502.         return $this->user;
  503.     }
  504.     public function setUser(?User $user): static
  505.     {
  506.         $this->user $user;
  507.         return $this;
  508.     }
  509.     public function isLu(): ?bool
  510.     {
  511.         return $this->lu;
  512.     }
  513.     public function setLu(?bool $lu): static
  514.     {
  515.         $this->lu $lu;
  516.         return $this;
  517.     }
  518.     public function getDatecreation(): ?DateTimeInterface
  519.     {
  520.         return $this->datecreation;
  521.     }
  522.     public function setDatecreation(?DateTimeInterface $datecreation): static
  523.     {
  524.         $this->datecreation $datecreation;
  525.         return $this;
  526.     }
  527.     public function getDemandedevisold(): ?string
  528.     {
  529.         return $this->demandedevisold;
  530.     }
  531.     public function setDemandedevisold(?string $demandedevisold): static
  532.     {
  533.         $this->demandedevisold $demandedevisold;
  534.         return $this;
  535.     }
  536.     public function getIddevisold(): ?string
  537.     {
  538.         return $this->iddevisold;
  539.     }
  540.     public function setIddevisold(?string $iddevisold): static
  541.     {
  542.         $this->iddevisold $iddevisold;
  543.         return $this;
  544.     }
  545.     /**
  546.      * @return Collection<int, Historiqueintervention>
  547.      */
  548.     public function getHistoriqueinterventions(): Collection
  549.     {
  550.         return $this->historiqueinterventions;
  551.     }
  552.     public function addHistoriqueintervention(Historiqueintervention $historiqueintervention): static
  553.     {
  554.         if (!$this->historiqueinterventions->contains($historiqueintervention)) {
  555.             $this->historiqueinterventions->add($historiqueintervention);
  556.             $historiqueintervention->setDevis($this);
  557.         }
  558.         return $this;
  559.     }
  560.     public function removeHistoriqueintervention(Historiqueintervention $historiqueintervention): static
  561.     {
  562.         if ($this->historiqueinterventions->removeElement($historiqueintervention)) {
  563.             // set the owning side to null (unless already changed)
  564.             if ($historiqueintervention->getDevis() === $this) {
  565.                 $historiqueintervention->setDevis(null);
  566.             }
  567.         }
  568.         return $this;
  569.     }
  570.     public function getIduerold(): ?string
  571.     {
  572.         return $this->iduerold;
  573.     }
  574.     public function setIduerold(?string $iduerold): static
  575.     {
  576.         $this->iduerold $iduerold;
  577.         return $this;
  578.     }
  579.     public function getIdintervold(): ?string
  580.     {
  581.         return $this->idintervold;
  582.     }
  583.     public function setIdintervold(?string $idintervold): static
  584.     {
  585.         $this->idintervold $idintervold;
  586.         return $this;
  587.     }
  588.     public function getUsername(): ?string
  589.     {
  590.         return $this->username;
  591.     }
  592.     public function setUsername(?string $username): static
  593.     {
  594.         $this->username $username;
  595.         return $this;
  596.     }
  597.     public function getAdressp(): ?string
  598.     {
  599.         return $this->adressp;
  600.     }
  601.     public function setAdressp(?string $adressp): static
  602.     {
  603.         $this->adressp $adressp;
  604.         return $this;
  605.     }
  606.     public function getTelpp(): ?string
  607.     {
  608.         return $this->telpp;
  609.     }
  610.     public function setTelpp(?string $telpp): static
  611.     {
  612.         $this->telpp $telpp;
  613.         return $this;
  614.     }
  615.     public function getFournisseur(): ?Fournisseur
  616.     {
  617.         return $this->fournisseur;
  618.     }
  619.     public function setFournisseur(?Fournisseur $fournisseur): static
  620.     {
  621.         $this->fournisseur $fournisseur;
  622.         return $this;
  623.     }
  624.     /**
  625.      * @return Collection<int, Archivearticle>
  626.      */
  627.     public function getArchivearticles(): Collection
  628.     {
  629.         return $this->archivearticles;
  630.     }
  631.     public function addArchivearticle(Archivearticle $archivearticle): self
  632.     {
  633.         if (!$this->archivearticles->contains($archivearticle)) {
  634.             $this->archivearticles->add($archivearticle);
  635.             $archivearticle->setFichevente($this);
  636.         }
  637.         return $this;
  638.     }
  639.     public function removeArchivearticle(Archivearticle $archivearticle): self
  640.     {
  641.         if ($this->archivearticles->removeElement($archivearticle)) {
  642.             // set the owning side to null (unless already changed)
  643.             if ($archivearticle->getFichevente() === $this) {
  644.                 $archivearticle->setFichevente(null);
  645.             }
  646.         }
  647.         return $this;
  648.     }
  649.     public function getIdsfacts(): ?string
  650.     {
  651.         return $this->idsfacts;
  652.     }
  653.     public function setIdsfacts(?string $idsfacts): self
  654.     {
  655.         $this->idsfacts $idsfacts;
  656.         return $this;
  657.     }
  658.    
  659. }