<?php
/**
* ReceptionDetail.php
* Created by Stéphane Brun
* Date: 10/07/2018 at 08:40
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ReceptionDetailRepository")
* @ORM\Table(name="reception_detail")
*/
class ReceptionDetail
{
const HISTORY_WATCH = array(
'qteRecue' => 'Quantité reçue',
'reponse' => 'Réponse',
'aTraiter' => 'A traiter',
);
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(name="flag", type="boolean")
*/
protected $flag = false;
/**
* @ORM\Column(name="titre", type="string", length=600, nullable=true)
*/
protected $titre;
/**
* @ORM\Column(name="qte", type="integer")
*/
protected $qte = 0;
/**
* @ORM\Column(name="qte_recue", type="integer")
*/
protected $qteRecue = 0;
/**
* @ORM\Column(name="qte_recue_ftp", type="integer")
*/
protected $qteRecueFTP = 0;
/**
* @ORM\Column(name="qte_retournee", type="integer")
*/
protected $qteRetournee = 0;
/**
* @ORM\Column(name="qte_retournee_sadr", type="integer")
*/
protected $qteRetourneeSADR = 0;
/**
* @ORM\Column(name="retrait", type="boolean")
*/
protected $retrait = false;
// /**
// * @ORM\Column(name="reponse", type="integer")
// */
// protected $reponse = 0;
/**
* has one CommandeReponse
*
* @ORM\ManyToOne(targetEntity="App\Entity\CommandeReponse")
* @ORM\JoinColumn(name="reponse_id", referencedColumnName="id")
*/
protected $reponse;
/**
* La réponse renvoyé par le fournisseur en cas de commande FTP
* @ORM\Column(name="reponse_text", type="string", length=600, nullable=true)
*/
protected $reponseText;
/**
* @ORM\Column(name="pvu", type="float")
*/
protected $pvu = 0;
/**
* @ORM\Column(name="remise", type="integer")
*/
protected $remise = 40;
/**
* @ORM\Column(name="a_traiter", type="boolean")
*/
protected $aTraiter = true;
/**
* @ORM\Column(name="coutant", type="float")
*/
protected $coutant = 0;
/**
* has one CommandeDetail
*
* @ORM\ManyToOne(targetEntity="App\Entity\Commande")
* @ORM\JoinColumn(name="commande_id", referencedColumnName="id", nullable=true)
*/
protected $commande;
/**
* has one CommandeSpecialeDetail
*
* @ORM\ManyToOne(targetEntity="App\Entity\CommandeSpecialeDetail", inversedBy="receptionDetail")
* @ORM\JoinColumn(name="commande_speciale_detail_id", referencedColumnName="id", nullable=true)
*/
protected $commandeSpecialeDetail;
/**
* has one Titre
*
* @ORM\ManyToOne(targetEntity="App\Entity\Titre", cascade={"persist"})
* @ORM\JoinColumn(name="titre_id", referencedColumnName="TISBN")
*/
protected $produit;
/**
* has one TitreCompany
*
* @ORM\ManyToOne(targetEntity="App\Entity\TitreCompany", cascade={"persist"})
* @ORM\JoinColumn(name="titre_company_id", referencedColumnName="id")
*/
protected $titreCompany;
/**
* has one Company
*
* @ORM\ManyToOne(targetEntity="App\Entity\Company")
* @ORM\JoinColumn(name="company_id", referencedColumnName="id")
*/
protected $company;
/**
* has one Reception
*
* @ORM\ManyToOne(targetEntity="App\Entity\Reception", inversedBy="details")
* @ORM\JoinColumn(name="reception_id", referencedColumnName="id")
*/
protected $reception;
/**
* has one Reception
*
* @ORM\ManyToOne(targetEntity="App\Entity\Reception")
* @ORM\JoinColumn(name="original_reception_id", referencedColumnName="id", nullable=true)
*/
protected $originalReception;
/**
* has one ReceptionDetail
*
* @ORM\ManyToOne(targetEntity="App\Entity\CommandeDetail", inversedBy="receptionDetail"))
* @ORM\JoinColumn(name="original_commande_detail_id", referencedColumnName="id", nullable=true)
*/
protected $originalCommandeDetail;
/**
* has one Etiquette
*
* @ORM\Column(name="etiquette_id", type="integer", nullable=true)
*/
protected $etiquette;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getFlag()
{
return $this->flag;
}
/**
* @return mixed
*/
public function isFlag()
{
return $this->getFlag();
}
/**
* @param mixed $flag
* @return ReceptionDetail
*/
public function setFlag($flag)
{
$this->flag = $flag;
return $this;
}
/**
* @return mixed
*/
public function getTitre()
{
return $this->titre;
}
/**
* @param mixed $titre
* @return ReceptionDetail
*/
public function setTitre($titre)
{
$this->titre = $titre;
return $this;
}
/**
* @return mixed
*/
public function getQte()
{
return $this->qte;
}
/**
* @param mixed $qte
* @return ReceptionDetail
*/
public function setQte($qte)
{
$this->qte = $qte;
return $this;
}
/**
* @return mixed
*/
public function getQteRecue()
{
return $this->qteRecue;
}
/**
* @param mixed $qteRecue
* @return ReceptionDetail
*/
public function setQteRecue($qteRecue)
{
$this->qteRecue = $qteRecue;
return $this;
}
/**
* @return mixed
*/
public function getQteRecueFTP()
{
return $this->qteRecueFTP;
}
/**
* @param mixed $qteRecueFTP
* @return ReceptionDetail
*/
public function setQteRecueFTP($qteRecueFTP)
{
$this->qteRecueFTP = $qteRecueFTP;
return $this;
}
/**
* @return mixed
*/
public function getQteRetournee()
{
return $this->qteRetournee;
}
/**
* @param mixed $qteRetournee
* @return ReceptionDetail
*/
public function setQteRetournee($qteRetournee)
{
$this->qteRetournee = $qteRetournee;
return $this;
}
/**
* @return mixed
*/
public function getQteRetourneeSADR()
{
return $this->qteRetourneeSADR;
}
/**
* @param mixed $qteRetourneeSADR
* @return ReceptionDetail
*/
public function setQteRetourneeSADR($qteRetourneeSADR)
{
$this->qteRetourneeSADR = $qteRetourneeSADR;
return $this;
}
/**
* @return mixed
*/
public function getRetrait()
{
return $this->retrait;
}
/**
* @return mixed
*/
public function isRetrait()
{
return $this->getRetrait();
}
/**
* @param mixed $retrait
* @return ReceptionDetail
*/
public function setRetrait($retrait)
{
$this->retrait = $retrait;
return $this;
}
/**
* @return mixed
*/
public function getReponse()
{
return $this->reponse;
}
/**
* @param mixed $reponse
* @return ReceptionDetail
*/
public function setReponse($reponse)
{
$this->reponse = $reponse;
return $this;
}
/**
* @return mixed
*/
public function getReponseText()
{
return $this->reponseText;
}
/**
* @param mixed $reponseText
*/
public function setReponseText($reponseText): void
{
$this->reponseText = $reponseText;
}
/**
* @return mixed
*/
public function getPvu()
{
return $this->pvu;
}
/**
* @param mixed $pvu
* @return ReceptionDetail
*/
public function setPvu($pvu)
{
$this->pvu = $pvu;
return $this;
}
/**
* @return mixed
*/
public function getRemise()
{
return $this->remise;
}
/**
* @param mixed $remise
* @return ReceptionDetail
*/
public function setRemise($remise)
{
$this->remise = $remise;
return $this;
}
/**
* @return mixed
*/
public function getATraiter()
{
return $this->aTraiter;
}
/**
* @return mixed
*/
public function isATraiter()
{
return $this->getATraiter();
}
/**
* @param mixed $aTraiter
* @return ReceptionDetail
*/
public function setATraiter($aTraiter)
{
$this->aTraiter = $aTraiter;
return $this;
}
/**
* @return mixed
*/
public function getCoutant()
{
return $this->coutant;
}
/**
* @param mixed $coutant
* @return ReceptionDetail
*/
public function setCoutant($coutant)
{
$this->coutant = $coutant;
return $this;
}
/**
* @return Commande
*/
public function getCommande()
{
return $this->commande;
}
/**
* @param Commande $commande
* @return ReceptionDetail
*/
public function setCommande(Commande $commande)
{
$this->commande = $commande;
return $this;
}
/**
* @return Titre
*/
public function getProduit()
{
return $this->produit;
}
/**
* @param Titre $produit
* @return ReceptionDetail
*/
public function setProduit(Titre $produit)
{
$this->produit = $produit;
return $this;
}
/**
* @return Reception
*/
public function getReception()
{
return $this->reception;
}
/**
* @param Reception $reception
* @return ReceptionDetail
*/
public function setReception(Reception $reception)
{
$this->reception = $reception;
return $this;
}
/**
* @return Reception
*/
public function getOriginalReception()
{
return $this->originalReception;
}
/**
* @param Reception $originalReception
* @return ReceptionDetail
*/
public function setOriginalReception(Reception $originalReception)
{
$this->originalReception = $originalReception;
return $this;
}
/**
* @return CommandeDetail
*/
public function getOriginalCommandeDetail()
{
return $this->originalCommandeDetail;
}
/**
* @param CommandeDetail $originalCommandeDetail
* @return ReceptionDetail
*/
public function setOriginalCommandeDetail(CommandeDetail $originalCommandeDetail)
{
$this->originalCommandeDetail = $originalCommandeDetail;
return $this;
}
/**
* @return mixed
*/
public function getEtiquette()
{
return $this->etiquette;
}
/**
* @param mixed $etiquette
* @return ReceptionDetail
*/
public function setEtiquette($etiquette)
{
$this->etiquette = $etiquette;
return $this;
}
/**
* @return TitreCompany
*/
public function getTitreCompany()
{
return $this->titreCompany;
}
/**
* @param TitreCompany $titreCompany
* @return ReceptionDetail
*/
public function setTitreCompany(TitreCompany $titreCompany)
{
$this->titreCompany = $titreCompany;
return $this;
}
/**
* @return Company
*/
public function getCompany()
{
return $this->company;
}
/**
* @param Company $company
* @return ReceptionDetail
*/
public function setCompany(Company $company)
{
$this->company = $company;
return $this;
}
/**
* @return CommandeSpecialeDetail
*/
public function getCommandeSpecialeDetail()
{
return $this->commandeSpecialeDetail;
}
/**
* @param CommandeSpecialeDetail $commandeSpecialeDetail
* @return ReceptionDetail
*/
public function setCommandeSpecialeDetail(CommandeSpecialeDetail $commandeSpecialeDetail)
{
$this->commandeSpecialeDetail = $commandeSpecialeDetail;
return $this;
}
}