本文整理汇总了PHP中CSejour::loadRefBilanSSR方法的典型用法代码示例。如果您正苦于以下问题:PHP CSejour::loadRefBilanSSR方法的具体用法?PHP CSejour::loadRefBilanSSR怎么用?PHP CSejour::loadRefBilanSSR使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSejour
的用法示例。
在下文中一共展示了CSejour::loadRefBilanSSR方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
CAppUI::displayMsg($msg, "{$acte->_class}-msg-create");
}
// Actes CsARR
foreach ($codes_csarrs as $_code) {
$acte = new CActeCsARR();
$acte->code = $_code;
$acte->evenement_ssr_id = $evenement->_id;
$msg = $acte->store();
CAppUI::displayMsg($msg, "{$acte->_class}-msg-create");
}
}
} else {
if (count($_days)) {
$entree = CMbDT::date($sejour->entree);
$sortie = CMbDT::date($sejour->sortie);
$bilan = $sejour->loadRefBilanSSR();
$referent = $bilan->loadRefKineReferent();
$date = CValue::getOrSession("date", CMbDT::date());
$monday = CMbDT::date("last monday", CMbDT::date("+1 day", $date));
foreach ($_days as $_number) {
$_day = CMbDT::date("+{$_number} DAYS", $monday);
if (!CMbRange::in($_day, $entree, $sortie)) {
CAppUI::setMsg("CEvenementSSR-msg-failed-bounds", UI_MSG_WARNING);
continue;
}
if (!$_heure_deb || !$duree) {
continue;
}
$evenement = new CEvenementSSR();
$evenement->equipement_id = $equipement_id;
$evenement->debut = "{$_day} {$_heure_deb}";
示例2: CSejour
$sejour_id = CValue::post("sejour_id");
$original_sejour_id = CValue::post("original_sejour_id");
$sejour = new CSejour();
$sejour->load($sejour_id);
// Chargement de la prescription de sejour
$sejour->loadRefPrescriptionSejour();
// Verification que la prescription est vide
if ($sejour->_ref_prescription_sejour->countBackRefs("prescription_line_element")) {
CAppUI::setMsg("Impossible de dupliquer l'ancien séjour car ce séjour possède déjà une prescription", UI_MSG_WARNING);
CAppUI::redirect('m=ssr&tab=vw_aed_sejour_ssr&sejour_id=' . $sejour_id);
}
// Chargement du sejour à dupliquer
$original_sejour = new CSejour();
$original_sejour->load($original_sejour_id);
// Chargement des references: bilan, fiche d'autonomie, prescriptions, evenements
$bilan_ssr = $original_sejour->loadRefBilanSSR();
$fiche_autonomie = $original_sejour->loadRefFicheAutonomie();
$prescription_sejour = $original_sejour->loadRefPrescriptionSejour();
$lines_element = $prescription_sejour->loadRefsLinesElement();
// Chargement evenements de la derniere semaine complete
$original_last_friday = CMbDT::date("last friday", CMbDT::date("+ 1 DAY", $original_sejour->sortie));
$monday = CMbDT::date("last monday", $original_last_friday);
$next_monday = CMbDT::date("next monday", $monday);
// 1er vendredi du nouveau sejour
$next_friday = CMbDT::date("next friday", CMbDT::date("- 1 DAY", $sejour->entree));
// Calcul du nombre de decalage entre les 2 sejours
$nb_decalage = CMbDT::daysRelative($original_last_friday, $next_friday);
$evenement_ssr = new CEvenementSSR();
$where = array();
$where["sejour_id"] = " = '{$original_sejour->_id}'";
$where["debut"] = " BETWEEN '{$monday}' AND '{$next_monday}'";