/**
  * @see parent::updateFormFields()
  */
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->loadRefType();
     $this->_montant = $this->montant_base;
     // Vue codée
     $this->_shortview = $this->quantite > 1 ? "{$this->quantite}x " : "";
     $this->_shortview .= $this->_ref_type->_view;
     if ($this->coefficient != 1) {
         $this->_shortview .= $this->coefficient;
     }
     $this->_view = "Frais divers {$this->_shortview}";
     if ($this->object_class && $this->object_id) {
         $this->_view .= " de {$this->object_class}-{$this->object_id}";
     }
 }
Example #2
0
 /**
  * Mise à jour du montant total de la rétrocession
  * 
  * @param string $code code pour mettre à jour
  * 
  * @return $this->_ref_acte
  */
 function updateMontant($code = "")
 {
     $this->_montant_total = 0;
     if ($code == $this->code || !$code) {
         if ($this->type == "montant") {
             $this->_montant_total = $this->valeur;
         } elseif ($this->type == "pct") {
             $this->loadRefCode();
             $this->_ref_acte->updateFormFields();
             $this->_montant_total = $this->_ref_acte->_montant_facture * $this->valeur / 100;
         } elseif (($this->code_class == "CActeTarmed" || $this->code_class == "CActeCaisse") && CModule::getActive("tarmed") && CAppUI::conf("tarmed CCodeTarmed use_cotation_tarmed")) {
             $_code = $this->loadRefCode();
             $tarmed = $_code->_ref_tarmed;
             $pm = $this->code_class == "CActeTarmed" ? $tarmed->tp_al * $tarmed->f_al : $_code->_ref_prestation_caisse->pt_medical;
             $pt = $this->code_class == "CActeTarmed" ? $tarmed->tp_tl * $tarmed->f_tl : $_code->_ref_prestation_caisse->pt_technique;
             $this->_montant_total = $pm * ($this->pct_pm / 100) + $pt * ($this->pct_pt / 100);
         }
     }
     $this->_montant_total = round($this->_montant_total, 2);
     return $this->_montant_total;
 }
 /**
  * Delete acte
  *
  * @param CActe       $acte   Acte
  * @param CMbObject   $object Object
  * @param CIdSante400 $idex   Idex
  *
  * @return String|null
  */
 function deleteActe($acte, $object, $idex)
 {
     if ($msg = $idex->delete()) {
         return $msg;
     }
     if ($msg = $acte->delete()) {
         return $msg;
     }
     if ($msg = $object->store()) {
         return $msg;
     }
     return null;
 }
 /**
  * @see parent::loadRefsFwd()
  */
 function loadRefsFwd()
 {
     parent::loadRefsFwd();
     $this->loadRefExecutant();
     $this->loadRefCodeCCAM();
     if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
         $this->loadRefCodageCCAM();
     }
 }
Example #5
0
 /**
  * @see parent::canDeleteEx()
  */
 function canDeleteEx()
 {
     if ($msg = $this->checkCoded()) {
         return $msg;
     }
     return parent::canDeleteEx();
 }