<?php
namespace App\Entity\GestionComerciale;
use App\Entity\Adresses\Adresse;
use App\Entity\Articles\Devise;
use App\Entity\Articles\MouvementStock;
use App\Entity\Clients\Client;
use App\Entity\Export\Export;
use App\Entity\Litiges\Litige;
use App\Entity\Localisation\SecteurGeographique;
use App\Entity\Localisation\Zone;
use App\Entity\MarketPlace\CompteMarketPlace;
use App\Entity\MarketPlace\ModeReglementMarketPlace;
use App\Entity\MarketPlace\Rapport;
use App\Entity\MarketPlace\StatutCommande;
use App\Entity\Notes\Note;
use App\Entity\Projets\Projet;
use App\Entity\Projets\ProjetActivite;
use App\Entity\Projets\ProjetDomaine;
use App\Entity\Rangements\Caisse;
use App\Entity\Rangements\CommandeCaisse;
use App\Entity\Rangements\CommandeEmplacement;
use App\Entity\Rangements\NiveauUn;
use App\Entity\Transporteurs\RapportCloture;
use App\Entity\Transporteurs\Transporteur;
use App\Entity\Utilisateur\Contact;
use App\Entity\Utilisateur\HistoriqueIntervention;
use App\Entity\Utilisateur\Intervention;
use App\Entity\Utilisateur\Utilisateur;
use App\Entity\Vehicules\VehiculeClient;
use DateTime;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
//use Symfony\Component\Validator\ExecutionContextInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping\Index;
use App\Annotations\SecuredEntity;
/**
* Commande
*
* @ORM\Table("commerciale__commande",indexes={
* @ORM\Index(name="reference", columns={"reference"}),
* @ORM\Index(name="referenceMarketPlace", columns={"reference_market_place"})
* })
* @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\CommandeRepository")
* @ORM\HasLifecycleCallbacks()
* @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
* @SecuredEntity(name="Commandes", group="VENTES")
*/
class Commande
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="a_bloquer", type="boolean", nullable=true)
*/
private $aBloquer;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Rangements\NiveauUn", inversedBy="emplacements")
* @ORM\JoinColumn(nullable=true)
*/
private $niveauUn;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Projets\Projet", inversedBy="commandes")
* @ORM\JoinColumn(nullable=true)
*/
private $projet;
/**
* @ORM\Column(name="canal_vente", type="string", length=255, nullable=true)
*/
private $canalVente;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\CompteMarketPlace", cascade={"persist"})
*/
private $compteMarketPlace;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\Rapport", cascade={"persist"})
*/
private $rapportBext;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\StatutCommande", inversedBy="commandes")
* @ORM\JoinColumn(nullable=true)
*/
private $statutCommandeMarketPlace;
/**
* @ORM\Column(name="reference_market_place", type="string", length=255, nullable=true)
*/
private $referenceMarketPlace;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Rangements\CommandeEmplacement", mappedBy="commande")
*/
private $commandeEmplacements;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Litiges\Litige", mappedBy="commande")
*/
private $litiges;
/**
* @ORM\Column(name="bascule_comptabilite", type="boolean", nullable=true)
*/
private $basculeComptabilite;
/**
* @ORM\Column(name="kilometrage", type="integer", nullable=true)
*/
private $kilometrage;
/**
* @ORM\Column(name="duree_validite", type="datetime", nullable=true)
*/
private $dureeValidite;
/**
* @ORM\Column(name="delai_relance", type="integer", nullable=true)
*/
private $delaiRelance;
/**
* @ORM\Column(name="modifiable", type="boolean", nullable=true)
*/
private $modifiable;
/**
* @ORM\Column(name="bp_auto", type="boolean", nullable=true)
*/
private $bonPrepaAuto;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Vehicules\VehiculeClient", inversedBy="commande")
* @ORM\JoinColumn(nullable=true)
*/
private $vehiculesClient;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Utilisateur\Intervention", mappedBy="ordreRep")
* @ORM\JoinColumn(nullable=true)
*/
private $interventions;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Acompte", mappedBy="commande", cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private $acomptes;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Acompte", mappedBy="parent")
* @ORM\JoinColumn(nullable=true)
*/
private $reglements;
/**
* @ORM\Column(name="avoir_utilise", type="boolean", nullable=true)
*/
private $avoirUtilise;
/**
* @ORM\Column(name="franco_port", type="boolean", nullable=true)
*/
private $francoPort;
/**
* @ORM\Column(name="avecTaxe", type="boolean", nullable=true)
*/
private $avecTaxe;
/**
* @ORM\Column(name="visible", type="boolean", nullable=true)
*/
private $visible;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande", inversedBy="docEnfantsDevis")
* @ORM\JoinColumn(nullable=true)
*/
private $devis;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande",inversedBy="bls")
* @ORM\JoinColumn(nullable=true)
*/
private $facture;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="devis")
*/
private $docEnfantsDevis;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Projets\ProjetActivite", mappedBy="commande")
*/
private $projetActivites;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Projets\ProjetDomaine", mappedBy="commande")
*/
private $projetDomaines;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="commande")
*/
private $docEnfantsCommande;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="bp")
*/
private $docEnfantsBP;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="bl")
*/
private $docEnfantsBL;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande",inversedBy="docEnfantsBL")
* @ORM\JoinColumn(nullable=true)
*/
private $bl;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="facture")
*/
private $bls;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande",inversedBy="docEnfantsBP")
* @ORM\JoinColumn(nullable=true)
*/
private $bp;
/**
* @ORM\Column(name="marge", type="float", nullable=true)
*
*/
private $marge;
/**
* @ORM\Column(name="taux_marge", type="float", nullable=true)
*
*/
private $tauxMarge;
/**
* @ORM\Column(name="texte_facture", type="text", nullable=true)
*/
private $texteFacture;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande", cascade={"persist"},inversedBy="docEnfantsCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $commande;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Contact")
* @ORM\JoinColumn(nullable=true)
*/
private $contactLivraison;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Contact")
* @ORM\JoinColumn(nullable=true)
*/
private $contactFacturation;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Contact")
* @ORM\JoinColumn(nullable=true)
*/
private $contactAcheteur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client", inversedBy="commandes", cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private $client;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\RaisonAnomalie", cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private $raisonAnomalie;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\Transporteur", inversedBy="commandes")
* @ORM\JoinColumn(nullable=true)
*/
private $transporteur;
/**
* @ORM\Column(name="type_document_commercial_id", type="integer")
*/
private $typeDocumentCommercial;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Notes\Note", mappedBy="commande")
* @ORM\OrderBy({"dateDebut" = "DESC", "id" = "ASC"})
*/
private $notes;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\ArticleCommande", mappedBy="commande")
* @ORM\OrderBy({"position" = "ASC", "id" = "ASC"})
*/
private $articleCommande;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\StatutPaiement", inversedBy="commandes")
* @ORM\JoinColumn(nullable=true)
*/
private $statutPaiement;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\StatutCommande", inversedBy="commandes")
* @ORM\JoinColumn(nullable=true)
*/
private $statutCommande;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\EtatCommande", inversedBy="commandes")
* @ORM\JoinColumn(nullable=true)
*/
private $etatCommande;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="commandes")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
* @ORM\JoinColumn(nullable=true)
*/
private $createur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateurValideManuellement;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="ordreRepMecanicien")
* @ORM\JoinColumn(nullable=true)
*/
private $mecanicien;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\SecteurGeographique")
* @ORM\JoinColumn(nullable=true)
*/
private $secteurGeographique;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
* @ORM\JoinColumn(nullable=true)
*/
private $commercial;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
* @ORM\JoinColumn(nullable=true)
*/
private $assistanteCommercial;
/**
* @ORM\Column(name="nb_colis", type="integer", nullable=true)
*/
private $nbColis;
/**
* @ORM\Column(name="date_insertion", type="datetime", nullable=true)
*/
private $dateInsertion;
/**
*
* @ORM\Column(name="date_echeance", type="datetime", nullable=true)
*/
private $dateEcheance;
/**
* @ORM\Column(name="date_confirmation_preparation", type="datetime", nullable=true)
*/
private $dateConfirmationPreparation;
/**
* @ORM\Column(name="date_confirmation_expedition", type="datetime", nullable=true)
*/
private $dateConfirmationExpedition;
/**
* @ORM\Column(name="date_premiere_confirmation_expedition", type="datetime", nullable=true)
*/
private $datePremiereConfirmationExpedition;
/**
* @ORM\Column(name="date_force_expedie", type="datetime", nullable=true)
*/
private $dateForceExpedie;
/**
* @ORM\Column(name="date_force_annule", type="datetime", nullable=true)
*/
private $dateForceAnnule;
/**
* @ORM\Column(name="delai_livraison", type="integer", nullable=true)
*/
private $delaiLivraison;
/**
* @ORM\Column(name="date_relance", type="datetime", nullable=true)
*/
private $dateRelance;
/**
* @ORM\Column(name="date_approximative_reception", type="datetime", nullable=true)
*/
private $dateApproximativeReception;
/**
* @ORM\Column(name="date_expedition", type="datetime", nullable=true)
*/
private $dateExpedition;
/**
* @ORM\Column(name="date_bon", type="datetime", nullable=true)
*/
private $dateBon;
/**
* @ORM\Column(name="date_annulation", type="datetime", nullable=true)
*/
private $dateAnnulation;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="dateMaj", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateMaj;
/**
* @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="numero_reference", type="integer",nullable=true)
*/
private $numeroReference;
/**
* @ORM\Column(name="numero_suivi", type="string", length=255, nullable=true)
*/
private $numeroSuivi;
/**
* @ORM\Column(name="reference", type="string", length=255, nullable=true)
*/
private $reference;
/**
* @ORM\Column(name="reference_prestashop", type="string", length=255, nullable=true)
*/
private $referencePrestashop;
/**
* @ORM\Column(name="origine_saisie", type="string", length=255, nullable=true)
*/
private $origineSaisie;
/**
* @ORM\Column(name="origine", type="string", length=255, nullable=true)
*/
private $origine;
/**
* @ORM\Column(name="id_import", type="string", length=255, nullable=true)
*/
private $idImport;
/**
* @ORM\Column(name="valide_manuellement", type="boolean", nullable=true)
*/
private $valideManuellement;
/**
* @ORM\Column(name="perdu", type="boolean", nullable=true)
*/
private $perdu;
/**
* @ORM\Column(name="total_tva", type="float", nullable=true)
*/
private $totalTva;
/**
* @ORM\Column(name="frais_port_supplementaire", type="float", nullable=true)
*/
private $fraisPortSupplementaire;
/**
* @ORM\Column(name="taux_tva_frais_port", type="float", nullable=true)
*/
private $tauxTvaFraisPort;
/**
* @ORM\Column(name="total_frais_port", type="float", nullable=true)
*/
private $totalFraisPort;
/**
* @ORM\Column(name="total_frais_port_ttc", type="float", nullable=true)
*/
private $totalFraisPortTtc;
/**
* @ORM\Column(name="total_tva_frais_port", type="float", nullable=true)
*/
private $totalTvaFraisPort;
/**
* @ORM\Column(name="total_poids", type="float", nullable=true)
*/
private $totalPoids;
/**
* @ORM\Column(name="total_ttc", type="float", nullable=true)
*/
private $totalTtc;
/**
* @ORM\Column(name="total", type="float", nullable=true)
*/
private $total;
/**
* @var float
*
* @ORM\Column(name="total_ht_avec_frais_port", type="float", nullable=true)
*/
private $totalHtAvecFraisPort;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Adresses\Adresse", inversedBy="commandeLivraison")
* @ORM\JoinColumn(nullable=true)
*/
private $adresseLivraison;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
*/
private $paysLivraison;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
*/
private $villeLivraison;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
*/
private $codePostalLivraison;
/**
* @ORM\Column(name="ville_livraison_txt", type="string", length=255, nullable=true)
*/
private $villeLivraisonTxt;
/**
* @ORM\Column(name="pays_livraison_txt", type="string", length=255, nullable=true)
*/
private $paysLivraisonTxt;
/**
* @ORM\Column(name="code_postal_livraison_txt", type="string", length=255, nullable=true)
*/
private $codePostalLivraisonTxt;
/**
* @ORM\Column(name="libelle_livraison", type="string", length=255, nullable=true)
*/
private $libelleLivraison;
/**
* @ORM\Column(name="numero_livraison", type="string", length=255, nullable=true)
*/
private $numeroLivraison;
/**
* @ORM\Column(name="rue_livraison", type="string", length=255, nullable=true)
*/
private $rueLivraison;
/**
* @ORM\Column(name="complement_livraison", type="string", length=255, nullable=true)
*/
private $complementLivraison;
/**
* @ORM\Column(name="complement_livraison_2", type="string", length=255, nullable=true)
*/
private $complementLivraison2;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Adresses\Adresse", inversedBy="commandeFacturation")
* @ORM\JoinColumn(nullable=true)
*/
private $adresseFacturation;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
*/
private $paysFacturation;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
*/
private $villeFacturation;
/**
* @ORM\Column(name="pays_facturation_txt", type="string", length=255, nullable=true)
*/
private $paysFacturationTxt;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone")
*/
private $codePostalFacturation;
/**
* @ORM\Column(name="ville_facturation_txt", type="string", length=255, nullable=true)
*/
private $villeFacturationTxt;
/**
* @ORM\Column(name="code_postal_facturation_txt", type="string", length=255, nullable=true)
*/
private $codePostalFacturationTxt;
/**
* @ORM\Column(name="libelle_facturation", type="string", length=255, nullable=true)
*/
private $libelleFacturation;
/**
* @ORM\Column(name="numero_facturation", type="string", length=255, nullable=true)
*/
private $numeroFacturation;
/**
* @ORM\Column(name="rue_facturation", type="string", length=255, nullable=true)
*/
private $rueFacturation;
/**
* @ORM\Column(name="complement_facturation", type="string", length=255, nullable=true)
*/
private $complementFacturation;
/**
* @ORM\Column(name="complement_facturation_2", type="string", length=255, nullable=true)
*/
private $complementFacturation2;
/**
* @ORM\Column(name="reference_client", type="string", length=255, nullable=true)
*/
private $referenceClient;
/**
* @ORM\Column(name="commentaire", type="text", nullable=true)
*/
private $commentaire;
/**
* @ORM\Column(name="travaux", type="text", nullable=true)
*/
private $travaux;
/**
* @ORM\Column(name="commentaire_annulation", type="text", nullable=true)
*/
private $commentaireAnnulation;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Articles\MouvementStock", mappedBy="commande")
*/
private $mouvementStock;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\CommandeNumeroSuivi", mappedBy="commande")
* @ORM\JoinColumn(nullable=true)
*/
private $commandeNumeroSuivi;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\CommandeFournisseur", mappedBy="commande")
* @ORM\JoinColumn(nullable=true)
*/
private $commandesFournisseur;
/**
* @ORM\Column(name="temps_passe", type="float", nullable=true)
*/
private $tempsPasse;
/**
* @ORM\Column(name="temps_facture", type="float", nullable=true)
*/
private $tempsFacture;
/**
* @ORM\Column(name="a_facturer", type="boolean", nullable=true)
*/
private $aFacturer;
/**
* @ORM\Column(name="deja_facture", type="boolean", nullable=true)
*/
private $dejaFacture;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ModeReglement", cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private $modereglement;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\ModeReglementMarketPlace", cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private $modeReglementMarketPlace;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\DelaiPaiement", cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private $delaiPaiement;
/**
* @ORM\Column(name="multi_bl", type="boolean", nullable=true)
*/
private $multiBL;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\LCR", inversedBy="factures")
* @ORM\JoinColumn(nullable=true)
*/
private $lcr;
/**
* @ORM\Column(name="attente_facturation", type="boolean", nullable=true)
*/
private $attenteFacturation;
/**
* @ORM\Column(name="date_validation_bat", type="datetime", nullable=true)
*/
private $dateValidationBAT;
/**
* @ORM\Column(name="statut_bat", type="boolean", nullable=true)
*/
private $statutBAT;
/**
* @ORM\Column(name="date_transfert_compta", type="datetime", nullable=true)
*/
private $dateTransfertCompta;
/**
* @ORM\Column(name="numero_lettrage", type="float", nullable=true)
*
*/
private $numeroLettrage;
/**
* @ORM\Column(name="lettrage", type="string", length=255, nullable=true)
*/
private $lettrage;
/**
* @ORM\Column(name="solde", type="float", nullable=true)
*
*/
private $solde;
/**
* @ORM\Column(name="statut_a_modifier", type="boolean", nullable=true)
*/
private $statutAmodifier;
/**
* @ORM\Column(name="prenom", type="string", length=255, nullable=true)
*/
private $prenom;
/**
* @ORM\Column(name="nom", type="string", length=255, nullable=true)
*
*/
private $nom;
/**
* @ORM\Column(name="prenom_facturation", type="string", length=255, nullable=true)
*/
private $prenomFacturation;
/**
* @ORM\Column(name="nom_facturation", type="string", length=255, nullable=true)
*
*/
private $nomFacturation;
/**
* @ORM\Column(name="civilite", type="string", length=255, nullable=true)
*/
private $civilite;
/**
* @ORM\Column(name="date_reception_fournisseur", type="datetime", nullable=true)
*/
private $dateReceptionFournisseur;
/**
* @ORM\Column(name="date_livraison_souhaitee", type="datetime", nullable=true)
*/
private $dateLivraisonSouhaitee;
/**
* @ORM\Column(name="date_livraison_theorique", type="datetime", nullable=true)
*/
private $dateLivraisonTheorique;
/**
* @ORM\Column(name="date_expedition_theorique", type="datetime", nullable=true)
*/
private $dateExpeditionTheorique;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Rangements\CommandeCaisse", mappedBy="commande")
*/
private $commandeCaisses;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Utilisateur\HistoriqueIntervention", mappedBy="commande")
*/
private $historiqueIntervention;
/**
* @ORM\Column(name="telephone", type="string", length=255, nullable=true)
*
*/
private $telephone;
/**
* @ORM\Column(name="telephone2", type="string", length=255, nullable=true)
*
*/
private $telephone2;
/**
* @ORM\Column(name="email", type="string", length=255, nullable=true)
*
*/
private $email;
/**
* @ORM\Column(name="telephone_facturation", type="string", length=255, nullable=true)
*
*/
private $telephoneFacturation;
/**
* @ORM\Column(name="telephone_facturation2", type="string", length=255, nullable=true)
*
*/
private $telephoneFacturation2;
/**
* @ORM\Column(name="adresse_validee_manuellement", type="boolean", nullable=true)
*/
private $adresseValideeManuellement;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ModeExpedition")
* @ORM\JoinColumn(nullable=true)
*/
private $modeExpedition;
/**
* @ORM\Column(name="date_export_bext", type="datetime", nullable=true)
*/
private $dateExportBext;
/**
* @ORM\Column(name="date_max_expedition_min", type="datetime", nullable=true)
*/
private $dateMaxExpeditionMin;
/**
* @ORM\Column(name="date_max_expedition_max", type="datetime", nullable=true)
*/
private $dateMaxExpeditionMax;
/**
* @ORM\Column(name="maj", type="boolean", nullable=true)
*/
private $maj;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande")
* @ORM\JoinColumn(nullable=true)
*/
private $commandeParent;
/**
* @ORM\Column(name="archive", type="boolean", nullable=true, options={"default" : 0})
*/
private $archive;
/**
* @ORM\Column(name="code_iso_facturation", type="string", length=255, nullable=true)
*/
private $codeIsoFacturation;
/**
* @ORM\Column(name="state_or_province_facturation", type="string", length=255, nullable=true)
*/
private $stateOrProvinceFacturation;
/**
* @ORM\Column(name="code_iso_livraison", type="string", length=255, nullable=true)
*/
private $codeIsoLivraison;
/**
* @ORM\Column(name="state_or_province_livraison", type="string", length=255, nullable=true)
*/
private $stateOrProvinceLivraison;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\Devise")
* @ORM\JoinColumn(nullable=true)
*/
private $devise;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Export\Export")
* @ORM\JoinColumn(nullable=true)
*/
private $exportCompta;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\RapportCloture",inversedBy="bonsLivraison")
* @ORM\JoinColumn(nullable=true)
*/
private $rapportCloture;
/**
* @ORM\Column(name="date_mail_facture", type="datetime", nullable=true)
*/
private $dateMailFacture;
/**
* @ORM\Column(name="date_calcul_marge", type="datetime", nullable=true)
*/
private $dateCalculMarge;
/**
* @ORM\Column(name="point_retrait", type="string", length=255, nullable=true)
*/
private $pointRetrait;
/**
* @ORM\Column(name="delivery_mode", type="string", length=255, nullable=true)
*/
private $deliveryMode;
/**
* @ORM\Column(name="total_ttc_devise", type="float", nullable=true)
*/
private $totalTtcDevise;
/**
* @ORM\Column(name="taux_change", type="float", nullable=true)
*/
private $tauxChange;
/**
* @ORM\Column(name="sended_to_oqton", type="boolean", nullable=true)
*/
private $sendedToOqton = false;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Rangements\Caisse")
* @ORM\JoinColumn(nullable=true)
*/
private $caisse;
/**
* @ORM\Column(name="fichier_import", type="string", length=255, nullable=true)
*/
private $fichierImport;
/**
* @ORM\Column(name="email_import", type="string", length=255, nullable=true)
*/
private $emailImport;
/**
* @ORM\Column(name="fichier_export", type="string", length=255, nullable=true)
*/
private $fichierExport;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $donneesImportees = [];
/**
* @ORM\Column(type="text", nullable=true)
*/
private $adresseLivraisonTxt;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $adresseFacturationTxt;
public function __construct()
{
$this->dateInsertion = new Datetime();
$this->date = new Datetime();
$this->dateBon = new Datetime();
$this->dateExpeditionTheorique = new Datetime();
$this->fraisPortSupplementaire = 0;
$this->delaiRelance = 3;
$this->avecTaxe = true;
$this->francoPort = false;
$this->basculeComptabilite = false;
$this->visible = true;
$this->modifiable = true;
$this->tempsPasse = 0;
$this->tempsFacture = 0;
//$this->aFacturer = true;
$this->dejaFacture = false;
$this->multiBL = false;
$this->attenteFacturation = false;
$this->bls = new ArrayCollection();
$this->acomptes = new ArrayCollection();
$this->statutAmodifier = false;
$this->articleCommande = new ArrayCollection();
//$this->dureeValidite = 30;
$this->commandeEmplacements = new ArrayCollection();
$this->litiges = new ArrayCollection();
$this->interventions = new ArrayCollection();
$this->reglements = new ArrayCollection();
$this->docEnfantsDevis = new ArrayCollection();
$this->docEnfantsCommande = new ArrayCollection();
$this->docEnfantsBP = new ArrayCollection();
$this->docEnfantsBL = new ArrayCollection();
$this->bps = new ArrayCollection();
$this->notes = new ArrayCollection();
$this->mouvementStock = new ArrayCollection();
$this->commandeNumeroSuivi = new ArrayCollection();
$this->commandesFournisseur = new ArrayCollection();
$this->commandeCaisses = new ArrayCollection();
$this->historiqueIntervention = new ArrayCollection();
$this->projetDomaines = new ArrayCollection();
$this->projetActivites = new ArrayCollection();
}
public function __toString(){
$retour = (string)$this->getReference();
if(is_object($this->getClient())) $retour .= ' / '.$this->getClient()->getNom().' '.$this->getClient()->getPrenom();
return $retour;
}
public function getUploadDir(){
return "/importCsv/import-cmd-client/".$this->getDate()->format('Y/m/d/').$this->getId().'/';
}
public function setId($id): Commande
{
$this->id=$id;
return $this;
}
public function getId()
{
return $this->id;
}
public function setDate(?DateTime $date, $force = false): Commande
{
if(!$force) return $this;
$oldDate = $this->date;
/*
if($force === true){
} 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'))){
$dateTmp = new Datetime();
$date->setTime($dateTmp->format('H'), $dateTmp->format('i'), $dateTmp->format('s'));
} elseif(is_object($oldDate) && is_object($date)) {
$date->setTime($oldDate->format('H'), $oldDate->format('i'), $oldDate->format('s'));
}
*/
$this->date = $date;
$this->setDateEcheanceAuto();
return $this;
}
public function setDateEcheanceAuto(){
if(is_object($this->client)) {// and !is_object($this->dateEcheance)
$client = $this->client;
//Calcul de l'échéance
if(is_object($client->getDelaiPaiement()))
{
$delai = $client->getDelaiPaiement()->getId();
}
else {
$delai = 0;
}
if(is_object($this->date))
{
$date = clone $this->date;
} else {
$date = new \DateTime();
}
$delai_jours = 0;
$jour_echeance = 0;
$fin_mois = false;
if(is_object($client->getDelaiPaiement()))
{
if($client->getDelaiPaiement()->getDelai() > 0)
{
$delai_jours = $client->getDelaiPaiement()->getDelai();
}
if($client->getDelaiPaiement()->getJourEcheance() > 0)
{
$jour_echeance = $client->getDelaiPaiement()->getJourEcheance();
}
if($client->getDelaiPaiement()->isFinMois())
{
$fin_mois = true;
}
}
if($delai_jours > 0) {
$interval = new \DateInterval( "P".$delai_jours."D" );
$date->add($interval);
}
if($fin_mois) {
$date->modify('last day of this month');
}
if($jour_echeance > 0 && $fin_mois ) {
$date->modify('+'.$jour_echeance.'days');
}
else if($jour_echeance)
{
//$date_temp = new \Datetime();
$date->setDate($date->format("Y"),$date->format("m"),$jour_echeance);
//$date->modify('+'.$jour_echeance.'days');
}
/*
switch ($delai) {
case 1://30 jours fin de mois
$interval = new \DateInterval( "P30D" );
$date->add($interval);
$echeance = new \DateTime('last day of '.$date->format('F Y'));
break;
case 2://A reception facture
$echeance = $date;
break;
case 3://30 jours
$echeance = $date;
$interval = new \DateInterval( "P30D" );
$echeance->add($interval);
break;
case 4://45 jours fin de mois
$interval = new \DateInterval( "P45D" );
$date->add($interval);
$echeance = new \DateTime('last day of '.$date->format('F Y'));
break;
case 5://60 jours
$echeance = $date;
$interval = new \DateInterval( "P60D" );
$echeance->add($interval);
break;
default:
$echeance = $date;
}
*/
$this->setDateEcheance($date);
/*
//Calcul de l'échéance
if(is_object($client->getDelaiPaiement()))
$delai = $client->getDelaiPaiement()->getId();
else
$delai = 0;
if(is_object($this->date)){
$date = clone $this->date;
} else {
$date = new \DateTime();
}
switch ($delai) {
case 1://30 jours fin de mois
$interval = new \DateInterval( "P30D" );
$date->add($interval);
$echeance = new \DateTime('last day of '.$date->format('F Y'));
break;
case 2://A reception facture
$echeance = $date;
break;
case 3://30 jours
$echeance = $date;
$interval = new \DateInterval( "P30D" );
$echeance->add($interval);
break;
case 4://45 jours fin de mois
$interval = new \DateInterval( "P45D" );
$date->add($interval);
$echeance = new \DateTime('last day of '.$date->format('F Y'));
break;
case 5://60 jours
$echeance = $date;
$interval = new \DateInterval( "P60D" );
$echeance->add($interval);
break;
default:
$echeance = $date;
}
$this->setDateEcheance($echeance);
*/
} elseif(!is_object($this->dateEcheance)) {
$echeance = $this->date;
$this->setDateEcheance($echeance);
}
//exit;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setDateMaj(?DateTime $dateMaj): Commande
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?DateTime
{
return $this->dateMaj;
}
public function setDateSuppression(?DateTime $dateSuppression): Commande
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setReference(?string $reference): Commande
{
$this->reference = $reference;
$this->modifierStatutCommande();
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setTotal(?float $total): Commande
{
$this->total = $total;
return $this;
}
public function getTotal(): ?float
{
return $this->total;
}
/**
* @return float
*/
public function getTotalHtAvecFraisPort(): float
{
return $this->totalHtAvecFraisPort;
}
/**
* @param float $totalHtAvecFraisPort
* @return Commande
*/
public function setTotalHtAvecFraisPort(float $totalHtAvecFraisPort): Commande
{
$this->totalHtAvecFraisPort = $totalHtAvecFraisPort;
return $this;
}
public function setUtilisateur(?Utilisateur $utilisateur): Commande
{
$this->utilisateur = $utilisateur;
if(!is_object($this->getCreateur())) {
$this->setCreateur($utilisateur);
}
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function setDelaiPaiement(?DelaiPaiement $delaiPaiement): Commande
{
$this->delaiPaiement = $delaiPaiement;
return $this;
}
public function getDelaiPaiement(): ?DelaiPaiement
{
return $this->delaiPaiement;
}
public function setModeReglement(?ModeReglement $modereglement): Commande
{
$this->modereglement = $modereglement;
return $this;
}
public function getModeReglement(): ?ModeReglement
{
return $this->modereglement;
}
public function setStatutCommande(?\App\Entity\GestionComerciale\StatutCommande $statutCommande): Commande
{
$this->statutCommande = $statutCommande;
$this->modifierStatutCommande();
if(is_object($statutCommande) && ( $statutCommande->getOrdre() == '0' || $statutCommande->getOrdre() == 0) && ($this->getDateAnnulation() == NULL || $this->getDateAnnulation() == '')) {
$this->setDateAnnulation(new Datetime);
}
return $this;
}
private function modifierStatutCommande(){
$commandeParente = $this->getCommande();
if(is_object($commandeParente)) {
$commandeParente->setStatutAmodifier(true);
}
/*
else
$this->setStatutAmodifier(true);
*
*/
}
public function getStatutCommande(): ?\App\Entity\GestionComerciale\StatutCommande
{
return $this->statutCommande;
}
public function addArticleCommande(ArticleCommande $articleCommande): Commande
{
$this->articleCommande[] = $articleCommande;
$articleCommande->setCommande($this);
return $this;
}
public function removeArticleCommande(ArticleCommande $articleCommande)
{
$this->articleCommande->removeElement($articleCommande);
}
public function getArticleCommande(): Collection
{
return $this->articleCommande;
}
public function setClient(?Client $client): Commande
{
//<br/> essai AF201707-000244
//<br/> essai B C201707-000340
if(is_object($client) && $this->client != $client){
$commentaire = 'essai';
/*
if(is_object($this->commande)){
$acomptes = $this->commande->getAcomptes();
$commentaire .= ' A'.$this->reference;
} else {
$acomptes = $this->acomptes;
$commentaire .= ' B '.$this->reference;
}
*/
$acomptes = $this->acomptes;
$commentaire .= ' B '.$this->reference;
if(count($acomptes) > 0)
foreach($acomptes as $acompte){
//$commentaire .= ' reg '.$acompte->getId();
$acompte->setClient($client);
$commentaire .= ' c reg '.$acompte->getId();
}
//$client->setCommentaire($client->getCommentaire()."<br/> ".$commentaire);
}
$this->client = $client;
if(is_object($client)){
$this->setCivilite($client->getCivilite());
$this->setNom($client->getNom());
$this->setprenom($client->getPrenom());
}
return $this;
}
public function getClient(): ?Client
{
return $this->client;
}
public function setTotalTva(?float $totalTva): Commande
{
$this->totalTva = $totalTva;
return $this;
}
public function getTotalTva(): ?float
{
return $this->totalTva;
}
public function setTotalFraisPort(?float $totalFraisPort): Commande
{
$this->totalFraisPort = $totalFraisPort;
return $this;
}
public function getTotalFraisPort(): ?float
{
return $this->totalFraisPort;
}
public function setTotalTtc(?float $totalTtc): Commande
{
$this->totalTtc = $totalTtc;
return $this;
}
public function getTotalTtc(): ?float
{
return $this->totalTtc;
}
public function setNumeroLivraison(?string $numeroLivraison): Commande
{
$this->numeroLivraison = $numeroLivraison;
return $this;
}
public function getNumeroLivraison(): ?string
{
return $this->numeroLivraison;
}
public function setRueLivraison(?string $rueLivraison): Commande
{
$this->rueLivraison = $rueLivraison;
return $this;
}
public function getRueLivraison(): ?string
{
return $this->abreviation($this->rueLivraison);
}
public function setComplementLivraison(?string $complementLivraison): Commande
{
$this->complementLivraison = $complementLivraison;
return $this;
}
public function getComplementLivraison(): ?string
{
return $this->abreviation($this->complementLivraison);
}
public function setNumeroFacturation(?string $numeroFacturation): Commande
{
$this->numeroFacturation = $numeroFacturation;
return $this;
}
public function getNumeroFacturation(): ?string
{
return $this->abreviation($this->numeroFacturation);
}
public function setRueFacturation(?string $rueFacturation): Commande
{
$this->rueFacturation = $rueFacturation;
return $this;
}
public function getRueFacturation(): ?string
{
return $this->abreviation($this->rueFacturation);
}
public function setComplementFacturation(?string $complementFacturation): Commande
{
$this->complementFacturation = $complementFacturation;
return $this;
}
public function getComplementFacturation(): ?string
{
return $this->abreviation($this->complementFacturation);
}
public function setPaysLivraison(?Zone $paysLivraison): Commande
{
$this->paysLivraison = $paysLivraison;
return $this;
}
public function getPaysLivraison(): ?Zone
{
return $this->paysLivraison;
}
public function setVilleLivraison(?Zone $villeLivraison): Commande
{
$this->villeLivraison = $villeLivraison;
return $this;
}
public function getVilleLivraison(): ?Zone
{
return $this->villeLivraison;
}
public function setCodePostalLivraison(?Zone $codePostalLivraison): Commande
{
$this->codePostalLivraison = $codePostalLivraison;
return $this;
}
public function getCodePostalLivraison(): ?Zone
{
return $this->codePostalLivraison;
}
public function setPaysFacturation(?Zone $paysFacturation): Commande
{
$this->paysFacturation = $paysFacturation;
return $this;
}
public function getPaysFacturation(): ?Zone
{
return $this->paysFacturation;
}
public function setVilleFacturation(?Zone $villeFacturation): Commande
{
$this->villeFacturation = $villeFacturation;
return $this;
}
public function getVilleFacturation(): ?Zone
{
return $this->villeFacturation;
}
public function setCodePostalFacturation(?Zone $codePostalFacturation): Commande
{
$this->codePostalFacturation = $codePostalFacturation;
return $this;
}
public function getCodePostalFacturation(): ?Zone
{
return $this->codePostalFacturation;
}
public function setAdresseLivraison(?Adresse $adresseLivraison): Commande
{
$this->adresseLivraison = $adresseLivraison;
return $this;
}
public function getAdresseLivraison(): ?Adresse
{
return $this->adresseLivraison;
}
public function setAdresseFacturation(?Adresse $adresseFacturation): Commande
{
$this->adresseFacturation = $adresseFacturation;
return $this;
}
public function getAdresseFacturation(): ?Adresse
{
return $this->adresseFacturation;
}
public function supprimerAdresse()
{
$this->adresseLivraison = NULL;
$this->adresseFacturation = NULL;
}
public function setTransporteur(?Transporteur $transporteur): Commande
{
$this->transporteur = $transporteur;
return $this;
}
public function getTransporteur(): ?Transporteur
{
return $this->transporteur;
}
public function setTotalPoids(?float $totalPoids): Commande
{
$this->totalPoids = $totalPoids;
return $this;
}
public function getTotalPoids(): ?float
{
return $this->totalPoids;
}
public function setFraisPortSupplementaire(?float $fraisPortSupplementaire): Commande
{
$this->fraisPortSupplementaire = $fraisPortSupplementaire;
return $this;
}
public function getFraisPortSupplementaire(): ?float
{
return $this->fraisPortSupplementaire;
}
public function setDateApproximativeReception(?DateTime $dateApproximativeReception): Commande
{
$this->dateApproximativeReception = $dateApproximativeReception;
return $this;
}
public function getDateApproximativeReception(): ?DateTime
{
return $this->dateApproximativeReception;
}
public function setReferenceClient(?string $referenceClient): Commande
{
$this->referenceClient = $referenceClient;
return $this;
}
public function getReferenceClient(): ?string
{
return $this->referenceClient;
}
public function addAcompte(Acompte $acomptes): Commande
{
$this->acomptes[] = $acomptes;
return $this;
}
public function removeAcompte(Acompte $acomptes)
{
$this->acomptes->removeElement($acomptes);
}
public function getAcomptes(): Collection
{
return $this->acomptes;
}
public function setDevis(?Commande $devis): Commande
{
$this->devis = $devis;
return $this;
}
public function getDevis(): ?Commande
{
return $this->devis;
}
public function setCommentaire(?string $commentaire): Commande
{
$this->commentaire = $commentaire;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setAvecTaxe(?bool $avecTaxe): Commande
{
$this->avecTaxe = $avecTaxe;
return $this;
}
public function getAvecTaxe(): ?bool
{
return $this->avecTaxe;
}
public function setStatutPaiement(?StatutPaiement $statutPaiement): Commande
{
$this->statutPaiement = $statutPaiement;
return $this;
}
public function getStatutPaiement(): ?StatutPaiement
{
return $this->statutPaiement;
}
public function setDateBon(?DateTime $dateBon): Commande
{
$this->dateBon = $dateBon;
return $this;
}
public function getDateBon(): ?DateTime
{
return $this->dateBon;
}
public function setCommande(?Commande $commande): Commande
{
$this->commande = $commande;
return $this;
}
public function getCommande(): ?Commande
{
return $this->commande;
}
public function setVehiculesClient(?VehiculeClient $vehiculesClient): Commande
{
$this->vehiculesClient = $vehiculesClient;
return $this;
}
public function getVehiculesClient(): ?VehiculeClient
{
return $this->vehiculesClient;
}
public function addMouvementStock(MouvementStock $mouvementStock): Commande
{
$this->mouvementStock[] = $mouvementStock;
return $this;
}
public function removeMouvementStock(MouvementStock $mouvementStock)
{
$this->mouvementStock->removeElement($mouvementStock);
}
public function getMouvementStock(): Collection
{
return $this->mouvementStock;
}
public function addIntervention(Intervention $interventions): Commande
{
$this->interventions[] = $interventions;
return $this;
}
public function removeIntervention(Intervention $interventions)
{
$this->interventions->removeElement($interventions);
}
public function getInterventions(): Collection
{
return $this->interventions;
}
public function setMecanicien(?Utilisateur $mecanicien): Commande
{
$this->mecanicien = $mecanicien;
return $this;
}
public function getMecanicien(): ?Utilisateur
{
return $this->mecanicien;
}
public function setDateExpedition(?DateTime $dateExpedition): Commande
{
$this->dateExpedition = $dateExpedition;
return $this;
}
public function getDateExpedition(): ?DateTime
{
return $this->dateExpedition;
}
public function setEtatCommande(?EtatCommande $etatCommande): Commande
{
$this->etatCommande = $etatCommande;
return $this;
}
public function getEtatCommande(): ?EtatCommande
{
return $this->etatCommande;
}
public function setAvoirUtilise(?bool $avoirUtilise): Commande
{
$this->avoirUtilise = $avoirUtilise;
return $this;
}
public function getAvoirUtilise(): ?bool
{
return $this->avoirUtilise;
}
public function setFacture(?Commande $facture): Commande
{
$this->facture = $facture;
return $this;
}
public function getFacture(): ?Commande
{
return $this->facture;
}
public function setBasculeComptabilite(?bool $basculeComptabilite): Commande
{
$this->basculeComptabilite = $basculeComptabilite;
return $this;
}
public function getBasculeComptabilite(): ?bool
{
return $this->basculeComptabilite;
}
public function setFrancoPort(?bool $francoPort): Commande
{
$this->francoPort = $francoPort;
return $this;
}
public function getFrancoPort(): ?bool
{
return $this->francoPort;
}
public function setOrigineSaisie(?string $origineSaisie): Commande
{
$this->origineSaisie = $origineSaisie;
return $this;
}
public function getOrigineSaisie(): ?string
{
return $this->origineSaisie;
}
public function setVisible(?bool $visible): Commande
{
$this->visible = $visible;
return $this;
}
public function getVisible(): ?bool
{
return $this->visible;
}
public function setModifiable(?bool $modifiable): Commande
{
$this->modifiable = $modifiable;
return $this;
}
public function getModifiable(): ?bool
{
return $this->modifiable;
}
public function setBl(?Commande $bl): Commande
{
$this->bl = $bl;
return $this;
}
public function getBl(): ?Commande
{
return $this->bl;
}
public function setBp(?Commande $bp): Commande
{
$this->bp = $bp;
return $this;
}
public function getBp(): ?Commande
{
return $this->bp;
}
public function setCommentaireAnnulation(?string $commentaireAnnulation): Commande
{
$this->commentaireAnnulation = $commentaireAnnulation;
return $this;
}
public function getCommentaireAnnulation(): ?string
{
return $this->commentaireAnnulation;
}
public function addCommandesFournisseur(CommandeFournisseur $commandesFournisseur): Commande
{
$this->commandesFournisseur[] = $commandesFournisseur;
return $this;
}
public function removeCommandesFournisseur(CommandeFournisseur $commandesFournisseur)
{
$this->commandesFournisseur->removeElement($commandesFournisseur);
}
public function getCommandesFournisseur(): Collection
{
return $this->commandesFournisseur;
}
public function setTravaux(?string $travaux): Commande
{
$this->travaux = $travaux;
return $this;
}
public function getTravaux(): ?string
{
return $this->travaux;
}
public function setTempsPasse(?float $tempsPasse): Commande
{
$this->tempsPasse = $tempsPasse;
return $this;
}
public function getTempsPasse(): ?float
{
return $this->tempsPasse;
}
public function setTempsFacture(?float $tempsFacture): Commande
{
$this->tempsFacture = $tempsFacture;
return $this;
}
public function getTempsFacture(): ?float
{
return $this->tempsFacture;
}
public function setAFacturer(?bool $aFacturer): Commande
{
$this->aFacturer = $aFacturer;
return $this;
}
public function getAFacturer(): ?bool
{
return $this->aFacturer;
}
public function setDejaFacture(?bool $dejaFacture): Commande
{
$this->dejaFacture = $dejaFacture;
return $this;
}
public function getDejaFacture(): ?bool
{
return $this->dejaFacture;
}
public function setLcr(?LCR $lcr): Commande
{
$this->lcr = $lcr;
return $this;
}
public function getLcr(): ?LCR
{
return $this->lcr;
}
public function setAttenteFacturation(?bool $attenteFacturation): Commande
{
$this->attenteFacturation = $attenteFacturation;
return $this;
}
public function getAttenteFacturation(): ?bool
{
return $this->attenteFacturation;
}
public function setMultiBL(?bool $multiBL): Commande
{
$this->multiBL = $multiBL;
return $this;
}
public function getMultiBL(): ?bool
{
return $this->multiBL;
}
public function setDateTransfertCompta(?DateTime $dateTransfertCompta): Commande
{
$this->dateTransfertCompta = $dateTransfertCompta;
return $this;
}
public function getDateTransfertCompta(): ?DateTime
{
return $this->dateTransfertCompta;
}
public function setTotalFraisPortTtc(?float $totalFraisPortTtc): Commande
{
$this->totalFraisPortTtc = $totalFraisPortTtc;
return $this;
}
public function getTotalFraisPortTtc(): ?float
{
return $this->totalFraisPortTtc;
}
public function setTotalTvaFraisPort(?float $totalTvaFraisPort): Commande
{
$this->totalTvaFraisPort = $totalTvaFraisPort;
return $this;
}
public function getTotalTvaFraisPort(): ?float
{
return $this->totalTvaFraisPort;
}
public function setTauxTvaFraisPort(?float $tauxTvaFraisPort): Commande
{
$this->tauxTvaFraisPort = $tauxTvaFraisPort;
return $this;
}
public function getTauxTvaFraisPort(): ?float
{
return $this->tauxTvaFraisPort;
}
public function setNumeroReference(?int $numeroReference): Commande
{
if($numeroReference == '') $numeroReference = NULL;
$this->numeroReference = $numeroReference;
return $this;
}
public function getNumeroReference(): ?int
{
return $this->numeroReference;
}
public function addBl(Commande $bl): Commande
{
$this->bls[] = $bl;
return $this;
}
public function removeBl(Commande $bl)
{
$this->bls->removeElement($bl);
}
public function getBls(): Collection
{
return $this->bls;
}
public function addReglement(Acompte $reglement): Commande
{
$this->reglements[] = $reglement;
return $this;
}
public function removeReglement(Acompte $reglement)
{
$this->reglements->removeElement($reglement);
}
public function getReglements(): Collection
{
return $this->reglements;
}
public function setKilometrage(?int $kilometrage): Commande
{
$this->kilometrage = $kilometrage;
return $this;
}
public function getKilometrage(): ?int
{
return $this->kilometrage;
}
public function setComplementLivraison2(?string $complementLivraison2): Commande
{
$this->complementLivraison2 = $complementLivraison2;
return $this;
}
public function getComplementLivraison2(): ?string
{
return $this->abreviation($this->complementLivraison2);
}
public function setComplementFacturation2(?string $complementFacturation2): Commande
{
$this->complementFacturation2 = $complementFacturation2;
return $this;
}
public function getComplementFacturation2(): ?string
{
return $this->abreviation($this->complementFacturation2);
}
public function addFacture(Commande $facture): Commande
{
$this->factures[] = $facture;
return $this;
}
public function removeFacture(Commande $facture)
{
$this->factures->removeElement($facture);
}
public function getFactures(): Collection
{
return $this->factures;
}
public function addBlsCommande(Commande $blsCommande): Commande
{
$this->blsCommande[] = $blsCommande;
return $this;
}
public function removeBlsCommande(Commande $blsCommande)
{
$this->blsCommande->removeElement($blsCommande);
}
public function getBlsCommande(): Collection
{
return $this->blsCommande;
}
public function addDocEnfant(Commande $docEnfant): Commande
{
$this->docEnfants[] = $docEnfant;
return $this;
}
public function removeDocEnfant(Commande $docEnfant)
{
$this->docEnfants->removeElement($docEnfant);
}
public function getDocEnfants(): Collection
{
return $this->docEnfants;
}
public function addDocEnfantsCommande(Commande $docEnfantsCommande): Commande
{
$this->docEnfantsCommande[] = $docEnfantsCommande;
return $this;
}
public function removeDocEnfantsCommande(Commande $docEnfantsCommande)
{
$this->docEnfantsCommande->removeElement($docEnfantsCommande);
}
public function getDocEnfantsCommande(): Collection
{
return $this->docEnfantsCommande;
}
public function addDocEnfantsBP(Commande $docEnfantsBP): Commande
{
$this->docEnfantsBP[] = $docEnfantsBP;
return $this;
}
public function removeDocEnfantsBP(Commande $docEnfantsBP)
{
$this->docEnfantsBP->removeElement($docEnfantsBP);
}
public function getDocEnfantsBP(): Collection
{
return $this->docEnfantsBP;
}
public function addDocEnfantsDevi(Commande $docEnfantsDevi): Commande
{
$this->docEnfantsDevis[] = $docEnfantsDevi;
return $this;
}
public function removeDocEnfantsDevi(Commande $docEnfantsDevi)
{
$this->docEnfantsDevis->removeElement($docEnfantsDevi);
}
public function getDocEnfantsDevis(): Collection
{
return $this->docEnfantsDevis;
}
public function addDocEnfantsBL(Commande $docEnfantsBL): Commande
{
$this->docEnfantsBL[] = $docEnfantsBL;
return $this;
}
public function removeDocEnfantsBL(Commande $docEnfantsBL)
{
$this->docEnfantsBL->removeElement($docEnfantsBL);
}
public function getDocEnfantsBL(): Collection
{
return $this->docEnfantsBL;
}
public function setNumeroLettrage(?float $numeroLettrage): Commande
{
$this->numeroLettrage = $numeroLettrage;
if($numeroLettrage == null) {
$this->setLettrage(null);
} else {
$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'];
$lettrage = '';
$reste = floatval($numeroLettrage);
$lettrage .= $reste . ' ';
$premiereLettreKey = $reste % 26;
$lettrage .= $premiereLettreKey . ' ';
$reste -= $premiereLettreKey;
$lettrage .= $reste . ' ';
$deuxiemeLettreKey = $reste % (26*26);
$lettrage .= $deuxiemeLettreKey . ' ';
$reste -= $deuxiemeLettreKey;
$lettrage .= $reste . ' ';
$deuxiemeLettreKey = $deuxiemeLettreKey / 26;
$lettrage .= $deuxiemeLettreKey . ' ';
$troisiemeLettreKey = $reste % (26*26*26);
$troisiemeLettreKey = $troisiemeLettreKey / (26*26);
$premiereLettre = $lettres[$premiereLettreKey];
$deuxiemeLettre = $lettres[$deuxiemeLettreKey];
$troisiemeLettre = $lettres[$troisiemeLettreKey];
$lettrage = $troisiemeLettre.$deuxiemeLettre.$premiereLettre;
$this->setLettrage($lettrage);
}
return $this;
}
public function getNumeroLettrage(): ?float
{
return $this->numeroLettrage;
}
public function setLettrage(?string $lettrage): Commande
{
$this->lettrage = $lettrage;
return $this;
}
public function getLettrage(): ?string
{
return $this->lettrage;
}
public function setSolde(?float $solde): Commande
{
$this->solde = $solde;
return $this;
}
public function getSolde(): ?float
{
return $this->solde;
}
public function setLibelleLivraison(?string $libelleLivraison): Commande
{
$this->libelleLivraison = $libelleLivraison;
return $this;
}
public function getLibelleLivraison(): ?string
{
return $this->abreviation($this->libelleLivraison);
}
public function setLibelleFacturation(?string $libelleFacturation): Commande
{
$this->libelleFacturation = $libelleFacturation;
return $this;
}
public function getLibelleFacturation(): ?string
{
return $this->abreviation($this->libelleFacturation);
}
public function setStatutAmodifier(?bool $statutAmodifier): Commande
{
$this->statutAmodifier = $statutAmodifier;
return $this;
}
public function getStatutAmodifier(): ?bool
{
return $this->statutAmodifier;
}
public function setBonPrepaAuto(?bool $bonPrepaAuto): Commande
{
$this->bonPrepaAuto = $bonPrepaAuto;
return $this;
}
public function getBonPrepaAuto(): ?bool
{
return $this->bonPrepaAuto;
}
public function setOrigine(?string $origine): Commande
{
$this->origine = $origine;
return $this;
}
public function getOrigine(): ?string
{
return $this->origine;
}
public function setValideManuellement(?bool $valideManuellement): Commande
{
//if($valideManuellement != $this->valideManuellement) $this->setUtilisateurValideManuellement($this->getUtilisateur());
$this->valideManuellement = $valideManuellement;
return $this;
}
public function getValideManuellement(): ?bool
{
return $this->valideManuellement;
}
public function setIdImport(?string $idImport): Commande
{
$this->idImport = $idImport;
return $this;
}
public function getIdImport(): ?string
{
return $this->idImport;
}
public function setReferencePrestashop(?string $referencePrestashop): Commande
{
$this->referencePrestashop = $referencePrestashop;
return $this;
}
public function getReferencePrestashop(): ?string
{
return $this->referencePrestashop;
}
public function setPrenom(?string $prenom): Commande
{
$this->prenom = $prenom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setNom(?string $nom): Commande
{
$this->nom = $nom;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setCivilite(?string $civilite): Commande
{
$this->civilite = $civilite;
return $this;
}
public function getCivilite(): ?string
{
return $this->civilite;
}
public function setDateAnnulation(?DateTime $dateAnnulation): Commande
{
$this->dateAnnulation = $dateAnnulation;
return $this;
}
public function getDateAnnulation(): ?DateTime
{
return $this->dateAnnulation;
}
public function setUtilisateurValideManuellement(?Utilisateur $utilisateurValideManuellement): Commande
{
$this->utilisateurValideManuellement = $utilisateurValideManuellement;
return $this;
}
public function getUtilisateurValideManuellement(): ?Utilisateur
{
return $this->utilisateurValideManuellement;
}
public function addLitige(Litige $litige): Commande
{
$this->litiges[] = $litige;
return $this;
}
public function removeLitige(Litige $litige)
{
$this->litiges->removeElement($litige);
}
public function getLitiges(): Collection
{
return $this->litiges;
}
public function setDelaiRelance(?int $delaiRelance): Commande
{
$this->delaiRelance = $delaiRelance;
return $this;
}
public function getDelaiRelance(): ?int
{
return $this->delaiRelance;
}
public function setNbColis(?int $nbColis): Commande
{
$this->nbColis = $nbColis;
return $this;
}
public function getNbColis(): ?int
{
return $this->nbColis;
}
public function setDelaiLivraison(?int $delaiLivraison): Commande
{
$this->delaiLivraison = $delaiLivraison;
return $this;
}
public function getDelaiLivraison(): ?int
{
return $this->delaiLivraison;
}
public function setDateRelance(?DateTime $dateRelance): Commande
{
$this->dateRelance = $dateRelance;
return $this;
}
public function getDateRelance(): ?DateTime
{
return $this->dateRelance;
}
public function setPerdu(?bool $perdu): Commande
{
$this->perdu = $perdu;
return $this;
}
public function getPerdu(): ?bool
{
return $this->perdu;
}
public function setCommercial(?Utilisateur $commercial): Commande
{
$this->commercial = $commercial;
return $this;
}
public function getCommercial(): ?Utilisateur
{
return $this->commercial;
}
public function setAssistanteCommercial(?Utilisateur $assistanteCommercial): Commande
{
$this->assistanteCommercial = $assistanteCommercial;
return $this;
}
public function getAssistanteCommercial(): ?Utilisateur
{
return $this->assistanteCommercial;
}
public function addNote(Note $note): Commande
{
$this->notes[] = $note;
return $this;
}
public function removeNote(Note $note)
{
$this->notes->removeElement($note);
}
public function getNotes(): Collection
{
return $this->notes;
}
public function setNumeroSuivi(?string $numeroSuivi): Commande
{
$this->numeroSuivi = $numeroSuivi;
return $this;
}
public function getNumeroSuivi(): ?string
{
return $this->numeroSuivi;
}
public function setDateValidationBAT(?DateTime $dateValidationBAT): Commande
{
$this->dateValidationBAT = $dateValidationBAT;
return $this;
}
public function getDateValidationBAT(): ?DateTime
{
return $this->dateValidationBAT;
}
public function setStatutBAT(?bool $statutBAT): Commande
{
$this->statutBAT = $statutBAT;
return $this;
}
public function getStatutBAT(): ?bool
{
return $this->statutBAT;
}
public function setSecteurGeographique(?SecteurGeographique $secteurGeographique): Commande
{
$this->secteurGeographique = $secteurGeographique;
return $this;
}
public function getSecteurGeographique(): ?SecteurGeographique
{
return $this->secteurGeographique;
}
public function setDateReceptionFournisseur(?DateTime $dateReceptionFournisseur): Commande
{
$this->dateReceptionFournisseur = $dateReceptionFournisseur;
return $this;
}
public function getDateReceptionFournisseur(): ?DateTime
{
return $this->dateReceptionFournisseur;
}
public function setDateLivraisonSouhaitee(?DateTime $dateLivraisonSouhaitee): Commande
{
$this->dateLivraisonSouhaitee = $dateLivraisonSouhaitee;
return $this;
}
public function getDateLivraisonSouhaitee(): ?DateTime
{
return $this->dateLivraisonSouhaitee;
}
public function setDateLivraisonTheorique(?DateTime $dateLivraisonTheorique): Commande
{
$this->dateLivraisonTheorique = $dateLivraisonTheorique;
return $this;
}
public function getDateLivraisonTheorique(): ?DateTime
{
return $this->dateLivraisonTheorique;
}
public function setCreateur(?Utilisateur $createur): Commande
{
$this->createur = $createur;
return $this;
}
public function getCreateur(): ?Utilisateur
{
return $this->createur;
}
public function addCaiss(Caisse $caiss): Commande
{
$this->caisses[] = $caiss;
return $this;
}
public function removeCaiss(Caisse $caiss)
{
$this->caisses->removeElement($caiss);
}
public function getCaisses(): Collection
{
return $this->caisses;
}
public function addHistoriqueIntervention(HistoriqueIntervention $historiqueIntervention): Commande
{
$this->historiqueIntervention[] = $historiqueIntervention;
return $this;
}
public function removeHistoriqueIntervention(HistoriqueIntervention $historiqueIntervention)
{
$this->historiqueIntervention->removeElement($historiqueIntervention);
}
public function getHistoriqueIntervention(): Collection
{
return $this->historiqueIntervention;
}
public function setContactLivraison(?Contact $contactLivraison): Commande
{
$this->contactLivraison = $contactLivraison;
return $this;
}
public function getContactLivraison(): ?Contact
{
return $this->contactLivraison;
}
public function setContactFacturation(?Contact $contactFacturation): Commande
{
$this->contactFacturation = $contactFacturation;
return $this;
}
public function getContactFacturation(): ?Contact
{
return $this->contactFacturation;
}
public function setVilleLivraisonTxt(?string $villeLivraisonTxt): Commande
{
$this->villeLivraisonTxt = $villeLivraisonTxt;
return $this;
}
public function getVilleLivraisonTxt(): ?string
{
return $this->abreviation($this->villeLivraisonTxt);
}
public function setCodePostalLivraisonTxt(?string $codePostalLivraisonTxt): Commande
{
$this->codePostalLivraisonTxt = $codePostalLivraisonTxt;
return $this;
}
public function getCodePostalLivraisonTxt(): ?string
{
return $this->abreviation($this->codePostalLivraisonTxt);
}
public function setVilleFacturationTxt(?string $villeFacturationTxt): Commande
{
$this->villeFacturationTxt = $villeFacturationTxt;
return $this;
}
public function getVilleFacturationTxt(): ?string
{
return $this->abreviation($this->villeFacturationTxt);
}
public function setCodePostalFacturationTxt(?string $codePostalFacturationTxt): Commande
{
$this->codePostalFacturationTxt = $codePostalFacturationTxt;
return $this;
}
public function getCodePostalFacturationTxt(): ?string
{
return $this->abreviation($this->codePostalFacturationTxt);
}
public function setDureeValidite(?DateTime $dureeValidite): Commande
{
$this->dureeValidite = $dureeValidite;
return $this;
}
public function getDureeValidite(): ?DateTime
{
return $this->dureeValidite;
}
public function setContactAcheteur(?Contact $contactAcheteur): Commande
{
$this->contactAcheteur = $contactAcheteur;
return $this;
}
public function getContactAcheteur(): ?Contact
{
return $this->contactAcheteur;
}
public function addCommandeCaiss(CommandeCaisse $commandeCaiss): Commande
{
$this->commandeCaisses[] = $commandeCaiss;
return $this;
}
public function removeCommandeCaiss(CommandeCaisse $commandeCaiss)
{
$this->commandeCaisses->removeElement($commandeCaiss);
}
public function getCommandeCaisses(): Collection
{
return $this->commandeCaisses;
}
public function setDateExpeditionTheorique(?DateTime $dateExpeditionTheorique): Commande
{
$this->dateExpeditionTheorique = $dateExpeditionTheorique;
return $this;
}
public function getDateExpeditionTheorique(): ?DateTime
{
return $this->dateExpeditionTheorique;
}
public function addCommandeEmplacement(CommandeEmplacement $commandeEmplacement): Commande
{
$this->commandeEmplacements[] = $commandeEmplacement;
return $this;
}
public function removeCommandeEmplacement(CommandeEmplacement $commandeEmplacement)
{
$this->commandeEmplacements->removeElement($commandeEmplacement);
}
public function getCommandeEmplacements(): Collection
{
return $this->commandeEmplacements;
}
public function setReferenceMarketPlace(?string $referenceMarketPlace): Commande
{
$this->referenceMarketPlace = $referenceMarketPlace;
return $this;
}
public function getReferenceMarketPlace(): ?string
{
return $this->referenceMarketPlace;
}
public function setCompteMarketPlace(?CompteMarketPlace $compteMarketPlace): Commande
{
$this->compteMarketPlace = $compteMarketPlace;
return $this;
}
public function getCompteMarketPlace(): ?CompteMarketPlace
{
return $this->compteMarketPlace;
}
public function setStatutCommandeMarketPlace(?StatutCommande $statutCommandeMarketPlace): Commande
{
$this->statutCommandeMarketPlace = $statutCommandeMarketPlace;
return $this;
}
public function getStatutCommandeMarketPlace(): ?StatutCommande
{
return $this->statutCommandeMarketPlace;
}
public function setTelephone(?string $telephone): Commande
{
/*
$testVal=" ";
//enleve tout les - et espaces présents pour uniformiser les numéros
$noSpace = preg_replace('/[- ]+/', '', $telephone);
// si c'est un 06
if(substr($noSpace, 0, 1) == "0"){
// coupe le numéro pour mettre des espaces (sinon Excel pense que c'est un gros chiffre)
$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);
// si c'est un +33
} else if(substr($noSpace, 0, 3) == "+33"){
// coupe le numéro pour mettre des espaces (sinon Excel pense que c'est un gros chiffre)
$testVal = substr($noSpace,0,4).' '.substr($noSpace,4,2).' '.substr($noSpace,6,2).' '.substr($noSpace,8,2).' '.substr($noSpace,10,2);
}else{
//envoi du numéro d'origine
$testVal = $telephone;
};
$tel = str_replace(["+33"],["0"], $testVal);
*/
$this->telephone = $telephone;
return $this;
}
public function getTelephone(): ?string
{
$telephone = $this->telephone;
$telephone = str_replace(" ","",$telephone);
$telephone = str_replace(".","",$telephone);
$telephone = str_replace("(","",$telephone);
$telephone = str_replace(")","",$telephone);
$telephone = str_replace("+33","",$telephone);
return $telephone;
}
public function setAdresseValideeManuellement(?bool $adresseValideeManuellement): Commande
{
$this->adresseValideeManuellement = $adresseValideeManuellement;
return $this;
}
public function getAdresseValideeManuellement(): ?bool
{
return $this->adresseValideeManuellement;
}
public function setModeExpedition(?ModeExpedition $modeExpedition): Commande
{
$this->modeExpedition = $modeExpedition;
return $this;
}
public function getModeExpedition(): ?ModeExpedition
{
return $this->modeExpedition;
}
public function setModeReglementMarketPlace(?ModeReglementMarketPlace $modeReglementMarketPlace): Commande
{
$this->modeReglementMarketPlace = $modeReglementMarketPlace;
return $this;
}
public function getModeReglementMarketPlace(): ?ModeReglementMarketPlace
{
return $this->modeReglementMarketPlace;
}
public function setDateExportBext(?DateTime $dateExportBext): Commande
{
$this->dateExportBext = $dateExportBext;
return $this;
}
public function getDateExportBext(): ?DateTime
{
return $this->dateExportBext;
}
public function setDateConfirmationPreparation(?DateTime $dateConfirmationPreparation): Commande
{
$this->dateConfirmationPreparation = $dateConfirmationPreparation;
return $this;
}
public function getDateConfirmationPreparation(): ?DateTime
{
return $this->dateConfirmationPreparation;
}
public function setDateConfirmationExpedition(?DateTime $dateConfirmationExpedition): Commande
{
$this->dateConfirmationExpedition = $dateConfirmationExpedition;
return $this;
}
public function getDateConfirmationExpedition(): ?DateTime
{
return $this->dateConfirmationExpedition;
}
public function setDatePremiereConfirmationExpedition(?DateTime $datePremiereConfirmationExpedition): Commande
{
$this->datePremiereConfirmationExpedition = $datePremiereConfirmationExpedition;
return $this;
}
public function getDatePremiereConfirmationExpedition(): ?DateTime
{
return $this->datePremiereConfirmationExpedition;
}
public function setDateForceExpedie(?DateTime $dateForceExpedie): Commande
{
$this->dateForceExpedie = $dateForceExpedie;
return $this;
}
public function getDateForceExpedie(): ?DateTime
{
return $this->dateForceExpedie;
}
public function setDateForceAnnule(?DateTime $dateForceAnnule): Commande
{
$this->dateForceAnnule = $dateForceAnnule;
return $this;
}
public function getDateForceAnnule(): ?DateTime
{
return $this->dateForceAnnule;
}
public function setABloquer(?bool $aBloquer): Commande
{
$this->aBloquer = $aBloquer;
return $this;
}
public function getABloquer(): ?bool
{
return $this->aBloquer;
}
public function setDateInsertion(?DateTime $dateInsertion): Commande
{
$this->dateInsertion = $dateInsertion;
return $this;
}
public function getDateInsertion(): ?DateTime
{
return $this->dateInsertion;
}
public function setDateMaxExpeditionMin(?DateTime $dateMaxExpeditionMin): Commande
{
$this->dateMaxExpeditionMin = $dateMaxExpeditionMin;
return $this;
}
public function getDateMaxExpeditionMin(): ?DateTime
{
return $this->dateMaxExpeditionMin;
}
public function setDateMaxExpeditionMax(?DateTime $dateMaxExpeditionMax): Commande
{
$this->dateMaxExpeditionMax = $dateMaxExpeditionMax;
return $this;
}
public function getDateMaxExpeditionMax(): ?DateTime
{
return $this->dateMaxExpeditionMax;
}
public function setMaj(?bool $maj): Commande
{
$this->maj = $maj;
return $this;
}
public function getMaj(): ?bool
{
return $this->maj;
}
public function setRapportBext(?Rapport $rapportBext): Commande
{
$this->rapportBext = $rapportBext;
return $this;
}
public function getRapportBext(): ?Rapport
{
return $this->rapportBext;
}
public function setCommandeParent(?Commande $commandeParent): Commande
{
$this->commandeParent = $commandeParent;
return $this;
}
public function getCommandeParent(): ?Commande
{
return $this->commandeParent;
}
public function setPrenomFacturation(?string $prenomFacturation): Commande
{
$this->prenomFacturation = $prenomFacturation;
return $this;
}
public function getPrenomFacturation(): ?string
{
return $this->abreviation($this->prenomFacturation);
}
public function setNomFacturation(?string $nomFacturation): Commande
{
$this->nomFacturation = $nomFacturation;
return $this;
}
public function getNomFacturation(): ?string
{
return $this->abreviation($this->nomFacturation);
}
public function setCanalVente(?string $canalVente): Commande
{
$this->canalVente = $canalVente;
return $this;
}
public function getCanalVente(): ?string
{
return $this->canalVente;
}
public function setNiveauUn(?NiveauUn $niveauUn): Commande
{
$this->niveauUn = $niveauUn;
return $this;
}
public function getNiveauUn(): ?NiveauUn
{
return $this->niveauUn;
}
public function setTelephone2(?string $telephone2): Commande
{
$this->telephone2 = $telephone2;
return $this;
}
public function getTelephone2(): ?string
{
//return $this->telephone2;
$telephone = $this->telephone2;
$telephone = str_replace(" ","",$telephone);
$telephone = str_replace(".","",$telephone);
$telephone = str_replace("(","",$telephone);
$telephone = str_replace(")","",$telephone);
$telephone = str_replace("+33","",$telephone);
return $telephone;
}
public function abreviation($str)
{
$search = ['allée','avenue.','boulevard','carrefour','chemin','chaussée','impasse','lotissement','passage','place','résidence','route','batiment','étage','escalier'];
$replace = ['All.','Av.','Bd.','Car.','Che.','Chs.','Imp.','Lot.','Pas.','Pl.','Res.','Rte.','Bat.','Et.','Esc.'];
return str_replace($search, $replace, $str);
}
public function setPaysLivraisonTxt(?string $paysLivraisonTxt): Commande
{
$this->paysLivraisonTxt = $paysLivraisonTxt;
return $this;
}
public function getPaysLivraisonTxt(): ?string
{
return $this->paysLivraisonTxt;
}
public function setPaysFacturationTxt(?string $paysFacturationTxt): Commande
{
$this->paysFacturationTxt = $paysFacturationTxt;
return $this;
}
public function getPaysFacturationTxt(): ?string
{
return $this->paysFacturationTxt;
}
public function setTelephoneFacturation(?string $telephoneFacturation): Commande
{
$this->telephoneFacturation = $telephoneFacturation;
return $this;
}
public function getTelephoneFacturation(): ?string
{
//return $this->telephoneFacturation;
$telephone = $this->telephoneFacturation;
$telephone = str_replace(" ","",$telephone);
$telephone = str_replace(".","",$telephone);
$telephone = str_replace("(","",$telephone);
$telephone = str_replace(")","",$telephone);
$telephone = str_replace("+33","",$telephone);
return $telephone;
}
public function setTelephoneFacturation2(?string $telephoneFacturation2): Commande
{
$this->telephoneFacturation2 = $telephoneFacturation2;
return $this;
}
public function getTelephoneFacturation2(): ?string
{
//return $this->telephoneFacturation2;
$telephone = $this->telephoneFacturation2;
$telephone = str_replace(" ","",$telephone);
$telephone = str_replace(".","",$telephone);
$telephone = str_replace("(","",$telephone);
$telephone = str_replace(")","",$telephone);
$telephone = str_replace("+33","",$telephone);
return $telephone;
}
public function addCommandeNumeroSuivi(CommandeNumeroSuivi $commandeNumeroSuivi): Commande
{
$this->commandeNumeroSuivi[] = $commandeNumeroSuivi;
return $this;
}
public function removeCommandeNumeroSuivi(CommandeNumeroSuivi $commandeNumeroSuivi)
{
$this->commandeNumeroSuivi->removeElement($commandeNumeroSuivi);
}
public function getCommandeNumeroSuivi()
{
return $this->commandeNumeroSuivi;
}
public function setArchive(?bool $archive): Commande
{
$this->archive = $archive;
return $this;
}
public function getArchive(): ?bool
{
return $this->archive;
}
public function setCodeIsoFacturation(?string $codeIsoFacturation): Commande
{
$this->codeIsoFacturation = $codeIsoFacturation;
return $this;
}
public function getCodeIsoFacturation(): ?string
{
return $this->codeIsoFacturation;
}
public function setStateOrProvinceFacturation(?string $stateOrProvinceFacturation): Commande
{
$this->stateOrProvinceFacturation = $stateOrProvinceFacturation;
return $this;
}
public function getStateOrProvinceFacturation(): ?string
{
return $this->stateOrProvinceFacturation;
}
public function setCodeIsoLivraison(?string $codeIsoLivraison): Commande
{
$this->codeIsoLivraison = $codeIsoLivraison;
return $this;
}
public function getCodeIsoLivraison(): ?string
{
return $this->codeIsoLivraison;
}
public function setStateOrProvinceLivraison(?string $stateOrProvinceLivraison): Commande
{
$this->stateOrProvinceLivraison = $stateOrProvinceLivraison;
return $this;
}
public function getStateOrProvinceLivraison(): ?string
{
return $this->stateOrProvinceLivraison;
}
public function setDevise(?Devise $devise): Commande
{
$this->devise = $devise;
return $this;
}
public function getDevise(): ?Devise
{
return $this->devise;
}
public function setEmail(?string $email): Commande
{
$this->email = $email;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setExportCompta(?Export $exportCompta): Commande
{
$this->exportCompta = $exportCompta;
return $this;
}
public function getExportCompta(): ?Export
{
return $this->exportCompta;
}
public function setMarge(?float $marge): Commande
{
$this->marge = $marge;
return $this;
}
public function getMarge(): ?float
{
return $this->marge;
}
public function setTauxMarge(?float $tauxMarge): Commande
{
$this->tauxMarge = $tauxMarge;
return $this;
}
public function getTauxMarge(): ?float
{
return $this->tauxMarge;
}
public function setRapportCloture(?RapportCloture $rapportCloture): Commande
{
$this->rapportCloture = $rapportCloture;
return $this;
}
public function getRapportCloture(): ?RapportCloture
{
return $this->rapportCloture;
}
public function setDateMailFacture(?DateTime $dateMailFacture): Commande
{
$this->dateMailFacture = $dateMailFacture;
return $this;
}
public function getDateMailFacture(): ?DateTime
{
return $this->dateMailFacture;
}
public function setPointRetrait(?string $pointRetrait): Commande
{
$this->pointRetrait = $pointRetrait;
return $this;
}
public function getPointRetrait(): ?string
{
return $this->pointRetrait;
}
public function setDeliveryMode(?string $deliveryMode): Commande
{
$this->deliveryMode = $deliveryMode;
return $this;
}
public function getDeliveryMode(): ?string
{
return $this->deliveryMode;
}
public function setRaisonAnomalie(?RaisonAnomalie $raisonAnomalie): Commande
{
$this->raisonAnomalie = $raisonAnomalie;
return $this;
}
public function getRaisonAnomalie(): ?RaisonAnomalie
{
return $this->raisonAnomalie;
}
public function setDateCalculMarge(?DateTime $dateCalculMarge): Commande
{
$this->dateCalculMarge = $dateCalculMarge;
return $this;
}
public function getDateCalculMarge(): ?DateTime
{
return $this->dateCalculMarge;
}
public function setTotalTtcDevise(?float $totalTtcDevise): Commande
{
$this->totalTtcDevise = $totalTtcDevise;
return $this;
}
public function getTotalTtcDevise(): ?float
{
return $this->totalTtcDevise;
}
public function setTauxChange(?float $tauxChange): Commande
{
$this->tauxChange = $tauxChange;
return $this;
}
public function getTauxChange(): ?float
{
return $this->tauxChange;
}
public function getTexteFacture(): ?string
{
return $this->texteFacture;
}
public function setTexteFacture(?string $texteFacture): Commande
{
$this->texteFacture = $texteFacture;
return $this;
}
public function getProjet(): ?Projet
{
return $this->projet;
}
public function setProjet($projet): ?Commande
{
$this->projet = $projet;
return $this;
}
public function getProjetActivites(): Collection
{
return $this->projetActivites;
}
public function setProjetActivites($projetActivites): Commande
{
$this->projetActivites = $projetActivites;
return $this;
}
public function getProjetDomaines(): Collection
{
return $this->projetDomaines;
}
public function setProjetDomaines($projetDomaines): Commande
{
$this->projetDomaines = $projetDomaines;
return $this;
}
public function isABloquer(): ?bool
{
return $this->aBloquer;
}
public function isBasculeComptabilite(): ?bool
{
return $this->basculeComptabilite;
}
public function isModifiable(): ?bool
{
return $this->modifiable;
}
public function isBonPrepaAuto(): ?bool
{
return $this->bonPrepaAuto;
}
public function isAvoirUtilise(): ?bool
{
return $this->avoirUtilise;
}
public function isFrancoPort(): ?bool
{
return $this->francoPort;
}
public function isAvecTaxe(): ?bool
{
return $this->avecTaxe;
}
public function isVisible(): ?bool
{
return $this->visible;
}
public function getTypeDocumentCommercial(): ?int
{
return $this->typeDocumentCommercial;
}
public function setTypeDocumentCommercial(int $typeDocumentCommercial): Commande
{
$this->typeDocumentCommercial = $typeDocumentCommercial;
return $this;
}
public function isValideManuellement(): ?bool
{
return $this->valideManuellement;
}
public function isPerdu(): ?bool
{
return $this->perdu;
}
public function isAFacturer(): ?bool
{
return $this->aFacturer;
}
public function isDejaFacture(): ?bool
{
return $this->dejaFacture;
}
public function isMultiBL(): ?bool
{
return $this->multiBL;
}
public function isAttenteFacturation(): ?bool
{
return $this->attenteFacturation;
}
public function isStatutBAT(): ?bool
{
return $this->statutBAT;
}
public function isStatutAmodifier(): ?bool
{
return $this->statutAmodifier;
}
public function isAdresseValideeManuellement(): ?bool
{
return $this->adresseValideeManuellement;
}
public function isMaj(): ?bool
{
return $this->maj;
}
public function isArchive(): ?bool
{
return $this->archive;
}
public function isSendedToOqton(): bool
{
return $this->sendedToOqton;
}
public function setSendedToOqton(bool $sendedToOqton): Commande
{
$this->sendedToOqton = $sendedToOqton;
return $this;
}
public function setCaisse(?Caisse $caisse): Commande
{
$this->caisse = $caisse;
return $this;
}
public function getCaisse(): ?Caisse
{
return $this->caisse;
}
public function getDateEcheance(): ?\DateTimeInterface
{
return $this->dateEcheance;
}
public function setDateEcheance(?\DateTimeInterface $dateEcheance): self
{
$this->dateEcheance = $dateEcheance;
return $this;
}
public function addProjetActivite(ProjetActivite $projetActivite): self
{
if (!$this->projetActivites->contains($projetActivite)) {
$this->projetActivites[] = $projetActivite;
$projetActivite->setCommande($this);
}
return $this;
}
public function removeProjetActivite(ProjetActivite $projetActivite): self
{
if ($this->projetActivites->removeElement($projetActivite)) {
// set the owning side to null (unless already changed)
if ($projetActivite->getCommande() === $this) {
$projetActivite->setCommande(null);
}
}
return $this;
}
public function addProjetDomaine(ProjetDomaine $projetDomaine): self
{
if (!$this->projetDomaines->contains($projetDomaine)) {
$this->projetDomaines[] = $projetDomaine;
$projetDomaine->setCommande($this);
}
return $this;
}
public function removeProjetDomaine(ProjetDomaine $projetDomaine): self
{
if ($this->projetDomaines->removeElement($projetDomaine)) {
// set the owning side to null (unless already changed)
if ($projetDomaine->getCommande() === $this) {
$projetDomaine->setCommande(null);
}
}
return $this;
}
public function getFichierImport(): ?string
{
return $this->fichierImport;
}
public function setFichierImport(?string $fichierImport): self
{
$this->fichierImport = $fichierImport;
return $this;
}
public function getFichierExport(): ?string
{
return $this->fichierExport;
}
public function setFichierExport(?string $fichierExport): self
{
$this->fichierExport = $fichierExport;
return $this;
}
public function getEmailImport(): ?string
{
return $this->emailImport;
}
public function setEmailImport(?string $emailImport): self
{
$this->emailImport = $emailImport;
return $this;
}
public function getDonneesImportees(): ?array
{
return $this->donneesImportees;
}
public function setDonneesImportees(?array $donneesImportees): self
{
$this->donneesImportees = $donneesImportees;
return $this;
}
public function getAdresseLivraisonTxt(): ?string
{
return $this->adresseLivraisonTxt;
}
public function setAdresseLivraisonTxt(?string $adresseLivraisonTxt): self
{
$this->adresseLivraisonTxt = $adresseLivraisonTxt;
return $this;
}
public function getAdresseFacturationTxt(): ?string
{
return $this->adresseFacturationTxt;
}
public function setAdresseFacturationTxt(?string $adresseFacturationTxt): self
{
$this->adresseFacturationTxt = $adresseFacturationTxt;
return $this;
}
}