<?php
namespace App\Entity\Articles;
use App\Entity\Fournisseurs\Fournisseur;
use App\Entity\GestionComerciale\ArticleCommande;
use App\Entity\GestionComerciale\Commande;
use App\Entity\GestionComerciale\CommandeFournisseur;
use App\Entity\GestionComerciale\Fabrication;
use App\Entity\GestionComerciale\Reception;
use App\Entity\Inventaires\ArticleInventaire;
use App\Entity\Inventaires\Inventaire;
use App\Entity\Rangements\Emplacement;
use App\Entity\Utilisateur\Utilisateur;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/**
* MouvementStock
*
* @ORM\Table("article__mouvement_stock")
* @ORM\Entity(repositoryClass="App\Repository\Articles\MouvementStockRepository")
*/
class MouvementStock
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="id_import", type="string",length=255, nullable=true)
*/
private $idImport;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Rangements\Emplacement")
*/
private $emplacement;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="mouvementStock")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="date_mouvement", type="datetime", nullable=true)
*/
private $dateMvt;
/**
* @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="quantite", type="float", nullable=true)
* @Assert\Range(
* min = 0,
* minMessage = "Quantité minimum 1",
* )
* @Assert\NotBlank(message="Quantité obligatoire")
*/
private $quantite;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\Article",inversedBy="mouvementStock")
* @ORM\JoinColumn(nullable=false)
*/
private $article;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\RaisonMouvementStock")
* @ORM\JoinColumn(nullable=false)
*/
private $raisonMouvementStock;
/**
* @ORM\Column(name="prix_sans_remise", type="float", nullable=true)
*/
private $prixSansRemise;
/**
* @ORM\Column(name="prix_achat", type="float", nullable=true)
*/
private $prixAchat;
/**
* @ORM\Column(name="prix_achat_devise", type="float", nullable=true)
*/
private $prixAchatDevise;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Fournisseurs\Fournisseur",inversedBy="mouvementStocks")
* @ORM\JoinColumn(nullable=true)
*/
private $fournisseur;
/**
* @ORM\Column(name="pump", type="float", nullable=true)
*/
private $pump;
/**
* @ORM\Column(name="cpump", type="float", nullable=true)
*/
private $cpump;
/**
* @ORM\Column(name="annexe", type="float", nullable=true)
*/
private $annexe;
/**
* @ORM\Column(name="commentaire", type="text", nullable=true)
* @Assert\NotBlank(message="Commentaire obligatoire")
*/
private $commentaire;
/**
* @ORM\Column(name="stock", type="float", nullable=true)
*/
private $stock;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande", inversedBy="mouvementStock")
* @ORM\JoinColumn(nullable=true)
*/
private $commande;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande")
* @ORM\JoinColumn(nullable=true)
*/
private $commandeVirtuel;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\CommandeFournisseur", inversedBy="mouvementStock")
* @ORM\JoinColumn(nullable=true)
*/
private $commandeFournisseur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Fabrication", inversedBy="mouvementStock")
* @ORM\JoinColumn(nullable=true)
*/
private $fabrication;
/**
* @ORM\Column(name="bon_livraison", type="string", length=255, nullable=true)
*/
private $bonLivraison;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\CommandeFournisseur", inversedBy="mouvementsStock")
* @ORM\JoinColumn(nullable=true)
*/
private $factureFournisseur;
/**
* @ORM\Column(name="reference", type="string", length=255, nullable=true)
*/
private $reference;
/**
* @ORM\Column(name="reference_fournisseur", type="string", length=255, nullable=true)
*/
private $referenceFournisseur;
/**
* @ORM\Column(name="libelle", type="string", length=255, nullable=true)
*/
private $libelle;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ArticleCommande", inversedBy="mouvementsStock")
* @ORM\JoinColumn(nullable=true)
*/
private $articleCommande;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ArticleCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $articleCommandeCf;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ArticleCommande" )
* @ORM\JoinColumn(nullable=true)
*/
private $articleCommandeVirtuel;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\ConditionAchat", inversedBy="mouvementsStock")
* @ORM\JoinColumn(nullable=true)
*/
private $conditionAchat;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Reception", inversedBy="mouvementsStock")
* @ORM\JoinColumn(nullable=true)
*/
private $reception;
/**
* @ORM\Column(name="aFacturer", type="boolean", nullable=true)
*/
private $aFacturer;
/**
* @ORM\Column(name="est_un_composant", type="boolean", nullable=true)
*/
private $estUnComposant;
/**
* @ORM\Column(name="remise", type="float", nullable=true)
*/
private $remise;
/**
* @ORM\Column(name="remise_supplementaire", type="float", nullable=true)
*/
private $remiseSuppl;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Inventaires\Inventaire", inversedBy="mouvementsStock")
* @ORM\JoinColumn(nullable=true)
*/
private $inventaire;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Inventaires\ArticleInventaire", inversedBy="mouvementsStock")
* @ORM\JoinColumn(nullable=true)
*/
private $articleInventaire;
/**
* @ORM\Column(name="frais_annexes", type="float", nullable=true)
*/
private $fraisAnnexes;
/**
* @ORM\Column(name="reste_a_facturer", type="float", nullable=true)
*/
private $resteAfacturer;
/**
* @ORM\Column(name="ecocontribution", type="float", nullable=true)
*/
private $ecocontribution;
/**
* @ORM\Column(name="prix_achat_unitaire_avec_frais", type="float", nullable=true)
*/
private $prixAchatUnitaireAvecFrais;
/**
* @ORM\Column(name="pump_hors_frais", type="float", nullable=true)
*/
private $pumpHorsFrais;
public function __construct()
{
$this->date = new Datetime();
$this->dateMvt = new Datetime();
$this->aFacturer = true;
$this->estUnComposant = false;
}
public function getId(): int
{
return $this->id;
}
public function setDate(?DateTime $date): MouvementStock
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setQuantite(?int $quantite): MouvementStock
{
$this->quantite = $quantite;
return $this;
}
public function getQuantite(): ?int
{
return $this->quantite;
}
public function setArticle(?Article $article): MouvementStock
{
$this->article = $article;
return $this;
}
public function getArticle(): ?Article
{
return $this->article;
}
public function setRaisonMouvementStock(?RaisonMouvementStock $raisonMouvementStock): MouvementStock
{
$this->raisonMouvementStock = $raisonMouvementStock;
return $this;
}
public function getRaisonMouvementStock(): ?RaisonMouvementStock
{
return $this->raisonMouvementStock;
}
public function setUtilisateur(?Utilisateur $utilisateur): MouvementStock
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function setPrixAchat(?float $prixAchat): MouvementStock
{
$this->prixAchat = $prixAchat;
return $this;
}
public function getPrixAchat(): ?float
{
return $this->prixAchat;
}
public function setFournisseur(?Fournisseur $fournisseur): MouvementStock
{
$this->fournisseur = $fournisseur;
return $this;
}
public function getFournisseur(): ?Fournisseur
{
return $this->fournisseur;
}
public function setPump(?float $pump): MouvementStock
{
$this->pump = $pump;
return $this;
}
public function getPump(): ?float
{
return $this->pump;
}
public function setDateMvt(?DateTime $dateMvt): MouvementStock
{
$this->dateMvt = $dateMvt;
return $this;
}
public function getDateMvt(): ?DateTime
{
return $this->dateMvt;
}
public function setCommentaire(?string $commentaire): MouvementStock
{
$this->commentaire = $commentaire;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setStock(?int $stock): MouvementStock
{
$this->stock = $stock;
return $this;
}
public function getStock(): ?int
{
return $this->stock;
}
public function setCommande(?Commande $commande): MouvementStock
{
$this->commande = $commande;
return $this;
}
public function getCommande(): ?Commande
{
return $this->commande;
}
public function setCommandeFournisseur(?CommandeFournisseur $commandeFournisseur): MouvementStock
{
$this->commandeFournisseur = $commandeFournisseur;
return $this;
}
public function getCommandeFournisseur(): ?CommandeFournisseur
{
return $this->commandeFournisseur;
}
public function setFabrication(?Fabrication $fabrication): MouvementStock
{
$this->fabrication = $fabrication;
return $this;
}
public function getFabrication(): ?Fabrication
{
return $this->fabrication;
}
public function setIdImport(?string $idImport): MouvementStock
{
$this->idImport = $idImport;
return $this;
}
public function getIdImport(): ?string
{
return $this->idImport;
}
public function setDateSuppression(?DateTime $dateSuppression): MouvementStock
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setBonLivraison(?string $bonLivraison): MouvementStock
{
$this->bonLivraison = $bonLivraison;
return $this;
}
public function getBonLivraison(): ?string
{
return $this->bonLivraison;
}
public function setFactureFournisseur(?CommandeFournisseur $factureFournisseur): MouvementStock
{
$this->factureFournisseur = $factureFournisseur;
return $this;
}
public function getFactureFournisseur(): ?CommandeFournisseur
{
return $this->factureFournisseur;
}
public function setReference(?string $reference): MouvementStock
{
$this->reference = $reference;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReferenceFournisseur(?string $referenceFournisseur): MouvementStock
{
$this->referenceFournisseur = $referenceFournisseur;
return $this;
}
public function getReferenceFournisseur(): ?string
{
return $this->referenceFournisseur;
}
public function setLibelle(?string $libelle): MouvementStock
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setConditionAchat(?ConditionAchat $conditionAchat): MouvementStock
{
$this->conditionAchat = $conditionAchat;
return $this;
}
public function getConditionAchat(): ?ConditionAchat
{
return $this->conditionAchat;
}
public function setReception(?Reception $reception): MouvementStock
{
$this->reception = $reception;
return $this;
}
public function getReception(): ?Reception
{
return $this->reception;
}
public function setAFacturer(?bool $aFacturer): MouvementStock
{
$this->aFacturer = $aFacturer;
return $this;
}
public function getAFacturer(): ?bool
{
return $this->aFacturer;
}
public function setArticleCommande(?ArticleCommande $articleCommande): MouvementStock
{
$this->articleCommande = $articleCommande;
return $this;
}
public function getArticleCommande(): ?ArticleCommande
{
return $this->articleCommande;
}
public function setRemise(?float $remise): MouvementStock
{
$this->remise = $remise;
return $this;
}
public function getRemise(): ?float
{
return $this->remise;
}
public function setRemiseSuppl(?float $remiseSuppl): MouvementStock
{
$this->remiseSuppl = $remiseSuppl;
return $this;
}
public function getRemiseSuppl(): ?float
{
return $this->remiseSuppl;
}
public function setEmplacement(?Emplacement $emplacement): MouvementStock
{
$this->emplacement = $emplacement;
return $this;
}
public function getEmplacement(): ?Emplacement
{
return $this->emplacement;
}
public function setInventaire(?Inventaire $inventaire): MouvementStock
{
$this->inventaire = $inventaire;
return $this;
}
public function getInventaire(): ?Inventaire
{
return $this->inventaire;
}
public function setArticleInventaire(?ArticleInventaire $articleInventaire): MouvementStock
{
$this->articleInventaire = $articleInventaire;
return $this;
}
public function getArticleInventaire(): ?ArticleInventaire
{
return $this->articleInventaire;
}
public function setPrixSansRemise(?float $prixSansRemise): MouvementStock
{
$this->prixSansRemise = $prixSansRemise;
return $this;
}
public function getPrixSansRemise(): ?float
{
return $this->prixSansRemise;
}
public function setEstUnComposant(?bool $estUnComposant): MouvementStock
{
$this->estUnComposant = $estUnComposant;
}
public function getEstUnComposant(): ?bool
{
return $this->estUnComposant;
}
public function setFraisAnnexes(?float $fraisAnnexes): MouvementStock
{
$this->fraisAnnexes = $fraisAnnexes;
return $this;
}
public function getFraisAnnexes(): ?float
{
return $this->fraisAnnexes;
}
public function setCommandeVirtuel(?Commande $commandeVirtuel): MouvementStock
{
$this->commandeVirtuel = $commandeVirtuel;
return $this;
}
public function getCommandeVirtuel(): ?Commande
{
return $this->commandeVirtuel;
}
public function setArticleCommandeVirtuel(?ArticleCommande $articleCommandeVirtuel): MouvementStock
{
$this->articleCommandeVirtuel = $articleCommandeVirtuel;
return $this;
}
public function getArticleCommandeVirtuel(): ?ArticleCommande
{
return $this->articleCommandeVirtuel;
}
public function setPrixAchatDevise(?float $prixAchatDevise): MouvementStock
{
$this->prixAchatDevise = $prixAchatDevise;
return $this;
}
public function getPrixAchatDevise(): ?float
{
return $this->prixAchatDevise;
}
public function setArticleCommandeCf(?ArticleCommande $articleCommandeCf): MouvementStock
{
$this->articleCommandeCf = $articleCommandeCf;
return $this;
}
public function getArticleCommandeCf(): ?ArticleCommande
{
return $this->articleCommandeCf;
}
public function setResteAfacturer(?float $resteAfacturer): MouvementStock
{
$this->resteAfacturer = $resteAfacturer;
return $this;
}
public function getResteAfacturer(): ?float
{
return $this->resteAfacturer;
}
public function setCpump(?float $cpump): MouvementStock
{
$this->cpump = $cpump;
return $this;
}
public function getCpump(): ?float
{
return $this->cpump;
}
public function setAnnexe(?float $annexe): MouvementStock
{
$this->annexe = $annexe;
return $this;
}
public function getAnnexe(): ?float
{
return $this->annexe;
}
public function setEcocontribution(?float $ecocontribution): MouvementStock
{
$this->ecocontribution = $ecocontribution;
return $this;
}
public function getEcocontribution(): ?float
{
return $this->ecocontribution;
}
public function setPrixAchatUnitaireAvecFrais(?float $prixAchatUnitaireAvecFrais): MouvementStock
{
$this->prixAchatUnitaireAvecFrais = $prixAchatUnitaireAvecFrais;
return $this;
}
public function getPrixAchatUnitaireAvecFrais(): ?float
{
return $this->prixAchatUnitaireAvecFrais;
}
public function setPumpHorsFrais(?float $pumpHorsFrais): MouvementStock
{
$this->pumpHorsFrais = $pumpHorsFrais;
return $this;
}
public function getPumpHorsFrais(): ?float
{
return $this->pumpHorsFrais;
}
}