src/Entity/Articles/MouvementStock.php line 26

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Articles;
  3. use App\Entity\Fournisseurs\Fournisseur;
  4. use App\Entity\GestionComerciale\ArticleCommande;
  5. use App\Entity\GestionComerciale\Commande;
  6. use App\Entity\GestionComerciale\CommandeFournisseur;
  7. use App\Entity\GestionComerciale\Fabrication;
  8. use App\Entity\GestionComerciale\Reception;
  9. use App\Entity\Inventaires\ArticleInventaire;
  10. use App\Entity\Inventaires\Inventaire;
  11. use App\Entity\Rangements\Emplacement;
  12. use App\Entity\Utilisateur\Utilisateur;
  13. use DateTime;
  14. use Doctrine\ORM\Mapping as ORM;
  15. use Gedmo\Mapping\Annotation as Gedmo;
  16. use Symfony\Component\Validator\Constraints as Assert;
  17. /**
  18.  * MouvementStock
  19.  *
  20.  * @ORM\Table("article__mouvement_stock")
  21.  * @ORM\Entity(repositoryClass="App\Repository\Articles\MouvementStockRepository")
  22.  */
  23. class MouvementStock
  24. {
  25.     /**
  26.      * @ORM\Column(name="id", type="integer")
  27.      * @ORM\Id
  28.      * @ORM\GeneratedValue(strategy="AUTO")
  29.      */
  30.     private $id;
  31.     /**
  32.      * @ORM\Column(name="id_import", type="string",length=255, nullable=true)
  33.      */
  34.     private $idImport;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity="App\Entity\Rangements\Emplacement")
  37.      */
  38.     private $emplacement;
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="mouvementStock")
  41.      * @ORM\JoinColumn(nullable=true)
  42.      */
  43.     private $utilisateur;
  44.     /**
  45.      * @ORM\Column(name="date", type="datetime", nullable=true)
  46.      */
  47.     private $date;
  48.     /**
  49.      * @ORM\Column(name="date_mouvement", type="datetime", nullable=true)
  50.      */
  51.     private $dateMvt;
  52.     /**
  53.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  54.      */
  55.     private $dateSuppression;
  56.     /**
  57.      * @ORM\Column(name="quantite", type="float", nullable=true)
  58.      * @Assert\Range(
  59.      *      min = 0,
  60.      *      minMessage = "Quantité minimum 1",
  61.      * )
  62.      * @Assert\NotBlank(message="Quantité obligatoire")
  63.      */
  64.     private $quantite;
  65.     /**
  66.      * @ORM\ManyToOne(targetEntity="App\Entity\Articles\Article",inversedBy="mouvementStock")
  67.      * @ORM\JoinColumn(nullable=false)
  68.      */
  69.     private $article;
  70.     /**
  71.      * @ORM\ManyToOne(targetEntity="App\Entity\Articles\RaisonMouvementStock")
  72.      * @ORM\JoinColumn(nullable=false)
  73.      */
  74.     private $raisonMouvementStock;
  75.     /**
  76.      * @ORM\Column(name="prix_sans_remise", type="float", nullable=true)
  77.      */
  78.     private $prixSansRemise;
  79.     /**
  80.      * @ORM\Column(name="prix_achat", type="float", nullable=true)
  81.      */
  82.     private $prixAchat;
  83.     /**
  84.      * @ORM\Column(name="prix_achat_devise", type="float", nullable=true)
  85.      */
  86.     private $prixAchatDevise;
  87.     /**
  88.      * @ORM\ManyToOne(targetEntity="App\Entity\Fournisseurs\Fournisseur",inversedBy="mouvementStocks")
  89.      * @ORM\JoinColumn(nullable=true)
  90.      */
  91.     private $fournisseur;
  92.     /**
  93.      * @ORM\Column(name="pump", type="float", nullable=true)
  94.      */
  95.     private $pump;
  96.     /**
  97.      * @ORM\Column(name="cpump", type="float", nullable=true)
  98.      */
  99.     private $cpump;
  100.     /**
  101.      * @ORM\Column(name="annexe", type="float", nullable=true)
  102.      */
  103.     private $annexe;
  104.     /**
  105.      * @ORM\Column(name="commentaire", type="text", nullable=true)
  106.      * @Assert\NotBlank(message="Commentaire obligatoire")
  107.      */
  108.     private $commentaire;
  109.     /**
  110.      * @ORM\Column(name="stock", type="float", nullable=true)
  111.      */
  112.     private $stock;
  113.     /**
  114.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande", inversedBy="mouvementStock")
  115.      * @ORM\JoinColumn(nullable=true)
  116.      */
  117.     private $commande;
  118.     /**
  119.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande")
  120.      * @ORM\JoinColumn(nullable=true)
  121.      */
  122.     private $commandeVirtuel;
  123.     /**
  124.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\CommandeFournisseur", inversedBy="mouvementStock")
  125.      * @ORM\JoinColumn(nullable=true)
  126.      */
  127.     private $commandeFournisseur;
  128.     /**
  129.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Fabrication", inversedBy="mouvementStock")
  130.      * @ORM\JoinColumn(nullable=true)
  131.      */
  132.     private $fabrication;
  133.     /**
  134.      * @ORM\Column(name="bon_livraison", type="string", length=255, nullable=true)
  135.      */
  136.     private $bonLivraison;
  137.     /**
  138.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\CommandeFournisseur", inversedBy="mouvementsStock")
  139.      * @ORM\JoinColumn(nullable=true)
  140.      */
  141.     private $factureFournisseur;
  142.     /**
  143.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  144.      */
  145.     private $reference;
  146.     /**
  147.      * @ORM\Column(name="reference_fournisseur", type="string", length=255, nullable=true)
  148.      */
  149.     private $referenceFournisseur;
  150.     /**
  151.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  152.      */
  153.     private $libelle;
  154.     /**
  155.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ArticleCommande", inversedBy="mouvementsStock")
  156.      * @ORM\JoinColumn(nullable=true)
  157.      */
  158.     private $articleCommande;
  159.     /**
  160.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ArticleCommande")
  161.      * @ORM\JoinColumn(nullable=true)
  162.      */
  163.     private $articleCommandeCf;
  164.     /**
  165.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ArticleCommande" )
  166.      * @ORM\JoinColumn(nullable=true)
  167.      */
  168.     private $articleCommandeVirtuel;
  169.     /**
  170.      * @ORM\ManyToOne(targetEntity="App\Entity\Articles\ConditionAchat", inversedBy="mouvementsStock")
  171.      * @ORM\JoinColumn(nullable=true)
  172.      */
  173.     private $conditionAchat;
  174.     /**
  175.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Reception", inversedBy="mouvementsStock")
  176.      * @ORM\JoinColumn(nullable=true)
  177.      */
  178.     private $reception;
  179.     /**
  180.      * @ORM\Column(name="aFacturer", type="boolean", nullable=true)
  181.      */
  182.     private $aFacturer;
  183.     /**
  184.      * @ORM\Column(name="est_un_composant", type="boolean", nullable=true)
  185.      */
  186.     private $estUnComposant;
  187.     /**
  188.      * @ORM\Column(name="remise", type="float", nullable=true)
  189.      */
  190.     private $remise;
  191.     /**
  192.      * @ORM\Column(name="remise_supplementaire", type="float", nullable=true)
  193.      */
  194.     private $remiseSuppl;
  195.     /**
  196.      * @ORM\ManyToOne(targetEntity="App\Entity\Inventaires\Inventaire", inversedBy="mouvementsStock")
  197.      * @ORM\JoinColumn(nullable=true)
  198.      */
  199.     private $inventaire;
  200.     /**
  201.      * @ORM\ManyToOne(targetEntity="App\Entity\Inventaires\ArticleInventaire", inversedBy="mouvementsStock")
  202.      * @ORM\JoinColumn(nullable=true)
  203.      */
  204.     private $articleInventaire;
  205.     /**
  206.      * @ORM\Column(name="frais_annexes", type="float", nullable=true)
  207.      */
  208.     private $fraisAnnexes;
  209.     /**
  210.      * @ORM\Column(name="reste_a_facturer", type="float", nullable=true)
  211.      */
  212.     private $resteAfacturer;
  213.     /**
  214.      * @ORM\Column(name="ecocontribution", type="float", nullable=true)
  215.      */
  216.     private $ecocontribution;
  217.     /**
  218.      * @ORM\Column(name="prix_achat_unitaire_avec_frais", type="float", nullable=true)
  219.      */
  220.     private $prixAchatUnitaireAvecFrais;
  221.     /**
  222.      * @ORM\Column(name="pump_hors_frais", type="float", nullable=true)
  223.      */
  224.     private $pumpHorsFrais;
  225.     public function __construct()
  226.     {
  227.         $this->date           = new Datetime();
  228.         $this->dateMvt        = new Datetime();
  229.         $this->aFacturer      true;
  230.         $this->estUnComposant false;
  231.     }
  232.     public function getId(): int
  233.     {
  234.         return $this->id;
  235.     }
  236.     public function setDate(?DateTime $date): MouvementStock
  237.     {
  238.         $this->date $date;
  239.         return $this;
  240.     }
  241.     public function getDate(): ?DateTime
  242.     {
  243.         return $this->date;
  244.     }
  245.     public function setQuantite(?int $quantite): MouvementStock
  246.     {
  247.         $this->quantite $quantite;
  248.         return $this;
  249.     }
  250.     public function getQuantite(): ?int
  251.     {
  252.         return $this->quantite;
  253.     }
  254.     public function setArticle(?Article $article): MouvementStock
  255.     {
  256.         $this->article $article;
  257.         return $this;
  258.     }
  259.     public function getArticle(): ?Article
  260.     {
  261.         return $this->article;
  262.     }
  263.     public function setRaisonMouvementStock(?RaisonMouvementStock $raisonMouvementStock): MouvementStock
  264.     {
  265.         $this->raisonMouvementStock $raisonMouvementStock;
  266.         return $this;
  267.     }
  268.     public function getRaisonMouvementStock(): ?RaisonMouvementStock
  269.     {
  270.         return $this->raisonMouvementStock;
  271.     }
  272.     public function setUtilisateur(?Utilisateur $utilisateur): MouvementStock
  273.     {
  274.         $this->utilisateur $utilisateur;
  275.         return $this;
  276.     }
  277.     public function getUtilisateur(): ?Utilisateur
  278.     {
  279.         return $this->utilisateur;
  280.     }
  281.     public function setPrixAchat(?float $prixAchat): MouvementStock
  282.     {
  283.         $this->prixAchat $prixAchat;
  284.         return $this;
  285.     }
  286.     public function getPrixAchat(): ?float
  287.     {
  288.         return $this->prixAchat;
  289.     }
  290.     public function setFournisseur(?Fournisseur $fournisseur): MouvementStock
  291.     {
  292.         $this->fournisseur $fournisseur;
  293.         return $this;
  294.     }
  295.     public function getFournisseur(): ?Fournisseur
  296.     {
  297.         return $this->fournisseur;
  298.     }
  299.     public function setPump(?float $pump): MouvementStock
  300.     {
  301.         $this->pump $pump;
  302.         return $this;
  303.     }
  304.     public function getPump(): ?float
  305.     {
  306.         return $this->pump;
  307.     }
  308.     public function setDateMvt(?DateTime $dateMvt): MouvementStock
  309.     {
  310.         $this->dateMvt $dateMvt;
  311.         return $this;
  312.     }
  313.     public function getDateMvt(): ?DateTime
  314.     {
  315.         return $this->dateMvt;
  316.     }
  317.     public function setCommentaire(?string $commentaire): MouvementStock
  318.     {
  319.         $this->commentaire $commentaire;
  320.         return $this;
  321.     }
  322.     public function getCommentaire(): ?string
  323.     {
  324.         return $this->commentaire;
  325.     }
  326.     public function setStock(?int $stock): MouvementStock
  327.     {
  328.         $this->stock $stock;
  329.         return $this;
  330.     }
  331.     public function getStock(): ?int
  332.     {
  333.         return $this->stock;
  334.     }
  335.     public function setCommande(?Commande $commande): MouvementStock
  336.     {
  337.         $this->commande $commande;
  338.         return $this;
  339.     }
  340.     public function getCommande(): ?Commande
  341.     {
  342.         return $this->commande;
  343.     }
  344.     public function setCommandeFournisseur(?CommandeFournisseur $commandeFournisseur): MouvementStock
  345.     {
  346.         $this->commandeFournisseur $commandeFournisseur;
  347.         return $this;
  348.     }
  349.     public function getCommandeFournisseur(): ?CommandeFournisseur
  350.     {
  351.         return $this->commandeFournisseur;
  352.     }
  353.     public function setFabrication(?Fabrication $fabrication): MouvementStock
  354.     {
  355.         $this->fabrication $fabrication;
  356.         return $this;
  357.     }
  358.     public function getFabrication(): ?Fabrication
  359.     {
  360.         return $this->fabrication;
  361.     }
  362.     public function setIdImport(?string $idImport): MouvementStock
  363.     {
  364.         $this->idImport $idImport;
  365.         return $this;
  366.     }
  367.     public function getIdImport(): ?string
  368.     {
  369.         return $this->idImport;
  370.     }
  371.     public function setDateSuppression(?DateTime $dateSuppression): MouvementStock
  372.     {
  373.         $this->dateSuppression $dateSuppression;
  374.         return $this;
  375.     }
  376.     public function getDateSuppression(): ?DateTime
  377.     {
  378.         return $this->dateSuppression;
  379.     }
  380.     public function setBonLivraison(?string $bonLivraison): MouvementStock
  381.     {
  382.         $this->bonLivraison $bonLivraison;
  383.         return $this;
  384.     }
  385.     public function getBonLivraison(): ?string
  386.     {
  387.         return $this->bonLivraison;
  388.     }
  389.     public function setFactureFournisseur(?CommandeFournisseur $factureFournisseur): MouvementStock
  390.     {
  391.         $this->factureFournisseur $factureFournisseur;
  392.         return $this;
  393.     }
  394.     public function getFactureFournisseur(): ?CommandeFournisseur
  395.     {
  396.         return $this->factureFournisseur;
  397.     }
  398.     public function setReference(?string $reference): MouvementStock
  399.     {
  400.         $this->reference $reference;
  401.         return $this;
  402.     }
  403.     public function getReference(): ?string
  404.     {
  405.         return $this->reference;
  406.     }
  407.     public function setReferenceFournisseur(?string $referenceFournisseur): MouvementStock
  408.     {
  409.         $this->referenceFournisseur $referenceFournisseur;
  410.         return $this;
  411.     }
  412.     public function getReferenceFournisseur(): ?string
  413.     {
  414.         return $this->referenceFournisseur;
  415.     }
  416.     public function setLibelle(?string $libelle): MouvementStock
  417.     {
  418.         $this->libelle $libelle;
  419.         return $this;
  420.     }
  421.     public function getLibelle(): ?string
  422.     {
  423.         return $this->libelle;
  424.     }
  425.     public function setConditionAchat(?ConditionAchat $conditionAchat): MouvementStock
  426.     {
  427.         $this->conditionAchat $conditionAchat;
  428.         return $this;
  429.     }
  430.     public function getConditionAchat(): ?ConditionAchat
  431.     {
  432.         return $this->conditionAchat;
  433.     }
  434.     public function setReception(?Reception $reception): MouvementStock
  435.     {
  436.         $this->reception $reception;
  437.         return $this;
  438.     }
  439.     public function getReception(): ?Reception
  440.     {
  441.         return $this->reception;
  442.     }
  443.     public function setAFacturer(?bool $aFacturer): MouvementStock
  444.     {
  445.         $this->aFacturer $aFacturer;
  446.         return $this;
  447.     }
  448.     public function getAFacturer(): ?bool
  449.     {
  450.         return $this->aFacturer;
  451.     }
  452.     public function setArticleCommande(?ArticleCommande $articleCommande): MouvementStock
  453.     {
  454.         $this->articleCommande $articleCommande;
  455.         return $this;
  456.     }
  457.     public function getArticleCommande(): ?ArticleCommande
  458.     {
  459.         return $this->articleCommande;
  460.     }
  461.     public function setRemise(?float $remise): MouvementStock
  462.     {
  463.         $this->remise $remise;
  464.         return $this;
  465.     }
  466.     public function getRemise(): ?float
  467.     {
  468.         return $this->remise;
  469.     }
  470.     public function setRemiseSuppl(?float $remiseSuppl): MouvementStock
  471.     {
  472.         $this->remiseSuppl $remiseSuppl;
  473.         return $this;
  474.     }
  475.     public function getRemiseSuppl(): ?float
  476.     {
  477.         return $this->remiseSuppl;
  478.     }
  479.     public function setEmplacement(?Emplacement $emplacement): MouvementStock
  480.     {
  481.         $this->emplacement $emplacement;
  482.         return $this;
  483.     }
  484.     public function getEmplacement(): ?Emplacement
  485.     {
  486.         return $this->emplacement;
  487.     }
  488.     public function setInventaire(?Inventaire $inventaire): MouvementStock
  489.     {
  490.         $this->inventaire $inventaire;
  491.         return $this;
  492.     }
  493.     public function getInventaire(): ?Inventaire
  494.     {
  495.         return $this->inventaire;
  496.     }
  497.     public function setArticleInventaire(?ArticleInventaire $articleInventaire): MouvementStock
  498.     {
  499.         $this->articleInventaire $articleInventaire;
  500.         return $this;
  501.     }
  502.     public function getArticleInventaire(): ?ArticleInventaire
  503.     {
  504.         return $this->articleInventaire;
  505.     }
  506.     public function setPrixSansRemise(?float $prixSansRemise): MouvementStock
  507.     {
  508.         $this->prixSansRemise $prixSansRemise;
  509.         return $this;
  510.     }
  511.     public function getPrixSansRemise(): ?float
  512.     {
  513.         return $this->prixSansRemise;
  514.     }
  515.     public function setEstUnComposant(?bool $estUnComposant): MouvementStock
  516.     {
  517.         $this->estUnComposant $estUnComposant;
  518.     }
  519.     public function getEstUnComposant(): ?bool
  520.     {
  521.         return $this->estUnComposant;
  522.     }
  523.     public function setFraisAnnexes(?float $fraisAnnexes): MouvementStock
  524.     {
  525.         $this->fraisAnnexes $fraisAnnexes;
  526.         return $this;
  527.     }
  528.     public function getFraisAnnexes(): ?float
  529.     {
  530.         return $this->fraisAnnexes;
  531.     }
  532.     public function setCommandeVirtuel(?Commande $commandeVirtuel): MouvementStock
  533.     {
  534.         $this->commandeVirtuel $commandeVirtuel;
  535.         return $this;
  536.     }
  537.     public function getCommandeVirtuel(): ?Commande
  538.     {
  539.         return $this->commandeVirtuel;
  540.     }
  541.     public function setArticleCommandeVirtuel(?ArticleCommande $articleCommandeVirtuel): MouvementStock
  542.     {
  543.         $this->articleCommandeVirtuel $articleCommandeVirtuel;
  544.         return $this;
  545.     }
  546.     public function getArticleCommandeVirtuel(): ?ArticleCommande
  547.     {
  548.         return $this->articleCommandeVirtuel;
  549.     }
  550.     public function setPrixAchatDevise(?float $prixAchatDevise): MouvementStock
  551.     {
  552.         $this->prixAchatDevise $prixAchatDevise;
  553.         return $this;
  554.     }
  555.     public function getPrixAchatDevise(): ?float
  556.     {
  557.         return $this->prixAchatDevise;
  558.     }
  559.     public function setArticleCommandeCf(?ArticleCommande $articleCommandeCf): MouvementStock
  560.     {
  561.         $this->articleCommandeCf $articleCommandeCf;
  562.         return $this;
  563.     }
  564.     public function getArticleCommandeCf(): ?ArticleCommande
  565.     {
  566.         return $this->articleCommandeCf;
  567.     }
  568.     public function setResteAfacturer(?float $resteAfacturer): MouvementStock
  569.     {
  570.         $this->resteAfacturer $resteAfacturer;
  571.         return $this;
  572.     }
  573.     public function getResteAfacturer(): ?float
  574.     {
  575.         return $this->resteAfacturer;
  576.     }
  577.     public function setCpump(?float $cpump): MouvementStock
  578.     {
  579.         $this->cpump $cpump;
  580.         return $this;
  581.     }
  582.     public function getCpump(): ?float
  583.     {
  584.         return $this->cpump;
  585.     }
  586.     public function setAnnexe(?float $annexe): MouvementStock
  587.     {
  588.         $this->annexe $annexe;
  589.         return $this;
  590.     }
  591.     public function getAnnexe(): ?float
  592.     {
  593.         return $this->annexe;
  594.     }
  595.     public function setEcocontribution(?float $ecocontribution): MouvementStock
  596.     {
  597.         $this->ecocontribution $ecocontribution;
  598.         return $this;
  599.     }
  600.     public function getEcocontribution(): ?float
  601.     {
  602.         return $this->ecocontribution;
  603.     }
  604.     public function setPrixAchatUnitaireAvecFrais(?float $prixAchatUnitaireAvecFrais): MouvementStock
  605.     {
  606.         $this->prixAchatUnitaireAvecFrais $prixAchatUnitaireAvecFrais;
  607.         return $this;
  608.     }
  609.     public function getPrixAchatUnitaireAvecFrais(): ?float
  610.     {
  611.         return $this->prixAchatUnitaireAvecFrais;
  612.     }
  613.     public function setPumpHorsFrais(?float $pumpHorsFrais): MouvementStock
  614.     {
  615.         $this->pumpHorsFrais $pumpHorsFrais;
  616.         return $this;
  617.     }
  618.     public function getPumpHorsFrais(): ?float
  619.     {
  620.         return $this->pumpHorsFrais;
  621.     }
  622. }