Mesa/Controller/MesasController.php
public function cerrarMesa ( $mesa_id, $imprimir_ticket = true) {
        
        $this->Mesa->id = $mesa_id;     
        
        if( !$this->Mesa->cerrar_mesa() ) {
            if( !$this->request->is('ajax') ){
                $this->setFlash('Error al cerrar la mesa', 'flash_error');
            }
        }
        if( !$this->request->is('ajax') ){
            $this->redirect( $this->referer() );
        }         
    }
public function cerrarMesa ( $mesa_id, $imprimir_ticket = true) {
        
        $this->Mesa->id = $mesa_id;     
        
        if( !$this->Mesa->cerrar_mesa() ) {
            if( !$this->request->is('ajax') ){
                $this->setFlash('Error al cerrar la mesa', 'flash_error');
            }
        }
        if( !$this->request->is('ajax') ){
            $this->redirect( $this->referer() );
        }         
    }
public function cerrarMesa ( $ mesa_id , $ imprimir_ticket = true ) { $ this -> Mesa -> id = $ mesa_id ; if ( ! $ this -> Mesa -> cerrar_mesa ( ) ) { if ( ! $ this -> request -> is ( 'ajax' ) ) { $ this -> setFlash ( 'Error al cerrar la mesa' , 'flash_error' ) ; } } if ( ! $ this -> request -> is ( 'ajax' ) ) { $ this -> redirect ( $ this -> referer ( ) ) ; } }
Cierra la mesa, calculando el total y, si se lo indica,
imprime el ticket fiscal.
@param type $mesa_id
@param type $imprimir_ticket
@return type
Cierra la mesa calculando el total y si se lo indica imprime el ticket fiscal .