} else { $object->_force_sent = true; } $object->loadLastLog(); try { $object->store(); } catch (CMbException $e) { // Cas d'erreur on repasse la facturation à l'état précédent $object->facture = 0; if ($unlock_dossier) { $object->facture = 1; } $object->store(); $e->stepAjax(); } $object->countExchanges("pmsi", "evenementServeurActe"); if (!$unlock_dossier) { // Flag les actes CCAM en envoyés foreach ($object->_ref_actes_ccam as $_acte_ccam) { $_acte_ccam->sent = 1; if ($msg = $_acte_ccam->store()) { CAppUI::setMsg($msg, UI_MSG_ERROR); } } } $order = "date_production DESC"; // Création du template $smarty = new CSmartyDP(); $smarty->assign("canUnlockActes", $canUnlockActes); $smarty->assign("object", $object); $smarty->assign("IPP", $IPP);
* * @package Mediboard * @subpackage soins * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ * @link http://www.mediboard.org */ $sejour_id = CValue::get('sejour_id'); $date = CValue::get('date', CMbDT::date()); $from = CValue::get('from'); $to = Cvalue::get('to'); $sejour = new CSejour(); $sejour->load($sejour_id); $sejour->loadRefsFwd(); $sejour->countExchanges(); $sejour->isCoded(); $sejour->canDo(); $sejour->getAssociationCodesActes(); $sejour->loadPossibleActes(); /* Gestion des dates */ $date_entree = CMbDT::date(null, $sejour->entree); $date_sortie = CMbDT::date(null, $sejour->sortie); if (is_null($from) || is_null($to)) { if (CMbDT::daysRelative($date, $date_sortie) < 0) { $date = $date_sortie; } elseif (CMbDT::daysRelative($date_entree, $date) < 0) { $date = $date_entree; } if (CMbDT::daysRelative($date_entree, $date_sortie) < 6) { $from = $date_entree;