コード例 #1
0
    $filter->_type_affichage = 1;
}
if ($filter->_type_affichage == "totaux") {
    $filter->_type_affichage = 0;
}
$ljoin = array();
$where = array();
// Filtre sur les dates
$where["reglement.date"] = "BETWEEN '{$filter->_date_min}' AND '{$filter->_date_max} 23:59:59'";
// Filtre sur les modes de paiement
if ($filter->_mode_reglement) {
    $where["reglement.mode"] = "= '{$filter->_mode_reglement}'";
}
// Filtre sur les praticiens
$chir_id = CValue::getOrSession("chir");
$listPrat = CConsultation::loadPraticiensCompta($chir_id);
// Chargement des règlements via les factures
$ljoin["facture_cabinet"] = "reglement.object_id = facture_cabinet.facture_id";
if (!$all_group_compta) {
    $where["facture_cabinet.group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
}
$where["facture_cabinet.praticien_id"] = CSQLDataSource::prepareIn(array_keys($listPrat));
$where["reglement.object_class"] = " = 'CFactureCabinet'";
$reglement = new CReglement();
/** @var CReglement[] $reglements */
$reglements = $reglement->loadList($where, " facture_cabinet.facture_id, reglement.date", null, null, $ljoin);
$reglement = new CReglement();
// Calcul du récapitulatif
// Initialisation du tableau de reglements
$recapReglement["total"] = array("nb_consultations" => "0", "du_patient" => "0", "du_tiers" => "0", "nb_reglement_patient" => "0", "nb_reglement_tiers" => "0", "secteur1" => "0", "secteur2" => "0", "secteur3" => "0", "du_tva" => "0");
foreach (array_merge($reglement->_specs["mode"]->_list, array("")) as $_mode) {
コード例 #2
0
$use_edit = CAppUI::pref("useEditAutocompleteUsers");
if (!$edit && $use_edit) {
    $edit = 1;
}
// Droits sur les utilisateurs retournés
$permType = $edit ? PERM_EDIT : PERM_READ;
// Récupération de la liste des utilisateurs
if ($rdv) {
    $listUsers = $object->loadProfessionnelDeSanteByPref($permType, null, $keywords);
} elseif ($praticiens) {
    $listUsers = $object->loadPraticiens($permType, null, $keywords);
} else {
    $listUsers = $object->loadUsers($permType, null, $keywords);
}
if ($compta) {
    $listUsersCompta = CConsultation::loadPraticiensCompta();
    foreach ($listUsers as $_user) {
        if (!isset($listUsersCompta[$_user->_id])) {
            unset($listUsers[$_user->_id]);
        }
    }
}
$template = $object->getTypedTemplate("autocomplete");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign('matches', $listUsers);
$smarty->assign('field', $field);
$smarty->assign('view_field', $view_field);
$smarty->assign('show_view', $show_view);
$smarty->assign('template', $template);
$smarty->assign('nodebug', true);
コード例 #3
0
ファイル: vw_compta.php プロジェクト: fbone/mediboard4
$three_month_deb = CMbDT::date("-3 month", $month_fin);
$month_fin = CMbDT::date("-1 day", $month_fin);
$filter = new CConsultation();
$filter->_date_min = CMbDT::date();
$filter->_date_max = CMbDT::date("+ 0 day");
$filter->_etat_paiement = CValue::getOrSession("_etat_paiement", 0);
$filter->_type_affichage = CValue::getOrSession("_type_affichage", 0);
$filter_reglement = new CReglement();
$filter_reglement->mode = CValue::getOrSession("mode", 0);
// L'utilisateur est-il praticien ?
$mediuser = CMediusers::get();
$mediuser->loadRefFunction();
$is_praticien = $mediuser->isPraticien();
$is_admin = in_array(CUser::$types[$mediuser->_user_type], array("Administrator"));
$is_admin_or_secretaire = in_array(CUser::$types[$mediuser->_user_type], array("Administrator", "Secrétaire"));
$listPrat = CConsultation::loadPraticiensCompta();
$bloc = new CBlocOperatoire();
$blocs = $bloc->loadGroupList();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("filter", $filter);
$smarty->assign("filter_reglement", $filter_reglement);
$smarty->assign("mediuser", $mediuser);
$smarty->assign("is_praticien", $is_praticien);
$smarty->assign("is_admin_or_secretaire", $is_admin_or_secretaire);
$smarty->assign("listPrat", $listPrat);
$smarty->assign("now", $now);
$smarty->assign("yesterday", $yesterday);
$smarty->assign("week_deb", $week_deb);
$smarty->assign("week_fin", $week_fin);
$smarty->assign("month_deb", $month_deb);
コード例 #4
0
/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage dPfacturation
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html 
 * @version    $Revision$
 */
CCanDo::checkRead();
$debut = CValue::getOrSession("date_min", CMbDT::date());
$fin = CValue::getOrSession("date_max", CMbDT::date());
$chir_id = CValue::getOrSession("chir_id");
$prats = array();
if (!$chir_id) {
    $prats = CConsultation::loadPraticiensCompta();
} else {
    $chir = CMediusers::get($chir_id);
    $prats[$chir_id] = $chir;
}
CMbObject::massLoadFwdRef($prats, "function_id");
$ds = CSQLDataSource::get("std");
$object_classes = array("Etablissement" => array("CConsultation", "CSejour", "COperation"), "Cabinet" => array("CConsultation"));
$secteurs = array("sect1" => 0, "sect2" => 0);
$cotation = array();
$total_by_prat = array();
$total_by_class = array();
$tab_actes = array();
$total = 0;
if (CAppUI::conf("ref_pays") == 1) {
    $tab_actes["ccam"] = $secteurs;