src/Entity/GestionComerciale/Reception.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\GestionComerciale;
  3. use App\Entity\Articles\MouvementStock;
  4. use App\Entity\Fournisseurs\Fournisseur;
  5. use App\Entity\Utilisateur\Utilisateur;
  6. use DateTime;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. use Symfony\Component\Validator\ExecutionContextInterface;
  13. /**
  14.  * TypeReglement
  15.  *
  16.  * @ORM\Table("commerciale__reception")
  17.  * @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\ReceptionRepository")
  18.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  19.  */
  20. class Reception
  21. {
  22.     /**
  23.      * @ORM\Column(name="id", type="integer")
  24.      * @ORM\Id
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      */
  27.     private $id;
  28.     
  29.     /**
  30.      * @ORM\Column(name="commentaire", type="text", nullable=true)
  31.     */
  32.     private $commentaire;    
  33.     
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="receptions")
  36.      * @ORM\JoinColumn(nullable=true)
  37.      */
  38.     private $utilisateur;
  39.     /**
  40.      * @ORM\Column(name="date", type="datetime", nullable=true)
  41.      */
  42.     private $date;
  43.     /**
  44.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  45.      */
  46.     private $dateSuppression;
  47.     /**
  48.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  49.      * @Gedmo\Timestampable(on="update")
  50.      */
  51.     private $dateMaj;
  52.     
  53.     /**
  54.     * @ORM\OneToMany(targetEntity="App\Entity\Articles\MouvementStock", mappedBy="reception")
  55.     */
  56.     private $mouvementsStock;
  57.     
  58.     /**
  59.      * @ORM\Column(name="bon_livraison", type="string", length=255, nullable=true)
  60.      */
  61.     private $bonLivraison;
  62.     
  63.     /**
  64.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\CommandeFournisseur", inversedBy="receptions")
  65.      * @ORM\JoinColumn(nullable=true)
  66.      */
  67.     private $commandeFournisseur;
  68.     
  69.         /**
  70.      * @ORM\Column(name="aFacturer", type="boolean", nullable=true)
  71.      */
  72.     private $aFacturer;
  73.     
  74.     /**
  75.      * @ORM\ManyToOne(targetEntity="App\Entity\Fournisseurs\Fournisseur",inversedBy="receptions")
  76.      * @ORM\JoinColumn(nullable=true)
  77.      */
  78.     private $fournisseur;
  79.     
  80.     /**
  81.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  82.      */
  83.     private $reference;
  84.     /**
  85.      * @ORM\Column(name="frais_port_supplementaire", type="float", nullable=true)
  86.      */
  87.     private $fraisPortSupplementaire;
  88.     
  89.     /**
  90.      * @ORM\Column(name="fraix_fixe", type="float", nullable=true)
  91.      */
  92.     private $fraisFixe 0;
  93.     /**
  94.      * @ORM\Column(name="frais_approche", type="float", nullable=true)
  95.      */
  96.     private $fraisApproche;
  97.     public function __construct()
  98.     {
  99.         $this->date = new Datetime();
  100.             $this->aFacturer       true;
  101.             $this->mouvementsStock = new ArrayCollection();
  102.     }
  103.     public function getId(): int
  104.     {
  105.         return $this->id;
  106.     }
  107.     public function setDate(?DateTime $date): Reception
  108.     {
  109.         $this->date $date;
  110.         return $this;
  111.     }
  112.     public function getDate(): ?DateTime
  113.     {
  114.         return $this->date;
  115.     }
  116.     public function setDateSuppression(?DateTime $dateSuppression): Reception
  117.     {
  118.         $this->dateSuppression $dateSuppression;
  119.         return $this;
  120.     }
  121.     public function getDateSuppression(): ?DateTime
  122.     {
  123.         return $this->dateSuppression;
  124.     }
  125.     public function setDateMaj(?DateTime $dateMaj): Reception
  126.     {
  127.         $this->dateMaj $dateMaj;
  128.         return $this;
  129.     }
  130.     public function getDateMaj(): ?DateTime
  131.     {
  132.         return $this->dateMaj;
  133.     }
  134.     public function setUtilisateur(?Utilisateur $utilisateur): Reception
  135.     {
  136.         $this->utilisateur $utilisateur;
  137.         return $this;
  138.     }
  139.     public function getUtilisateur(): ?Utilisateur
  140.     {
  141.         return $this->utilisateur;
  142.     }
  143.     public function addMouvementsStock(MouvementStock $mouvementsStock): Reception
  144.     {
  145.         $this->mouvementsStock[] = $mouvementsStock;
  146.         return $this;
  147.     }
  148.     public function removeMouvementsStock(MouvementStock $mouvementsStock)
  149.     {
  150.         $this->mouvementsStock->removeElement($mouvementsStock);
  151.     }
  152.     public function getMouvementsStock(): Collection
  153.     {
  154.         return $this->mouvementsStock;
  155.     }
  156.     public function setBonLivraison(?string $bonLivraison): Reception
  157.     {
  158.         $this->bonLivraison $bonLivraison;
  159.         return $this;
  160.     }
  161.     public function getBonLivraison(): ?string
  162.     {
  163.         return $this->bonLivraison;
  164.     }
  165.     public function setCommandeFournisseur(?CommandeFournisseur $commandeFournisseur): Reception
  166.     {
  167.         $this->commandeFournisseur $commandeFournisseur;
  168.         return $this;
  169.     }
  170.     public function getCommandeFournisseur(): ?CommandeFournisseur
  171.     {
  172.         return $this->commandeFournisseur;
  173.     }
  174.     public function setAFacturer(?bool $aFacturer): Reception
  175.     {
  176.         $this->aFacturer $aFacturer;
  177.         return $this;
  178.     }
  179.     public function getAFacturer(): ?bool
  180.     {
  181.         return $this->aFacturer;
  182.     }
  183.     public function setFournisseur(?Fournisseur $fournisseur): Reception
  184.     {
  185.         $this->fournisseur $fournisseur;
  186.         return $this;
  187.     }
  188.     public function getFournisseur(): ?Fournisseur
  189.     {
  190.         return $this->fournisseur;
  191.     }
  192.     public function setReference(?string $reference): Reception
  193.     {
  194.         $this->reference $reference;
  195.         return $this;
  196.     }
  197.     public function getReference(): ?string
  198.     {
  199.         return $this->reference;
  200.     }
  201.     public function setCommentaire(?string $commentaire): Reception
  202.     {
  203.         $this->commentaire $commentaire;
  204.         return $this;
  205.     }
  206.     public function getCommentaire(): ?string
  207.     {
  208.         return $this->commentaire;
  209.     }    
  210.     public function setFraisPortSupplementaire(?float $fraisPortSupplementaire): Reception
  211.     {
  212.         $this->fraisPortSupplementaire $fraisPortSupplementaire;
  213.         return $this;
  214.     }
  215.     public function getFraisPortSupplementaire(): ?float
  216.     {
  217.         return $this->fraisPortSupplementaire;
  218.     }
  219.     public function setFraisFixe(?float $fraisFixe): Reception
  220.     {
  221.         $this->fraisFixe $fraisFixe;
  222.         return $this;
  223.     }
  224.     public function getFraisFixe(): ?float
  225.     {
  226.         return $this->fraisFixe;
  227.     }
  228.     public function setFraisApproche(?float $fraisApproche): Reception
  229.     {
  230.         $this->fraisApproche $fraisApproche;
  231.         return $this;
  232.     }
  233.     public function getFraisApproche(): ?float
  234.     {
  235.         return $this->fraisApproche;
  236.     }
  237. }