public function setinformeterceroajaxAction() { try { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $request = $this->getRequest(); if ($this->getRequest()->isPost()) { $chequeId = $request->cheque_id; $opId = (int) $request->operation_id; $approved = $request->approved; $report = $request->report; $mapper = new Gyuser_Model_ChequesDataMapper(); $result = $mapper->setChequeInforme($chequeId, $approved, $report); $opMapper = new Gyuser_Model_OperationsDataMapper(); if ($approved == '0') { //not approved $opMapper->updateOpAmount($opId); } $opMapper->OpTercerosStateChange($opId, 5); //if all cheques finished approval it will set op. cerrada con cliente (ready to deliver). if ($result) { echo $result; } else { echo "f"; } } } catch (Exception $e) { echo $e; } }