src/Entity/TitreCompany.php line 17

Open in your IDE?
  1. <?php
  2. /**
  3.  * TitreCompany.php
  4.  * Created by Stéphane Brun
  5.  * Date: 03/05/2018 at 15:57
  6.  */
  7. namespace App\Entity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="titre_company")
  12.  * @ORM\Entity(repositoryClass="App\Repository\TitreCompanyRepository")
  13.  */
  14. class TitreCompany
  15. {
  16.     const HISTORY_WATCH = [
  17.         'titre'              => 'ISBN',
  18.         'qSeuil'             => 'Seuil',
  19.         'qem'                => 'En main',
  20.         'qManquante'         => 'Manquante',
  21.         'qAbimes'            => 'Abimé',
  22.         'qMisDeCote'         => 'Mis de coté',
  23.         'qConsignation'      => 'Consig X2',
  24.         'qCommandeReguliere' => 'Commande régulière',
  25.         'qCommandeSpeciale'  => 'Commande spéciale',
  26.     ];
  27.     /**
  28.      * @ORM\Column(type="integer")
  29.      * @ORM\Id
  30.      * @ORM\GeneratedValue(strategy="AUTO")
  31.      */
  32.     protected $id;
  33.     /**
  34.      * @ORM\Column(name="TEnSalle", type="boolean", nullable=true)
  35.      */
  36.     protected $enSalle;
  37.     /**
  38.      * @ORM\Column(name="TVedette", type="float", nullable=true)
  39.      */
  40.     protected $vedette;
  41.     /**
  42.      * @ORM\Column(name="TSVedette1", type="float", nullable=true)
  43.      */
  44.     protected $sousVedette1;
  45.     /**
  46.      * @ORM\Column(name="TEtatDepuis", type="datetime", nullable=true)
  47.      */
  48.     protected $etatDepuis;
  49.     /**
  50.      * @ORM\Column(name="TAcquisition", type="integer", nullable=true)
  51.      */
  52.     protected $acquisition;
  53.     /**
  54.      * @ORM\Column(name="TCatalogue", type="boolean", nullable=true)
  55.      */
  56.     protected $catalogue;
  57.     /**
  58.      * @ORM\Column(name="TQSeuil", type="integer", nullable=true)
  59.      */
  60.     protected $qSeuil;
  61.     /**
  62.      * @ORM\Column(name="TQEM", type="integer", nullable=true)
  63.      */
  64.     protected $qem;
  65.     /**
  66.      * @ORM\Column(name="TQManquante", type="integer", nullable=true)
  67.      */
  68.     protected $qManquante;
  69.     /**
  70.      * @ORM\Column(name="TQAbimes", type="integer", nullable=true)
  71.      */
  72.     protected $qAbimes;
  73.     /**
  74.      * @ORM\Column(name="TQMdeCote", type="integer", nullable=true)
  75.      */
  76.     protected $qMisDeCote;
  77.     /**
  78.      * @ORM\Column(name="TQConsignation", type="integer", nullable=true)
  79.      */
  80.     protected $qConsignation;
  81.     /**
  82.      * @ORM\Column(name="TQCommandeReguliere", type="integer", nullable=true)
  83.      */
  84.     protected $qCommandeReguliere;
  85.     /**
  86.      * @ORM\Column(name="TQCommandeSpeciale", type="integer", nullable=true)
  87.      */
  88.     protected $qCommandeSpeciale;
  89.     /**
  90.      * @ORM\OneToMany(targetEntity="App\Entity\CommandeSpecialeDetail", mappedBy="titreCompany")
  91.      */
  92.     protected $commandesSpecialeDetails;
  93.     /**
  94.      * @ORM\Column(name="TCommentaire", type="text", nullable=true)
  95.      */
  96.     protected $commentaire;
  97.     /**
  98.      * @ORM\Column(name="TQComptee", type="integer", nullable=true)
  99.      */
  100.     protected $qComptee;
  101.     /**
  102.      * @ORM\Column(name="TQCompteeDate", type="datetime", nullable=true)
  103.      */
  104.     protected $qCompteeDate;
  105.     /**
  106.      * @ORM\Column(name="TQAjustement", type="integer", nullable=true)
  107.      */
  108.     protected $qAjustement;
  109.     /**
  110.      * @ORM\Column(name="TDate", type="datetime", nullable=true)
  111.      */
  112.     protected $date;
  113.     /**
  114.      * @ORM\Column(name="TDateCompteeReelle", type="datetime", nullable=true)
  115.      */
  116.     protected $dateCompteeReelle;
  117.     /**
  118.      * @ORM\Column(name="TCategorie", type="string", length=255, nullable=true)
  119.      */
  120.     protected $categorie;
  121.     /**
  122.      * @ORM\Column(name="TEtiquettesSpeciales", type="integer", nullable=true)
  123.      */
  124.     protected $etiquettesSpeciales;
  125.     /**
  126.      * @ORM\Column(name="TEnLigne", type="integer", nullable=true)
  127.      */
  128.     protected $enLigne;
  129.     /**
  130.      * @ORM\Column(name="TVitrine", type="integer", nullable=true)
  131.      */
  132.     protected $vitrine;
  133.     /**
  134.      * @ORM\Column(name="tqtereserve", type="integer", nullable=true)
  135.      */
  136.     protected $qReserve;
  137.     /**
  138.      * @ORM\Column(name="TSSCollectionNumero", type="string", length=50, nullable=true)
  139.      */
  140.     protected $ssCollectionNumero;
  141.     /**
  142.      * @ORM\Column(name="TCollectionNumero", type="string", length=50, nullable=true)
  143.      */
  144.     protected $collectionNumero;
  145.     /**
  146.      * @ORM\Column(name="Collqc", type="integer", nullable=true)
  147.      */
  148.     protected $collqc;
  149.     /**
  150.      * Many Titres has one Collections
  151.      *
  152.      * @ORM\ManyToOne(targetEntity="App\Entity\Collections", cascade={"persist"})
  153.      * @ORM\JoinColumn(name="TCollection", referencedColumnName="id", nullable=true)
  154.      */
  155.     protected $collection;
  156.     /**
  157.      * Many Titres has one (Sub)Collections
  158.      *
  159.      * @ORM\ManyToOne(targetEntity="App\Entity\Collections", cascade={"persist"})
  160.      * @ORM\JoinColumn(name="TSSCollection", referencedColumnName="id", nullable=true)
  161.      */
  162.     protected $sousCollection;
  163.     /**
  164.      * Many Titres has one Departements
  165.      *
  166.      * @ORM\ManyToOne(targetEntity="App\Entity\Departements", cascade={"persist"}, inversedBy="titresCompany")
  167.      * @ORM\JoinColumn(name="TDepartement", referencedColumnName="id", nullable=true)
  168.      */
  169.     protected $departement;
  170.     /**
  171.      * Many Titres has one Rayons
  172.      *
  173.      * @ORM\ManyToOne(targetEntity="App\Entity\Rayons", cascade={"persist"})
  174.      * @ORM\JoinColumn(name="TRayon", referencedColumnName="id", nullable=true)
  175.      */
  176.     protected $rayon;
  177.     /**
  178.      * Many Titres has one (Sub) Rayons
  179.      *
  180.      * @ORM\ManyToOne(targetEntity="App\Entity\Rayons", cascade={"persist"})
  181.      * @ORM\JoinColumn(name="TRayon2", referencedColumnName="id", nullable=true)
  182.      */
  183.     protected $rayon2;
  184.     /**
  185.      * Many Titres has one Sujets(1)
  186.      *
  187.      * @ORM\ManyToOne(targetEntity="App\Entity\Sujets", cascade={"persist"})
  188.      * @ORM\JoinColumn(name="TSujet1", referencedColumnName="id", nullable=true)
  189.      */
  190.     protected $sujet1;
  191.     /**
  192.      * Many Titres has one Sujets(2)
  193.      *
  194.      * @ORM\ManyToOne(targetEntity="App\Entity\Sujets", cascade={"persist"})
  195.      * @ORM\JoinColumn(name="TSujet2", referencedColumnName="id", nullable=true)
  196.      */
  197.     protected $sujet2;
  198.     /**
  199.      * Many Titres has one Sujets(3)
  200.      *
  201.      * @ORM\ManyToOne(targetEntity="App\Entity\Sujets", cascade={"persist"})
  202.      * @ORM\JoinColumn(name="TSujet3", referencedColumnName="id", nullable=true)
  203.      */
  204.     protected $sujet3;
  205.     /**
  206.      * Many Titres has one Etats
  207.      *
  208.      * @ORM\ManyToOne(targetEntity="App\Entity\Etats", cascade={"persist"})
  209.      * @ORM\JoinColumn(name="TEtat", referencedColumnName="id", nullable=true)
  210.      */
  211.     protected $etat;
  212.     /**
  213.      * has one Titre
  214.      *
  215.      * @ORM\ManyToOne(targetEntity="App\Entity\Titre", inversedBy="titreCompany", cascade={"persist"})
  216.      * @ORM\JoinColumn(name="titre_id", referencedColumnName="TISBN")
  217.      */
  218.     protected $titre;
  219.     /**
  220.      * has one Company
  221.      *
  222.      * @ORM\ManyToOne(targetEntity="Company", inversedBy="titresCompany", cascade={"persist"})
  223.      * @ORM\JoinColumn(name="company_id", referencedColumnName="id")
  224.      */
  225.     protected $company;
  226.     public function __construct()
  227.     {
  228.         /*Defined default values to 0 for original structure data
  229.         * Order reporting need integer values to calculate result
  230.         */
  231.         $this->qSeuil 0;
  232.         $this->qem 0;
  233.         $this->qManquante 0;
  234.         $this->qAbimes 0;
  235.         $this->qMisDeCote 0;
  236.         $this->qConsignation 0;
  237.         $this->qCommandeReguliere 0;
  238.         $this->qCommandeSpeciale 0;
  239.     }
  240.     /**
  241.      * @return mixed
  242.      */
  243.     public function getCompany()
  244.     {
  245.         return $this->company;
  246.     }
  247.     /**
  248.      * @param Company $company
  249.      */
  250.     public function setCompany(Company $company)
  251.     {
  252.         $this->company $company;
  253.     }
  254.     /**
  255.      * @return mixed
  256.      */
  257.     public function getId()
  258.     {
  259.         return $this->id;
  260.     }
  261.     /**
  262.      * @param mixed $id
  263.      */
  264.     public function setId($id): void
  265.     {
  266.         $this->id $id;
  267.     }
  268.     /**
  269.      * @return mixed
  270.      */
  271.     public function getEnSalle()
  272.     {
  273.         return $this->enSalle;
  274.     }
  275.     /**
  276.      * @param mixed $enSalle
  277.      */
  278.     public function setEnSalle($enSalle null)
  279.     {
  280.         $this->enSalle $enSalle;
  281.     }
  282.     /**
  283.      * @return mixed
  284.      */
  285.     public function getVedette()
  286.     {
  287.         return $this->vedette;
  288.     }
  289.     /**
  290.      * @param mixed $vedette
  291.      */
  292.     public function setVedette($vedette null)
  293.     {
  294.         $this->vedette $vedette;
  295.     }
  296.     /**
  297.      * @return mixed
  298.      */
  299.     public function getSousVedette1()
  300.     {
  301.         return $this->sousVedette1;
  302.     }
  303.     /**
  304.      * @param mixed $sousVedette1
  305.      */
  306.     public function setSousVedette1($sousVedette1 null)
  307.     {
  308.         $this->sousVedette1 $sousVedette1;
  309.     }
  310.     /**
  311.      * @return mixed
  312.      */
  313.     public function getEtatDepuis()
  314.     {
  315.         return $this->etatDepuis;
  316.     }
  317.     /**
  318.      * @param mixed $etatDepuis
  319.      */
  320.     public function setEtatDepuis($etatDepuis null)
  321.     {
  322.         $this->etatDepuis $etatDepuis;
  323.     }
  324.     /**
  325.      * @return mixed
  326.      */
  327.     public function getAcquisition()
  328.     {
  329.         return $this->acquisition;
  330.     }
  331.     /**
  332.      * @param mixed $acquisition
  333.      */
  334.     public function setAcquisition($acquisition null)
  335.     {
  336.         $this->acquisition $acquisition;
  337.     }
  338.     /**
  339.      * @return mixed
  340.      */
  341.     public function getCatalogue()
  342.     {
  343.         return $this->catalogue;
  344.     }
  345.     /**
  346.      * @param mixed $catalogue
  347.      */
  348.     public function setCatalogue($catalogue null)
  349.     {
  350.         $this->catalogue $catalogue;
  351.     }
  352.     /**
  353.      * @return mixed
  354.      */
  355.     public function getQSeuil()
  356.     {
  357.         return $this->qSeuil;
  358.     }
  359.     /**
  360.      * @param mixed $qSeuil
  361.      */
  362.     public function setQSeuil($qSeuil null)
  363.     {
  364.         $this->qSeuil $qSeuil;
  365.     }
  366.     /**
  367.      * @return mixed
  368.      */
  369.     public function getQem()
  370.     {
  371.         return $this->qem;
  372.     }
  373.     /**
  374.      * @param mixed $qem
  375.      */
  376.     public function setQem($qem null)
  377.     {
  378.         $this->qem $qem;
  379.     }
  380.     /**
  381.      * @return mixed
  382.      */
  383.     public function getQManquante()
  384.     {
  385.         return $this->qManquante;
  386.     }
  387.     /**
  388.      * @param mixed $qManquante
  389.      */
  390.     public function setQManquante($qManquante null)
  391.     {
  392.         $this->qManquante $qManquante;
  393.     }
  394.     /**
  395.      * @return mixed
  396.      */
  397.     public function getQAbimes()
  398.     {
  399.         return $this->qAbimes;
  400.     }
  401.     /**
  402.      * @param mixed $qAbimes
  403.      */
  404.     public function setQAbimes($qAbimes null)
  405.     {
  406.         $this->qAbimes $qAbimes;
  407.     }
  408.     /**
  409.      * @return mixed
  410.      */
  411.     public function getQMisDeCote()
  412.     {
  413.         return $this->qMisDeCote;
  414.     }
  415.     /**
  416.      * @param mixed $qMisDeCote
  417.      */
  418.     public function setQMisDeCote($qMisDeCote null)
  419.     {
  420.         $this->qMisDeCote $qMisDeCote;
  421.     }
  422.     /**
  423.      * @return mixed
  424.      */
  425.     public function getQConsignation()
  426.     {
  427.         return $this->qConsignation;
  428.     }
  429.     /**
  430.      * @param mixed $qConsignation
  431.      */
  432.     public function setQConsignation($qConsignation null)
  433.     {
  434.         $this->qConsignation $qConsignation;
  435.     }
  436.     /**
  437.      * @return mixed
  438.      */
  439.     public function getQCommandeReguliere()
  440.     {
  441.         return $this->qCommandeReguliere;
  442.     }
  443.     /**
  444.      * @param mixed $qCommandeReguliere
  445.      */
  446.     public function setQCommandeReguliere($qCommandeReguliere null)
  447.     {
  448.         $this->qCommandeReguliere $qCommandeReguliere;
  449.     }
  450.     /**
  451.      * @return mixed
  452.      */
  453.     public function getQCommandeSpeciale()
  454.     {
  455.         return $this->qCommandeSpeciale;
  456.     }
  457.     /**
  458.      * @param mixed $qCommandeSpeciale
  459.      */
  460.     public function setQCommandeSpeciale($qCommandeSpeciale null)
  461.     {
  462.         $this->qCommandeSpeciale $qCommandeSpeciale;
  463.     }
  464.     /**
  465.      * @return mixed
  466.      */
  467.     public function getCommandesSpecialeDetails()
  468.     {
  469.         return $this->commandesSpecialeDetails;
  470.     }
  471.     /**
  472.      * @param mixed $commandesSpecialeDetails
  473.      */
  474.     public function setCommandesSpecialeDetails($commandesSpecialeDetails): void
  475.     {
  476.         $this->commandesSpecialeDetails $commandesSpecialeDetails;
  477.     }
  478.     /**
  479.      * @return mixed
  480.      */
  481.     public function getCommentaire()
  482.     {
  483.         return $this->commentaire;
  484.     }
  485.     /**
  486.      * @param mixed $commentaire
  487.      */
  488.     public function setCommentaire($commentaire null)
  489.     {
  490.         $this->commentaire $commentaire;
  491.     }
  492.     /**
  493.      * @return mixed
  494.      */
  495.     public function getQComptee()
  496.     {
  497.         return $this->qComptee;
  498.     }
  499.     /**
  500.      * @param mixed $qComptee
  501.      */
  502.     public function setQComptee($qComptee null)
  503.     {
  504.         $this->qComptee $qComptee;
  505.     }
  506.     /**
  507.      * @return mixed
  508.      */
  509.     public function getQCompteeDate()
  510.     {
  511.         return $this->qCompteeDate;
  512.     }
  513.     /**
  514.      * @param mixed $qCompteeDate
  515.      */
  516.     public function setQCompteeDate($qCompteeDate null)
  517.     {
  518.         if (!empty($qCompteeDate) && !is_a($qCompteeDate'DateTime')) {
  519.             $this->qCompteeDate = new \DateTime($qCompteeDate);
  520.         } else {
  521.             $this->qCompteeDate $qCompteeDate;
  522.         }
  523.     }
  524.     /**
  525.      * @return mixed
  526.      */
  527.     public function getQAjustement()
  528.     {
  529.         return $this->qAjustement;
  530.     }
  531.     /**
  532.      * @param mixed $qAjustement
  533.      */
  534.     public function setQAjustement($qAjustement null)
  535.     {
  536.         $this->qAjustement $qAjustement;
  537.     }
  538.     /**
  539.      * @return mixed
  540.      */
  541.     public function getDate()
  542.     {
  543.         return $this->date;
  544.     }
  545.     /**
  546.      * @param mixed $date
  547.      */
  548.     public function setDate($date null)
  549.     {
  550.         $this->date $date;
  551.     }
  552.     /**
  553.      * @return mixed
  554.      */
  555.     public function getDateCompteeReelle()
  556.     {
  557.         return $this->dateCompteeReelle;
  558.     }
  559.     /**
  560.      * @param mixed $dateCompteeReelle
  561.      */
  562.     public function setDateCompteeReelle($dateCompteeReelle null)
  563.     {
  564.         $this->dateCompteeReelle $dateCompteeReelle;
  565.     }
  566.     /**
  567.      * @return mixed
  568.      */
  569.     public function getCategorie()
  570.     {
  571.         return $this->categorie;
  572.     }
  573.     /**
  574.      * @param mixed $categorie
  575.      */
  576.     public function setCategorie($categorie null)
  577.     {
  578.         $this->categorie $categorie;
  579.     }
  580.     /**
  581.      * @return mixed
  582.      */
  583.     public function getEtiquettesSpeciales()
  584.     {
  585.         return $this->etiquettesSpeciales;
  586.     }
  587.     /**
  588.      * @param mixed $etiquettesSpeciales
  589.      */
  590.     public function setEtiquettesSpeciales($etiquettesSpeciales null)
  591.     {
  592.         $this->etiquettesSpeciales $etiquettesSpeciales;
  593.     }
  594.     /**
  595.      * @return mixed
  596.      */
  597.     public function getEnLigne()
  598.     {
  599.         return $this->enLigne;
  600.     }
  601.     /**
  602.      * @param mixed $enLigne
  603.      */
  604.     public function setEnLigne($enLigne null)
  605.     {
  606.         $this->enLigne $enLigne;
  607.     }
  608.     /**
  609.      * @return mixed
  610.      */
  611.     public function getVitrine()
  612.     {
  613.         return $this->vitrine;
  614.     }
  615.     /**
  616.      * @param mixed $vitrine
  617.      */
  618.     public function setVitrine($vitrine null)
  619.     {
  620.         $this->vitrine $vitrine;
  621.     }
  622.     /**
  623.      * @return mixed
  624.      */
  625.     public function getQReserve()
  626.     {
  627.         return $this->qReserve;
  628.     }
  629.     /**
  630.      * @param mixed $qReserve
  631.      */
  632.     public function setQReserve($qReserve null)
  633.     {
  634.         $this->qReserve $qReserve;
  635.     }
  636.     /**
  637.      * @return mixed
  638.      */
  639.     public function getSsCollectionNumero()
  640.     {
  641.         return $this->ssCollectionNumero;
  642.     }
  643.     /**
  644.      * @param mixed $ssCollectionNumero
  645.      */
  646.     public function setSsCollectionNumero($ssCollectionNumero null)
  647.     {
  648.         $this->ssCollectionNumero $ssCollectionNumero;
  649.     }
  650.     /**
  651.      * @return mixed
  652.      */
  653.     public function getCollectionNumero()
  654.     {
  655.         return $this->collectionNumero;
  656.     }
  657.     /**
  658.      * @param mixed $collectionNumero
  659.      */
  660.     public function setCollectionNumero($collectionNumero null)
  661.     {
  662.         $this->collectionNumero $collectionNumero;
  663.     }
  664.     /**
  665.      * @return mixed
  666.      */
  667.     public function getCollqc()
  668.     {
  669.         return $this->collqc;
  670.     }
  671.     /**
  672.      * @param mixed $collqc
  673.      */
  674.     public function setCollqc($collqc null)
  675.     {
  676.         $this->collqc $collqc;
  677.     }
  678.     /**
  679.      * @return mixed
  680.      */
  681.     public function getCollection()
  682.     {
  683.         return $this->collection;
  684.     }
  685.     /**
  686.      * @param mixed $collection
  687.      */
  688.     public function setCollection($collection null)
  689.     {
  690.         $this->collection $collection;
  691.     }
  692.     /**
  693.      * @return mixed
  694.      */
  695.     public function getSousCollection()
  696.     {
  697.         return $this->sousCollection;
  698.     }
  699.     /**
  700.      * @param mixed $sousCollection
  701.      */
  702.     public function setSousCollection($sousCollection null)
  703.     {
  704.         $this->sousCollection $sousCollection;
  705.     }
  706.     /**
  707.      * @return mixed
  708.      */
  709.     public function getDepartement()
  710.     {
  711.         return $this->departement;
  712.     }
  713.     /**
  714.      * @param mixed $departement
  715.      */
  716.     public function setDepartement($departement null)
  717.     {
  718.         $this->departement $departement;
  719.     }
  720.     /**
  721.      * @return mixed
  722.      */
  723.     public function getRayon()
  724.     {
  725.         return $this->rayon;
  726.     }
  727.     /**
  728.      * @param mixed $rayon
  729.      */
  730.     public function setRayon($rayon null)
  731.     {
  732.         $this->rayon $rayon;
  733.     }
  734.     /**
  735.      * @return mixed
  736.      */
  737.     public function getRayon2()
  738.     {
  739.         return $this->rayon2;
  740.     }
  741.     /**
  742.      * @param mixed $rayon2
  743.      */
  744.     public function setRayon2($rayon2 null)
  745.     {
  746.         $this->rayon2 $rayon2;
  747.     }
  748.     /**
  749.      * @return mixed
  750.      */
  751.     public function getSujet1()
  752.     {
  753.         return $this->sujet1;
  754.     }
  755.     /**
  756.      * @param mixed $sujet1
  757.      */
  758.     public function setSujet1($sujet1 null)
  759.     {
  760.         $this->sujet1 $sujet1;
  761.     }
  762.     /**
  763.      * @return mixed
  764.      */
  765.     public function getSujet2()
  766.     {
  767.         return $this->sujet2;
  768.     }
  769.     /**
  770.      * @param mixed $sujet2
  771.      */
  772.     public function setSujet2($sujet2 null)
  773.     {
  774.         $this->sujet2 $sujet2;
  775.     }
  776.     /**
  777.      * @return mixed
  778.      */
  779.     public function getSujet3()
  780.     {
  781.         return $this->sujet3;
  782.     }
  783.     /**
  784.      * @param mixed $sujet3
  785.      */
  786.     public function setSujet3($sujet3 null)
  787.     {
  788.         $this->sujet3 $sujet3;
  789.     }
  790.     /**
  791.      * @return mixed
  792.      */
  793.     public function getEtat()
  794.     {
  795.         return $this->etat;
  796.     }
  797.     /**
  798.      * @param mixed $etat
  799.      */
  800.     public function setEtat($etat null)
  801.     {
  802.         $this->etat $etat;
  803.     }
  804.     /**
  805.      * @return mixed
  806.      */
  807.     public function getTitre()
  808.     {
  809.         return $this->titre;
  810.     }
  811.     /**
  812.      * @param Titre $titre
  813.      */
  814.     public function setTitre(Titre $titre)
  815.     {
  816.         $this->titre $titre;
  817.     }
  818.     /**
  819.      * Calculate the available quantity
  820.      *
  821.      * @return mixed
  822.      */
  823.     public function getDisponible()
  824.     {
  825.         $disponible $this->getQem()
  826.             - $this->getQManquante()
  827.             - $this->getQAbimes()
  828.             - $this->getQMisDeCote()
  829.             - $this->getQConsignation();
  830.         return $disponible;
  831.     }
  832.     /***
  833.      * Retourne this first non empty subject
  834.      *
  835.      * @return null|Sujets
  836.      */
  837.     public function getFirstSujet()
  838.     {
  839.         if (!empty($this->sujet1)) {
  840.             return $this->sujet1;
  841.         }
  842.         if (!empty($this->sujet2)) {
  843.             return $this->sujet2;
  844.         }
  845.         if (!empty($this->sujet3)) {
  846.             return $this->sujet3;
  847.         }
  848.         return null;
  849.     }
  850. }