<?php
namespace App\Entity\GestionComerciale;
use App\Entity\Articles\Article;
use App\Entity\Articles\ArticleAssocie;
use App\Entity\Articles\ArticleComposant;
use App\Entity\Articles\ConditionAchat;
use App\Entity\Articles\MouvementStock;
use App\Entity\Articles\NumeroSerie;
use App\Entity\Ged\Fichier;
use App\Entity\Litiges\Litige;
use App\Entity\MarketPlace\ArticleMarketPlace;
use App\Entity\Taxes\Taxe;
use App\Entity\Transporteurs\Transporteur;
use App\Entity\Utilisateur\Intervention;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
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 App\Entity\Remises\Remise;
use Symfony\Component\Validator\Constraints\IsTrue;
/**
* ArticleCommande
*
* @ORM\Table("commerciale__article_commande",indexes={
* @ORM\Index(name="etiquette_idx", columns={"etiquettes"})
* })
* @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\ArticleCommandeRepository")
*/
class ArticleCommande
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\Article", inversedBy="articleCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $article;
/**
* @ORM\Column(name="seller_product_id", type="string", nullable=true)
*/
private $seller_product_id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\Transporteur")
* @ORM\JoinColumn(nullable=true)
*/
private $transporteur;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Utilisateur\Intervention", mappedBy="articleCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $interventions;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\ArticleComposant", inversedBy="articlesCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $articleComposant;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\ArticleAssocie", inversedBy="articlesCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $articleAssocie;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\ArticleCommandeEmplacement", cascade={"persist","remove"}, mappedBy="articleCommande")
*/
private $articleCommandeEmplacement;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Articles\NumeroSerie", cascade={"remove"} ,mappedBy="articleCommande")
*/
private $numeroSerie;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Remises\Remise", inversedBy="articleCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $remiseInitial;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande", cascade={"persist"}, inversedBy="articleCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $commande;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Litiges\Litige", cascade={"persist"}, inversedBy="articleCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $litige;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\CommandeFournisseur", inversedBy="articleCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $commandeFournisseur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Fabrication", inversedBy="articleCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $fabrication;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Fabrication", mappedBy="articleCommandeCommandeClient")
*/
private $fabricationArticleCommandeCommandeClient;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\FabricationMultiple", inversedBy="articleCommandes")
* @ORM\JoinColumn(nullable=true)
*/
private $fabricationMultiple;
/**
* @ORM\Column(name="libelle", type="string", length=255)
* @Assert\NotBlank(message="Libelle obligatoire")
*/
private $libelle;
/**
* @ORM\Column(name="libelle_secondaire", type="string", length=255, nullable=true)
*/
private $libelleSecondaire;
/**
* @ORM\Column(name="numero_serie", type="string", length=255, nullable=true)
*/
private $numSerie;
/**
* @ORM\Column(name="commentaire", type="text", nullable=true)
*/
private $commentaire;
/**
* @ORM\Column(name="commentaire_prive", type="text", nullable=true)
*/
private $commentairePrive;
/**
* @ORM\Column(name="commentaire_suppl", type="text", nullable=true)
*/
private $commentaireSuppl;
/**
* @ORM\Column(name="date", type="datetime")
*/
private $date;
/**
* @ORM\Column(name="date_supression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="date_maj", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateMaj;
/**
* @ORM\Column(name="date_maj_prix", type="datetime", nullable=true)
*/
private $dateMajPrix;
/**
* @ORM\Column(name="date_priorisation", type="datetime", nullable=true)
*/
private $datePriorisation;
/**
* @ORM\Column(name="reference", type="string", length=255, nullable=true)
*/
private $reference;
/**
* @ORM\Column(name="reference_client", type="string", length=255, nullable=true)
*/
private $referenceClient;
/**
* @ORM\Column(name="reference_fournisseur", type="string", length=255, nullable=true)
*/
private $referenceFournisseur;
/**
* @ORM\Column(name="prix_base", type="float", nullable=true)
* @Assert\NotBlank(message="Prix de base obligatoire")
*/
private $prixBase;
/**
* @ORM\Column(name="prix_unitaire_ttc", type="float", nullable=true)
*/
private $prixUnitaireTtc;
/**
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(name="description_courte", type="text", nullable=true)
*/
private $descriptionCourte;
/**
* @ORM\Column(name="largeur", type="float", nullable=true)
*/
private $largeur;
/**
* @ORM\Column(name="profondeur", type="float", nullable=true)
*/
private $profondeur;
/**
* @ORM\Column(name="hauteur", type="float", nullable=true)
*/
private $hauteur;
/**
* @ORM\Column(name="poids", type="float", nullable=true)
*/
private $poids;
/**
* @ORM\Column(name="a_consigner", type="boolean", nullable=true)
*/
private $aConsigner;
/**
* @ORM\Column(name="forcer", type="boolean", nullable=true)
*/
private $force;
/**
* @ORM\Column(name="bloquer", type="boolean", nullable=true, options={"default" : 0})
*/
private $bloquer;
/**
* @ORM\Column(name="consigne", type="boolean", nullable=true)
*/
private $consigne;
/**
* @ORM\Column(name="tva_achat", type="float", nullable=true)
*/
private $tvaAchat;
/**
* @ORM\Column(name="tva_vente", type="float", nullable=true)
*/
private $tvaVente;
/**
* @ORM\Column(name="quantite", type="float")
*/
private $quantite;
/**
* @ORM\Column(name="coefficient_conditionnement", type="float", nullable=true)
*/
private $coefficientConditionnement;
/**
* @ORM\Column(name="quantite_dispo", type="float", nullable=true)
*/
private $quantiteDispo;
/**
* @ORM\Column(name="quantite_deja_preparee_simplifie", type="float", nullable=true)
*/
private $quantiteDejaPrepareeSimplifie;
/**
* @ORM\Column(name="quantite_deja_preparee", type="float", nullable=true)
*/
private $quantiteDejaPreparee;
/**
* @ORM\Column(name="maj_quantite_deja_preparee", type="boolean", nullable=true)
*/
private $majQuantiteDejaPreparee;
/**
* @ORM\Column(name="ral_client", type="float", nullable=true)
*/
private $ralClient;
/**
* @ORM\Column(name="ral", type="float", nullable=true)
*/
private $ral;
/**
* @ORM\Column(name="rar", type="float", nullable=true)
*/
private $rar;
/**
* @ORM\Column(name="quantite_reprise", type="float", nullable=true)
*/
private $quantiteReprise;
/**
* @ORM\Column(name="remise", type="float", nullable=true)
*/
private $remise;
/**
* @ORM\Column(name="remise_supplementaire", type="float", nullable=true)
*/
private $remiseSupplementaire;
/**
* @ORM\Column(name="position", type="integer", nullable=true)
*/
private $position;
/**
* @var float
*
*/
private $prixRemise;//Prix remisé
/**
* @var float
*
*/
private $marge;
/**
* @var float
*
* @ORM\Column(name="total_ht", type="float", nullable=true)
*/
private $totalHt;
/**
* @var float
*
* @ORM\Column(name="total_with_tax", type="float", nullable=true)
*/
private $totalWithTax;
/**
* @var float
*/
private $totalTTC;
/**
* @ORM\Column(name="tva", type="float", nullable=true)
*/
private $tva;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Taxes\Taxe")
* @ORM\JoinColumn(nullable=true)
*/
private $taxe;
/**
* @ORM\ManyToOne(targetEntity="Devis", inversedBy="articlesCommande")
* @ORM\JoinColumn(name="devis_id", referencedColumnName="id")
*/
protected $devis;
/**
* @ORM\Column(name="pump", type="float", nullable=true)
*/
private $pump;
/**
* @ORM\Column(name="cump", type="float", nullable=true)
*/
private $cump;
/**
* @ORM\Column(name="etiquettes", type="integer", nullable=true)
*/
private $etiquettes;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ArticleCommande", cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private $articleCommandeParent;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ArticleCommande", inversedBy="articlesCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $articleCommande;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\ArticleCommande", mappedBy="articleCommande")
*/
private $articlesCommande;
/**
* @ORM\Column(name="generer_fabriquer", type="integer", nullable=true)
*/
private $genererFabriquer;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\ConditionAchat", inversedBy="articlesCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $conditionAchat;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Articles\MouvementStock", cascade={"persist"}, mappedBy="articleCommande")
*/
private $mouvementsStock;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\Articles\MouvementStock", cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private $mouvementsStockFF;
/**
* @ORM\Column(name="maj_condition_achat", type="text", nullable=true)
*/
private $majCondAchat;
/**
* @ORM\Column(name="checked", type="boolean", nullable=true)
*/
private $checked;
/**
* @ORM\Column(name="frais_annexes", type="float", nullable=true)
*/
private $fraisAnnexes;
/**
* @ORM\Column(name="frais_port", type="float", nullable=true)
*/
private $fraisPort;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\ArticleCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $articleCommandeRepris;
/**
* @ORM\Column(name="reste_a_reprendre", type="float", nullable=true)
*/
private $resteAreprendre;
/**
* @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\ManyToOne(targetEntity="App\Entity\GestionComerciale\ArticleCommande")
* @ORM\JoinColumn(nullable=true)
*/
private $articleCommandeAssocie;
/**
* @ORM\Column(name="ecocontribution", type="float", nullable=true)
*/
private $ecocontribution;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\ArticleMarketPlace")
* @ORM\JoinColumn(nullable=true)
*/
private $articleMarketPlace;
/**
* @ORM\Column(name="id_import", type="string",length=255, nullable=true)
*/
private $idImport;
/**
* @ORM\Column(name="commision_montant", type="float", nullable=true)
*/
private $commissionMontant;
/**
* @ORM\Column(name="commision_taux_tva", type="float", nullable=true)
*/
private $commissionTauxTva;
/**
* @ORM\Column(name="commision_tva", type="float", nullable=true)
*/
private $commissionTva;
/**
* @ORM\Column(name="remboursement_montant", type="float", nullable=true)
*/
private $remboursementMontant;
/**
* @ORM\Column(name="remboursement_commision_montant_ht", type="float", nullable=true)
*/
private $remboursementCommissionMontantHt;
/**
* @ORM\Column(name="remboursement_commision_tva", type="float", nullable=true)
*/
private $remboursementCommissionTva;
/**
* @ORM\Column(name="date_approximative_reception", type="datetime", nullable=true)
*/
private $dateApproximativeReception;
/**
* @ORM\Column(name="prix_achat_unitaire_avec_frais", type="float", nullable=true)
*/
private $prixAchatUnitaireAvecFrais;
/**
* @ORM\Column(name="ajouter_frais_prix_achat", type="boolean", nullable=true)
*/
private $ajouterFraisPrixAchat;
/**
* @ORM\Column(name="total_ttc_devise", type="float", nullable=true)
*/
private $totalTtcDevise;
/**
* @ORM\Column(name="taux_change", type="float", nullable=true)
*/
private $tauxChange;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Ged\Fichier")
* @ORM\JoinColumn(nullable=true)
*/
private $fichier = null;
/**
* @ORM\Column(name="fabrication_etiquette", type="string",length=3, nullable=true)
*/
private $fabricationEtiquette;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $prixAvecRemise;
public function __construct()
{
$this->date = new Datetime();
$this->dateExpeditionTheorique = new Datetime();
$this->ral = $this->quantite;
$this->etiquettes = 0;
$this->force = false;
$this->bloquer = false;
$this->majCondAchat = 'rien';
$this->coefficientConditionnement = 1;
$this->quantiteDejaPreparee = 0;
$this->cump = 0;
$this->quantiteDejaPrepareeSimplifie = 0;
$this->ecocontribution = 0;
$this->interventions = new ArrayCollection();
$this->articleCommandeEmplacement = new ArrayCollection();
$this->mouvementsStockFF = new ArrayCollection();
$this->mouvementsStock = new ArrayCollection();
//$this->articleCommande = new ArrayCollection();
$this->numeroSerie = new ArrayCollection();
$this->fabricationArticleCommandeCommandeClient = new ArrayCollection();
$this->articlesCommande = new ArrayCollection();
}
public function setId($id): ArticleCommande
{
$this->id = $id;
return $this;
}
/**
* @IsTrue(message="La quantité reprise n'est pas valide.")
*/
public function isQuantiteRepriseIsValid(): bool
{
//echo "<div>RAR ".$this->rar."</div>";
//echo "<div>quantiteReprise ".$this->quantiteReprise."</div>";
//echo "<div>".is_int($this->rar)."</div>";
if ($this->rar > $this->quantiteReprise or $this->rar < 0 or ! is_int($this->rar)) {
return true;
} else {
return true;
}
}
public function getId(): ?int
{
return $this->id;
}
public function setQuantite(int $quantite): ArticleCommande
{
$this->quantite = $quantite;
if ($this->resteAreprendre === null) {
$this->resteAreprendre = $quantite;
}
return $this;
}
public function getQuantite(): int
{
return $this->quantite;
}
public function setCommande(?Commande $commande): ArticleCommande
{
$this->commande = $commande;
return $this;
}
public function getCommande(): ?Commande
{
return $this->commande;
}
public function setArticle(?Article $article): ArticleCommande
{
$this->article = $article;
return $this;
}
public function getArticle(): ?Article
{
return $this->article;
}
public function setRemise(?float $remise): ArticleCommande
{
$this->remise = $remise;
return $this;
}
public function getRemise(): ?float
{
return $this->remise;
}
public function setPosition(?int $position): ArticleCommande
{
$this->position = $position;
return $this;
}
public function getPosition(): ?int
{
return $this->position;
}
public function setTotalHt(?float $totalHt)
{
$this->totalHt = $totalHt;
return $this;
}
public function getPrixRemise($round = 2): ?float
{
$total = $this->prixBase * (1 - ($this->remise / 100));
//return $total;
$prixRemise = $total * (1 - ($this->remiseSupplementaire / 100));
return round($prixRemise, $round);
//return $this->totalHt;
}
public function getMarge(): ?float
{
$total = $this->getPrixRemise() - $this->pump;
return $total;
//return $this->totalHt;
}
public function getTotalHt($round = 2): ?float
{
$total = $this->quantite * ($this->getPrixRemise($round) + $this->getEcocontribution());
if ( ! empty($this->getCoefficientConditionnement())) {
$total = $total / floatval($this->getCoefficientConditionnement());
}
return round($total, $round);
//return $this->totalHt;
}
public function getTotalHtV2(): ?float
{
//$total = $this->quantite * $this->getPrixRemise();
//return $total;
return $this->totalHt;
}
public function getTotalTTCV2(): ?float
{
$total = $this->getTotalHtV2() * (1 + ($this->tva / 100));
return $total;
//return $this->totalHt;
}
public function getTotalTTC(): ?float
{
$total = $this->gettotalHT() * (1 + ($this->tva / 100));
return $total;
//return $this->totalHt;
}
public function setTva(?float $tva): ArticleCommande
{
if ($tva == '') {
$tva = null;
}
$this->tva = $tva;
return $this;
}
public function getTva(): ?float
{
return $this->tva;
}
public function setDevis(?Devis $devis): ArticleCommande
{
$this->devis = $devis;
return $this;
}
public function getDevis(): ?Devis
{
return $this->devis;
}
public function setLibelle(string $libelle): ArticleCommande
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): string
{
return $this->libelle;
}
public function setDate(DateTime $date): ArticleCommande
{
$this->date = $date;
return $this;
}
public function getDate(): DateTime
{
return $this->date;
}
public function setDateSuppression(?DateTime $dateSuppression): ArticleCommande
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setDateMaj(?DateTime $dateMaj): ArticleCommande
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?DateTime
{
return $this->dateMaj;
}
public function setDateMajPrix(?DateTime $dateMajPrix): ArticleCommande
{
$this->dateMajPrix = $dateMajPrix;
return $this;
}
public function getDateMajPrix(): ?DateTime
{
return $this->dateMajPrix;
}
public function setReference(?string $reference): ArticleCommande
{
$this->reference = $reference;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReferenceClient(?string $referenceClient): ArticleCommande
{
$this->referenceClient = $referenceClient;
return $this;
}
public function getReferenceClient(): ?string
{
return $this->referenceClient;
}
public function setReferenceFournisseur(?string $referenceFournisseur): ArticleCommande
{
$this->referenceFournisseur = $referenceFournisseur;
return $this;
}
public function getReferenceFournisseur(): ?string
{
return $this->referenceFournisseur;
}
public function setPrixBase(?float $prixBase): ArticleCommande
{
$this->prixBase = $prixBase;
return $this;
}
public function getPrixBase(): ?float
{
return $this->prixBase;
}
public function setDescription(?string $description): ArticleCommande
{
$this->description = $description;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescriptionCourte(?string $descriptionCourte): ArticleCommande
{
$this->descriptionCourte = $descriptionCourte;
return $this;
}
public function getDescriptionCourte(): ?string
{
return $this->descriptionCourte;
}
public function setLargeur(?float $largeur): ArticleCommande
{
$this->largeur = $largeur;
return $this;
}
public function getLargeur(): ?float
{
return $this->largeur;
}
public function setProfondeur(?float $profondeur): ArticleCommande
{
$this->profondeur = $profondeur;
return $this;
}
public function getProfondeur(): ?float
{
return $this->profondeur;
}
public function setHauteur(?float $hauteur): ArticleCommande
{
$this->hauteur = $hauteur;
return $this;
}
public function getHauteur(): ?float
{
return $this->hauteur;
}
public function setPoids(?float $poids): ArticleCommande
{
$this->poids = $poids;
return $this;
}
public function getPoids(): ?float
{
return $this->poids;
}
public function setAConsigner(?bool $aConsigner): ArticleCommande
{
$this->aConsigner = $aConsigner;
return $this;
}
public function getAConsigner(): ?bool
{
return $this->aConsigner;
}
public function setConsigne(?bool $consigne): ArticleCommande
{
$this->consigne = $consigne;
return $this;
}
public function getConsigne(): ?bool
{
return $this->consigne;
}
public function setTvaAchat(?float $tvaAchat): ArticleCommande
{
$this->tvaAchat = $tvaAchat;
return $this;
}
public function getTvaAchat(): ?float
{
return $this->tvaAchat;
}
public function setTvaVente(?float $tvaVente): ArticleCommande
{
$this->tvaVente = $tvaVente;
return $this;
}
public function getTvaVente(): ?float
{
return $this->tvaVente;
}
public function setPump(?float $pump): ArticleCommande
{
$this->pump = $pump;
return $this;
}
public function getPump(): ?float
{
return $this->pump;
}
public function setCommentaire(?string $commentaire): ArticleCommande
{
$this->commentaire = $commentaire;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommandeFournisseur(?CommandeFournisseur $commandeFournisseur): ArticleCommande
{
$this->commandeFournisseur = $commandeFournisseur;
return $this;
}
public function getCommandeFournisseur(): ?CommandeFournisseur
{
return $this->commandeFournisseur;
}
public function setRal(?int $ral): ArticleCommande
{
$this->ral = $ral;
return $this;
}
public function getRal(): ?int
{
return $this->ral;
}
public function setNumSerie(?string $numSerie): ArticleCommande
{
$this->numSerie = $numSerie;
return $this;
}
public function getNumSerie(): ?string
{
return $this->numSerie;
}
public function addNumeroSerie(NumeroSerie $numeroSerie): ArticleCommande
{
$this->numeroSerie[] = $numeroSerie;
return $this;
}
public function removeNumeroSerie(NumeroSerie $numeroSerie)
{
$this->numeroSerie->removeElement($numeroSerie);
}
public function getNumeroSerie(): Collection
{
return $this->numeroSerie;
}
public function setRalClient(?int $ralClient): ArticleCommande
{
$this->ralClient = $ralClient;
return $this;
}
public function getRalClient(): ?int
{
return $this->ralClient;
}
public function setRar(?int $rar): ArticleCommande
{
$this->rar = $rar;
return $this;
}
public function getRar(): ?int
{
return $this->rar;
}
public function setQuantiteReprise(?int $quantiteReprise): ArticleCommande
{
$this->quantiteReprise = $quantiteReprise;
return $this;
}
public function getQuantiteReprise(): ?int
{
return $this->quantiteReprise;
}
public function setFabrication(?Fabrication $fabrication): ArticleCommande
{
$this->fabrication = $fabrication;
return $this;
}
public function getFabrication(): ?Fabrication
{
return $this->fabrication;
}
public function setRemiseInitial(?Remise $remiseInitial): ArticleCommande
{
$this->remiseInitial = $remiseInitial;
return $this;
}
public function getRemiseInitial(): ?Remise
{
return $this->remiseInitial;
}
public function setEtiquettes(?int $etiquettes): ArticleCommande
{
$this->etiquettes = $etiquettes;
return $this;
}
public function getEtiquettes(): ?int
{
return $this->etiquettes;
}
public function setArticleCommande(?ArticleCommande $articleCommande): ArticleCommande
{
$this->articleCommande = $articleCommande;
return $this;
}
public function getArticleCommande(): ?ArticleCommande
{
return $this->articleCommande;
}
public function addArticlesCommande(ArticleCommande $articlesCommande): ArticleCommande
{
$this->articlesCommande[] = $articlesCommande;
return $this;
}
public function removeArticlesCommande(ArticleCommande $articlesCommande)
{
$this->articlesCommande->removeElement($articlesCommande);
}
public function getArticlesCommande(): Collection
{
return $this->articlesCommande;
}
public function setLibelleSecondaire(?string $libelleSecondaire): ArticleCommande
{
$this->libelleSecondaire = $libelleSecondaire;
return $this;
}
public function getLibelleSecondaire(): ?string
{
return $this->libelleSecondaire;
}
public function setGenererFabriquer(?int $genererFabriquer): ArticleCommande
{
$this->genererFabriquer = $genererFabriquer;
return $this;
}
public function getGenererFabriquer(): ?int
{
return $this->genererFabriquer;
}
public function setForce(?bool $force): ArticleCommande
{
$this->force = $force;
return $this;
}
public function getForce(): ?bool
{
return $this->force;
}
public function setRemiseSupplementaire(?float $remiseSupplementaire): ArticleCommande
{
$this->remiseSupplementaire = $remiseSupplementaire;
return $this;
}
public function getRemiseSupplementaire(): ?float
{
return $this->remiseSupplementaire;
}
public function setConditionAchat(?ConditionAchat $conditionAchat): ArticleCommande
{
$this->conditionAchat = $conditionAchat;
return $this;
}
public function getConditionAchat(): ?ConditionAchat
{
return $this->conditionAchat;
}
public function setMajCondAchat(?string $majCondAchat): ArticleCommande
{
$this->majCondAchat = $majCondAchat;
return $this;
}
public function getMajCondAchat(): ?string
{
return $this->majCondAchat;
}
public function addMouvementsStock(MouvementStock $mouvementsStock): ArticleCommande
{
$this->mouvementsStock[] = $mouvementsStock;
return $this;
}
public function removeMouvementsStock(MouvementStock $mouvementsStock)
{
$this->mouvementsStock->removeElement($mouvementsStock);
}
public function getMouvementsStock(): Collection
{
return $this->mouvementsStock;
}
public function addMouvementsStockFF(MouvementStock $mouvementsStockFF): ArticleCommande
{
$this->mouvementsStockFF[] = $mouvementsStockFF;
$mouvementsStockFF->setArticleCommande($this);
return $this;
}
public function removeMouvementsStockFF(MouvementStock $mouvementsStockFF)
{
$this->mouvementsStockFF->removeElement($mouvementsStockFF);
}
public function getMouvementsStockFF(): Collection
{
return $this->mouvementsStockFF;
}
public function setCommentaireSuppl(?string $commentaireSuppl): ArticleCommande
{
$this->commentaireSuppl = $commentaireSuppl;
return $this;
}
public function getCommentaireSuppl(): ?string
{
return $this->commentaireSuppl;
}
public function addArticleCommandeEmplacement(ArticleCommandeEmplacement $articleCommandeEmplacement): ArticleCommande
{
$this->articleCommandeEmplacement[] = $articleCommandeEmplacement;
return $this;
}
public function removeArticleCommandeEmplacement(ArticleCommandeEmplacement $articleCommandeEmplacement)
{
if (is_object($this->articleCommandeEmplacement)) {
$this->articleCommandeEmplacement->removeElement($articleCommandeEmplacement);
}
}
public function getArticleCommandeEmplacement(): Collection
{
return $this->articleCommandeEmplacement;
}
public function setChecked(?bool $checked): ArticleCommande
{
$this->checked = $checked;
return $this;
}
public function getChecked(): ?bool
{
return $this->checked;
}
public function setArticleCommandeParent(?ArticleCommande $articleCommandeParent): ArticleCommande
{
if (is_object($articleCommandeParent)) {
$articleCommandeParent->setDatePriorisation(null);
$articleCommandeParent->setMajQuantiteDejaPreparee(true);
//$articleCommandeParent->setQuantiteDejaPreparee(floatval($articleCommandeParent->getQuantiteDejaPreparee()) + floatval($this->getQuantite()));
if ($this->articleCommandeParent != $articleCommandeParent) {
$articleCommandeParent->setQuantiteDejaPreparee(floatval($articleCommandeParent->getQuantiteDejaPreparee()) + floatval($this->getQuantite()));
}
}
$this->articleCommandeParent = $articleCommandeParent;
return $this;
}
public function setFraisAnnexes(?float $fraisAnnexes): ArticleCommande
{
$this->fraisAnnexes = $fraisAnnexes;
return $this;
}
public function getArticleCommandeParent(): ?ArticleCommande
{
return $this->articleCommandeParent;
}
public function getFraisAnnexes(): ?float
{
return $this->fraisAnnexes;
}
public function setArticleComposant(?ArticleComposant $articleComposant): ArticleCommande
{
$this->articleComposant = $articleComposant;
return $this;
}
public function getArticleComposant(): ?ArticleComposant
{
return $this->articleComposant;
}
public function addIntervention(Intervention $intervention): ArticleCommande
{
$this->interventions[] = $intervention;
return $this;
}
public function setResteAreprendre(?float $resteAreprendre): ArticleCommande
{
$this->resteAreprendre = $resteAreprendre;
return $this;
}
public function removeIntervention(Intervention $intervention)
{
$this->interventions->removeElement($intervention);
}
public function getInterventions(): Collection
{
return $this->interventions;
}
public function getLibelleConstruit(): string
{
return $this->libelle." ".$this->libelleSecondaire." (".$this->quantite."H)";
}
public function getResteAreprendre(): ?float
{
return $this->resteAreprendre;
}
public function setArticleCommandeRepris(?ArticleCommande $articleCommandeRepris): ArticleCommande
{
$this->articleCommandeRepris = $articleCommandeRepris;
return $this;
}
public function getArticleCommandeRepris(): ?ArticleCommande
{
return $this->articleCommandeRepris;
}
public function setTaxe(?Taxe $taxe): ArticleCommande
{
$this->taxe = $taxe;
return $this;
}
public function getTaxe(): ?Taxe
{
return $this->taxe;
}
public function setQuantiteDispo(?float $quantiteDispo): ArticleCommande
{
$this->quantiteDispo = $quantiteDispo;
if ($quantiteDispo != '' && $quantiteDispo != 0) {
$this->setDatePriorisation(new Datetime);
}
return $this;
}
public function getQuantiteDispo(): ?float
{
return $this->quantiteDispo;
}
public function setCump(?float $cump): ArticleCommande
{
$this->cump = $cump;
return $this;
}
public function getCump(): ?float
{
return $this->cump;
}
public function setDatePriorisation(?DateTime $datePriorisation): ArticleCommande
{
$this->datePriorisation = $datePriorisation;
return $this;
}
public function getDatePriorisation(): ?DateTime
{
return $this->datePriorisation;
}
public function setCoefficientConditionnement(?float $coefficientConditionnement): ArticleCommande
{
$this->coefficientConditionnement = $coefficientConditionnement;
return $this;
}
public function getCoefficientConditionnement(): ?float
{
return $this->coefficientConditionnement;
}
public function setQuantiteDejaPreparee(?float $quantiteDejaPreparee): ArticleCommande
{
$this->quantiteDejaPreparee = $quantiteDejaPreparee;
return $this;
}
public function getQuantiteDejaPreparee(): ?float
{
return $this->quantiteDejaPreparee;
}
public function setMajQuantiteDejaPreparee(?bool $majQuantiteDejaPreparee): ArticleCommande
{
$this->majQuantiteDejaPreparee = $majQuantiteDejaPreparee;
return $this;
}
public function getMajQuantiteDejaPreparee(): ?bool
{
return $this->majQuantiteDejaPreparee;
}
public function setLitige(?Litige $litige): ArticleCommande
{
$this->litige = $litige;
return $this;
}
public function getLitige(): ?Litige
{
return $this->litige;
}
public function setCommentairePrive(?string $commentairePrive): ArticleCommande
{
$this->commentairePrive = $commentairePrive;
return $this;
}
public function getCommentairePrive(): ?string
{
return $this->commentairePrive;
}
public function setFraisPort(?float $fraisPort): ArticleCommande
{
$this->fraisPort = $fraisPort;
return $this;
}
public function getFraisPort(): ?float
{
return $this->fraisPort;
}
public function setTransporteur(?Transporteur $transporteur): ArticleCommande
{
$this->transporteur = $transporteur;
return $this;
}
public function getTransporteur(): ?Transporteur
{
return $this->transporteur;
}
public function setDateLivraisonTheorique(?DateTime $dateLivraisonTheorique): ArticleCommande
{
$this->dateLivraisonTheorique = $dateLivraisonTheorique;
return $this;
}
public function getDateLivraisonTheorique(): ?DateTime
{
return $this->dateLivraisonTheorique;
}
public function setArticleAssocie(?ArticleAssocie $articleAssocie): ArticleCommande
{
$this->articleAssocie = $articleAssocie;
return $this;
}
public function getArticleAssocie(): ?ArticleAssocie
{
return $this->articleAssocie;
}
public function setArticleCommandeAssocie(?ArticleCommande $articleCommandeAssocie): ArticleCommande
{
$this->articleCommandeAssocie = $articleCommandeAssocie;
return $this;
}
public function getArticleCommandeAssocie(): ?ArticleCommande
{
return $this->articleCommandeAssocie;
}
public function setQuantiteDejaPrepareeSimplifie(?float $quantiteDejaPrepareeSimplifie): ArticleCommande
{
$this->quantiteDejaPrepareeSimplifie = $quantiteDejaPrepareeSimplifie;
return $this;
}
public function getQuantiteDejaPrepareeSimplifie(): ?float
{
return $this->quantiteDejaPrepareeSimplifie;
}
public function setEcocontribution(?float $ecocontribution): ArticleCommande
{
$this->ecocontribution = $ecocontribution;
return $this;
}
public function getEcocontribution(): ?float
{
return $this->ecocontribution;
}
public function setDateExpeditionTheorique(?DateTime $dateExpeditionTheorique): ArticleCommande
{
$this->dateExpeditionTheorique = $dateExpeditionTheorique;
return $this;
}
public function getDateExpeditionTheorique(): ?DateTime
{
return $this->dateExpeditionTheorique;
}
public function setArticleMarketPlace(?ArticleMarketPlace $articleMarketPlace): ArticleCommande
{
$this->articleMarketPlace = $articleMarketPlace;
return $this;
}
public function getArticleMarketPlace(): ?ArticleMarketPlace
{
return $this->articleMarketPlace;
}
public function setIdImport(?string $idImport): ArticleCommande
{
$this->idImport = $idImport;
return $this;
}
public function getIdImport(): ?string
{
return $this->idImport;
}
public function setPrixUnitaireTtc(?float $prixUnitaireTtc): ArticleCommande
{
$this->prixUnitaireTtc = $prixUnitaireTtc;
return $this;
}
public function getPrixUnitaireTtc(): ?float
{
return $this->prixUnitaireTtc;
}
public function setTotalWithTax(?float $totalWithTax): ArticleCommande
{
$this->totalWithTax = $totalWithTax;
return $this;
}
public function getTotalWithTax(): ?float
{
return $this->totalWithTax;
}
public function setCommissionMontant(?float $commissionMontant): ArticleCommande
{
$this->commissionMontant = $commissionMontant;
return $this;
}
public function getCommissionMontant(): ?float
{
return $this->commissionMontant;
}
public function setCommissionTauxTva(?float $commissionTauxTva): ArticleCommande
{
$this->commissionTauxTva = $commissionTauxTva;
return $this;
}
public function getCommissionTauxTva(): ?float
{
return $this->commissionTauxTva;
}
public function setCommissionTva(?float $commissionTva): ArticleCommande
{
$this->commissionTva = $commissionTva;
return $this;
}
public function getCommissionTva(): ?float
{
return $this->commissionTva;
}
public function setRemboursementMontant(?float $remboursementMontant): ArticleCommande
{
$this->remboursementMontant = $remboursementMontant;
return $this;
}
public function getRemboursementMontant(): ?float
{
return $this->remboursementMontant;
}
public function setRemboursementCommissionMontantHt(?float $remboursementCommissionMontantHt): ArticleCommande
{
$this->remboursementCommissionMontantHt = $remboursementCommissionMontantHt;
return $this;
}
public function getRemboursementCommissionMontantHt(): ?float
{
return $this->remboursementCommissionMontantHt;
}
public function setRemboursementCommissionTva(?float $remboursementCommissionTva): ArticleCommande
{
$this->remboursementCommissionTva = $remboursementCommissionTva;
return $this;
}
public function getRemboursementCommissionTva(): ?float
{
return $this->remboursementCommissionTva;
}
public function setSellerProductId(?string $sellerProductId): ArticleCommande
{
$this->seller_product_id = $sellerProductId;
return $this;
}
public function getSellerProductId(): ?string
{
return $this->seller_product_id;
}
public function setDateApproximativeReception(?DateTime $dateApproximativeReception): ArticleCommande
{
$this->dateApproximativeReception = $dateApproximativeReception;
return $this;
}
public function getDateApproximativeReception(): ?DateTime
{
return $this->dateApproximativeReception;
}
public function setPrixAchatUnitaireAvecFrais(?float $prixAchatUnitaireAvecFrais): ArticleCommande
{
$this->prixAchatUnitaireAvecFrais = $prixAchatUnitaireAvecFrais;
return $this;
}
public function getPrixAchatUnitaireAvecFrais(): ?float
{
return $this->prixAchatUnitaireAvecFrais;
}
public function setAjouterFraisPrixAchat(?bool $ajouterFraisPrixAchat): ArticleCommande
{
$this->ajouterFraisPrixAchat = $ajouterFraisPrixAchat;
return $this;
}
public function getAjouterFraisPrixAchat(): ?bool
{
return $this->ajouterFraisPrixAchat;
}
public function setTotalTtcDevise(?float $totalTtcDevise): ArticleCommande
{
$this->totalTtcDevise = $totalTtcDevise;
return $this;
}
public function getTotalTtcDevise(): ?float
{
return $this->totalTtcDevise;
}
public function setTauxChange(?float $tauxChange): ArticleCommande
{
$this->tauxChange = $tauxChange;
return $this;
}
public function getTauxChange(): ?float
{
return $this->tauxChange;
}
public function getFabricationMultiple(): ?FabricationMultiple
{
return $this->fabricationMultiple;
}
public function setFabricationMultiple(?FabricationMultiple $fabricationMultiple): ?ArticleCommande
{
$this->fabricationMultiple = $fabricationMultiple;
return $this;
}
public function getFichier(): ?Fichier
{
return $this->fichier;
}
public function setFichier(?Fichier $fichier)
{
$this->fichier = $fichier;
return $this;
}
public function getFabricationEtiquette()
{
return $this->fabricationEtiquette;
}
public function setFabricationEtiquette($fabricationEtiquette)
{
$this->fabricationEtiquette = $fabricationEtiquette;
return $this;
}
public function isAConsigner(): ?bool
{
return $this->aConsigner;
}
public function isForce(): ?bool
{
return $this->force;
}
public function isBloquer(): ?bool
{
return $this->bloquer;
}
public function setBloquer(?bool $bloquer): self
{
$this->bloquer = $bloquer;
return $this;
}
public function isConsigne(): ?bool
{
return $this->consigne;
}
public function isMajQuantiteDejaPreparee(): ?bool
{
return $this->majQuantiteDejaPreparee;
}
public function isChecked(): ?bool
{
return $this->checked;
}
public function isAjouterFraisPrixAchat(): ?bool
{
return $this->ajouterFraisPrixAchat;
}
/**
* @return Collection<int, Fabrication>
*/
public function getFabricationArticleCommandeCommandeClient(): Collection
{
return $this->fabricationArticleCommandeCommandeClient;
}
public function addFabricationArticleCommandeCommandeClient(Fabrication $fabricationArticleCommandeCommandeClient): self
{
if (!$this->fabricationArticleCommandeCommandeClient->contains($fabricationArticleCommandeCommandeClient)) {
$this->fabricationArticleCommandeCommandeClient[] = $fabricationArticleCommandeCommandeClient;
$fabricationArticleCommandeCommandeClient->setArticleCommandeCommandeClient($this);
}
return $this;
}
public function removeFabricationArticleCommandeCommandeClient(Fabrication $fabricationArticleCommandeCommandeClient): self
{
if ($this->fabricationArticleCommandeCommandeClient->removeElement($fabricationArticleCommandeCommandeClient)) {
// set the owning side to null (unless already changed)
if ($fabricationArticleCommandeCommandeClient->getArticleCommandeCommandeClient() === $this) {
$fabricationArticleCommandeCommandeClient->setArticleCommandeCommandeClient(null);
}
}
return $this;
}
public function getPrixAvecRemise(): ?float
{
return $this->prixAvecRemise;
}
public function setPrixAvecRemise(?float $prixAvecRemise): self
{
$this->prixAvecRemise = $prixAvecRemise;
return $this;
}
}