Ejemplo n.º 1
0
 public function testNegativoDecimales()
 {
     //Comprueba que no se acepten decimales negativos
     echo " >> Comprobando aceptacion de decimales negativos\n";
     echo "\tSe envian: -1, -2, -3, -4";
     try {
         echo "\tExcepcion capturada: " . POSController::DecimalesConfiguracion(-1, -2, -3, -4);
         //Se envian argumentos invalidos
     } catch (Exception $e) {
         echo "\tExcepción capturada: ", $e->getMessage(), "\n";
     }
 }
Ejemplo n.º 2
0
 protected function GenerateResponse()
 {
     try {
         $this->response = POSController::DecimalesConfiguracion(isset($_POST['cambio']) ? $_POST['cambio'] : null, isset($_POST['cantidades']) ? $_POST['cantidades'] : null, isset($_POST['costos']) ? $_POST['costos'] : null, isset($_POST['ventas']) ? $_POST['ventas'] : null);
     } catch (Exception $e) {
         //Logger::error($e);
         throw new ApiException($this->error_dispatcher->invalidDatabaseOperation($e->getMessage()));
     }
 }