<?php
namespace App\Entity\GestionComerciale;
use App\Entity\Articles\MouvementStock;
use App\Entity\Fournisseurs\Fournisseur;
use App\Entity\Utilisateur\Utilisateur;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\ExecutionContextInterface;
/**
* TypeReglement
*
* @ORM\Table("commerciale__reception")
* @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\ReceptionRepository")
* @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
*/
class Reception
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="commentaire", type="text", nullable=true)
*/
private $commentaire;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="receptions")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="dateMaj", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateMaj;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Articles\MouvementStock", mappedBy="reception")
*/
private $mouvementsStock;
/**
* @ORM\Column(name="bon_livraison", type="string", length=255, nullable=true)
*/
private $bonLivraison;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\CommandeFournisseur", inversedBy="receptions")
* @ORM\JoinColumn(nullable=true)
*/
private $commandeFournisseur;
/**
* @ORM\Column(name="aFacturer", type="boolean", nullable=true)
*/
private $aFacturer;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Fournisseurs\Fournisseur",inversedBy="receptions")
* @ORM\JoinColumn(nullable=true)
*/
private $fournisseur;
/**
* @ORM\Column(name="reference", type="string", length=255, nullable=true)
*/
private $reference;
/**
* @ORM\Column(name="frais_port_supplementaire", type="float", nullable=true)
*/
private $fraisPortSupplementaire;
/**
* @ORM\Column(name="fraix_fixe", type="float", nullable=true)
*/
private $fraisFixe = 0;
/**
* @ORM\Column(name="frais_approche", type="float", nullable=true)
*/
private $fraisApproche;
public function __construct()
{
$this->date = new Datetime();
$this->aFacturer = true;
$this->mouvementsStock = new ArrayCollection();
}
public function getId(): int
{
return $this->id;
}
public function setDate(?DateTime $date): Reception
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setDateSuppression(?DateTime $dateSuppression): Reception
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setDateMaj(?DateTime $dateMaj): Reception
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?DateTime
{
return $this->dateMaj;
}
public function setUtilisateur(?Utilisateur $utilisateur): Reception
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function addMouvementsStock(MouvementStock $mouvementsStock): Reception
{
$this->mouvementsStock[] = $mouvementsStock;
return $this;
}
public function removeMouvementsStock(MouvementStock $mouvementsStock)
{
$this->mouvementsStock->removeElement($mouvementsStock);
}
public function getMouvementsStock(): Collection
{
return $this->mouvementsStock;
}
public function setBonLivraison(?string $bonLivraison): Reception
{
$this->bonLivraison = $bonLivraison;
return $this;
}
public function getBonLivraison(): ?string
{
return $this->bonLivraison;
}
public function setCommandeFournisseur(?CommandeFournisseur $commandeFournisseur): Reception
{
$this->commandeFournisseur = $commandeFournisseur;
return $this;
}
public function getCommandeFournisseur(): ?CommandeFournisseur
{
return $this->commandeFournisseur;
}
public function setAFacturer(?bool $aFacturer): Reception
{
$this->aFacturer = $aFacturer;
return $this;
}
public function getAFacturer(): ?bool
{
return $this->aFacturer;
}
public function setFournisseur(?Fournisseur $fournisseur): Reception
{
$this->fournisseur = $fournisseur;
return $this;
}
public function getFournisseur(): ?Fournisseur
{
return $this->fournisseur;
}
public function setReference(?string $reference): Reception
{
$this->reference = $reference;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setCommentaire(?string $commentaire): Reception
{
$this->commentaire = $commentaire;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setFraisPortSupplementaire(?float $fraisPortSupplementaire): Reception
{
$this->fraisPortSupplementaire = $fraisPortSupplementaire;
return $this;
}
public function getFraisPortSupplementaire(): ?float
{
return $this->fraisPortSupplementaire;
}
public function setFraisFixe(?float $fraisFixe): Reception
{
$this->fraisFixe = $fraisFixe;
return $this;
}
public function getFraisFixe(): ?float
{
return $this->fraisFixe;
}
public function setFraisApproche(?float $fraisApproche): Reception
{
$this->fraisApproche = $fraisApproche;
return $this;
}
public function getFraisApproche(): ?float
{
return $this->fraisApproche;
}
}