提交 91e0809d authored 作者: fengzy's avatar fengzy

资金管理

上级 75aa3806
...@@ -18,19 +18,19 @@ class flow_fund_depositClassModel extends flowModel ...@@ -18,19 +18,19 @@ class flow_fund_depositClassModel extends flowModel
//提交时调用 //提交时调用
protected function flowsubmit($na, $sm){ protected function flowsubmit($na, $sm){
$name=$this->rs['toaccount']; $name=$this->rs['toaccount'];
$data=m('c_fund_account')->getone("`name`='$name'"); $data=m('c_fund_account')->getone("`name`='$name'");
$zfarr = array( $zfarr = array(
'account_balance' =>$this->rs['trans_amount']+$data['account_balance'], 'account_balance' =>$this->rs['trans_amount']+$data['account_balance'],
); );
m('c_fund_account')->update($zfarr,"`name`='$name'"); m('c_fund_account')->update($zfarr,"`name`='$name'");
$id=$this->rs['id']; $id=$this->rs['id'];
$account_balance=$this->rs['trans_amount']+$data['account_balance'];//当前余额 $account_balance=$this->rs['trans_amount']+$data['account_balance'];//当前余额
$detail = array( $detail = array(
'account_balance' =>$account_balance, 'account_balance' =>$account_balance,
); );
m('c_fund_detail')->update($detail,"`id`='$id'"); m('c_fund_detail')->update($detail,"`id`='$id'");
...@@ -42,6 +42,7 @@ class flow_fund_depositClassModel extends flowModel ...@@ -42,6 +42,7 @@ class flow_fund_depositClassModel extends flowModel
'account_balance' =>$data['account_balance']+$this->rs['trans_amount'], 'account_balance' =>$data['account_balance']+$this->rs['trans_amount'],
'trans_numb' => $this->rs['trans_numb'], 'trans_numb' => $this->rs['trans_numb'],
'create_time' =>$this->rs['create_time'], 'create_time' =>$this->rs['create_time'],
'uid' =>$this->rs['uid'],
); );
m('c_account_detail')->insert($toacc_detail); m('c_account_detail')->insert($toacc_detail);
......
...@@ -76,6 +76,7 @@ class flow_fund_transferClassModel extends flowModel ...@@ -76,6 +76,7 @@ class flow_fund_transferClassModel extends flowModel
'account_balance' =>$data['account_balance']-$this->rs['trans_amount'], 'account_balance' =>$data['account_balance']-$this->rs['trans_amount'],
'trans_numb' => $this->rs['trans_numb'], 'trans_numb' => $this->rs['trans_numb'],
'create_time' =>$this->rs['create_time'], 'create_time' =>$this->rs['create_time'],
'uid' =>$this->rs['uid'],
); );
m('c_account_detail')->insert($acc_detail); m('c_account_detail')->insert($acc_detail);
...@@ -86,6 +87,7 @@ class flow_fund_transferClassModel extends flowModel ...@@ -86,6 +87,7 @@ class flow_fund_transferClassModel extends flowModel
'account_balance' =>$toaccount_list['account_balance']+$this->rs['trans_amount'], 'account_balance' =>$toaccount_list['account_balance']+$this->rs['trans_amount'],
'trans_numb' => $this->rs['trans_numb'], 'trans_numb' => $this->rs['trans_numb'],
'create_time' =>$this->rs['create_time'], 'create_time' =>$this->rs['create_time'],
'uid' =>$this->rs['uid'],
); );
m('c_account_detail')->insert($toacc_detail); m('c_account_detail')->insert($toacc_detail);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论