Exemplo n.º 1
0
	function ilQuickPaymentAction(){
		$db = new Loan_Model_DbTable_DbLoanILPayment();
		if($this->getRequest()->isPost()){
			$data = $this->getRequest()->getPost();
			//print_r($data);
			$db->quickPayment($data);
			
		}
		$frm = new Loan_Form_FrmIlPayment();
		$frm_loan=$frm->quickPayment();
		Application_Model_Decorator::removeAllDecorator($frm_loan);
		$db_keycode = new Application_Model_DbTable_DbKeycode();
		$this->view->keycode = $db_keycode->getKeyCodeMiniInv();
		
		$this->view->graiceperiod = $db_keycode->getSystemSetting(9);
		$this->view->frm_ilpayment = $frm_loan;
		
		$this->view->co = $db->getAllCo();
	}
Exemplo n.º 2
0
	function editAction()
	{
		$id = $this->getRequest()->getParam("id");
		$db = new Loan_Model_DbTable_DbGroupPayment();
		$db_global = new Application_Model_DbTable_DbGlobal();
		if($this->getRequest()->isPost()){
			$_data = $this->getRequest()->getPost();
			$identity = $_data["identity"];
			try {
				if($identity==""){
					Application_Form_FrmMessage::Sucessfull("Group Client no loan to pay!", "/loan/grouppayment");
				}else{
					$db->updateGroupPayment($_data);
// 					Application_Form_FrmMessage::Sucessfull("Update Success!", "/loan/GroupPayment");
					exit();
				}
			}catch (Exception $e) {
				$err =$e->getMessage();
				Application_Model_DbTable_DbUserLog::writeMessageError($err);
			}
		}
		$last_pay_date = $db_global->getLastDatePayment($id);
		$current_date = $db_global->getCurrentDatePayment($id);
		if($current_date<$last_pay_date){
			Application_Form_FrmMessage::Sucessfull("WARNNING_EDIT_LOAN","/loan/grouppayment/");
		}
		$rs = $db->getGroupPaymentById($id);
		$frm = new Loan_Form_FrmIlPayment();
		$frm_loan=$frm->FrmGroupPayment();
		Application_Model_Decorator::removeAllDecorator($frm_loan);
		$this->view->frm_ilpayment = $frm_loan;
		
		$this->view->reciept_money = $rs;
		$this->view->client = $db->getAllClient();
		$this->view->clientCode = $db->getAllClientCode();
		
		$db_keycode = new Application_Model_DbTable_DbKeycode();
		$this->view->keycode = $db_keycode->getKeyCodeMiniInv();
		
		$this->view->graiceperiod = $db_keycode->getSystemSetting(9);
		
		$session_user=new Zend_Session_Namespace('auth');
		$this->view->user_name = $session_user->last_name .' '. $session_user->first_name;
	
		$list = new Application_Form_Frmtable();
	
		$rs_receipt_detail = $db->getGroupPaymentDetail($id);
		$this->view->reciept_moneyDetail = $rs_receipt_detail;
		$this->view->group_id = $rs["group_id"];
		
		$this->view->loan_numbers = $db_global->getLoanNumberByBranch(2);
	}
Exemplo n.º 3
0
  function editAction()
  {
  	$id = $this->getRequest()->getParam("id");
  	$db = new Loan_Model_DbTable_DbLoanILPayment();
  	$db_global = new Application_Model_DbTable_DbGlobal();
  	if($this->getRequest()->isPost()){
  		$data = $this->getRequest()->getPost();
  		//print_r($data);exit();
  		$db->editQuickPayment($id,$data);
//   		$db->cancelPaymnet($data);
  		if(isset($data["save_new"])){
  			Application_Form_FrmMessage::Sucessfull("INSERT_SUCCESS!","/loan/ilquickpayment/add");
  		}elseif(isset($data["save_close"])){
  			Application_Form_FrmMessage::Sucessfull("INSERT_SUCCESS!","/loan/ilquickpayment");
  		}
  	}
  	$last_pay_date = $db_global->getLastDatePayment($id);
  	$current_date = $db_global->getCurrentDatePayment($id);
  	if($current_date<$last_pay_date){
  		Application_Form_FrmMessage::Sucessfull("WARNNING_EDIT_LOAN","/loan/ilquickpayment/");
  	}
  	$quickPayment = $db->getIlQuickPaymentById($id);
  	$this->view->quickPayment = $quickPayment;
  	
  	$quickPaymentDetail = $db->getIlQuickPaymentDetailById($id);
  	$this->view->quickPaymentDetail = $quickPaymentDetail;
  	
  	$frm = new Loan_Form_FrmIlPayment();
  	$frm_loan=$frm->quickPayment();
  	Application_Model_Decorator::removeAllDecorator($frm_loan);
  	$db_keycode = new Application_Model_DbTable_DbKeycode();
  	$this->view->keycode = $db_keycode->getKeyCodeMiniInv();
  	 
  	$this->view->graiceperiod = $db_keycode->getSystemSetting(9);
  	$this->view->frm_ilpayment = $frm_loan;
  	 
  	$this->view->co = $db->getAllCo();
  }