* @package Mediboard * @subpackage SSR * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $rhs_date_monday = CValue::get('rhs_date_monday'); $date = CMbDT::date(); $rhs = new CRHS(); $join['sejour'] = "sejour.sejour_id = rhs.sejour_id"; $join['patients'] = "patients.patient_id = sejour.patient_id"; $where['sejour.annule'] = " = '0'"; $where['date_monday'] = " = '{$rhs_date_monday}'"; $order = "nom, prenom"; /** @var CRHS[] $sejours_rhs */ $sejours_rhs = $rhs->loadList($where, $order, null, null, $join); foreach ($sejours_rhs as $_rhs) { $_rhs->loadRefsNotes(); $sejour = $_rhs->loadRefSejour(); $sejour->_ref_patient->loadIPP(); } $where['rhs.facture'] = " = '0'"; $count_sej_rhs_no_charge = $rhs->countList($where, null, $join); // Création du template $smarty = new CSmartyDP(); $smarty->assign("sejours_rhs", $sejours_rhs); $smarty->assign("count_sej_rhs_no_charge", $count_sej_rhs_no_charge); $smarty->assign("rhs_date_monday", $rhs_date_monday); $smarty->assign("read_only", true); $smarty->display("inc_vw_rhs_sejour.tpl");
* @package Mediboard * @subpackage SSR * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $sejour_ids = explode("-", CValue::get("sejour_ids")); $date_monday = CValue::get("date_monday"); $all_rhs = CValue::get("all_rhs"); $where["sejour_id"] = CSQLDataSource::prepareIn($sejour_ids); $where["date_monday"] = $all_rhs ? ">= '{$date_monday}'" : "= '{$date_monday}'"; $order = "sejour_id, date_monday"; $rhs = new CRHS(); /** @var CRHS[] $sejours_rhs */ $sejours_rhs = $rhs->loadList($where, $order); // Liste des catégories d'activité $type_activite = new CTypeActiviteCdARR(); $types_activite = $type_activite->loadList(); $totaux = array(); foreach ($sejours_rhs as $_rhs) { // Dépendances $dependances = $_rhs->loadRefDependances(); if (!$dependances->_id) { $dependances->store(); } $_rhs->loadRefSejour(); $_rhs->buildTotaux(); } // Création du template $smarty = new CSmartyDP();
<?php /** * $Id$ * * @package Mediboard * @subpackage SSR * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ $sejour_ids = CValue::post("sejour_ids"); $date_monday = CValue::post("date_monday"); $all_rhs = CValue::post("all_rhs"); $where["sejour_id"] = CSQLDataSource::prepareIn($sejour_ids); $where["date_monday"] = $all_rhs ? ">= '{$date_monday}'" : "= '{$date_monday}'"; $order = "sejour_id, date_monday"; $rhs = new CRHS(); /** @var CRHS[] $rhss */ $rhss = $rhs->loadList($where, $order); if (count($rhss)) { foreach ($rhss as $_rhs) { $_rhs->facture = CValue::post("facture"); $msg = $_rhs->store(); CAppUI::displayMsg($msg, "CRHS-msg-modify"); } } else { CAppui::setMsg("CRHS.none", UI_MSG_WARNING); } echo CAppUI::getMsg(); CApp::rip();