src/Entity/GestionComerciale/Commande.php line 55

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