示例#1
0
 public function billingAction()
 {
     $this->_checkAuth();
     $modelUserFinance = new Kutu_Core_Orm_Table_UserFinance();
     $rowset = $modelUserFinance->getUserFinance($this->_user->kopel);
     $this->view->rowset = $rowset;
     $modelOrder = new Kutu_Core_Orm_Table_Order();
     $outstandingAmount = $modelOrder->outstandingUserAmout($this->_userFinanceInfo->userId);
     $this->view->outstandingAmount = $outstandingAmount;
     if ($this->_request->isPost()) {
         $data['taxNumber'] = $this->_request->getParam('taxNumber');
         $data['taxCompany'] = $this->_request->getParam('taxCompany');
         $data['taxAddress'] = $this->_request->getParam('taxAddress');
         $data['taxCity'] = $this->_request->getParam('taxCity');
         $data['taxProvince'] = $this->_request->getParam('taxProvince');
         $data['taxZip'] = $this->_request->getParam('taxZip');
         $data['taxPhone'] = $this->_request->getParam('taxPhone');
         $data['taxFax'] = $this->_request->getParam('taxFax');
         $data['taxCountryId'] = $this->_request->getParam('taxCountryId');
         $where = "userId = '" . $this->_user->kopel . "'";
         $userFinance = new Kutu_Core_Orm_Table_UserFinance();
         $userFinance->update($data, $where);
         $this->_helper->redirector('bilupdsuc');
     }
 }
示例#2
0
 public function billingAction()
 {
     $this->_checkAuth();
     $userFinance = new Kutu_Core_Orm_Table_UserFinance();
     $userId = @$this->_userInfo->userId;
     $rowset = $userFinance->getUserFinance($userId);
     /*echo '<pre>';
     		print_r($rowset);
     		echo '</pre>';*/
     $tblOrder = new Kutu_Core_Orm_Table_Order();
     //table kutuOrder
     //select previous transaction that are postpaid based on userid
     $outstandingAmount = @$tblOrder->outstandingUserAmout($this->_userInfo->userId);
     $this->view->rowset = $rowset;
     $this->view->outstandingAmount = $outstandingAmount;
     //print_r($this->_request->getParams());
     if ($this->_request->isPost('save')) {
         $data['taxNumber'] = $this->_request->getParam('taxNumber');
         $data['taxCompany'] = $this->_request->getParam('taxCompany');
         $data['taxAddress'] = $this->_request->getParam('taxAddress');
         $data['taxCity'] = $this->_request->getParam('taxCity');
         $data['taxProvince'] = $this->_request->getParam('taxProvince');
         $data['taxZip'] = $this->_request->getParam('taxZip');
         $data['taxCountryId'] = $this->_request->getParam('taxCountryId');
         $where = "userId = '" . $userId . "'";
         $userFinance->update($data, $where);
         $this->_helper->redirector('bilupdsuc');
     } else {
         //echo 'falset';
     }
 }