* * @package Mediboard * @subpackage cabinet * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkEdit(); $tarif_id = CValue::get("tarif_id"); $prat_id = CValue::get("prat_id"); $codable_id = CValue::get("codable_id"); $codable_class = CValue::get("codable_class"); //Chargement du tarif $tarif = new CTarif(); $tarif->load($tarif_id); if (!$tarif->getPerm(PERM_EDIT) && $tarif_id) { CAppUI::setMsg("Vous n'avez pas le droit de modifier ce tarif"); $tarif = new CTarif(); } if ($codable_id) { $tarif->_bind_codable = true; $tarif->_codable_id = $codable_id; $tarif->_codable_class = $codable_class; $tarif->bindCodable(); $tarif->updateFormFields(); } else { $tarif->loadRefsNotes(); $tarif->getSecteur1Uptodate(); $tarif->loadView(); if (!$tarif->_id) { $tarif->secteur1 = 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::checkEdit(); // Edite t'on un tarif ? $tarif_id = CValue::getOrSession("tarif_id"); $tarif = new CTarif(); $tarif->load($tarif_id); if (!$tarif->getPerm(PERM_EDIT)) { CAppUI::setMsg("Vous n'avez pas le droit de modifier ce tarif"); $tarif = new CTarif(); } $tarif->loadRefsNotes(); $tarif->getSecteur1Uptodate(); $tarif->loadView(); $tarif->getPrecodeReady(); // L'utilisateur est-il praticien ? $user = CAppUI::$user; $user->loadRefFunction(); $prat = new CMediusers(); $prat->load($user->_id); $prat->loadRefFunction(); // Liste des tarifs du praticien $listeTarifsChir = null;