Esempio n. 1
0
 public static function initialize($idER = 0)
 {
     $OER = self::retrieveByPK($idER);
     if (!$OER instanceof EntradesReserva) {
         $OER = new EntradesReserva();
         $OER->setUsuariid(null);
         $OER->setActivitatsid(null);
         $OER->setQuantes(0);
         $OER->setData(date('Y-m-d H:i', time()));
     }
     return new EntradesReservaForm($OER);
 }
 public static function initialize($idS, $url_ajax_usuaris, $idER, $idH, $idU = 0, $quantitat = 0, $Descompte = 0, $TPagament = 0)
 {
     $OER = self::retrieveByPK($idER);
     if (!$OER instanceof EntradesReserva) {
         $OER = new EntradesReserva();
         $OER->setEntradesPreusHorariId($idH == 0 ? null : $idH);
         $OER->setUsuariid($idU == 0 ? null : $idU);
         $OER->setNomReserva(null);
         $OER->setEmailReserva(null);
         $OER->setTelefonReserva(null);
         $OER->setQuantitat($quantitat);
         $OER->setEstat(self::ESTAT_ENTRADA_EN_ESPERA);
         $OER->setActiu(true);
         $OER->setDescompte($Descompte);
         $OER->setSiteid($idS);
         $OER->setData(date('Y-m-d H:i', time()));
         $OER->setTipusPagament($TPagament);
     }
     return new EntradesReservaForm($OER, array('ajax' => $url_ajax_usuaris, 'IDH' => $idH));
 }