/**
  * Création d'un item de facture pour un frais divers
  *
  * @param CFacture $facture la facture
  * @param string   $date    date à défaut
  *
  * @return string|null
  */
 function creationItemsFacture($facture, $date)
 {
     $this->loadRefType();
     $ligne = new CFactureItem();
     $ligne->libelle = $this->_ref_type->libelle;
     $ligne->code = $this->_ref_type->code;
     $ligne->type = $this->_class;
     $ligne->object_id = $facture->_id;
     $ligne->object_class = $facture->_class;
     $ligne->date = $date;
     $ligne->montant_base = $this->montant_base;
     $ligne->montant_depassement = $this->montant_depassement;
     $ligne->quantite = $this->quantite;
     $ligne->coeff = $this->coefficient;
     $msg = $ligne->store();
     return $msg;
 }
Exemplo n.º 2
0
 /**
  * Création d'un item de facture avec un code ccam
  * 
  * @param CFacture $facture La facture
  * @param string   $date    Date à défaut
  * 
  * @return string
  **/
 function creationItemsFacture($facture, $date)
 {
     $this->loadRefCodeCCAM();
     $ligne = new CFactureItem();
     $ligne->libelle = $this->_ref_code_ccam->libelleCourt;
     $ligne->code = "{$this->code_acte} {$this->modificateurs}";
     $ligne->type = $this->_class;
     $ligne->object_id = $facture->_id;
     $ligne->object_class = $facture->_class;
     $ligne->date = CMbDT::date($this->execution);
     $ligne->montant_base = $this->montant_base;
     $ligne->montant_depassement = $this->montant_depassement;
     $ligne->quantite = 1;
     $ligne->coeff = $facture->_coeff;
     if ($msg = $ligne->store()) {
         return $msg;
     }
     return null;
 }