本文整理匯總了PHP中CMediusers::loadRefsRetrocessions方法的典型用法代碼示例。如果您正苦於以下問題:PHP CMediusers::loadRefsRetrocessions方法的具體用法?PHP CMediusers::loadRefsRetrocessions怎麽用?PHP CMediusers::loadRefsRetrocessions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CMediusers
的用法示例。
在下文中一共展示了CMediusers::loadRefsRetrocessions方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: updateMontantRetrocession
/**
* Calcul du montant de la retrocession pour la facture
*
* @return boolean
**/
function updateMontantRetrocession()
{
$this->_montant_retrocession = 0;
$this->loadRefPraticien();
$this->loadRefsItems();
$retrocessions = $this->_ref_praticien->loadRefsRetrocessions();
$add_anesth = true;
$use_pm = false;
foreach ($this->_ref_items as $item) {
foreach ($retrocessions as $retro) {
if ($retro->use_pm && $retro->code_class == $item->type && $retro->code == $item->code && $retro->active) {
$use_pm = true;
}
}
}
foreach ($this->_ref_items as $item) {
$modif = false;
if (!(!$add_anesth && $item->type == "CActeTarmed" && strstr($item->code, "28."))) {
foreach ($retrocessions as $retro) {
/** @var CRetrocession $retro*/
if ($retro->code_class == $item->type && $retro->code == $item->code && $retro->active) {
$modif = true;
$montant = $item->quantite * $retro->updateMontant();
if (!$retro->use_pm && $item->type == "CActeTarmed" && $use_pm) {
$montant = 0;
}
if ($item->type == "CActeTarmed" && strstr($item->code, "28.")) {
$add_anesth = false;
}
$this->_montant_retrocession += $montant;
$this->_retrocessions[$item->code] = array($item->_montant_facture, $montant);
}
}
if (!$modif && ($item->type == "CActeTarmed" || $item->type == "CActeCaisse") && !$use_pm) {
/* @var CActeTarmed $code */
$code = new $item->type();
$code->code = $item->code;
$code->updateMontantBase();
$montant = 0.0;
if ($item->type == "CActeTarmed" && !strstr($item->code, "28.") && !strstr($item->code, "35.")) {
$ref = $code->_ref_tarmed;
$montant = $item->quantite * $ref->tp_al * $ref->f_al * $this->_coeff;
}
$this->_montant_retrocession += $montant;
$this->_retrocessions[$item->code] = array($item->_montant_facture, $montant);
}
}
}
if ($this->_montant_retrocession && $this->annule) {
$this->_retrocessions["extourne"] = array(0, -$this->_montant_retrocession);
$this->_montant_retrocession = 0.0;
}
return $this->_montant_retrocession;
}
示例2: CMediusers
<?php
/**
* $Id: vw_retrocession_regles.php 19043 2013-05-07 10:17:32Z aurelie17 $
*
* @package Mediboard
* @subpackage dPfacturation
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 19043 $
*/
CCanDo::checkEdit();
$prat_id = CValue::getOrSession("prat_id", "0");
$mediuser = new CMediusers();
$listPrat = $mediuser->loadPraticiens();
// Chargement du praticien
$praticien = new CMediusers();
$praticien->load($prat_id);
$praticien->loadRefsRetrocessions();
// Creation du template
$smarty = new CSmartyDP();
$smarty->assign("listPrat", $listPrat);
$smarty->assign("praticien", $praticien);
$smarty->display("vw_retrocession_regles.tpl");