Exemplo n.º 1
0
 public function getchecksbyoperationidajaxAction()
 {
     try {
         $request = $this->getRequest();
         if ($this->getRequest()->isPost()) {
             $operationid = $request->operation_id;
             $this->_helper->layout->disableLayout();
             $this->_helper->viewRenderer->setNoRender();
             $mapper = new Gyuser_Model_OperationsDataMapper();
             $obj = new Gyuser_Model_Operations();
             $obj->setId($operationid);
             $planid = $mapper->GetPlanIdByOperationId($obj);
             $interests_id = $mapper->GetInterestsIdByOperationId($obj);
             $mapper = new Gyuser_Model_ChequesDataMapper();
             $chequesList = $mapper->GetChequeDetailsByOpId($operationid);
             $result['planid'] = $planid;
             $result['interests_id'] = $interests_id;
             $result['cheques'] = $chequesList;
             if ($result) {
                 echo json_encode($result);
             } else {
                 echo "f";
             }
         }
     } catch (Exception $e) {
         echo $e;
     }
 }