提交 9c65a612 authored 作者: fengzy's avatar fengzy

测试付款单

上级 3bebd9e8
...@@ -97,7 +97,7 @@ class flow_oafkClassModel extends flowModel ...@@ -97,7 +97,7 @@ class flow_oafkClassModel extends flowModel
$cbzxid= $vo['cost_id']; $cbzxid= $vo['cost_id'];
$model = 'c_fund_account'; $model = 'c_fund_account';
$sql = " cost_id ='$cbzxid' and status = 1 and is_default=1"; $sql = " cost_id ='$cbzxid' and status = 1 and is_default=1";
$data = m($model)->getone($sql,'id,name,account_balance'); $data = m($model)->getone($sql,'id,name,account_balance,freeze_amount');
$zfarr = array( $zfarr = array(
'account_balance' =>$data['account_balance']-$vo['amount'], 'account_balance' =>$data['account_balance']-$vo['amount'],
...@@ -105,6 +105,12 @@ class flow_oafkClassModel extends flowModel ...@@ -105,6 +105,12 @@ class flow_oafkClassModel extends flowModel
$id=$data['id']; $id=$data['id'];
m('c_fund_account')->update($zfarr,"`id`='$id'"); m('c_fund_account')->update($zfarr,"`id`='$id'");
$freeze = array(
'freeze_amount' => $data['freeze_amount'] - $vo['amount'],
);
m('c_fund_account')->update($freeze, "`id`='$id'");
// 成本中心 amount 变更 // 成本中心 amount 变更
$cbzx = substr($cbzxid,0,strrpos($cbzxid,"(")); $cbzx = substr($cbzxid,0,strrpos($cbzxid,"("));
$cbzxsql = " code ='$cbzx' and status = 1"; $cbzxsql = " code ='$cbzx' and status = 1";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论