本文整理汇总了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");