Beispiel #1
0
 public function compraVerificada()
 {
     if (($this->email_vendedor == EMAIL_PAYPAL1 || $this->email_vendedor == EMAIL_PAYPAL2) && $this->estado == "Completed") {
         if (TipoTicket::existeTipo($this->item_id)) {
             return true;
         } else {
             Tool::log("[ERROR]El tipo de ticket no está registrado", LOG);
             return false;
         }
     } else {
         return false;
     }
 }
Beispiel #2
0
 public function delTipo()
 {
     $db = Tool::conectaBD();
     if ($db) {
         if (TipoTicket::existeTipo($this->id)) {
             $sql = "DELETE FROM TipoTicket WHERE Id=" . $this->id;
             $res = Tool::ejecuta($sql, $db);
         } else {
             //El id no existe
             $res = false;
         }
     } else {
         //error conectando a base de datos
         $res = false;
     }
     Tool::desconectaBD($db);
     return $res;
 }