提交 5c3f21a9 authored 作者: fengzy's avatar fengzy

oa付款单

上级 6793ced1
...@@ -52,9 +52,14 @@ class flow_finfybxClassModel extends flowModel ...@@ -52,9 +52,14 @@ class flow_finfybxClassModel extends flowModel
foreach ($data as $key => $vo) { foreach ($data as $key => $vo) {
$cbzx_code=$vo['cbxmid']; $cbzx_code=$vo['cbxmid'];
$sql = " cost_id='$cbzx_code' and status = 1 and is_default=1"; $sql = " cost_id='$cbzx_code' and status = 1 and is_default=1";
$cost = m('c_fund_account')->getone($sql, 'id,freeze_amount');//查询账户表成本中心id $cost = m('c_fund_account')->getone($sql, 'id,type,freeze_amount,account_balance');//查询账户表成本中心
if($cost['type']=='1'){
if(($cost['account_balance']-$cost['freeze_amount'])<$vo['money']){
return "账户余额不足";die;
}
}
$id=$cost['id']; $id=$cost['id'];
$c_withhold = array( $c_withhold = array(
'fund_account_id' => $id, 'fund_account_id' => $id,
'docnum' => $this->rs['docnum'], 'docnum' => $this->rs['docnum'],
...@@ -80,7 +85,13 @@ class flow_finfybxClassModel extends flowModel ...@@ -80,7 +85,13 @@ class flow_finfybxClassModel extends flowModel
foreach ($data as $key => $vo) { foreach ($data as $key => $vo) {
$cbzx_code=$vo['cbxmid']; $cbzx_code=$vo['cbxmid'];
$sql = " cost_id='$cbzx_code' and status = 1 and is_default=1"; $sql = " cost_id='$cbzx_code' and status = 1 and is_default=1";
$cost = m('c_fund_account')->getone($sql, 'id,freeze_amount');//查询账户表成本中心id $cost = m('c_fund_account')->getone($sql, 'id,type,freeze_amount,account_balance');//查询账户表成本中心
if($cost['type']=='1'){
if(($cost['account_balance']-$cost['freeze_amount'])<$vo['money']){
return "账户余额不足";die;
}
}
$id=$cost['id']; $id=$cost['id'];
$c_withhold = array( $c_withhold = array(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论