/**
  *   To check the existence of claim number in keyhouse database
  */
 public function claimDetailsAction()
 {
     if ($this->_request->isPost()) {
         $filters = array('*' => array('StringTrim', 'HtmlEntities', 'StripTags'));
         $validators = array('*' => array('allowEmpty' => true));
         $input['claimRefNo'] = $this->_request->getParam('claimNumber');
         $validate = new Zend_Filter_Input($filters, $validators, $input);
         $claimRefNo = $validate->getEscaped->claimRefNo;
         $keyHouseManager = new Manager_Insurance_KeyHouse_Claim();
         $claimDetails = $keyHouseManager->getClaim($claimRefNo, $this->_agentSchemeNumber);
         $claimDetailsResponse = empty($claimDetails) ? 0 : 1;
         echo $claimDetailsResponse;
     }
 }
 /**
  * Print Claim Status Report in PDF format
  *
  * @return void
  */
 public function claimStatusAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     /* // This is the original code, but over HTTPS IE doesn't like it.
        $this->getResponse()
                 ->setHeader('Content-Disposition', 'inline;')
                 ->setHeader('Content-type', 'application/pdf');
        */
     // This is the dirty way of doing it, but it works in IE.  IE sucks.
     header('Pragma: public');
     // required
     header('Expires: 0');
     header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
     header('Cache-Control: private', false);
     // required for certain browsers
     header('Content-Disposition: inline;');
     header('Content-type: application/pdf');
     $claimRefNo = $this->_request->getParam('claimNumber');
     $claimManager = new Manager_Insurance_KeyHouse_Claim();
     if ($claimRefNo != '') {
         echo $claimManager->populateAndOuputClaimStatusReport($claimRefNo, $this->_agentSchemeNumber);
     } else {
         $this->_helper->redirector->gotoUrl('rentguaranteeclaims/view-claims');
     }
 }