提交 0a7e96cf authored 作者: fengzy's avatar fengzy

费用报销test

上级 88b61daa
...@@ -167,9 +167,9 @@ class flow_emfkClassModel extends flowModel ...@@ -167,9 +167,9 @@ class flow_emfkClassModel extends flowModel
$model['Model']['FDATE']=$applydt; $model['Model']['FDATE']=$applydt;
$model['Model']['FCONTACTUNIT']['FNumber']=$supplier['number']; $model['Model']['FCONTACTUNIT']['FNumber']=$supplier['number'];
$model['Model']['F_PAEZ_OADJBH']=$this->rs['docnum'];; $model['Model']['F_PAEZ_OADJBH']=$this->rs['docnum'];;
$model['Model']['FRECTUNIT']['FNumber']=$supplier['number']; $model['Model']['FRECTUNIT']['FNumber']=$supplier['number'];
$model['Model']['FPAYBILLENTRY']=$arr['FPAYBILLENTRY']; $model['Model']['FPAYBILLENTRY']=$arr['FPAYBILLENTRY'];
$data_model=json_encode($model); $data_model=json_encode($model);
......
...@@ -250,12 +250,12 @@ class flow_finfybxClassModel extends flowModel ...@@ -250,12 +250,12 @@ 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,type,freeze_amount,account_balance');//查询账户表成本中心 $cost = m('c_fund_account')->getone($sql, 'id,type,name,freeze_amount,account_balance');//查询账户表成本中心
if($cost['type']=='1'){
if(($cost['account_balance']-$cost['freeze_amount'])<$vo['money']){ if(($cost['account_balance']-$cost['freeze_amount'])<$vo['money']){
return "账户余额不足";die; return $cost['name']."账户余额不足";die;
} }
}
$id=$cost['id']; $id=$cost['id'];
$c_withhold = array( $c_withhold = array(
...@@ -283,13 +283,13 @@ class flow_finfybxClassModel extends flowModel ...@@ -283,13 +283,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,type,freeze_amount,account_balance');//查询账户表成本中心 $cost = m('c_fund_account')->getone($sql, 'id,type,name,freeze_amount,account_balance');//查询账户表成本中心
if($cost['type']=='1'){
if(($cost['account_balance']-$cost['freeze_amount'])<$vo['money']){ if(($cost['account_balance']-$cost['freeze_amount'])<$vo['money']){
return "账户余额不足";die; return $cost['name']."账户余额不足";die;
} }
}
$id=$cost['id']; $id=$cost['id'];
$c_withhold = array( $c_withhold = array(
...@@ -497,7 +497,7 @@ class flow_finfybxClassModel extends flowModel ...@@ -497,7 +497,7 @@ class flow_finfybxClassModel extends flowModel
$model['Model']['FDATE']=$applydt; $model['Model']['FDATE']=$applydt;
$model['Model']['FDEPARTMENT']['FNumber']=self::dept($this->rs['applicationdpt']); $model['Model']['FDEPARTMENT']['FNumber']=self::dept($this->rs['applicationdpt']);
$model['Model']['FCONTACTUNIT']['FNumber']=$gonncode; $model['Model']['FCONTACTUNIT']['FNumber']=$gonncode;
$model['Model']['F_PAEZ_OADJBH']=$this->rs['docnum'];; $model['Model']['F_PAEZ_OADJBH']=$this->rs['docnum'];
$model['Model']['FRECTUNIT']['FNumber']=$gonncode; $model['Model']['FRECTUNIT']['FNumber']=$gonncode;
$model['Model']['FPAYAPPLYENTRY']=$arr['FPAYAPPLYENTRY']; $model['Model']['FPAYAPPLYENTRY']=$arr['FPAYAPPLYENTRY'];
......
...@@ -257,13 +257,13 @@ protected function flowcheckafter($zt, $sm){ ...@@ -257,13 +257,13 @@ protected function flowcheckafter($zt, $sm){
foreach ($data as $key => $vo) { foreach ($data as $key => $vo) {
$cbzx_code=$vo['cbzx_code']; $cbzx_code=$vo['cbzx_code'];
$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,type,freeze_amount,account_balance');//查询账户表成本中心 $cost = m('c_fund_account')->getone($sql, 'id,type,name,freeze_amount,account_balance');//查询账户表成本中心
if($cost['type']=='1'){
if(($cost['account_balance']-$cost['freeze_amount'])<$vo['charge_amount']){ if(($cost['account_balance']-$cost['freeze_amount'])<$vo['charge_amount']){
return "账户余额不足";die; return $cost['name']."余额不足";die;
} }
}
$id=$cost['id']; $id=$cost['id'];
$c_withhold = array( $c_withhold = array(
...@@ -293,11 +293,10 @@ protected function flowcheckafter($zt, $sm){ ...@@ -293,11 +293,10 @@ protected function flowcheckafter($zt, $sm){
$cbzx_code=$vo['cbzx_code']; $cbzx_code=$vo['cbzx_code'];
$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,type,freeze_amount,account_balance');//查询账户表成本中心id $cost = m('c_fund_account')->getone($sql, 'id,type,freeze_amount,account_balance');//查询账户表成本中心id
if($cost['type']=='1'){
if(($cost['account_balance']-$cost['freeze_amount'])<$vo['charge_amount']){ if(($cost['account_balance']-$cost['freeze_amount'])<$vo['charge_amount']){
return "账户余额不足";die; return $cost['name']."余额不足";die;
} }
}
$id=$cost['id']; $id=$cost['id'];
$c_withhold = array( $c_withhold = array(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论