src/Entity/GestionComerciale/Commande.php line 56

Open in your IDE?
  1. <?php
  2. namespace App\Entity\GestionComerciale;
  3. use App\Entity\Adresses\Adresse;
  4. use App\Entity\Articles\Devise;
  5. use App\Entity\Articles\MouvementStock;
  6. use App\Entity\Clients\Client;
  7. use App\Entity\Export\Export;
  8. use App\Entity\Litiges\Litige;
  9. use App\Entity\Localisation\SecteurGeographique;
  10. use App\Entity\Localisation\Zone;
  11. use App\Entity\MarketPlace\CompteMarketPlace;
  12. use App\Entity\MarketPlace\ModeReglementMarketPlace;
  13. use App\Entity\MarketPlace\Rapport;
  14. use App\Entity\MarketPlace\StatutCommande;
  15. use App\Entity\Notes\Note;
  16. use App\Entity\Projets\Projet;
  17. use App\Entity\Projets\ProjetActivite;
  18. use App\Entity\Projets\ProjetDomaine;
  19. use App\Entity\Rangements\Caisse;
  20. use App\Entity\Rangements\CommandeCaisse;
  21. use App\Entity\Rangements\CommandeEmplacement;
  22. use App\Entity\Rangements\NiveauUn;
  23. use App\Entity\Taxes\Taxe;
  24. use App\Entity\Transporteurs\RapportCloture;
  25. use App\Entity\Transporteurs\Transporteur;
  26. use App\Entity\Utilisateur\Contact;
  27. use App\Entity\Utilisateur\HistoriqueIntervention;
  28. use App\Entity\Utilisateur\Intervention;
  29. use App\Entity\Utilisateur\Utilisateur;
  30. use App\Entity\Vehicules\VehiculeClient;
  31. use DateTime;
  32. use Doctrine\Common\Collections\Collection;
  33. use Doctrine\ORM\Mapping as ORM;
  34. use Gedmo\Mapping\Annotation as Gedmo;
  35. use Symfony\Component\Validator\Constraints as Assert;
  36. //use Symfony\Component\Validator\ExecutionContextInterface;
  37. use Doctrine\Common\Collections\ArrayCollection;
  38. use Doctrine\ORM\Mapping\Index;
  39. use App\Annotations\SecuredEntity;
  40. /**
  41.  * Commande
  42.  *
  43.  * @ORM\Table("commerciale__commande",indexes={
  44. *  @ORM\Index(name="reference", columns={"reference"}),
  45. *  @ORM\Index(name="referenceMarketPlace", columns={"reference_market_place"})
  46.  * })
  47.  * @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\CommandeRepository")
  48.  * @ORM\HasLifecycleCallbacks()
  49.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  50.  * @SecuredEntity(name="Commandes", group="VENTES")
  51.  */
  52. class Commande
  53. {
  54.     /**
  55.      * @ORM\Column(name="id", type="integer")
  56.      * @ORM\Id
  57.      * @ORM\GeneratedValue(strategy="AUTO")
  58.      */
  59.     private $id;
  60.     /**
  61.      * @ORM\Column(name="a_bloquer", type="boolean", nullable=true)
  62.      */
  63.     private $aBloquer;
  64.     /**
  65.      * @ORM\ManyToOne(targetEntity="App\Entity\Rangements\NiveauUn", inversedBy="emplacements")
  66.      * @ORM\JoinColumn(nullable=true)
  67.      */
  68.     private $niveauUn;
  69.     /**
  70.      * @ORM\ManyToOne(targetEntity="App\Entity\Projets\Projet", inversedBy="commandes")
  71.      * @ORM\JoinColumn(nullable=true)
  72.      */
  73.     private $projet;
  74.     /**
  75.      * @ORM\Column(name="canal_vente", type="string", length=255, nullable=true)
  76.      */
  77.     private $canalVente;
  78.     /**
  79.      * @var integer
  80.      *
  81.      * @ORM\ManyToOne(targetEntity="App\Entity\Taxes\Taxe")
  82.      * @ORM\JoinColumn(nullable=true)
  83.      */
  84.     private $taxe;
  85.     /**
  86.      * @var integer
  87.      *
  88.      * @ORM\ManyToOne(targetEntity="App\Entity\Taxes\Taxe")
  89.      * @ORM\JoinColumn(nullable=true)
  90.      */
  91.     private $taxeFraisPort;
  92.     /**
  93.      * @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\CompteMarketPlace", cascade={"persist"})
  94.      */
  95.     private $compteMarketPlace;
  96.     /**
  97.      * @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\Rapport", cascade={"persist"})
  98.      */
  99.     private $rapportBext;
  100.     /**
  101.      * @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\StatutCommande", inversedBy="commandes")
  102.      * @ORM\JoinColumn(nullable=true)
  103.      */
  104.     private $statutCommandeMarketPlace;
  105.     /**
  106.      * @ORM\Column(name="reference_market_place", type="string", length=255, nullable=true)
  107.      */
  108.     private $referenceMarketPlace;
  109.     /**
  110.      * @ORM\OneToMany(targetEntity="App\Entity\Rangements\CommandeEmplacement", mappedBy="commande")
  111.      */
  112.     private $commandeEmplacements;
  113.     /**
  114.      * @ORM\OneToMany(targetEntity="App\Entity\Litiges\Litige", mappedBy="commande")
  115.      */
  116.     private $litiges;
  117.     /**
  118.      * @ORM\Column(name="bascule_comptabilite", type="boolean", nullable=true)
  119.      */
  120.     private $basculeComptabilite;
  121.     /**
  122.      * @ORM\Column(name="kilometrage", type="integer", nullable=true)
  123.      */
  124.     private $kilometrage;
  125.     /**
  126.      * @ORM\Column(name="duree_validite", type="datetime", nullable=true)
  127.      */
  128.     private $dureeValidite;
  129.     /**
  130.      * @ORM\Column(name="delai_relance", type="integer", nullable=true)
  131.      */
  132.     private $delaiRelance;
  133.     /**
  134.      * @ORM\Column(name="modifiable", type="boolean", nullable=true)
  135.      */
  136.     private $modifiable;
  137.     /**
  138.      * @ORM\Column(name="bp_auto", type="boolean", nullable=true)
  139.      */
  140.     private $bonPrepaAuto;
  141.     /**
  142.      * @ORM\ManyToOne(targetEntity="App\Entity\Vehicules\VehiculeClient", inversedBy="commande")
  143.      * @ORM\JoinColumn(nullable=true)
  144.      */
  145.     private $vehiculesClient;
  146.     /**
  147.      * @ORM\OneToMany(targetEntity="App\Entity\Utilisateur\Intervention", mappedBy="ordreRep")
  148.      * @ORM\JoinColumn(nullable=true)
  149.      */
  150.     private $interventions;
  151.     /**
  152.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Acompte", mappedBy="commande", cascade={"persist"})
  153.      * @ORM\JoinColumn(nullable=true)
  154.      */
  155.     private $acomptes;
  156.     /**
  157.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Acompte", mappedBy="parent")
  158.      * @ORM\JoinColumn(nullable=true)
  159.      */
  160.     private $reglements;
  161.     /**
  162.      * @ORM\Column(name="avoir_utilise", type="boolean", nullable=true)
  163.      */
  164.     private $avoirUtilise;
  165.     /**
  166.      * @ORM\Column(name="franco_port", type="boolean", nullable=true)
  167.      */
  168.     private $francoPort;
  169.     /**
  170.      * @ORM\Column(name="avecTaxe", type="boolean", nullable=true)
  171.      */
  172.     private $avecTaxe;
  173.     /**
  174.      * @ORM\Column(name="visible", type="boolean", nullable=true)
  175.      */
  176.     private $visible;
  177.     /**
  178.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande", inversedBy="docEnfantsDevis")
  179.      * @ORM\JoinColumn(nullable=true)
  180.      */
  181.     private $devis;
  182.     /**
  183.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande",inversedBy="bls")
  184.      * @ORM\JoinColumn(nullable=true)
  185.      */
  186.     private $facture;
  187.     /**
  188.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="devis")
  189.      */
  190.     private $docEnfantsDevis;
  191.     /**
  192.      * @ORM\OneToMany(targetEntity="App\Entity\Projets\ProjetActivite", mappedBy="commande")
  193.      */
  194.     private $projetActivites;
  195.     /**
  196.      * @ORM\OneToMany(targetEntity="App\Entity\Projets\ProjetDomaine", mappedBy="commande")
  197.      */
  198.     private $projetDomaines;
  199.     /**
  200.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="commande")
  201.      */
  202.     private $docEnfantsCommande;
  203.     /**
  204.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="bp")
  205.      */
  206.     private $docEnfantsBP;
  207.     /**
  208.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="bl")
  209.      */
  210.     private $docEnfantsBL;
  211.     /**
  212.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande",inversedBy="docEnfantsBL")
  213.      * @ORM\JoinColumn(nullable=true)
  214.      */
  215.     private $bl;
  216.     /**
  217.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="facture")
  218.      */
  219.     private $bls;
  220.     /**
  221.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande",inversedBy="docEnfantsBP")
  222.      * @ORM\JoinColumn(nullable=true)
  223.      */
  224.     private $bp;
  225.     /**
  226.      * @ORM\Column(name="marge", type="float", nullable=true)
  227.      *
  228.      */
  229.     private $marge;
  230.     /**
  231.      * @ORM\Column(name="taux_marge", type="float", nullable=true)
  232.      *
  233.      */
  234.     private $tauxMarge;
  235.     /**
  236.      * @ORM\Column(name="texte_facture", type="text", nullable=true)
  237.     */
  238.     private $texteFacture;
  239.     /**
  240.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande", cascade={"persist"},inversedBy="docEnfantsCommande")
  241.      * @ORM\JoinColumn(nullable=true)
  242.      */
  243.     private $commande;
  244.     /**
  245.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Contact")
  246.      * @ORM\JoinColumn(nullable=true)
  247.      */
  248.     private $contactLivraison;
  249.     /**
  250.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Contact")
  251.      * @ORM\JoinColumn(nullable=true)
  252.      */
  253.     private $contactFacturation;
  254.     /**
  255.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Contact")
  256.      * @ORM\JoinColumn(nullable=true)
  257.      */
  258.     private $contactAcheteur;
  259.     /**
  260.      * @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client", inversedBy="commandes", cascade={"persist"})
  261.      * @ORM\JoinColumn(nullable=true)
  262.      */
  263.     private $client;
  264.     /**
  265.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\RaisonAnomalie",  cascade={"persist"})
  266.      * @ORM\JoinColumn(nullable=true)
  267.      */
  268.     private $raisonAnomalie;
  269.     /**
  270.      * @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\Transporteur", inversedBy="commandes")
  271.      * @ORM\JoinColumn(nullable=true)
  272.      */
  273.     private $transporteur;
  274.     /**
  275.      * @ORM\Column(name="type_document_commercial_id", type="integer")
  276.      */
  277.     private $typeDocumentCommercial;
  278.     /**
  279.      * @ORM\OneToMany(targetEntity="App\Entity\Notes\Note", mappedBy="commande")
  280.      * @ORM\OrderBy({"dateDebut" = "DESC", "id" = "ASC"})
  281.      */
  282.     private $notes;
  283.     /**
  284.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\ArticleCommande", mappedBy="commande")
  285.      * @ORM\OrderBy({"position" = "ASC", "id" = "ASC"})
  286.      */
  287.     private $articleCommande;
  288.     /**
  289.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\StatutPaiement", inversedBy="commandes")
  290.      * @ORM\JoinColumn(nullable=true)
  291.      */
  292.     private $statutPaiement;
  293.     /**
  294.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\StatutCommande", inversedBy="commandes")
  295.      * @ORM\JoinColumn(nullable=true)
  296.      */
  297.     private $statutCommande;
  298.     /**
  299.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\EtatCommande", inversedBy="commandes")
  300.      * @ORM\JoinColumn(nullable=true)
  301.      */
  302.     private $etatCommande;
  303.     /**
  304.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="commandes")
  305.      * @ORM\JoinColumn(nullable=true)
  306.      */
  307.     private $utilisateur;
  308.     /**
  309.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  310.      * @ORM\JoinColumn(nullable=true)
  311.      */
  312.     private $createur;
  313.     /**
  314.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  315.      * @ORM\JoinColumn(nullable=true)
  316.      */
  317.     private $utilisateurValideManuellement;
  318.     /**
  319.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="ordreRepMecanicien")
  320.      * @ORM\JoinColumn(nullable=true)
  321.      */
  322.     private $mecanicien;
  323.     /**
  324.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\SecteurGeographique")
  325.      * @ORM\JoinColumn(nullable=true)
  326.      */
  327.     private $secteurGeographique;
  328.     /**
  329.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  330.      * @ORM\JoinColumn(nullable=true)
  331.      */
  332.     private $commercial;
  333.     /**
  334.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  335.      * @ORM\JoinColumn(nullable=true)
  336.      */
  337.     private $assistanteCommercial;
  338.     /**
  339.      * @ORM\Column(name="nb_colis", type="integer", nullable=true)
  340.      */
  341.     private $nbColis;
  342.     /**
  343.      * @ORM\Column(name="date_insertion", type="datetime", nullable=true)
  344.      */
  345.     private $dateInsertion;
  346.     /**
  347.      *
  348.      * @ORM\Column(name="date_echeance", type="datetime", nullable=true)
  349.      */
  350.     private $dateEcheance;
  351.     /**
  352.      * @ORM\Column(name="date_confirmation_preparation", type="datetime", nullable=true)
  353.      */
  354.     private $dateConfirmationPreparation;
  355.     /**
  356.      * @ORM\Column(name="date_confirmation_expedition", type="datetime", nullable=true)
  357.      */
  358.     private $dateConfirmationExpedition;
  359.     /**
  360.      * @ORM\Column(name="date_premiere_confirmation_expedition", type="datetime", nullable=true)
  361.      */
  362.     private $datePremiereConfirmationExpedition;
  363.     /**
  364.      * @ORM\Column(name="date_force_expedie", type="datetime", nullable=true)
  365.      */
  366.     private $dateForceExpedie;
  367.     /**
  368.      * @ORM\Column(name="date_force_annule", type="datetime", nullable=true)
  369.      */
  370.     private $dateForceAnnule;
  371.     /**
  372.      * @ORM\Column(name="delai_livraison", type="integer", nullable=true)
  373.      */
  374.     private $delaiLivraison;
  375.     /**
  376.      * @ORM\Column(name="date_relance", type="datetime", nullable=true)
  377.      */
  378.     private $dateRelance;
  379.     /**
  380.      * @ORM\Column(name="date_approximative_reception", type="datetime", nullable=true)
  381.      */
  382.     private $dateApproximativeReception;
  383.     /**
  384.      * @ORM\Column(name="date_expedition", type="datetime", nullable=true)
  385.     */
  386.     private $dateExpedition;
  387.     /**
  388.      * @ORM\Column(name="date_bon", type="datetime", nullable=true)
  389.     */
  390.     private $dateBon;
  391.     /**
  392.      * @ORM\Column(name="date_annulation", type="datetime", nullable=true)
  393.     */
  394.     private $dateAnnulation;
  395.     /**
  396.      * @ORM\Column(name="date", type="datetime", nullable=true)
  397.      */
  398.     private $date;
  399.     /**
  400.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  401.      * @Gedmo\Timestampable(on="update")
  402.      */
  403.     private $dateMaj;
  404.     /**
  405.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  406.      */
  407.     private $dateSuppression;
  408.     /**
  409.      * @ORM\Column(name="numero_reference", type="integer",nullable=true)
  410.      */
  411.     private $numeroReference;
  412.     /**
  413.      * @ORM\Column(name="numero_suivi", type="string", length=255, nullable=true)
  414.      */
  415.     private $numeroSuivi;
  416.     /**
  417.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  418.      */
  419.     private $reference;
  420.         /**
  421.      * @ORM\Column(name="reference_prestashop", type="string", length=255, nullable=true)
  422.      */
  423.     private $referencePrestashop;
  424.     /**
  425.      * @ORM\Column(name="origine_saisie", type="string", length=255, nullable=true)
  426.      */
  427.     private $origineSaisie;
  428.         /**
  429.      * @ORM\Column(name="origine", type="string", length=255, nullable=true)
  430.      */
  431.     private $origine;
  432.     /**
  433.      * @ORM\Column(name="id_import", type="string", length=255, nullable=true)
  434.      */
  435.     private $idImport;
  436.     /**
  437.      * @ORM\Column(name="valide_manuellement", type="boolean", nullable=true)
  438.      */
  439.     private $valideManuellement;
  440.     /**
  441.      * @ORM\Column(name="perdu", type="boolean", nullable=true)
  442.      */
  443.     private $perdu;
  444.     /**
  445.      * @ORM\Column(name="total_tva", type="float", nullable=true)
  446.      */
  447.     private $totalTva;
  448.     /**
  449.      * @ORM\Column(name="frais_port_supplementaire", type="float", nullable=true)
  450.      */
  451.     private $fraisPortSupplementaire;
  452.     /**
  453.      * @ORM\Column(name="taux_tva_frais_port", type="float", nullable=true)
  454.      */
  455.     private $tauxTvaFraisPort;
  456.     /**
  457.      * @ORM\Column(name="total_frais_port", type="float", nullable=true)
  458.      */
  459.     private $totalFraisPort;
  460.     /**
  461.      * @ORM\Column(name="total_frais_port_ttc", type="float", nullable=true)
  462.      */
  463.     private $totalFraisPortTtc;
  464.     /**
  465.      * @ORM\Column(name="total_tva_frais_port", type="float", nullable=true)
  466.      */
  467.     private $totalTvaFraisPort;
  468.     /**
  469.      * @ORM\Column(name="total_poids", type="float", nullable=true)
  470.      */
  471.     private $totalPoids;
  472.     /**
  473.      * @ORM\Column(name="total_ttc", type="float", nullable=true)
  474.      */
  475.     private $totalTtc;
  476.     /**
  477.      * @ORM\Column(name="total", type="float", nullable=true)
  478.      */
  479.     private $total;
  480.     /**
  481.      * @var float
  482.      *
  483.      * @ORM\Column(name="total_ht_avec_frais_port", type="float", nullable=true)
  484.      */
  485.     private $totalHtAvecFraisPort;
  486.     /**
  487.      * @ORM\ManyToOne(targetEntity="App\Entity\Adresses\Adresse", inversedBy="commandeLivraison")
  488.      * @ORM\JoinColumn(nullable=true)
  489.      */
  490.     private $adresseLivraison;
  491.     /**
  492.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
  493.      */
  494.     private $paysLivraison;
  495.     /**
  496.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
  497.      */
  498.     private $villeLivraison;
  499.     /**
  500.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
  501.      */
  502.     private $codePostalLivraison;
  503.     /**
  504.      * @ORM\Column(name="ville_livraison_txt", type="string", length=255, nullable=true)
  505.      */
  506.     private $villeLivraisonTxt;
  507.     /**
  508.      * @ORM\Column(name="pays_livraison_txt", type="string", length=255, nullable=true)
  509.      */
  510.     private $paysLivraisonTxt;
  511.     /**
  512.      * @ORM\Column(name="code_postal_livraison_txt", type="string", length=255, nullable=true)
  513.      */
  514.     private $codePostalLivraisonTxt;
  515.     /**
  516.      * @ORM\Column(name="libelle_livraison", type="string", length=255, nullable=true)
  517.      */
  518.     private $libelleLivraison;
  519.     /**
  520.      * @ORM\Column(name="numero_livraison", type="string", length=255, nullable=true)
  521.      */
  522.     private $numeroLivraison;
  523.     /**
  524.      * @ORM\Column(name="rue_livraison", type="string", length=255, nullable=true)
  525.      */
  526.     private $rueLivraison;
  527.     /**
  528.      * @ORM\Column(name="complement_livraison", type="string", length=255, nullable=true)
  529.      */
  530.     private $complementLivraison;
  531.     /**
  532.      * @ORM\Column(name="complement_livraison_2", type="string", length=255, nullable=true)
  533.      */
  534.     private $complementLivraison2;
  535.     /**
  536.      * @ORM\ManyToOne(targetEntity="App\Entity\Adresses\Adresse", inversedBy="commandeFacturation")
  537.     * @ORM\JoinColumn(nullable=true)
  538.      */
  539.     private $adresseFacturation;
  540.     /**
  541.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
  542.      */
  543.     private $paysFacturation;
  544.     /**
  545.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
  546.      */
  547.     private $villeFacturation;
  548.     /**
  549.      * @ORM\Column(name="pays_facturation_txt", type="string", length=255, nullable=true)
  550.      */
  551.     private $paysFacturationTxt;
  552.     /**
  553.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
  554.      */
  555.     private $codePostalFacturation;
  556.     /**
  557.      * @ORM\Column(name="ville_facturation_txt", type="string", length=255, nullable=true)
  558.      */
  559.     private $villeFacturationTxt;
  560.     /**
  561.      * @ORM\Column(name="code_postal_facturation_txt", type="string", length=255, nullable=true)
  562.      */
  563.     private $codePostalFacturationTxt;
  564.     /**
  565.      * @ORM\Column(name="libelle_facturation", type="string", length=255, nullable=true)
  566.      */
  567.     private $libelleFacturation;
  568.     /**
  569.      * @ORM\Column(name="numero_facturation", type="string", length=255, nullable=true)
  570.      */
  571.     private $numeroFacturation;
  572.     /**
  573.      * @ORM\Column(name="rue_facturation", type="string", length=255, nullable=true)
  574.      */
  575.     private $rueFacturation;
  576.     /**
  577.      * @ORM\Column(name="complement_facturation", type="string", length=255, nullable=true)
  578.      */
  579.     private $complementFacturation;
  580.     /**
  581.      * @ORM\Column(name="complement_facturation_2", type="string", length=255, nullable=true)
  582.      */
  583.     private $complementFacturation2;
  584.     /**
  585.      * @ORM\Column(name="reference_client", type="string", length=255, nullable=true)
  586.      */
  587.     private $referenceClient;
  588.     /**
  589.      * @ORM\Column(name="commentaire", type="text", nullable=true)
  590.     */
  591.     private $commentaire;
  592.     /**
  593.      * @ORM\Column(name="travaux", type="text", nullable=true)
  594.     */
  595.     private $travaux;
  596.     /**
  597.      * @ORM\Column(name="commentaire_annulation", type="text", nullable=true)
  598.     */
  599.     private $commentaireAnnulation;
  600.     /**
  601.     * @ORM\OneToMany(targetEntity="App\Entity\Articles\MouvementStock", mappedBy="commande")
  602.     */
  603.     private $mouvementStock;
  604.     /**
  605.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\CommandeNumeroSuivi", mappedBy="commande")
  606.      * @ORM\JoinColumn(nullable=true)
  607.      */
  608.     private $commandeNumeroSuivi;
  609.     /**
  610.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\CommandeFournisseur", mappedBy="commande")
  611.      * @ORM\JoinColumn(nullable=true)
  612.      */
  613.     private $commandesFournisseur;
  614.     /**
  615.      * @ORM\Column(name="temps_passe", type="float", nullable=true)
  616.      */
  617.     private $tempsPasse;
  618.     /**
  619.      * @ORM\Column(name="temps_facture", type="float", nullable=true)
  620.      */
  621.     private $tempsFacture;
  622.     /**
  623.      * @ORM\Column(name="a_facturer", type="boolean", nullable=true)
  624.      */
  625.     private $aFacturer;
  626.     /**
  627.      * @ORM\Column(name="deja_facture", type="boolean", nullable=true)
  628.      */
  629.     private $dejaFacture;
  630.     /**
  631.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ModeReglement", cascade={"persist"})
  632.      * @ORM\JoinColumn(nullable=true)
  633.      */
  634.     private $modereglement;
  635.     /**
  636.      * @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\ModeReglementMarketPlace", cascade={"persist"})
  637.      * @ORM\JoinColumn(nullable=true)
  638.      */
  639.     private $modeReglementMarketPlace;
  640.     /**
  641.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\DelaiPaiement", cascade={"persist"})
  642.      * @ORM\JoinColumn(nullable=true)
  643.      */
  644.     private $delaiPaiement;
  645.     /**
  646.      * @ORM\Column(name="multi_bl", type="boolean", nullable=true)
  647.      */
  648.     private $multiBL;
  649.     /**
  650.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\LCR", inversedBy="factures")
  651.      * @ORM\JoinColumn(nullable=true)
  652.      */
  653.     private $lcr;
  654.     /**
  655.      * @ORM\Column(name="attente_facturation", type="boolean", nullable=true)
  656.      */
  657.     private $attenteFacturation;
  658.     /**
  659.      * @ORM\Column(name="date_validation_bat", type="datetime", nullable=true)
  660.      */
  661.     private $dateValidationBAT;
  662.     /**
  663.      * @ORM\Column(name="statut_bat", type="boolean", nullable=true)
  664.      */
  665.     private $statutBAT;
  666.     /**
  667.      * @ORM\Column(name="date_transfert_compta", type="datetime", nullable=true)
  668.      */
  669.     private $dateTransfertCompta;
  670.     /**
  671.      * @ORM\Column(name="numero_lettrage", type="float", nullable=true)
  672.      *
  673.      */
  674.     private $numeroLettrage;
  675.     /**
  676.      * @ORM\Column(name="lettrage", type="string", length=255, nullable=true)
  677.      */
  678.     private $lettrage;
  679.     /**
  680.      * @ORM\Column(name="solde", type="float", nullable=true)
  681.      *
  682.      */
  683.     private $solde;
  684.     /**
  685.      * @ORM\Column(name="statut_a_modifier", type="boolean", nullable=true)
  686.      */
  687.     private $statutAmodifier;
  688.     /**
  689.      * @ORM\Column(name="prenom", type="string", length=255, nullable=true)
  690.      */
  691.     private $prenom;
  692.     /**
  693.      * @ORM\Column(name="nom", type="string", length=255, nullable=true)
  694.      *
  695.      */
  696.     private $nom;
  697.     /**
  698.      * @ORM\Column(name="prenom_facturation", type="string", length=255, nullable=true)
  699.      */
  700.     private $prenomFacturation;
  701.     /**
  702.      * @ORM\Column(name="nom_facturation", type="string", length=255, nullable=true)
  703.      *
  704.      */
  705.     private $nomFacturation;
  706.     /**
  707.      * @ORM\Column(name="civilite", type="string", length=255, nullable=true)
  708.      */
  709.     private $civilite;
  710.     /**
  711.      * @ORM\Column(name="date_reception_fournisseur", type="datetime", nullable=true)
  712.      */
  713.     private $dateReceptionFournisseur;
  714.     /**
  715.      * @ORM\Column(name="date_livraison_souhaitee", type="datetime", nullable=true)
  716.      */
  717.     private $dateLivraisonSouhaitee;
  718.     /**
  719.      * @ORM\Column(name="date_livraison_theorique", type="datetime", nullable=true)
  720.      */
  721.     private $dateLivraisonTheorique;
  722.     /**
  723.      * @ORM\Column(name="date_expedition_theorique", type="datetime", nullable=true)
  724.      */
  725.     private $dateExpeditionTheorique;
  726.     /**
  727.      * @ORM\OneToMany(targetEntity="App\Entity\Rangements\CommandeCaisse", mappedBy="commande")
  728.      */
  729.     private $commandeCaisses;
  730.     /**
  731.      * @ORM\OneToMany(targetEntity="App\Entity\Utilisateur\HistoriqueIntervention", mappedBy="commande")
  732.      */
  733.     private $historiqueIntervention;
  734.     /**
  735.      * @ORM\Column(name="telephone", type="string", length=255, nullable=true)
  736.      *
  737.      */
  738.     private $telephone;
  739.     /**
  740.      * @ORM\Column(name="telephone2", type="string", length=255, nullable=true)
  741.      *
  742.      */
  743.     private $telephone2;
  744.     /**
  745.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  746.      *
  747.      */
  748.     private $email;
  749.     /**
  750.      * @ORM\Column(name="telephone_facturation", type="string", length=255, nullable=true)
  751.      *
  752.      */
  753.     private $telephoneFacturation;
  754.     /**
  755.      * @ORM\Column(name="telephone_facturation2", type="string", length=255, nullable=true)
  756.      *
  757.      */
  758.     private $telephoneFacturation2;
  759.     /**
  760.      * @ORM\Column(name="adresse_validee_manuellement", type="boolean", nullable=true)
  761.      */
  762.     private $adresseValideeManuellement;
  763.     /**
  764.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ModeExpedition")
  765.      * @ORM\JoinColumn(nullable=true)
  766.      */
  767.     private $modeExpedition;
  768.     /**
  769.      * @ORM\Column(name="date_export_bext", type="datetime", nullable=true)
  770.      */
  771.     private $dateExportBext;
  772.     /**
  773.      * @ORM\Column(name="date_max_expedition_min", type="datetime", nullable=true)
  774.      */
  775.     private $dateMaxExpeditionMin;
  776.     /**
  777.      * @ORM\Column(name="date_max_expedition_max", type="datetime", nullable=true)
  778.      */
  779.     private $dateMaxExpeditionMax;
  780.     /**
  781.      * @ORM\Column(name="maj", type="boolean", nullable=true)
  782.      */
  783.     private $maj;
  784.     /**
  785.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande")
  786.      * @ORM\JoinColumn(nullable=true)
  787.      */
  788.     private $commandeParent;
  789.     /**
  790.      * @ORM\Column(name="archive", type="boolean", nullable=true, options={"default" : 0})
  791.      */
  792.     private $archive;
  793.     /**
  794.      * @ORM\Column(name="code_iso_facturation", type="string", length=255, nullable=true)
  795.      */
  796.     private $codeIsoFacturation;
  797.     /**
  798.      * @ORM\Column(name="state_or_province_facturation", type="string", length=255, nullable=true)
  799.      */
  800.     private $stateOrProvinceFacturation;
  801.     /**
  802.      * @ORM\Column(name="code_iso_livraison", type="string", length=255, nullable=true)
  803.      */
  804.     private $codeIsoLivraison;
  805.     /**
  806.      * @ORM\Column(name="state_or_province_livraison", type="string", length=255, nullable=true)
  807.      */
  808.     private $stateOrProvinceLivraison;
  809.     /**
  810.      * @ORM\ManyToOne(targetEntity="App\Entity\Articles\Devise")
  811.      * @ORM\JoinColumn(nullable=true)
  812.      */
  813.     private $devise;
  814.     /**
  815.      * @ORM\ManyToOne(targetEntity="App\Entity\Export\Export")
  816.      * @ORM\JoinColumn(nullable=true)
  817.      */
  818.     private $exportCompta;
  819.     /**
  820.      * @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\RapportCloture",inversedBy="bonsLivraison")
  821.      * @ORM\JoinColumn(nullable=true)
  822.      */
  823.     private $rapportCloture;
  824.     /**
  825.      * @ORM\Column(name="date_mail_facture", type="datetime", nullable=true)
  826.      */
  827.     private $dateMailFacture;
  828.     /**
  829.      * @ORM\Column(name="date_calcul_marge", type="datetime", nullable=true)
  830.      */
  831.     private $dateCalculMarge;    
  832.     /**
  833.      * @ORM\Column(name="point_retrait", type="string", length=255, nullable=true)
  834.      */
  835.     private $pointRetrait;
  836.     /**
  837.      * @ORM\Column(name="delivery_mode", type="string", length=255, nullable=true)
  838.      */
  839.     private $deliveryMode;
  840.     /**
  841.      * @ORM\Column(name="total_ttc_devise", type="float", nullable=true)
  842.      */
  843.     private $totalTtcDevise;
  844.     /**
  845.      * @ORM\Column(name="taux_change", type="float", nullable=true)
  846.      */
  847.     private $tauxChange;
  848.     /**
  849.      * @ORM\Column(name="sended_to_oqton", type="boolean", nullable=true)
  850.      */
  851.     private $sendedToOqton false;
  852.     /**
  853.      * @ORM\ManyToOne(targetEntity="App\Entity\Rangements\Caisse")
  854.      * @ORM\JoinColumn(nullable=true)
  855.      */
  856.     private $caisse;
  857.     /**
  858.      * @ORM\Column(type="string", length=255, nullable=true)
  859.      */
  860.     private $payplugId;
  861.     /**
  862.      * @ORM\Column(type="string", length=255, nullable=true)
  863.      */
  864.     private $telephoneLivraison;
  865.     /**
  866.      * @ORM\Column(type="string", length=255, nullable=true)
  867.      */
  868.     private $emailLivraison;
  869.     /**
  870.      * @ORM\Column(type="float", nullable=true)
  871.      */
  872.     private $payplugMontant;
  873.     /**
  874.      * @ORM\Column(type="string", length=255, nullable=true)
  875.      */
  876.     private $statutAttente;
  877.     public function __construct()
  878.     {
  879.         $this->dateInsertion            = new Datetime();
  880.         $this->date                     = new Datetime();
  881.         $this->dateBon                  = new Datetime();
  882.         $this->dateExpeditionTheorique  = new Datetime();
  883.         $this->fraisPortSupplementaire  0;
  884.         $this->delaiRelance             3;
  885.         $this->avecTaxe                 true;
  886.         $this->francoPort               false;
  887.         $this->basculeComptabilite      false;
  888.         $this->visible                  true;
  889.         $this->modifiable                true;
  890.         $this->tempsPasse               0;
  891.         $this->tempsFacture             0;
  892.         //$this->aFacturer = true;
  893.         $this->dejaFacture              false;
  894.         $this->multiBL                  false;
  895.         $this->attenteFacturation       false;
  896.         $this->bls                      = new ArrayCollection();
  897.         $this->acomptes                 = new ArrayCollection();
  898.         $this->statutAmodifier           false;
  899.         $this->articleCommande          = new ArrayCollection();
  900.         //$this->dureeValidite = 30;
  901.         $this->commandeEmplacements     = new ArrayCollection();
  902.         $this->litiges                  = new ArrayCollection();
  903.         $this->interventions            = new ArrayCollection();
  904.         $this->reglements               = new ArrayCollection();
  905.         $this->docEnfantsDevis          = new ArrayCollection();
  906.         $this->docEnfantsCommande       = new ArrayCollection();
  907.         $this->docEnfantsBP             = new ArrayCollection();
  908.         $this->docEnfantsBL             = new ArrayCollection();
  909.         $this->bps                      = new ArrayCollection();
  910.         $this->notes                    = new ArrayCollection();
  911.         $this->mouvementStock           = new ArrayCollection();
  912.         $this->commandeNumeroSuivi      = new ArrayCollection();
  913.         $this->commandesFournisseur     = new ArrayCollection();
  914.         $this->commandeCaisses          = new ArrayCollection();
  915.         $this->historiqueIntervention   = new ArrayCollection();
  916.         $this->projetDomaines           = new ArrayCollection();
  917.         $this->projetActivites          = new ArrayCollection();
  918.         $this->factures          = new ArrayCollection();
  919.     }
  920.     public function __toString(){
  921.         $retour = (string)$this->getReference();
  922.         if(is_object($this->getClient())) $retour .= ' / '.$this->getClient()->getNom().' '.$this->getClient()->getPrenom();
  923.         return $retour;
  924.     }
  925.     public function setId($id): Commande
  926.     {
  927.         $this->id=$id;
  928.         return $this;
  929.     }
  930.     public function getId()
  931.     {
  932.         return $this->id;
  933.     }
  934.     public function setDate(?DateTime $date$force false): Commande
  935.     {
  936.         $oldDate $this->date;
  937.         if($force === true){
  938.         } else if(is_object($oldDate) && is_object($date) && ($date->format('Y') != $oldDate->format('Y') || $date->format('m') != $oldDate->format('m') || $date->format('d') != $oldDate->format('d'))){
  939.             $dateTmp = new Datetime();
  940.             $date->setTime($dateTmp->format('H'), $dateTmp->format('i'), $dateTmp->format('s'));
  941.         } elseif(is_object($oldDate) && is_object($date)) {
  942.             $date->setTime($oldDate->format('H'), $oldDate->format('i'), $oldDate->format('s'));
  943.         }
  944.         $this->date $date;
  945.         $this->setDateEcheanceAuto();
  946.         return $this;
  947.     }
  948.     public function setDateEcheanceAuto(){
  949.         if(is_object($this->client)) {// and !is_object($this->dateEcheance)
  950.             $client $this->client;
  951.             //Calcul de l'échéance
  952.             if(is_object($client->getDelaiPaiement()))
  953.             {
  954.                 $delai $client->getDelaiPaiement()->getId();
  955.             }
  956.             else {
  957.                 $delai 0;
  958.             }
  959.             if(is_object($this->date))
  960.             {
  961.                 $date = clone $this->date;
  962.             } else {
  963.                 $date = new \DateTime();
  964.             }
  965.             $delai_jours 0;
  966.             $jour_echeance 0;
  967.             $fin_mois false;
  968.             if(is_object($client->getDelaiPaiement()))
  969.             {
  970.                 if($client->getDelaiPaiement()->getDelai() > 0)
  971.                 {
  972.                     $delai_jours $client->getDelaiPaiement()->getDelai();
  973.                 }
  974.                 if($client->getDelaiPaiement()->getJourEcheance() > 0)
  975.                 {
  976.                     $jour_echeance $client->getDelaiPaiement()->getJourEcheance();
  977.                 }
  978.                 if($client->getDelaiPaiement()->isFinMois())
  979.                 {
  980.                     $fin_mois true;
  981.                 }
  982.             }
  983.             if($delai_jours 0) {
  984.                 $interval = new \DateInterval"P".$delai_jours."D" );
  985.                 $date->add($interval);
  986.             }
  987.             if($fin_mois) {
  988.                 $date->modify('last day of this month');
  989.             }
  990.             if($jour_echeance && $fin_mois ) {
  991.                 $date->modify('+'.$jour_echeance.'days');
  992.             }
  993.             else if($jour_echeance)
  994.             {
  995.                 //$date_temp = new \Datetime();
  996.                 $date->setDate($date->format("Y"),$date->format("m"),$jour_echeance);
  997.                 //$date->modify('+'.$jour_echeance.'days');
  998.             }
  999.             /*
  1000.             switch ($delai) {
  1001.                 case 1://30 jours fin de mois
  1002.                     $interval = new \DateInterval( "P30D" );
  1003.                     $date->add($interval);
  1004.                     $echeance = new \DateTime('last day of '.$date->format('F Y'));
  1005.                     break;
  1006.                 case 2://A reception facture
  1007.                     $echeance = $date;
  1008.                     break;
  1009.                 case 3://30 jours
  1010.                     $echeance = $date;
  1011.                     $interval = new \DateInterval( "P30D" );
  1012.                     $echeance->add($interval);
  1013.                     break;
  1014.                 case 4://45 jours fin de mois
  1015.                     $interval = new \DateInterval( "P45D" );
  1016.                     $date->add($interval);
  1017.                     $echeance = new \DateTime('last day of '.$date->format('F Y'));
  1018.                     break;
  1019.                 case 5://60 jours
  1020.                     $echeance = $date;
  1021.                     $interval = new \DateInterval( "P60D" );
  1022.                     $echeance->add($interval);
  1023.                     break;
  1024.                 default:
  1025.                    $echeance = $date;
  1026.             }
  1027.             */
  1028.             $this->setDateEcheance($date);
  1029.             /*
  1030.             //Calcul de l'échéance
  1031.             if(is_object($client->getDelaiPaiement()))
  1032.                 $delai = $client->getDelaiPaiement()->getId();
  1033.             else
  1034.                 $delai = 0;
  1035.                 if(is_object($this->date)){
  1036.                     $date = clone $this->date;
  1037.                 } else {
  1038.                     $date = new \DateTime();
  1039.                 }
  1040.             switch ($delai) {
  1041.                 case 1://30 jours fin de mois
  1042.                     $interval = new \DateInterval( "P30D" );
  1043.                     $date->add($interval);
  1044.                     $echeance = new \DateTime('last day of '.$date->format('F Y'));
  1045.                     break;
  1046.                 case 2://A reception facture
  1047.                     $echeance = $date;
  1048.                     break;
  1049.                 case 3://30 jours
  1050.                     $echeance = $date;
  1051.                     $interval = new \DateInterval( "P30D" );
  1052.                     $echeance->add($interval);
  1053.                     break;
  1054.                 case 4://45 jours fin de mois
  1055.                     $interval = new \DateInterval( "P45D" );
  1056.                     $date->add($interval);
  1057.                     $echeance = new \DateTime('last day of '.$date->format('F Y'));
  1058.                     break;
  1059.                 case 5://60 jours
  1060.                     $echeance = $date;
  1061.                     $interval = new \DateInterval( "P60D" );
  1062.                     $echeance->add($interval);
  1063.                     break;
  1064.                 default:
  1065.                    $echeance = $date;
  1066.             }
  1067.             $this->setDateEcheance($echeance);
  1068.             */
  1069.         } elseif(!is_object($this->dateEcheance)) {
  1070.             $echeance $this->date;
  1071.             $this->setDateEcheance($echeance);
  1072.         }
  1073.         //exit;
  1074.     }
  1075.     public function getDate(): ?DateTime
  1076.     {
  1077.         return $this->date;
  1078.     }
  1079.     public function setDateMaj(?DateTime $dateMaj): Commande
  1080.     {
  1081.         $this->dateMaj $dateMaj;
  1082.         return $this;
  1083.     }
  1084.     public function getDateMaj(): ?DateTime
  1085.     {
  1086.         return $this->dateMaj;
  1087.     }
  1088.     public function setDateSuppression(?DateTime $dateSuppression): Commande
  1089.     {
  1090.         $this->dateSuppression $dateSuppression;
  1091.         return $this;
  1092.     }
  1093.     public function getDateSuppression(): ?DateTime
  1094.     {
  1095.         return $this->dateSuppression;
  1096.     }
  1097.     public function setReference(?string $reference): Commande
  1098.     {
  1099.         $this->reference $reference;
  1100.         $this->modifierStatutCommande();
  1101.         return $this;
  1102.     }
  1103.     public function getReference(): ?string
  1104.     {
  1105.         return $this->reference;
  1106.     }
  1107.     public function setTotal(?float $total): Commande
  1108.     {
  1109.         $this->total $total;
  1110.         return $this;
  1111.     }
  1112.     public function getTotal(): ?float
  1113.     {
  1114.         return $this->total;
  1115.     }
  1116.     /**
  1117.      * @return float
  1118.      */
  1119.     public function getTotalHtAvecFraisPort(): float
  1120.     {
  1121.         return $this->totalHtAvecFraisPort;
  1122.     }
  1123.     /**
  1124.      * @param float $totalHtAvecFraisPort
  1125.      * @return Commande
  1126.      */
  1127.     public function setTotalHtAvecFraisPort(float $totalHtAvecFraisPort): Commande
  1128.     {
  1129.         $this->totalHtAvecFraisPort $totalHtAvecFraisPort;
  1130.         return $this;
  1131.     }
  1132.     public function setUtilisateur(?Utilisateur $utilisateur): Commande
  1133.     {
  1134.         $this->utilisateur $utilisateur;
  1135.         if(!is_object($this->getCreateur())) {
  1136.             $this->setCreateur($utilisateur);
  1137.         }
  1138.         return $this;
  1139.     }
  1140.     public function getUtilisateur(): ?Utilisateur
  1141.     {
  1142.         return $this->utilisateur;
  1143.     }
  1144.     public function setDelaiPaiement(?DelaiPaiement $delaiPaiement): Commande
  1145.     {
  1146.         $this->delaiPaiement $delaiPaiement;
  1147.         return $this;
  1148.     }
  1149.     public function getDelaiPaiement(): ?DelaiPaiement
  1150.     {
  1151.         return $this->delaiPaiement;
  1152.     }
  1153.     public function setModeReglement(?ModeReglement $modereglement): Commande
  1154.     {
  1155.         $this->modereglement $modereglement;
  1156.         return $this;
  1157.     }
  1158.     public function getModeReglement(): ?ModeReglement
  1159.     {
  1160.         return $this->modereglement;
  1161.     }
  1162.     public function setStatutCommande(?\App\Entity\GestionComerciale\StatutCommande $statutCommande): Commande
  1163.     {
  1164.         $this->statutCommande $statutCommande;
  1165.         $this->modifierStatutCommande();
  1166.         if(is_object($statutCommande) && ( $statutCommande->getOrdre() == '0' || $statutCommande->getOrdre() == 0) && ($this->getDateAnnulation() == NULL || $this->getDateAnnulation() == '')) {
  1167.             $this->setDateAnnulation(new Datetime);
  1168.         }
  1169.         return $this;
  1170.     }
  1171.     private function modifierStatutCommande(){
  1172.         $commandeParente $this->getCommande();
  1173.         if(is_object($commandeParente)) {
  1174.             $commandeParente->setStatutAmodifier(true);
  1175.         }
  1176.         /*
  1177.         else
  1178.             $this->setStatutAmodifier(true);
  1179.          *
  1180.          */
  1181.     }
  1182.     public function getStatutCommande(): ?\App\Entity\GestionComerciale\StatutCommande
  1183.     {
  1184.         return $this->statutCommande;
  1185.     }
  1186.     public function addArticleCommande(ArticleCommande $articleCommande): Commande
  1187.     {
  1188.         $this->articleCommande[] = $articleCommande;
  1189.         $articleCommande->setCommande($this);
  1190.         return $this;
  1191.     }
  1192.     public function removeArticleCommande(ArticleCommande $articleCommande)
  1193.     {
  1194.         $this->articleCommande->removeElement($articleCommande);
  1195.     }
  1196.     public function getArticleCommande(): Collection
  1197.     {
  1198.         return $this->articleCommande;
  1199.     }
  1200.     public function setClient(?Client $client): Commande
  1201.     {
  1202.         //<br/> essai AF201707-000244
  1203.         //<br/> essai B C201707-000340
  1204.         if(is_object($client) && $this->client != $client){
  1205.             $commentaire 'essai';
  1206.             /*
  1207.             if(is_object($this->commande)){
  1208.                 $acomptes = $this->commande->getAcomptes();
  1209.                  $commentaire .= ' A'.$this->reference;
  1210.             } else {
  1211.                 $acomptes = $this->acomptes;
  1212.                  $commentaire .= ' B '.$this->reference;
  1213.             }
  1214.             */
  1215.             $acomptes $this->acomptes;
  1216.             $commentaire .= ' B '.$this->reference;
  1217.             if(count($acomptes) > 0)
  1218.                 foreach($acomptes as $acompte){
  1219.                     //$commentaire .= ' reg '.$acompte->getId();
  1220.                     $acompte->setClient($client);
  1221.                      $commentaire .= ' c reg '.$acompte->getId();
  1222.                 }
  1223.             //$client->setCommentaire($client->getCommentaire()."<br/> ".$commentaire);
  1224.         }
  1225.         $this->client $client;
  1226.         if(is_object($client)){
  1227.             $this->setCivilite($client->getCivilite());
  1228.             $this->setNom($client->getNom());
  1229.             $this->setprenom($client->getPrenom());
  1230.         }
  1231.         return $this;
  1232.     }
  1233.     public function getClient(): ?Client
  1234.     {
  1235.         return $this->client;
  1236.     }
  1237.     public function setTotalTva(?float $totalTva): Commande
  1238.     {
  1239.         $this->totalTva $totalTva;
  1240.         return $this;
  1241.     }
  1242.     public function getTotalTva(): ?float
  1243.     {
  1244.         return $this->totalTva;
  1245.     }
  1246.     public function setTotalFraisPort(?float $totalFraisPort): Commande
  1247.     {
  1248.         $this->totalFraisPort $totalFraisPort;
  1249.         return $this;
  1250.     }
  1251.     public function getTotalFraisPort(): ?float
  1252.     {
  1253.         return $this->totalFraisPort;
  1254.     }
  1255.     public function setTotalTtc(?float $totalTtc): Commande
  1256.     {
  1257.         $this->totalTtc $totalTtc;
  1258.         return $this;
  1259.     }
  1260.     public function getTotalTtc(): ?float
  1261.     {
  1262.         return $this->totalTtc;
  1263.     }
  1264.     public function setNumeroLivraison(?string $numeroLivraison): Commande
  1265.     {
  1266.         $this->numeroLivraison $numeroLivraison;
  1267.         return $this;
  1268.     }
  1269.     public function getNumeroLivraison(): ?string
  1270.     {
  1271.         return $this->numeroLivraison;
  1272.     }
  1273.     public function setRueLivraison(?string $rueLivraison): Commande
  1274.     {
  1275.         $this->rueLivraison $rueLivraison;
  1276.         return $this;
  1277.     }
  1278.     public function getRueLivraison(): ?string
  1279.     {
  1280.         return $this->abreviation($this->rueLivraison);
  1281.     }
  1282.     public function setComplementLivraison(?string $complementLivraison): Commande
  1283.     {
  1284.         $this->complementLivraison $complementLivraison;
  1285.         return $this;
  1286.     }
  1287.     public function getComplementLivraison(): ?string
  1288.     {
  1289.         return $this->abreviation($this->complementLivraison);
  1290.     }
  1291.     public function setNumeroFacturation(?string $numeroFacturation): Commande
  1292.     {
  1293.         $this->numeroFacturation $numeroFacturation;
  1294.         return $this;
  1295.     }
  1296.     public function getNumeroFacturation(): ?string
  1297.     {
  1298.         return $this->abreviation($this->numeroFacturation);
  1299.     }
  1300.     public function setRueFacturation(?string $rueFacturation): Commande
  1301.     {
  1302.         $this->rueFacturation $rueFacturation;
  1303.         return $this;
  1304.     }
  1305.     public function getRueFacturation(): ?string
  1306.     {
  1307.         return $this->abreviation($this->rueFacturation);
  1308.     }
  1309.     public function setComplementFacturation(?string $complementFacturation): Commande
  1310.     {
  1311.         $this->complementFacturation $complementFacturation;
  1312.         return $this;
  1313.     }
  1314.     public function getComplementFacturation(): ?string
  1315.     {
  1316.         return $this->abreviation($this->complementFacturation);
  1317.     }
  1318.     public function setPaysLivraison(?Zone $paysLivraison): Commande
  1319.     {
  1320.         $this->paysLivraison $paysLivraison;
  1321.         return $this;
  1322.     }
  1323.     public function getPaysLivraison(): ?Zone
  1324.     {
  1325.         return $this->paysLivraison;
  1326.     }
  1327.     public function setVilleLivraison(?Zone $villeLivraison): Commande
  1328.     {
  1329.         $this->villeLivraison $villeLivraison;
  1330.         return $this;
  1331.     }
  1332.     public function getVilleLivraison(): ?Zone
  1333.     {
  1334.         return $this->villeLivraison;
  1335.     }
  1336.     public function setCodePostalLivraison(?Zone $codePostalLivraison): Commande
  1337.     {
  1338.         $this->codePostalLivraison $codePostalLivraison;
  1339.         return $this;
  1340.     }
  1341.     public function getCodePostalLivraison(): ?Zone
  1342.     {
  1343.         return $this->codePostalLivraison;
  1344.     }
  1345.     public function setPaysFacturation(?Zone $paysFacturation): Commande
  1346.     {
  1347.         $this->paysFacturation $paysFacturation;
  1348.         return $this;
  1349.     }
  1350.     public function getPaysFacturation(): ?Zone
  1351.     {
  1352.         return $this->paysFacturation;
  1353.     }
  1354.     public function setVilleFacturation(?Zone $villeFacturation): Commande
  1355.     {
  1356.         $this->villeFacturation $villeFacturation;
  1357.         return $this;
  1358.     }
  1359.     public function getVilleFacturation(): ?Zone
  1360.     {
  1361.         return $this->villeFacturation;
  1362.     }
  1363.     public function setCodePostalFacturation(?Zone $codePostalFacturation): Commande
  1364.     {
  1365.         $this->codePostalFacturation $codePostalFacturation;
  1366.         return $this;
  1367.     }
  1368.     public function getCodePostalFacturation(): ?Zone
  1369.     {
  1370.         return $this->codePostalFacturation;
  1371.     }
  1372.     public function setAdresseLivraison(?Adresse $adresseLivraison): Commande
  1373.     {
  1374.         $this->adresseLivraison $adresseLivraison;
  1375.         return $this;
  1376.     }
  1377.     public function getAdresseLivraison(): ?Adresse
  1378.     {
  1379.         return $this->adresseLivraison;
  1380.     }
  1381.     public function setAdresseFacturation(?Adresse $adresseFacturation): Commande
  1382.     {
  1383.         $this->adresseFacturation $adresseFacturation;
  1384.         return $this;
  1385.     }
  1386.     public function getAdresseFacturation(): ?Adresse
  1387.     {
  1388.         return $this->adresseFacturation;
  1389.     }
  1390.     public function supprimerAdresse()
  1391.     {
  1392.         $this->adresseLivraison NULL;
  1393.         $this->adresseFacturation NULL;
  1394.     }
  1395.     public function setTransporteur(?Transporteur $transporteur): Commande
  1396.     {
  1397.         $this->transporteur $transporteur;
  1398.         return $this;
  1399.     }
  1400.     public function getTransporteur(): ?Transporteur
  1401.     {
  1402.         return $this->transporteur;
  1403.     }
  1404.     public function setTotalPoids(?float $totalPoids): Commande
  1405.     {
  1406.         $this->totalPoids $totalPoids;
  1407.         return $this;
  1408.     }
  1409.     public function getTotalPoids(): ?float
  1410.     {
  1411.         return $this->totalPoids;
  1412.     }
  1413.     public function setFraisPortSupplementaire(?float $fraisPortSupplementaire): Commande
  1414.     {
  1415.         $this->fraisPortSupplementaire $fraisPortSupplementaire;
  1416.         return $this;
  1417.     }
  1418.     public function getFraisPortSupplementaire(): ?float
  1419.     {
  1420.         return $this->fraisPortSupplementaire;
  1421.     }
  1422.     public function setDateApproximativeReception(?DateTime $dateApproximativeReception): Commande
  1423.     {
  1424.         $this->dateApproximativeReception $dateApproximativeReception;
  1425.         return $this;
  1426.     }
  1427.     public function getDateApproximativeReception(): ?DateTime
  1428.     {
  1429.         return $this->dateApproximativeReception;
  1430.     }
  1431.     public function setReferenceClient(?string $referenceClient): Commande
  1432.     {
  1433.         $this->referenceClient $referenceClient;
  1434.         return $this;
  1435.     }
  1436.     public function getReferenceClient(): ?string
  1437.     {
  1438.         return $this->referenceClient;
  1439.     }
  1440.     public function addAcompte(Acompte $acomptes): Commande
  1441.     {
  1442.         $this->acomptes[] = $acomptes;
  1443.         return $this;
  1444.     }
  1445.     public function removeAcompte(Acompte $acomptes)
  1446.     {
  1447.         $this->acomptes->removeElement($acomptes);
  1448.     }
  1449.     public function getAcomptes(): Collection
  1450.     {
  1451.         return $this->acomptes;
  1452.     }
  1453.     public function setDevis(?Commande $devis): Commande
  1454.     {
  1455.         $this->devis $devis;
  1456.         return $this;
  1457.     }
  1458.     public function getDevis(): ?Commande
  1459.     {
  1460.         return $this->devis;
  1461.     }
  1462.     public function setCommentaire(?string $commentaire): Commande
  1463.     {
  1464.         $this->commentaire $commentaire;
  1465.         return $this;
  1466.     }
  1467.     public function getCommentaire(): ?string
  1468.     {
  1469.         return $this->commentaire;
  1470.     }
  1471.     public function setAvecTaxe(?bool $avecTaxe): Commande
  1472.     {
  1473.         $this->avecTaxe $avecTaxe;
  1474.         return $this;
  1475.     }
  1476.     public function getAvecTaxe(): ?bool
  1477.     {
  1478.         return $this->avecTaxe;
  1479.     }
  1480.     public function setStatutPaiement(?StatutPaiement $statutPaiement): Commande
  1481.     {
  1482.         $this->statutPaiement $statutPaiement;
  1483.         return $this;
  1484.     }
  1485.     public function getStatutPaiement(): ?StatutPaiement
  1486.     {
  1487.         return $this->statutPaiement;
  1488.     }
  1489.     public function setDateBon(?DateTime $dateBon): Commande
  1490.     {
  1491.         $this->dateBon $dateBon;
  1492.         return $this;
  1493.     }
  1494.     public function getDateBon(): ?DateTime
  1495.     {
  1496.         return $this->dateBon;
  1497.     }
  1498.     public function setCommande(?Commande $commande): Commande
  1499.     {
  1500.         $this->commande $commande;
  1501.         return $this;
  1502.     }
  1503.     public function getCommande(): ?Commande
  1504.     {
  1505.         return $this->commande;
  1506.     }
  1507.     public function setVehiculesClient(?VehiculeClient $vehiculesClient): Commande
  1508.     {
  1509.         $this->vehiculesClient $vehiculesClient;
  1510.         return $this;
  1511.     }
  1512.     public function getVehiculesClient(): ?VehiculeClient
  1513.     {
  1514.         return $this->vehiculesClient;
  1515.     }
  1516.     public function addMouvementStock(MouvementStock $mouvementStock): Commande
  1517.     {
  1518.         $this->mouvementStock[] = $mouvementStock;
  1519.         return $this;
  1520.     }
  1521.     public function removeMouvementStock(MouvementStock $mouvementStock)
  1522.     {
  1523.         $this->mouvementStock->removeElement($mouvementStock);
  1524.     }
  1525.     public function getMouvementStock(): Collection
  1526.     {
  1527.         return $this->mouvementStock;
  1528.     }
  1529.     public function addIntervention(Intervention $interventions): Commande
  1530.     {
  1531.         $this->interventions[] = $interventions;
  1532.         return $this;
  1533.     }
  1534.     public function removeIntervention(Intervention $interventions)
  1535.     {
  1536.         $this->interventions->removeElement($interventions);
  1537.     }
  1538.     public function getInterventions(): Collection
  1539.     {
  1540.         return $this->interventions;
  1541.     }
  1542.     public function setMecanicien(?Utilisateur $mecanicien): Commande
  1543.     {
  1544.         $this->mecanicien $mecanicien;
  1545.         return $this;
  1546.     }
  1547.     public function getMecanicien(): ?Utilisateur
  1548.     {
  1549.         return $this->mecanicien;
  1550.     }
  1551.     public function setDateExpedition(?DateTime $dateExpedition): Commande
  1552.     {
  1553.         $this->dateExpedition $dateExpedition;
  1554.         return $this;
  1555.     }
  1556.     public function getDateExpedition(): ?DateTime
  1557.     {
  1558.         return $this->dateExpedition;
  1559.     }
  1560.     public function setEtatCommande(?EtatCommande $etatCommande): Commande
  1561.     {
  1562.         $this->etatCommande $etatCommande;
  1563.         return $this;
  1564.     }
  1565.     public function getEtatCommande(): ?EtatCommande
  1566.     {
  1567.         return $this->etatCommande;
  1568.     }
  1569.     public function setAvoirUtilise(?bool $avoirUtilise): Commande
  1570.     {
  1571.         $this->avoirUtilise $avoirUtilise;
  1572.         return $this;
  1573.     }
  1574.     public function getAvoirUtilise(): ?bool
  1575.     {
  1576.         return $this->avoirUtilise;
  1577.     }
  1578.     public function setFacture(?Commande $facture): Commande
  1579.     {
  1580.         $this->facture $facture;
  1581.         return $this;
  1582.     }
  1583.     public function getFacture(): ?Commande
  1584.     {
  1585.         return $this->facture;
  1586.     }
  1587.     public function setBasculeComptabilite(?bool $basculeComptabilite): Commande
  1588.     {
  1589.         $this->basculeComptabilite $basculeComptabilite;
  1590.         return $this;
  1591.     }
  1592.     public function getBasculeComptabilite(): ?bool
  1593.     {
  1594.         return $this->basculeComptabilite;
  1595.     }
  1596.     public function setFrancoPort(?bool $francoPort): Commande
  1597.     {
  1598.         $this->francoPort $francoPort;
  1599.         return $this;
  1600.     }
  1601.     public function getFrancoPort(): ?bool
  1602.     {
  1603.         return $this->francoPort;
  1604.     }
  1605.     public function setOrigineSaisie(?string $origineSaisie): Commande
  1606.     {
  1607.         $this->origineSaisie $origineSaisie;
  1608.         return $this;
  1609.     }
  1610.     public function getOrigineSaisie(): ?string
  1611.     {
  1612.         return $this->origineSaisie;
  1613.     }
  1614.     public function setVisible(?bool $visible): Commande
  1615.     {
  1616.         $this->visible $visible;
  1617.         return $this;
  1618.     }
  1619.     public function getVisible(): ?bool
  1620.     {
  1621.         return $this->visible;
  1622.     }
  1623.     public function setModifiable(?bool $modifiable): Commande
  1624.     {
  1625.         $this->modifiable $modifiable;
  1626.         return $this;
  1627.     }
  1628.     public function getModifiable(): ?bool
  1629.     {
  1630.         return $this->modifiable;
  1631.     }
  1632.     public function setBl(?Commande $bl): Commande
  1633.     {
  1634.         $this->bl $bl;
  1635.         return $this;
  1636.     }
  1637.     public function getBl(): ?Commande
  1638.     {
  1639.         return $this->bl;
  1640.     }
  1641.     public function setBp(?Commande $bp): Commande
  1642.     {
  1643.         $this->bp $bp;
  1644.         return $this;
  1645.     }
  1646.     public function getBp(): ?Commande
  1647.     {
  1648.         return $this->bp;
  1649.     }
  1650.     public function setCommentaireAnnulation(?string $commentaireAnnulation): Commande
  1651.     {
  1652.         $this->commentaireAnnulation $commentaireAnnulation;
  1653.         return $this;
  1654.     }
  1655.     public function getCommentaireAnnulation(): ?string
  1656.     {
  1657.         return $this->commentaireAnnulation;
  1658.     }
  1659.     public function addCommandesFournisseur(CommandeFournisseur $commandesFournisseur): Commande
  1660.     {
  1661.         $this->commandesFournisseur[] = $commandesFournisseur;
  1662.         return $this;
  1663.     }
  1664.     public function removeCommandesFournisseur(CommandeFournisseur $commandesFournisseur)
  1665.     {
  1666.         $this->commandesFournisseur->removeElement($commandesFournisseur);
  1667.     }
  1668.     public function getCommandesFournisseur(): Collection
  1669.     {
  1670.         return $this->commandesFournisseur;
  1671.     }
  1672.     public function setTravaux(?string $travaux): Commande
  1673.     {
  1674.         $this->travaux $travaux;
  1675.         return $this;
  1676.     }
  1677.     public function getTravaux(): ?string
  1678.     {
  1679.         return $this->travaux;
  1680.     }
  1681.     public function setTempsPasse(?float $tempsPasse): Commande
  1682.     {
  1683.         $this->tempsPasse $tempsPasse;
  1684.         return $this;
  1685.     }
  1686.     public function getTempsPasse(): ?float
  1687.     {
  1688.         return $this->tempsPasse;
  1689.     }
  1690.     public function setTempsFacture(?float $tempsFacture): Commande
  1691.     {
  1692.         $this->tempsFacture $tempsFacture;
  1693.         return $this;
  1694.     }
  1695.     public function getTempsFacture(): ?float
  1696.     {
  1697.         return $this->tempsFacture;
  1698.     }
  1699.     public function setAFacturer(?bool $aFacturer): Commande
  1700.     {
  1701.         $this->aFacturer $aFacturer;
  1702.         return $this;
  1703.     }
  1704.     public function getAFacturer(): ?bool
  1705.     {
  1706.         return $this->aFacturer;
  1707.     }
  1708.     public function setDejaFacture(?bool $dejaFacture): Commande
  1709.     {
  1710.         $this->dejaFacture $dejaFacture;
  1711.         return $this;
  1712.     }
  1713.     public function getDejaFacture(): ?bool
  1714.     {
  1715.         return $this->dejaFacture;
  1716.     }
  1717.     public function setLcr(?LCR $lcr): Commande
  1718.     {
  1719.         $this->lcr $lcr;
  1720.         return $this;
  1721.     }
  1722.     public function getLcr(): ?LCR
  1723.     {
  1724.         return $this->lcr;
  1725.     }
  1726.     public function setAttenteFacturation(?bool $attenteFacturation): Commande
  1727.     {
  1728.         $this->attenteFacturation $attenteFacturation;
  1729.         return $this;
  1730.     }
  1731.     public function getAttenteFacturation(): ?bool
  1732.     {
  1733.         return $this->attenteFacturation;
  1734.     }
  1735.     public function setMultiBL(?bool $multiBL): Commande
  1736.     {
  1737.         $this->multiBL $multiBL;
  1738.         return $this;
  1739.     }
  1740.     public function getMultiBL(): ?bool
  1741.     {
  1742.         return $this->multiBL;
  1743.     }
  1744.     public function setDateTransfertCompta(?DateTime $dateTransfertCompta): Commande
  1745.     {
  1746.         $this->dateTransfertCompta $dateTransfertCompta;
  1747.         return $this;
  1748.     }
  1749.     public function getDateTransfertCompta(): ?DateTime
  1750.     {
  1751.         return $this->dateTransfertCompta;
  1752.     }
  1753.     public function setTotalFraisPortTtc(?float $totalFraisPortTtc): Commande
  1754.     {
  1755.         $this->totalFraisPortTtc $totalFraisPortTtc;
  1756.         return $this;
  1757.     }
  1758.     public function getTotalFraisPortTtc(): ?float
  1759.     {
  1760.         return $this->totalFraisPortTtc;
  1761.     }
  1762.     public function setTotalTvaFraisPort(?float $totalTvaFraisPort): Commande
  1763.     {
  1764.         $this->totalTvaFraisPort $totalTvaFraisPort;
  1765.         return $this;
  1766.     }
  1767.     public function getTotalTvaFraisPort(): ?float
  1768.     {
  1769.         return $this->totalTvaFraisPort;
  1770.     }
  1771.     public function setTauxTvaFraisPort(?float $tauxTvaFraisPort): Commande
  1772.     {
  1773.         $this->tauxTvaFraisPort $tauxTvaFraisPort;
  1774.         return $this;
  1775.     }
  1776.     public function getTauxTvaFraisPort(): ?float
  1777.     {
  1778.         return $this->tauxTvaFraisPort;
  1779.     }
  1780.     public function setNumeroReference(?int $numeroReference): Commande
  1781.     {
  1782.         if($numeroReference == ''$numeroReference NULL;
  1783.         $this->numeroReference $numeroReference;
  1784.         return $this;
  1785.     }
  1786.     public function getNumeroReference(): ?int
  1787.     {
  1788.         return $this->numeroReference;
  1789.     }
  1790.     public function addBl(Commande $bl): Commande
  1791.     {
  1792.         $this->bls[] = $bl;
  1793.         return $this;
  1794.     }
  1795.     public function removeBl(Commande $bl)
  1796.     {
  1797.         $this->bls->removeElement($bl);
  1798.     }
  1799.     public function getBls(): Collection
  1800.     {
  1801.         return $this->bls;
  1802.     }
  1803.     public function addReglement(Acompte $reglement): Commande
  1804.     {
  1805.         $this->reglements[] = $reglement;
  1806.         return $this;
  1807.     }
  1808.     public function removeReglement(Acompte $reglement)
  1809.     {
  1810.         $this->reglements->removeElement($reglement);
  1811.     }
  1812.     public function getReglements(): Collection
  1813.     {
  1814.         return $this->reglements;
  1815.     }
  1816.     public function setKilometrage(?int $kilometrage): Commande
  1817.     {
  1818.         $this->kilometrage $kilometrage;
  1819.         return $this;
  1820.     }
  1821.     public function getKilometrage(): ?int
  1822.     {
  1823.         return $this->kilometrage;
  1824.     }
  1825.     public function setComplementLivraison2(?string $complementLivraison2): Commande
  1826.     {
  1827.         $this->complementLivraison2 $complementLivraison2;
  1828.         return $this;
  1829.     }
  1830.     public function getComplementLivraison2(): ?string
  1831.     {
  1832.         return $this->abreviation($this->complementLivraison2);
  1833.     }
  1834.     public function setComplementFacturation2(?string $complementFacturation2): Commande
  1835.     {
  1836.         $this->complementFacturation2 $complementFacturation2;
  1837.         return $this;
  1838.     }
  1839.     public function getComplementFacturation2(): ?string
  1840.     {
  1841.         return $this->abreviation($this->complementFacturation2);
  1842.     }
  1843.     public function addFacture(Commande $facture): Commande
  1844.     {
  1845.         $this->factures[] = $facture;
  1846.         return $this;
  1847.     }
  1848.     public function removeFacture(Commande $facture)
  1849.     {
  1850.         $this->factures->removeElement($facture);
  1851.     }
  1852.     public function getFactures(): Collection
  1853.     {
  1854.         return $this->factures;
  1855.     }
  1856.     public function addBlsCommande(Commande $blsCommande): Commande
  1857.     {
  1858.         $this->blsCommande[] = $blsCommande;
  1859.         return $this;
  1860.     }
  1861.     public function removeBlsCommande(Commande $blsCommande)
  1862.     {
  1863.         $this->blsCommande->removeElement($blsCommande);
  1864.     }
  1865.     public function getBlsCommande(): Collection
  1866.     {
  1867.         return $this->blsCommande;
  1868.     }
  1869.     public function addDocEnfant(Commande $docEnfant): Commande
  1870.     {
  1871.         $this->docEnfants[] = $docEnfant;
  1872.         return $this;
  1873.     }
  1874.     public function removeDocEnfant(Commande $docEnfant)
  1875.     {
  1876.         $this->docEnfants->removeElement($docEnfant);
  1877.     }
  1878.     public function getDocEnfants(): Collection
  1879.     {
  1880.         return $this->docEnfants;
  1881.     }
  1882.     public function addDocEnfantsCommande(Commande $docEnfantsCommande): Commande
  1883.     {
  1884.         $this->docEnfantsCommande[] = $docEnfantsCommande;
  1885.         return $this;
  1886.     }
  1887.     public function removeDocEnfantsCommande(Commande $docEnfantsCommande)
  1888.     {
  1889.         $this->docEnfantsCommande->removeElement($docEnfantsCommande);
  1890.     }
  1891.     public function getDocEnfantsCommande(): Collection
  1892.     {
  1893.         return $this->docEnfantsCommande;
  1894.     }
  1895.     public function addDocEnfantsBP(Commande $docEnfantsBP): Commande
  1896.     {
  1897.         $this->docEnfantsBP[] = $docEnfantsBP;
  1898.         return $this;
  1899.     }
  1900.     public function removeDocEnfantsBP(Commande $docEnfantsBP)
  1901.     {
  1902.         $this->docEnfantsBP->removeElement($docEnfantsBP);
  1903.     }
  1904.     public function getDocEnfantsBP(): Collection
  1905.     {
  1906.         return $this->docEnfantsBP;
  1907.     }
  1908.     public function addDocEnfantsDevi(Commande $docEnfantsDevi): Commande
  1909.     {
  1910.         $this->docEnfantsDevis[] = $docEnfantsDevi;
  1911.         return $this;
  1912.     }
  1913.     public function removeDocEnfantsDevi(Commande $docEnfantsDevi)
  1914.     {
  1915.         $this->docEnfantsDevis->removeElement($docEnfantsDevi);
  1916.     }
  1917.     public function getDocEnfantsDevis(): Collection
  1918.     {
  1919.         return $this->docEnfantsDevis;
  1920.     }
  1921.     public function addDocEnfantsBL(Commande $docEnfantsBL): Commande
  1922.     {
  1923.         $this->docEnfantsBL[] = $docEnfantsBL;
  1924.         return $this;
  1925.     }
  1926.     public function removeDocEnfantsBL(Commande $docEnfantsBL)
  1927.     {
  1928.         $this->docEnfantsBL->removeElement($docEnfantsBL);
  1929.     }
  1930.     public function getDocEnfantsBL(): Collection
  1931.     {
  1932.         return $this->docEnfantsBL;
  1933.     }
  1934.     public function setNumeroLettrage(?float $numeroLettrage): Commande
  1935.     {
  1936.         $this->numeroLettrage $numeroLettrage;
  1937.         if($numeroLettrage == null) {
  1938.             $this->setLettrage(null);
  1939.         } else {
  1940.             $lettres = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
  1941.             $lettrage '';
  1942.             $reste floatval($numeroLettrage);
  1943.             $lettrage .= $reste ' ';
  1944.             $premiereLettreKey $reste 26;
  1945.             $lettrage .= $premiereLettreKey ' ';
  1946.             $reste -= $premiereLettreKey;
  1947.             $lettrage .= $reste ' ';
  1948.             $deuxiemeLettreKey $reste % (26*26);
  1949.             $lettrage .= $deuxiemeLettreKey ' ';
  1950.             $reste -= $deuxiemeLettreKey;
  1951.             $lettrage .= $reste ' ';
  1952.             $deuxiemeLettreKey $deuxiemeLettreKey 26;
  1953.             $lettrage .= $deuxiemeLettreKey ' ';
  1954.             $troisiemeLettreKey $reste % (26*26*26);
  1955.             $troisiemeLettreKey $troisiemeLettreKey / (26*26);
  1956.             $premiereLettre $lettres[$premiereLettreKey];
  1957.             $deuxiemeLettre $lettres[$deuxiemeLettreKey];
  1958.             $troisiemeLettre $lettres[$troisiemeLettreKey];
  1959.             $lettrage $troisiemeLettre.$deuxiemeLettre.$premiereLettre;
  1960.             $this->setLettrage($lettrage);
  1961.         }
  1962.         return $this;
  1963.     }
  1964.     public function getNumeroLettrage(): ?float
  1965.     {
  1966.         return $this->numeroLettrage;
  1967.     }
  1968.     public function setLettrage(?string $lettrage): Commande
  1969.     {
  1970.         $this->lettrage $lettrage;
  1971.         return $this;
  1972.     }
  1973.     public function getLettrage(): ?string
  1974.     {
  1975.         return $this->lettrage;
  1976.     }
  1977.     public function setSolde(?float $solde): Commande
  1978.     {
  1979.         $this->solde $solde;
  1980.         return $this;
  1981.     }
  1982.     public function getSolde(): ?float
  1983.     {
  1984.         return $this->solde;
  1985.     }
  1986.     public function setLibelleLivraison(?string $libelleLivraison): Commande
  1987.     {
  1988.         $this->libelleLivraison $libelleLivraison;
  1989.         return $this;
  1990.     }
  1991.     public function getLibelleLivraison(): ?string
  1992.     {
  1993.         return $this->abreviation($this->libelleLivraison);
  1994.     }
  1995.     public function setLibelleFacturation(?string $libelleFacturation): Commande
  1996.     {
  1997.         $this->libelleFacturation $libelleFacturation;
  1998.         return $this;
  1999.     }
  2000.     public function getLibelleFacturation(): ?string
  2001.     {
  2002.         return $this->abreviation($this->libelleFacturation);
  2003.     }
  2004.     public function setStatutAmodifier(?bool $statutAmodifier): Commande
  2005.     {
  2006.         $this->statutAmodifier $statutAmodifier;
  2007.         return $this;
  2008.     }
  2009.     public function getStatutAmodifier(): ?bool
  2010.     {
  2011.         return $this->statutAmodifier;
  2012.     }
  2013.     public function setBonPrepaAuto(?bool $bonPrepaAuto): Commande
  2014.     {
  2015.         $this->bonPrepaAuto $bonPrepaAuto;
  2016.         return $this;
  2017.     }
  2018.     public function getBonPrepaAuto(): ?bool
  2019.     {
  2020.         return $this->bonPrepaAuto;
  2021.     }
  2022.     public function setOrigine(?string $origine): Commande
  2023.     {
  2024.         $this->origine $origine;
  2025.         return $this;
  2026.     }
  2027.     public function getOrigine(): ?string
  2028.     {
  2029.         return $this->origine;
  2030.     }
  2031.     public function setValideManuellement(?bool $valideManuellement): Commande
  2032.     {
  2033.         //if($valideManuellement != $this->valideManuellement) $this->setUtilisateurValideManuellement($this->getUtilisateur());
  2034.         $this->valideManuellement $valideManuellement;
  2035.         return $this;
  2036.     }
  2037.     public function getValideManuellement(): ?bool
  2038.     {
  2039.         return $this->valideManuellement;
  2040.     }
  2041.     public function setIdImport(?string $idImport): Commande
  2042.     {
  2043.         $this->idImport $idImport;
  2044.         return $this;
  2045.     }
  2046.     public function getIdImport(): ?string
  2047.     {
  2048.         return $this->idImport;
  2049.     }
  2050.     public function setReferencePrestashop(?string $referencePrestashop): Commande
  2051.     {
  2052.         $this->referencePrestashop $referencePrestashop;
  2053.         return $this;
  2054.     }
  2055.     public function getReferencePrestashop(): ?string
  2056.     {
  2057.         return $this->referencePrestashop;
  2058.     }
  2059.     public function setPrenom(?string $prenom): Commande
  2060.     {
  2061.         $this->prenom $prenom;
  2062.         return $this;
  2063.     }
  2064.     public function getPrenom(): ?string
  2065.     {
  2066.         return $this->prenom;
  2067.     }
  2068.     public function setNom(?string $nom): Commande
  2069.     {
  2070.         $this->nom $nom;
  2071.         return $this;
  2072.     }
  2073.     public function getNom(): ?string
  2074.     {
  2075.         return $this->nom;
  2076.     }
  2077.     public function setCivilite(?string $civilite): Commande
  2078.     {
  2079.         $this->civilite $civilite;
  2080.         return $this;
  2081.     }
  2082.     public function getCivilite(): ?string
  2083.     {
  2084.         return $this->civilite;
  2085.     }
  2086.     public function setDateAnnulation(?DateTime $dateAnnulation): Commande
  2087.     {
  2088.         $this->dateAnnulation $dateAnnulation;
  2089.         return $this;
  2090.     }
  2091.     public function getDateAnnulation(): ?DateTime
  2092.     {
  2093.         return $this->dateAnnulation;
  2094.     }
  2095.     public function setUtilisateurValideManuellement(?Utilisateur $utilisateurValideManuellement): Commande
  2096.     {
  2097.         $this->utilisateurValideManuellement $utilisateurValideManuellement;
  2098.         return $this;
  2099.     }
  2100.     public function getUtilisateurValideManuellement(): ?Utilisateur
  2101.     {
  2102.         return $this->utilisateurValideManuellement;
  2103.     }
  2104.     public function addLitige(Litige $litige): Commande
  2105.     {
  2106.         $this->litiges[] = $litige;
  2107.         return $this;
  2108.     }
  2109.     public function removeLitige(Litige $litige)
  2110.     {
  2111.         $this->litiges->removeElement($litige);
  2112.     }
  2113.     public function getLitiges(): Collection
  2114.     {
  2115.         return $this->litiges;
  2116.     }
  2117.     public function setDelaiRelance(?int $delaiRelance): Commande
  2118.     {
  2119.         $this->delaiRelance $delaiRelance;
  2120.         return $this;
  2121.     }
  2122.     public function getDelaiRelance(): ?int
  2123.     {
  2124.         return $this->delaiRelance;
  2125.     }
  2126.     public function setNbColis(?int $nbColis): Commande
  2127.     {
  2128.         $this->nbColis $nbColis;
  2129.         return $this;
  2130.     }
  2131.     public function getNbColis(): ?int
  2132.     {
  2133.         return $this->nbColis;
  2134.     }
  2135.     public function setDelaiLivraison(?int $delaiLivraison): Commande
  2136.     {
  2137.         $this->delaiLivraison $delaiLivraison;
  2138.         return $this;
  2139.     }
  2140.     public function getDelaiLivraison(): ?int
  2141.     {
  2142.         return $this->delaiLivraison;
  2143.     }
  2144.     public function setDateRelance(?DateTime $dateRelance): Commande
  2145.     {
  2146.         $this->dateRelance $dateRelance;
  2147.         return $this;
  2148.     }
  2149.     public function getDateRelance(): ?DateTime
  2150.     {
  2151.         return $this->dateRelance;
  2152.     }
  2153.     public function setPerdu(?bool $perdu): Commande
  2154.     {
  2155.         $this->perdu $perdu;
  2156.         return $this;
  2157.     }
  2158.     public function getPerdu(): ?bool
  2159.     {
  2160.         return $this->perdu;
  2161.     }
  2162.     public function setCommercial(?Utilisateur $commercial): Commande
  2163.     {
  2164.         $this->commercial $commercial;
  2165.         return $this;
  2166.     }
  2167.     public function getCommercial(): ?Utilisateur
  2168.     {
  2169.         return $this->commercial;
  2170.     }
  2171.     public function setAssistanteCommercial(?Utilisateur $assistanteCommercial): Commande
  2172.     {
  2173.         $this->assistanteCommercial $assistanteCommercial;
  2174.         return $this;
  2175.     }
  2176.     public function getAssistanteCommercial(): ?Utilisateur
  2177.     {
  2178.         return $this->assistanteCommercial;
  2179.     }
  2180.     public function addNote(Note $note): Commande
  2181.     {
  2182.         $this->notes[] = $note;
  2183.         return $this;
  2184.     }
  2185.     public function removeNote(Note $note)
  2186.     {
  2187.         $this->notes->removeElement($note);
  2188.     }
  2189.     public function getNotes(): Collection
  2190.     {
  2191.         return $this->notes;
  2192.     }
  2193.     public function setNumeroSuivi(?string $numeroSuivi): Commande
  2194.     {
  2195.         $this->numeroSuivi $numeroSuivi;
  2196.         return $this;
  2197.     }
  2198.     public function getNumeroSuivi(): ?string
  2199.     {
  2200.         return $this->numeroSuivi;
  2201.     }
  2202.     public function setDateValidationBAT(?DateTime $dateValidationBAT): Commande
  2203.     {
  2204.         $this->dateValidationBAT $dateValidationBAT;
  2205.         return $this;
  2206.     }
  2207.     public function getDateValidationBAT(): ?DateTime
  2208.     {
  2209.         return $this->dateValidationBAT;
  2210.     }
  2211.     public function setStatutBAT(?bool $statutBAT): Commande
  2212.     {
  2213.         $this->statutBAT $statutBAT;
  2214.         return $this;
  2215.     }
  2216.     public function getStatutBAT(): ?bool
  2217.     {
  2218.         return $this->statutBAT;
  2219.     }
  2220.     public function setSecteurGeographique(?SecteurGeographique $secteurGeographique): Commande
  2221.     {
  2222.         $this->secteurGeographique $secteurGeographique;
  2223.         return $this;
  2224.     }
  2225.     public function getSecteurGeographique(): ?SecteurGeographique
  2226.     {
  2227.         return $this->secteurGeographique;
  2228.     }
  2229.     public function setDateReceptionFournisseur(?DateTime $dateReceptionFournisseur): Commande
  2230.     {
  2231.         $this->dateReceptionFournisseur $dateReceptionFournisseur;
  2232.         return $this;
  2233.     }
  2234.     public function getDateReceptionFournisseur(): ?DateTime
  2235.     {
  2236.         return $this->dateReceptionFournisseur;
  2237.     }
  2238.     public function setDateLivraisonSouhaitee(?DateTime $dateLivraisonSouhaitee): Commande
  2239.     {
  2240.         $this->dateLivraisonSouhaitee $dateLivraisonSouhaitee;
  2241.         return $this;
  2242.     }
  2243.     public function getDateLivraisonSouhaitee(): ?DateTime
  2244.     {
  2245.         return $this->dateLivraisonSouhaitee;
  2246.     }
  2247.     public function setDateLivraisonTheorique(?DateTime $dateLivraisonTheorique): Commande
  2248.     {
  2249.         $this->dateLivraisonTheorique $dateLivraisonTheorique;
  2250.         return $this;
  2251.     }
  2252.     public function getDateLivraisonTheorique(): ?DateTime
  2253.     {
  2254.         return $this->dateLivraisonTheorique;
  2255.     }
  2256.     public function setCreateur(?Utilisateur $createur): Commande
  2257.     {
  2258.         $this->createur $createur;
  2259.         return $this;
  2260.     }
  2261.     public function getCreateur(): ?Utilisateur
  2262.     {
  2263.         return $this->createur;
  2264.     }
  2265.     public function addCaiss(Caisse $caiss): Commande
  2266.     {
  2267.         $this->caisses[] = $caiss;
  2268.         return $this;
  2269.     }
  2270.     public function removeCaiss(Caisse $caiss)
  2271.     {
  2272.         $this->caisses->removeElement($caiss);
  2273.     }
  2274.     public function getCaisses(): Collection
  2275.     {
  2276.         return $this->caisses;
  2277.     }
  2278.     public function addHistoriqueIntervention(HistoriqueIntervention $historiqueIntervention): Commande
  2279.     {
  2280.         $this->historiqueIntervention[] = $historiqueIntervention;
  2281.         return $this;
  2282.     }
  2283.     public function removeHistoriqueIntervention(HistoriqueIntervention $historiqueIntervention)
  2284.     {
  2285.         $this->historiqueIntervention->removeElement($historiqueIntervention);
  2286.     }
  2287.     public function getHistoriqueIntervention(): Collection
  2288.     {
  2289.         return $this->historiqueIntervention;
  2290.     }
  2291.     public function setContactLivraison(?Contact $contactLivraison): Commande
  2292.     {
  2293.         $this->contactLivraison $contactLivraison;
  2294.         return $this;
  2295.     }
  2296.     public function getContactLivraison(): ?Contact
  2297.     {
  2298.         return $this->contactLivraison;
  2299.     }
  2300.     public function setContactFacturation(?Contact $contactFacturation): Commande
  2301.     {
  2302.         $this->contactFacturation $contactFacturation;
  2303.         return $this;
  2304.     }
  2305.     public function getContactFacturation(): ?Contact
  2306.     {
  2307.         return $this->contactFacturation;
  2308.     }
  2309.     public function setVilleLivraisonTxt(?string $villeLivraisonTxt): Commande
  2310.     {
  2311.         $this->villeLivraisonTxt $villeLivraisonTxt;
  2312.         return $this;
  2313.     }
  2314.     public function getVilleLivraisonTxt(): ?string
  2315.     {
  2316.         return $this->abreviation($this->villeLivraisonTxt);
  2317.     }
  2318.     public function setCodePostalLivraisonTxt(?string $codePostalLivraisonTxt): Commande
  2319.     {
  2320.         $this->codePostalLivraisonTxt $codePostalLivraisonTxt;
  2321.         return $this;
  2322.     }
  2323.     public function getCodePostalLivraisonTxt(): ?string
  2324.     {
  2325.         return $this->abreviation($this->codePostalLivraisonTxt);
  2326.     }
  2327.     public function setVilleFacturationTxt(?string $villeFacturationTxt): Commande
  2328.     {
  2329.         $this->villeFacturationTxt $villeFacturationTxt;
  2330.         return $this;
  2331.     }
  2332.     public function getVilleFacturationTxt(): ?string
  2333.     {
  2334.         return $this->abreviation($this->villeFacturationTxt);
  2335.     }
  2336.     public function setCodePostalFacturationTxt(?string $codePostalFacturationTxt): Commande
  2337.     {
  2338.         $this->codePostalFacturationTxt $codePostalFacturationTxt;
  2339.         return $this;
  2340.     }
  2341.     public function getCodePostalFacturationTxt(): ?string
  2342.     {
  2343.         return $this->abreviation($this->codePostalFacturationTxt);
  2344.     }
  2345.     public function setDureeValidite(?DateTime $dureeValidite): Commande
  2346.     {
  2347.         $this->dureeValidite $dureeValidite;
  2348.         return $this;
  2349.     }
  2350.     public function getDureeValidite(): ?DateTime
  2351.     {
  2352.         return $this->dureeValidite;
  2353.     }
  2354.     public function setContactAcheteur(?Contact $contactAcheteur): Commande
  2355.     {
  2356.         $this->contactAcheteur $contactAcheteur;
  2357.         return $this;
  2358.     }
  2359.     public function getContactAcheteur(): ?Contact
  2360.     {
  2361.         return $this->contactAcheteur;
  2362.     }
  2363.     public function addCommandeCaiss(CommandeCaisse $commandeCaiss): Commande
  2364.     {
  2365.         $this->commandeCaisses[] = $commandeCaiss;
  2366.         return $this;
  2367.     }
  2368.     public function removeCommandeCaiss(CommandeCaisse $commandeCaiss)
  2369.     {
  2370.         $this->commandeCaisses->removeElement($commandeCaiss);
  2371.     }
  2372.     public function getCommandeCaisses(): Collection
  2373.     {
  2374.         return $this->commandeCaisses;
  2375.     }
  2376.     public function setDateExpeditionTheorique(?DateTime $dateExpeditionTheorique): Commande
  2377.     {
  2378.         $this->dateExpeditionTheorique $dateExpeditionTheorique;
  2379.         return $this;
  2380.     }
  2381.     public function getDateExpeditionTheorique(): ?DateTime
  2382.     {
  2383.         return $this->dateExpeditionTheorique;
  2384.     }
  2385.     public function addCommandeEmplacement(CommandeEmplacement $commandeEmplacement): Commande
  2386.     {
  2387.         $this->commandeEmplacements[] = $commandeEmplacement;
  2388.         return $this;
  2389.     }
  2390.     public function removeCommandeEmplacement(CommandeEmplacement $commandeEmplacement)
  2391.     {
  2392.         $this->commandeEmplacements->removeElement($commandeEmplacement);
  2393.     }
  2394.     public function getCommandeEmplacements(): Collection
  2395.     {
  2396.         return $this->commandeEmplacements;
  2397.     }
  2398.     public function setReferenceMarketPlace(?string $referenceMarketPlace): Commande
  2399.     {
  2400.         $this->referenceMarketPlace $referenceMarketPlace;
  2401.         return $this;
  2402.     }
  2403.     public function getReferenceMarketPlace(): ?string
  2404.     {
  2405.         return $this->referenceMarketPlace;
  2406.     }
  2407.     public function setCompteMarketPlace(?CompteMarketPlace $compteMarketPlace): Commande
  2408.     {
  2409.         $this->compteMarketPlace $compteMarketPlace;
  2410.         return $this;
  2411.     }
  2412.     public function getCompteMarketPlace(): ?CompteMarketPlace
  2413.     {
  2414.         return $this->compteMarketPlace;
  2415.     }
  2416.     public function setStatutCommandeMarketPlace(?StatutCommande $statutCommandeMarketPlace): Commande
  2417.     {
  2418.         $this->statutCommandeMarketPlace $statutCommandeMarketPlace;
  2419.         return $this;
  2420.     }
  2421.     public function getStatutCommandeMarketPlace(): ?StatutCommande
  2422.     {
  2423.         return $this->statutCommandeMarketPlace;
  2424.     }
  2425.     public function setTelephone(?string $telephone): Commande
  2426.     {
  2427.         /*
  2428.       $testVal=" ";
  2429.       //enleve tout les - et espaces présents pour uniformiser les numéros
  2430.       $noSpace = preg_replace('/[- ]+/', '', $telephone);
  2431.       // si c'est un 06
  2432.       if(substr($noSpace, 0, 1) == "0"){
  2433.         // coupe le numéro pour mettre des espaces (sinon Excel pense que c'est un gros chiffre)
  2434.         $testVal = substr($noSpace,0,2).' '.substr($noSpace,2,2).' '.substr($noSpace,4,2).' '.substr($noSpace,6,2).' '.substr($noSpace,8,2).' '.substr($noSpace,10,2);
  2435.                 // si c'est un +33
  2436.       } else if(substr($noSpace, 0, 3) == "+33"){
  2437.         // coupe le numéro pour mettre des espaces (sinon Excel pense que c'est un gros chiffre)
  2438.         $testVal = substr($noSpace,0,4).' '.substr($noSpace,4,2).' '.substr($noSpace,6,2).' '.substr($noSpace,8,2).' '.substr($noSpace,10,2);
  2439.       }else{
  2440.         //envoi du numéro d'origine
  2441.         $testVal = $telephone;
  2442.       };
  2443.       $tel = str_replace(["+33"],["0"], $testVal);
  2444.       */
  2445.       $this->telephone $telephone;
  2446.         return $this;
  2447.     }
  2448.     public function getTelephone(): ?string
  2449.     {
  2450.         $telephone $this->telephone;
  2451.         $telephone str_replace(" ","",$telephone);
  2452.         $telephone str_replace(".","",$telephone);
  2453.         $telephone str_replace("(","",$telephone);
  2454.         $telephone str_replace(")","",$telephone);
  2455.         $telephone str_replace("+33","",$telephone);
  2456.         return $telephone;
  2457.     }
  2458.     public function setAdresseValideeManuellement(?bool $adresseValideeManuellement): Commande
  2459.     {
  2460.         $this->adresseValideeManuellement $adresseValideeManuellement;
  2461.         return $this;
  2462.     }
  2463.     public function getAdresseValideeManuellement(): ?bool
  2464.     {
  2465.         return $this->adresseValideeManuellement;
  2466.     }
  2467.     public function setModeExpedition(?ModeExpedition $modeExpedition): Commande
  2468.     {
  2469.         $this->modeExpedition $modeExpedition;
  2470.         return $this;
  2471.     }
  2472.     public function getModeExpedition(): ?ModeExpedition
  2473.     {
  2474.         return $this->modeExpedition;
  2475.     }
  2476.     public function setModeReglementMarketPlace(?ModeReglementMarketPlace $modeReglementMarketPlace): Commande
  2477.     {
  2478.         $this->modeReglementMarketPlace $modeReglementMarketPlace;
  2479.         return $this;
  2480.     }
  2481.     public function getModeReglementMarketPlace(): ?ModeReglementMarketPlace
  2482.     {
  2483.         return $this->modeReglementMarketPlace;
  2484.     }
  2485.     public function setDateExportBext(?DateTime $dateExportBext): Commande
  2486.     {
  2487.         $this->dateExportBext $dateExportBext;
  2488.         return $this;
  2489.     }
  2490.     public function getDateExportBext(): ?DateTime
  2491.     {
  2492.         return $this->dateExportBext;
  2493.     }
  2494.     public function setDateConfirmationPreparation(?DateTime $dateConfirmationPreparation): Commande
  2495.     {
  2496.         $this->dateConfirmationPreparation $dateConfirmationPreparation;
  2497.         return $this;
  2498.     }
  2499.     public function getDateConfirmationPreparation(): ?DateTime
  2500.     {
  2501.         return $this->dateConfirmationPreparation;
  2502.     }
  2503.     public function setDateConfirmationExpedition(?DateTime $dateConfirmationExpedition): Commande
  2504.     {
  2505.         $this->dateConfirmationExpedition $dateConfirmationExpedition;
  2506.         return $this;
  2507.     }
  2508.     public function getDateConfirmationExpedition(): ?DateTime
  2509.     {
  2510.         return $this->dateConfirmationExpedition;
  2511.     }
  2512.     public function setDatePremiereConfirmationExpedition(?DateTime $datePremiereConfirmationExpedition): Commande
  2513.     {
  2514.         $this->datePremiereConfirmationExpedition $datePremiereConfirmationExpedition;
  2515.         return $this;
  2516.     }
  2517.     public function getDatePremiereConfirmationExpedition(): ?DateTime
  2518.     {
  2519.         return $this->datePremiereConfirmationExpedition;
  2520.     }
  2521.     public function setDateForceExpedie(?DateTime $dateForceExpedie): Commande
  2522.     {
  2523.         $this->dateForceExpedie $dateForceExpedie;
  2524.         return $this;
  2525.     }
  2526.     public function getDateForceExpedie(): ?DateTime
  2527.     {
  2528.         return $this->dateForceExpedie;
  2529.     }
  2530.     public function setDateForceAnnule(?DateTime $dateForceAnnule): Commande
  2531.     {
  2532.         $this->dateForceAnnule $dateForceAnnule;
  2533.         return $this;
  2534.     }
  2535.     public function getDateForceAnnule(): ?DateTime
  2536.     {
  2537.         return $this->dateForceAnnule;
  2538.     }
  2539.     public function setABloquer(?bool $aBloquer): Commande
  2540.     {
  2541.         $this->aBloquer $aBloquer;
  2542.         return $this;
  2543.     }
  2544.     public function getABloquer(): ?bool
  2545.     {
  2546.         return $this->aBloquer;
  2547.     }
  2548.     public function setDateInsertion(?DateTime $dateInsertion): Commande
  2549.     {
  2550.         $this->dateInsertion $dateInsertion;
  2551.         return $this;
  2552.     }
  2553.     public function getDateInsertion(): ?DateTime
  2554.     {
  2555.         return $this->dateInsertion;
  2556.     }
  2557.     public function setDateMaxExpeditionMin(?DateTime $dateMaxExpeditionMin): Commande
  2558.     {
  2559.         $this->dateMaxExpeditionMin $dateMaxExpeditionMin;
  2560.         return $this;
  2561.     }
  2562.     public function getDateMaxExpeditionMin(): ?DateTime
  2563.     {
  2564.         return $this->dateMaxExpeditionMin;
  2565.     }
  2566.     public function setDateMaxExpeditionMax(?DateTime $dateMaxExpeditionMax): Commande
  2567.     {
  2568.         $this->dateMaxExpeditionMax $dateMaxExpeditionMax;
  2569.         return $this;
  2570.     }
  2571.     public function getDateMaxExpeditionMax(): ?DateTime
  2572.     {
  2573.         return $this->dateMaxExpeditionMax;
  2574.     }
  2575.     public function setMaj(?bool $maj): Commande
  2576.     {
  2577.         $this->maj $maj;
  2578.         return $this;
  2579.     }
  2580.     public function getMaj(): ?bool
  2581.     {
  2582.         return $this->maj;
  2583.     }
  2584.     public function setRapportBext(?Rapport $rapportBext): Commande
  2585.     {
  2586.         $this->rapportBext $rapportBext;
  2587.         return $this;
  2588.     }
  2589.     public function getRapportBext(): ?Rapport
  2590.     {
  2591.         return $this->rapportBext;
  2592.     }
  2593.     public function setCommandeParent(?Commande $commandeParent): Commande
  2594.     {
  2595.         $this->commandeParent $commandeParent;
  2596.         return $this;
  2597.     }
  2598.     public function getCommandeParent(): ?Commande
  2599.     {
  2600.         return $this->commandeParent;
  2601.     }
  2602.     public function setPrenomFacturation(?string $prenomFacturation): Commande
  2603.     {
  2604.         $this->prenomFacturation $prenomFacturation;
  2605.         return $this;
  2606.     }
  2607.     public function getPrenomFacturation(): ?string
  2608.     {
  2609.         return $this->abreviation($this->prenomFacturation);
  2610.     }
  2611.     public function setNomFacturation(?string $nomFacturation): Commande
  2612.     {
  2613.         $this->nomFacturation $nomFacturation;
  2614.         return $this;
  2615.     }
  2616.     public function getNomFacturation(): ?string
  2617.     {
  2618.         return $this->abreviation($this->nomFacturation);
  2619.     }
  2620.     public function setCanalVente(?string $canalVente): Commande
  2621.     {
  2622.         $this->canalVente $canalVente;
  2623.         return $this;
  2624.     }
  2625.     public function getCanalVente(): ?string
  2626.     {
  2627.         return $this->canalVente;
  2628.     }
  2629.     public function setNiveauUn(?NiveauUn $niveauUn): Commande
  2630.     {
  2631.         $this->niveauUn $niveauUn;
  2632.         return $this;
  2633.     }
  2634.     public function getNiveauUn(): ?NiveauUn
  2635.     {
  2636.         return $this->niveauUn;
  2637.     }
  2638.     public function setTelephone2(?string $telephone2): Commande
  2639.     {
  2640.         $this->telephone2 $telephone2;
  2641.         return $this;
  2642.     }
  2643.     public function getTelephone2(): ?string
  2644.     {
  2645.         //return $this->telephone2;
  2646.         $telephone $this->telephone2;
  2647.         $telephone str_replace(" ","",$telephone);
  2648.         $telephone str_replace(".","",$telephone);
  2649.         $telephone str_replace("(","",$telephone);
  2650.         $telephone str_replace(")","",$telephone);
  2651.         $telephone str_replace("+33","",$telephone);
  2652.         return $telephone;
  2653.     }
  2654.     public function abreviation($str)
  2655.     {
  2656.         $search  = ['allée','avenue.','boulevard','carrefour','chemin','chaussée','impasse','lotissement','passage','place','résidence','route','batiment','étage','escalier'];
  2657.         $replace = ['All.','Av.','Bd.','Car.','Che.','Chs.','Imp.','Lot.','Pas.','Pl.','Res.','Rte.','Bat.','Et.','Esc.'];
  2658.         return str_replace($search$replace$str);
  2659.     }
  2660.     public function setPaysLivraisonTxt(?string $paysLivraisonTxt): Commande
  2661.     {
  2662.         $this->paysLivraisonTxt $paysLivraisonTxt;
  2663.         return $this;
  2664.     }
  2665.     public function getPaysLivraisonTxt(): ?string
  2666.     {
  2667.         return $this->paysLivraisonTxt;
  2668.     }
  2669.     public function setPaysFacturationTxt(?string $paysFacturationTxt): Commande
  2670.     {
  2671.         $this->paysFacturationTxt $paysFacturationTxt;
  2672.         return $this;
  2673.     }
  2674.     public function getPaysFacturationTxt(): ?string
  2675.     {
  2676.         return $this->paysFacturationTxt;
  2677.     }
  2678.     public function setTelephoneFacturation(?string $telephoneFacturation): Commande
  2679.     {
  2680.         $this->telephoneFacturation $telephoneFacturation;
  2681.         return $this;
  2682.     }
  2683.     public function getTelephoneFacturation(): ?string
  2684.     {
  2685.         //return $this->telephoneFacturation;
  2686.         $telephone $this->telephoneFacturation;
  2687.         $telephone str_replace(" ","",$telephone);
  2688.         $telephone str_replace(".","",$telephone);
  2689.         $telephone str_replace("(","",$telephone);
  2690.         $telephone str_replace(")","",$telephone);
  2691.         $telephone str_replace("+33","",$telephone);
  2692.         return $telephone;
  2693.     }
  2694.     public function setTelephoneFacturation2(?string $telephoneFacturation2): Commande
  2695.     {
  2696.         $this->telephoneFacturation2 $telephoneFacturation2;
  2697.         return $this;
  2698.     }
  2699.     public function getTelephoneFacturation2(): ?string
  2700.     {
  2701.         //return $this->telephoneFacturation2;
  2702.         $telephone $this->telephoneFacturation2;
  2703.         $telephone str_replace(" ","",$telephone);
  2704.         $telephone str_replace(".","",$telephone);
  2705.         $telephone str_replace("(","",$telephone);
  2706.         $telephone str_replace(")","",$telephone);
  2707.         $telephone str_replace("+33","",$telephone);
  2708.         return $telephone;
  2709.     }
  2710.     public function addCommandeNumeroSuivi(CommandeNumeroSuivi $commandeNumeroSuivi): Commande
  2711.     {
  2712.         $this->commandeNumeroSuivi[] = $commandeNumeroSuivi;
  2713.         return $this;
  2714.     }
  2715.     public function removeCommandeNumeroSuivi(CommandeNumeroSuivi $commandeNumeroSuivi)
  2716.     {
  2717.         $this->commandeNumeroSuivi->removeElement($commandeNumeroSuivi);
  2718.     }
  2719.     public function getCommandeNumeroSuivi()
  2720.     {
  2721.         return $this->commandeNumeroSuivi;
  2722.     }
  2723.     public function setArchive(?bool $archive): Commande
  2724.     {
  2725.         $this->archive $archive;
  2726.         return $this;
  2727.     }
  2728.     public function getArchive(): ?bool
  2729.     {
  2730.         return $this->archive;
  2731.     }
  2732.     public function setCodeIsoFacturation(?string $codeIsoFacturation): Commande
  2733.     {
  2734.         $this->codeIsoFacturation $codeIsoFacturation;
  2735.         return $this;
  2736.     }
  2737.     public function getCodeIsoFacturation(): ?string
  2738.     {
  2739.         return $this->codeIsoFacturation;
  2740.     }
  2741.     public function setStateOrProvinceFacturation(?string $stateOrProvinceFacturation): Commande
  2742.     {
  2743.         $this->stateOrProvinceFacturation $stateOrProvinceFacturation;
  2744.         return $this;
  2745.     }
  2746.     public function getStateOrProvinceFacturation(): ?string
  2747.     {
  2748.         return $this->stateOrProvinceFacturation;
  2749.     }
  2750.     public function setCodeIsoLivraison(?string $codeIsoLivraison): Commande
  2751.     {
  2752.         $this->codeIsoLivraison $codeIsoLivraison;
  2753.         return $this;
  2754.     }
  2755.     public function getCodeIsoLivraison(): ?string
  2756.     {
  2757.         return $this->codeIsoLivraison;
  2758.     }
  2759.     public function setStateOrProvinceLivraison(?string $stateOrProvinceLivraison): Commande
  2760.     {
  2761.         $this->stateOrProvinceLivraison $stateOrProvinceLivraison;
  2762.         return $this;
  2763.     }
  2764.     public function getStateOrProvinceLivraison(): ?string
  2765.     {
  2766.         return $this->stateOrProvinceLivraison;
  2767.     }
  2768.     public function setDevise(?Devise $devise): Commande
  2769.     {
  2770.         $this->devise $devise;
  2771.         return $this;
  2772.     }
  2773.     public function getDevise(): ?Devise
  2774.     {
  2775.         return $this->devise;
  2776.     }
  2777.     public function setEmail(?string $email): Commande
  2778.     {
  2779.         $this->email $email;
  2780.         return $this;
  2781.     }
  2782.     public function getEmail(): ?string
  2783.     {
  2784.         return $this->email;
  2785.     }
  2786.     public function setExportCompta(?Export $exportCompta): Commande
  2787.     {
  2788.         $this->exportCompta $exportCompta;
  2789.         return $this;
  2790.     }
  2791.     public function getExportCompta(): ?Export
  2792.     {
  2793.         return $this->exportCompta;
  2794.     }
  2795.     public function setMarge(?float $marge): Commande
  2796.     {
  2797.         $this->marge $marge;
  2798.         return $this;
  2799.     }
  2800.     public function getMarge(): ?float
  2801.     {
  2802.         return $this->marge;
  2803.     }
  2804.     public function setTauxMarge(?float $tauxMarge): Commande
  2805.     {
  2806.         $this->tauxMarge $tauxMarge;
  2807.         return $this;
  2808.     }
  2809.     public function getTauxMarge(): ?float
  2810.     {
  2811.         return $this->tauxMarge;
  2812.     }
  2813.     public function setRapportCloture(?RapportCloture $rapportCloture): Commande
  2814.     {
  2815.         $this->rapportCloture $rapportCloture;
  2816.         return $this;
  2817.     }
  2818.     public function getRapportCloture(): ?RapportCloture
  2819.     {
  2820.         return $this->rapportCloture;
  2821.     }
  2822.     public function setDateMailFacture(?DateTime $dateMailFacture): Commande
  2823.     {
  2824.         $this->dateMailFacture $dateMailFacture;
  2825.         return $this;
  2826.     }
  2827.     public function getDateMailFacture(): ?DateTime
  2828.     {
  2829.         return $this->dateMailFacture;
  2830.     }
  2831.     public function setPointRetrait(?string $pointRetrait): Commande
  2832.     {
  2833.         $this->pointRetrait $pointRetrait;
  2834.         return $this;
  2835.     }
  2836.     public function getPointRetrait(): ?string
  2837.     {
  2838.         return $this->pointRetrait;
  2839.     }
  2840.     public function setDeliveryMode(?string $deliveryMode): Commande
  2841.     {
  2842.         $this->deliveryMode $deliveryMode;
  2843.         return $this;
  2844.     }
  2845.     public function getDeliveryMode(): ?string
  2846.     {
  2847.         return $this->deliveryMode;
  2848.     }
  2849.     public function setRaisonAnomalie(?RaisonAnomalie $raisonAnomalie): Commande
  2850.     {
  2851.         $this->raisonAnomalie $raisonAnomalie;
  2852.         return $this;
  2853.     }
  2854.     public function getRaisonAnomalie(): ?RaisonAnomalie
  2855.     {
  2856.         return $this->raisonAnomalie;
  2857.     }
  2858.     public function setDateCalculMarge(?DateTime $dateCalculMarge): Commande
  2859.     {
  2860.         $this->dateCalculMarge $dateCalculMarge;
  2861.         return $this;
  2862.     }
  2863.     public function getDateCalculMarge(): ?DateTime
  2864.     {
  2865.         return $this->dateCalculMarge;
  2866.     }
  2867.     public function setTotalTtcDevise(?float $totalTtcDevise): Commande
  2868.     {
  2869.         $this->totalTtcDevise $totalTtcDevise;
  2870.         return $this;
  2871.     }
  2872.     public function getTotalTtcDevise(): ?float
  2873.     {
  2874.         return $this->totalTtcDevise;
  2875.     }
  2876.     public function setTauxChange(?float $tauxChange): Commande
  2877.     {
  2878.         $this->tauxChange $tauxChange;
  2879.         return $this;
  2880.     }
  2881.     public function getTauxChange(): ?float
  2882.     {
  2883.         return $this->tauxChange;
  2884.     }
  2885.     public function getTexteFacture(): ?string
  2886.     {
  2887.         return $this->texteFacture;
  2888.     }
  2889.     public function setTexteFacture(?string $texteFacture): Commande
  2890.     {
  2891.         $this->texteFacture $texteFacture;
  2892.         return $this;
  2893.     }
  2894.     public function getProjet(): ?Projet
  2895.     {
  2896.         return $this->projet;
  2897.     }
  2898.     public function setProjet($projet): ?Commande
  2899.     {
  2900.         $this->projet $projet;
  2901.         return $this;
  2902.     }
  2903.     public function getProjetActivites(): Collection
  2904.     {
  2905.         return $this->projetActivites;
  2906.     }
  2907.     public function setProjetActivites($projetActivites): Commande
  2908.     {
  2909.         $this->projetActivites $projetActivites;
  2910.         return $this;
  2911.     }
  2912.     public function getProjetDomaines(): Collection
  2913.     {
  2914.         return $this->projetDomaines;
  2915.     }
  2916.     public function setProjetDomaines($projetDomaines): Commande
  2917.     {
  2918.         $this->projetDomaines $projetDomaines;
  2919.         return $this;
  2920.     }
  2921.     public function isABloquer(): ?bool
  2922.     {
  2923.         return $this->aBloquer;
  2924.     }
  2925.     public function isBasculeComptabilite(): ?bool
  2926.     {
  2927.         return $this->basculeComptabilite;
  2928.     }
  2929.     public function isModifiable(): ?bool
  2930.     {
  2931.         return $this->modifiable;
  2932.     }
  2933.     public function isBonPrepaAuto(): ?bool
  2934.     {
  2935.         return $this->bonPrepaAuto;
  2936.     }
  2937.     public function isAvoirUtilise(): ?bool
  2938.     {
  2939.         return $this->avoirUtilise;
  2940.     }
  2941.     public function isFrancoPort(): ?bool
  2942.     {
  2943.         return $this->francoPort;
  2944.     }
  2945.     public function isAvecTaxe(): ?bool
  2946.     {
  2947.         return $this->avecTaxe;
  2948.     }
  2949.     public function isVisible(): ?bool
  2950.     {
  2951.         return $this->visible;
  2952.     }
  2953.     public function getTypeDocumentCommercial(): ?int
  2954.     {
  2955.         return $this->typeDocumentCommercial;
  2956.     }
  2957.     public function setTypeDocumentCommercial(int $typeDocumentCommercial): Commande
  2958.     {
  2959.         $this->typeDocumentCommercial $typeDocumentCommercial;
  2960.         return $this;
  2961.     }
  2962.     public function isValideManuellement(): ?bool
  2963.     {
  2964.         return $this->valideManuellement;
  2965.     }
  2966.     public function isPerdu(): ?bool
  2967.     {
  2968.         return $this->perdu;
  2969.     }
  2970.     public function isAFacturer(): ?bool
  2971.     {
  2972.         return $this->aFacturer;
  2973.     }
  2974.     public function isDejaFacture(): ?bool
  2975.     {
  2976.         return $this->dejaFacture;
  2977.     }
  2978.     public function isMultiBL(): ?bool
  2979.     {
  2980.         return $this->multiBL;
  2981.     }
  2982.     public function isAttenteFacturation(): ?bool
  2983.     {
  2984.         return $this->attenteFacturation;
  2985.     }
  2986.     public function isStatutBAT(): ?bool
  2987.     {
  2988.         return $this->statutBAT;
  2989.     }
  2990.     public function isStatutAmodifier(): ?bool
  2991.     {
  2992.         return $this->statutAmodifier;
  2993.     }
  2994.     public function isAdresseValideeManuellement(): ?bool
  2995.     {
  2996.         return $this->adresseValideeManuellement;
  2997.     }
  2998.     public function isMaj(): ?bool
  2999.     {
  3000.         return $this->maj;
  3001.     }
  3002.     public function isArchive(): ?bool
  3003.     {
  3004.         return $this->archive;
  3005.     }
  3006.     public function isSendedToOqton(): bool
  3007.     {
  3008.         return $this->sendedToOqton;
  3009.     }
  3010.     public function setSendedToOqton(bool $sendedToOqton): Commande
  3011.     {
  3012.         $this->sendedToOqton $sendedToOqton;
  3013.         return $this;
  3014.     }
  3015.     public function setCaisse(?Caisse $caisse): Commande
  3016.     {
  3017.         $this->caisse $caisse;
  3018.         return $this;
  3019.     }
  3020.     public function getCaisse(): ?Caisse
  3021.     {
  3022.         return $this->caisse;
  3023.     }
  3024.     public function getDateEcheance(): ?\DateTimeInterface
  3025.     {
  3026.         return $this->dateEcheance;
  3027.     }
  3028.     public function setDateEcheance(?\DateTimeInterface $dateEcheance): self
  3029.     {
  3030.         $this->dateEcheance $dateEcheance;
  3031.         return $this;
  3032.     }
  3033.     public function addProjetActivite(ProjetActivite $projetActivite): self
  3034.     {
  3035.         if (!$this->projetActivites->contains($projetActivite)) {
  3036.             $this->projetActivites[] = $projetActivite;
  3037.             $projetActivite->setCommande($this);
  3038.         }
  3039.         return $this;
  3040.     }
  3041.     public function removeProjetActivite(ProjetActivite $projetActivite): self
  3042.     {
  3043.         if ($this->projetActivites->removeElement($projetActivite)) {
  3044.             // set the owning side to null (unless already changed)
  3045.             if ($projetActivite->getCommande() === $this) {
  3046.                 $projetActivite->setCommande(null);
  3047.             }
  3048.         }
  3049.         return $this;
  3050.     }
  3051.     public function addProjetDomaine(ProjetDomaine $projetDomaine): self
  3052.     {
  3053.         if (!$this->projetDomaines->contains($projetDomaine)) {
  3054.             $this->projetDomaines[] = $projetDomaine;
  3055.             $projetDomaine->setCommande($this);
  3056.         }
  3057.         return $this;
  3058.     }
  3059.     public function removeProjetDomaine(ProjetDomaine $projetDomaine): self
  3060.     {
  3061.         if ($this->projetDomaines->removeElement($projetDomaine)) {
  3062.             // set the owning side to null (unless already changed)
  3063.             if ($projetDomaine->getCommande() === $this) {
  3064.                 $projetDomaine->setCommande(null);
  3065.             }
  3066.         }
  3067.         return $this;
  3068.     }
  3069.     public function getTaxe(): ?Taxe
  3070.     {
  3071.         return $this->taxe;
  3072.     }
  3073.     public function setTaxe(?Taxe $taxe): self
  3074.     {
  3075.         $this->taxe $taxe;
  3076.         return $this;
  3077.     }
  3078.     public function getTaxeFraisPort(): ?Taxe
  3079.     {
  3080.         return $this->taxeFraisPort;
  3081.     }
  3082.     public function setTaxeFraisPort(?Taxe $taxeFraisPort): self
  3083.     {
  3084.         $this->taxeFraisPort $taxeFraisPort;
  3085.         return $this;
  3086.     }
  3087.     public function getPayplugId(): ?string
  3088.     {
  3089.         return $this->payplugId;
  3090.     }
  3091.     public function setPayplugId(?string $payplugId): self
  3092.     {
  3093.         $this->payplugId $payplugId;
  3094.         return $this;
  3095.     }
  3096.     public function getTelephoneLivraison(): ?string
  3097.     {
  3098.         return $this->telephoneLivraison;
  3099.     }
  3100.     public function setTelephoneLivraison(?string $telephoneLivraison): self
  3101.     {
  3102.         $this->telephoneLivraison $telephoneLivraison;
  3103.         return $this;
  3104.     }
  3105.     public function getEmailLivraison(): ?string
  3106.     {
  3107.         return $this->emailLivraison;
  3108.     }
  3109.     public function setEmailLivraison(?string $emailLivraison): self
  3110.     {
  3111.         $this->emailLivraison $emailLivraison;
  3112.         return $this;
  3113.     }
  3114.     public function getPayplugMontant(): ?float
  3115.     {
  3116.         return $this->payplugMontant;
  3117.     }
  3118.     public function setPayplugMontant(?float $payplugMontant): self
  3119.     {
  3120.         $this->payplugMontant $payplugMontant;
  3121.         return $this;
  3122.     }
  3123.     public function getStatutAttente(): ?string
  3124.     {
  3125.         return $this->statutAttente;
  3126.     }
  3127.     public function setStatutAttente(?string $statutAttente): self
  3128.     {
  3129.         $this->statutAttente $statutAttente;
  3130.         return $this;
  3131.     }
  3132. }