当前位置: 首页>>代码示例>>PHP>>正文


PHP Application_Model_GlobalClass::getInvoiceWithdraw方法代码示例

本文整理汇总了PHP中Application_Model_GlobalClass::getInvoiceWithdraw方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_GlobalClass::getInvoiceWithdraw方法的具体用法?PHP Application_Model_GlobalClass::getInvoiceWithdraw怎么用?PHP Application_Model_GlobalClass::getInvoiceWithdraw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Application_Model_GlobalClass的用法示例。


在下文中一共展示了Application_Model_GlobalClass::getInvoiceWithdraw方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: insertMoneyTransfer

 function insertMoneyTransfer($data)
 {
     $percent = empty($data['percent']) ? 0 : $data['percent'];
     $send_date = $data['send_date'] . ' ' . date('h:i:s');
     $exp_date = $data['epx_date'] . ' ' . date('h:i:s');
     $session_user = new Zend_Session_Namespace('auth');
     $db = $this->getAdapter();
     $db->beginTransaction();
     try {
         $agent_id = $data['agent_id'];
         $_data = array('sender_name' => $data['sender'], 'reciever_name' => $data['reciever'], 'reciever_tel' => $data['reciever_tel'], 'invoice_no' => $data['invoice_no'], 'amount' => $data['amount'], 'amount_type' => $data['type_money'], 'commission' => empty($data['commission']) ? 0 : $data['commission'], 'commission_type' => $data['type_money'], 'commission_percent' => $percent, 'commission_agent' => $data['commission_agent'], 'recieved' => $data['recieve_money'], 'recieved_type' => $data['type_money'], 'status' => $data['tran_type'] == 0 ? 0 : 2, 'status_loan' => empty($data['loan']) ? 0 : $data['loan'], 'cut_service' => empty($data['minus']) ? 0 : $data['minus'], 'agent_id' => $agent_id, 'subagent_id' => empty($data['sub_agent_id']) ? 0 : $data['sub_agent_id'], 'send_date' => $send_date, 'expire_date' => $exp_date, 'transfer_money' => $data['gave'], 'total_money' => $data['total'], 'return_money' => $data['return_money'], 'tran_type' => $data['tran_type'], 'is_kbank' => empty($data['is_kbank']) ? 0 : $data['is_kbank'], 'user_id' => $session_user->user_id);
         $tran_no = $this->insert($_data);
         $db_sender = new Application_Model_DbTable_DbKbank();
         $sender_id = $db_sender->getSenderIdbyName($data['sender']);
         //     	 	$db_rate=new Application_Model_DbTable_DbRate();
         //     	 	$rate = $db_rate->getCurrentRate();
         $_data['sender_name'] = $sender_id;
         $_data['exchange_rate_db'] = $data['BD'];
         $_data['exchange_rate_dr'] = $data['RD'];
         $_data['exchange_rate_rb'] = $data['RB'];
         $_data['is_orgdebt'] = 1;
         $db_cap = new Application_Model_DbTable_DbCapital();
         //for data capital
         if (!empty($data['loan'])) {
             //IF DEBT
             $this->_name = "cs_transactions_owe";
             $_data['money_tran_id'] = $tran_no;
             $_data['rate_perday'] = $data['rate_perday'];
             $money_type = 1;
             if ($data['type_money'] == 1) {
                 $total_debt = $data['total'] + $data['debt_dollar'];
             } elseif ($data['type_money'] == 2) {
                 $total_debt = $data['total'] + $data['debt_bath'];
                 $money_type = 2;
             } else {
                 $total_debt = $data['total'] + $data['debt_khmer'];
                 $money_type = 3;
             }
             $this->updateStatustoPaid($sender_id, $money_type);
             //update old tran debt to paid below add new debt
             $_data['total_money_owe'] = $total_debt;
             unset($_data['return_money']);
             unset($_data['is_kbank']);
             $this->insert($_data);
             if ($data['tran_type'] == 0) {
                 //debt with tran type = transfer
                 $amount = $data['total'];
             } else {
                 $amount = -$data['total'];
                 //យើងអស់លុយប៉ុន្តែយើងជំពាក់គេ
             }
             $income = 0;
             // 				$tran_type=7;//remain debt before pls ckeck condition  ;
             $tran_type = 2;
             //remain debt ;
         } else {
             //add owe if money kbank differ money transfer
             $_data['money_tran_id'] = $tran_no;
             $_data['rate_perday'] = $data['rate_perday'];
             $_data['total_money_owe'] = $data['total'];
             $_data['status_loan'] = 1;
             unset($_data['return_money']);
             //     	 		if($data['tran_type'] == 0){//with tran type = transfer
             //     	 			$amount = $data['total'];
             //     	 		}else{
             //     	 			$amount = -$data['total'];//វេចូល
             //     	 		}
             //     	 		$income = 1;
             if ($data['tran_type'] == 0) {
                 //with tran type = transfer
                 $amount = $data['total'];
             } else {
                 $amount = -$data['total'];
                 //វេចូល
             }
             //	for add withdraw to send if sender use kbank account
             if (!empty($data['is_kbank'])) {
                 if ($data['type_money'] == 1 and empty($data['debt_dollar'])) {
                     //if kbank no money for transfer
                     $this->AddOweTransationBysender($_data);
                 } elseif ($data['type_money'] == 2 and empty($data['debt_bath'])) {
                     $this->AddOweTransationBysender($_data);
                 } elseif ($data['type_money'] == 3 and empty($data['debt_khmer'])) {
                     $this->AddOweTransationBysender($_data);
                 }
                 $w_dollar = 0;
                 $w_bath = 0;
                 $w_riel = 0;
                 $b_dollar = 0;
                 $b_bath = 0;
                 $b_riel = 0;
                 $invoice = Application_Model_GlobalClass::getInvoiceWithdraw();
                 $db_draw = new Application_Model_DbTable_DbKbank();
                 $sender_id = $db_draw->getSenderIdbyName($data['sender']);
                 //covert sender name to sender id
                 $remain_from_kbank = 0;
                 $total_withdraw = $data['total'];
                 if ($data['type_money'] == 1) {
                     $w_dollar = $data['total'];
                     $remain_from_kbank = $data['debt_dollar'] - $data['total'];
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:currencyms,代码行数:101,代码来源:DbMoneyTransactions.php

示例2: extendDateAction

 public function extendDateAction()
 {
     $tr_id = $this->getRequest()->getParam('tr_id');
     $tr_id = empty($tr_id) ? 0 : $tr_id;
     if ($this->getRequest()->isPost()) {
         try {
             $data = $this->getRequest()->getPost();
             $db = new Application_Model_DbTable_DbKbank();
             $db->extendDateByTran($data);
             Application_Form_FrmMessage::Sucessfull('ការពន្យាពេលប្រតិបត្តិការនេះ​​ជោគ​ជ័យ', self::REDIRECT_URL . '/index/index');
         } catch (Exception $e) {
             Application_Form_FrmMessage::Sucessfull('ការពន្យាពេលប្រតិបត្តិការនេះ​​បរាជ័យ', self::REDIRECT_URL . '/index/index');
         }
     }
     if (empty($tr_id)) {
         Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', self::REDIRECT_URL . '/index/index');
     }
     $db = new Application_Model_DbTable_DbKbank();
     $rs = $db->getTranKbankById($tr_id);
     if (empty($rs)) {
         Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', self::REDIRECT_URL . '/index/index');
     }
     $this->view->rs = $rs;
     $session_user = new Zend_Session_Namespace('auth');
     $this->view->user_name = $session_user->last_name . ' ' . $session_user->first_name;
     $db_keycode = new Application_Model_DbTable_DbKeycode();
     $this->view->keycode = $db_keycode->getKeyCodeMiniInv();
     $pro = new Application_Model_DbTable_DbProvinces();
     $provinces = $pro->getProvinceList();
     array_unshift($provinces, array('id' => '0', "name" => "ជ្រើសរើសខេត្តដកប្រាក់", 'num' => 0));
     $this->view->provinces = $provinces;
     $subagent = new Application_Model_DbTable_DbSubAgent();
     $this->view->subagent = $subagent->getSubAgentListSelectTrns();
     $agent = new Application_Model_DbTable_DbAgents();
     $this->view->agent = $agent->getAgentListSelectTrns();
     $sender = new Application_Model_DbTable_DbSender();
     $_sender = $sender->getAllSenderKbank();
     array_unshift($_sender, array('id' => '-1', "name" => "បន្ថែមឈ្មោះអ្នកផ្ញើរ"));
     $this->view->sender = $_sender;
     $cur = new Application_Model_DbTable_DbCurrencies();
     $this->view->currency = $cur->getCurrencyList();
     $this->view->pay_term = $this->pay_term;
     $this->view->invoice_no = Application_Model_GlobalClass::getInvoiceWithdraw(2);
     $db = new Application_Model_DbTable_DbKbank();
     $this->view->new_acc = $acc_no = $db->getAccountNumberForKBank();
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:46,代码来源:IndexController.php

示例3: addAction

 public function addAction()
 {
     if ($this->getRequest()->isPost()) {
         try {
             $data = $this->getRequest()->getPost();
             $db = new Application_Model_DbTable_DbKbank();
             $db->addWithdrawBySender($data);
             Application_Form_FrmMessage::message('ការដកប្រាក់ពីប្រតិបត្តិការនេះ​​ដោយជោគ​ជ័យ');
         } catch (Exception $e) {
             Application_Form_FrmMessage::Sucessfull('ការដកប្រាក់ពីប្រតិបត្តិការនេះ​​បរា​ជ័យ', self::REDIRECT_URL . '/index/index');
         }
     }
     $session_user = new Zend_Session_Namespace('auth');
     $this->view->user_name = $session_user->last_name . ' ' . $session_user->first_name;
     $db_keycode = new Application_Model_DbTable_DbKeycode();
     $this->view->keycode = $db_keycode->getKeyCodeMiniInv();
     $sender = new Application_Model_DbTable_DbSender();
     $_sender = $sender->getAllSenderKbank();
     $this->view->sender = $_sender;
     $cur = new Application_Model_DbTable_DbCurrencies();
     $this->view->invoice_no = Application_Model_GlobalClass::getInvoiceWithdraw();
     $db = new Application_Model_DbTable_DbKbank();
     $this->view->new_acc = $acc_no = $db->getAccountNumberForKBank();
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:24,代码来源:WithdrawController.php

示例4: selectAction

 public function selectAction()
 {
     if ($this->getRequest()->isPost()) {
         $_data = $this->getRequest()->getPost();
         //print_r($_data);exit();
         try {
             $_dbmodel = new Application_Model_DbTable_DbPayment();
             $_dbmodel->addTransFound($_data);
             Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', "/payment/index/index");
         } catch (Exception $e) {
             echo $e->getMessage();
             exit;
             $this->view->msg = 'ការ​បញ្ចូល​មិន​ជោគ​ជ័យ';
         }
     }
     $this->view->invoice_no = Application_Model_GlobalClass::getInvoiceWithdraw(4);
     $sender = new Application_Model_DbTable_DbSender();
     $this->view->senderlist = $sender->getAllSenderNameOwe();
     $db_keycode = new Application_Model_DbTable_DbKeycode();
     $this->view->keycode = $db_keycode->getKeyCodeMiniInv();
     $session_user = new Zend_Session_Namespace('auth');
     $this->view->user_name = $session_user->last_name . ' ' . $session_user->first_name;
     $cur = new Application_Model_DbTable_DbCurrencies();
     $currency = $cur->getCurrencyList();
     $this->view->currency = $this->_helpfilteroption($currency);
     $curr = $this->_helpfilteroption($currency);
     array_unshift($curr, array('id' => '-1', "name" => "សងប្រភេទប្រាក់ផ្សេង", 'symbol' => 'other'));
     $this->view->pay_currencytype = $curr;
     $db_rate = new Application_Model_DbTable_DbPayment();
     $this->view->rate = $db_rate->getRateAll();
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:31,代码来源:IndexController.php

示例5: addAction

 public function addAction()
 {
     if ($this->getRequest()->isPost()) {
         try {
             $data = $this->getRequest()->getPost();
             $db = new Application_Model_DbTable_DbCustomerLoan();
             $db->AddNewTranLoan($data);
             Application_Form_FrmMessage::message('ការបញ្ចូលប្រតិបត្តិការ​ដោយជោគ​ជ័យ');
         } catch (Exception $e) {
             echo $e->getMessage();
             exit;
             Application_Form_FrmMessage::Sucessfull('ការបញ្ចូលប្រតិបត្តិការ​ដោយជោគ​ជ័យ​​បរា​ជ័យ', self::REDIRECT_URL . '/index/index');
         }
     }
     $session_user = new Zend_Session_Namespace('auth');
     $this->view->user_name = $session_user->last_name . ' ' . $session_user->first_name;
     $db_keycode = new Application_Model_DbTable_DbKeycode();
     $this->view->keycode = $db_keycode->getKeyCodeMiniInv();
     $sender = new Application_Model_DbTable_DbSender();
     $_sender = $sender->getAllSenderKbank(2);
     array_unshift($_sender, array('id' => '-1', "name" => "បន្ថែមឈ្មោះអ្នកផ្ញើរ", 'tel' => ''));
     $this->view->sender = $_sender;
     $cur = new Application_Model_DbTable_DbCurrencies();
     $this->view->invoice_no = Application_Model_GlobalClass::getInvoiceWithdraw(5);
     $db_rate = new Application_Model_DbTable_DbRate();
     $this->view->rate = $db_rate->getCurrentRate();
     $cur = new Application_Model_DbTable_DbCurrencies();
     $this->view->currency = $cur->getCurrencyList();
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:29,代码来源:IndexController.php


注:本文中的Application_Model_GlobalClass::getInvoiceWithdraw方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。