提交 153c807a authored 作者: fengzy's avatar fengzy

'测试'

上级 4904bec0
...@@ -72,7 +72,7 @@ class flow_emfkClassModel extends flowModel ...@@ -72,7 +72,7 @@ class flow_emfkClassModel extends flowModel
$allcheckid=explode(',',$flow_bill['allcheckid']); $allcheckid=explode(',',$flow_bill['allcheckid']);
$optionid = m('option')->getone("num = 'em_manager' ",'id'); $optionid = m('option')->getone("num = 'em_manager' ",'id');
$optionid=$optionid['id']; $optionid=$optionid['id'];
$option = m('option')->getall("num = '$optionid' and num =1 order by sort desc",'num,name,value,sort'); $option = m('option')->getall("pid = '$optionid' and num =1 order by sort desc",'num,name,value,sort');
foreach ($option as $key => $value) { foreach ($option as $key => $value) {
if(in_array($value['value'], $allcheckid)){ if(in_array($value['value'], $allcheckid)){
$checkid= $value['value']; $checkid= $value['value'];
......
...@@ -43,9 +43,9 @@ class flow_projectfkClassModel extends flowModel ...@@ -43,9 +43,9 @@ class flow_projectfkClassModel extends flowModel
$sql = " mid ='$id' and `table`='c_projectfk' "; $sql = " mid ='$id' and `table`='c_projectfk' ";
$flow_bill = m('flow_bill')->getone($sql,'allcheckid'); $flow_bill = m('flow_bill')->getone($sql,'allcheckid');
$allcheckid=explode(',',$flow_bill['allcheckid']); $allcheckid=explode(',',$flow_bill['allcheckid']);
$optionid = m('option')->getone("num = 'em_manager' ",'id'); $optionid = m('option')->getone("num = 'pro_manager' ",'id');
$optionid=$optionid['id']; $optionid=$optionid['id'];
$option = m('option')->getall("num = '$optionid' and num =1 order by sort desc",'num,name,value,sort'); $option = m('option')->getall("pid = '$optionid' and num =1 order by sort desc",'num,name,value,sort');
foreach ($option as $key => $value) { foreach ($option as $key => $value) {
if(in_array($value['value'], $allcheckid)){ if(in_array($value['value'], $allcheckid)){
$checkid= $value['value']; $checkid= $value['value'];
...@@ -73,16 +73,16 @@ class flow_projectfkClassModel extends flowModel ...@@ -73,16 +73,16 @@ class flow_projectfkClassModel extends flowModel
foreach ($data as $key => $vo) { foreach ($data as $key => $vo) {
$project=self::project($vo['cbzxid']); // $project=self::project($vo['cbzxid']);
//
//
$cbzx_code= self::dept($project['data'][0]['jz_cur_dept']); // $cbzx_code= self::dept($project['data'][0]['jz_cur_dept']);
$cbzx_code='WJFX-1-16008';
$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,name,type,freeze_amount,account_balance');//查询账户表成本中心id
if($cost['type']=='1'){ if($cost['type']=='1'){
if(($cost['account_balance']-$cost['freeze_amount'])<$vo['amount']){ if(($cost['account_balance']-$cost['freeze_amount'])<$vo['amount']){
return "账户余额不足";die; return $cost['name']."余额不足";die;
} }
} }
$id=$cost['id']; $id=$cost['id'];
...@@ -114,10 +114,10 @@ class flow_projectfkClassModel extends flowModel ...@@ -114,10 +114,10 @@ class flow_projectfkClassModel extends flowModel
foreach ($withhold_cost as $key => $vo) { foreach ($withhold_cost as $key => $vo) {
//减去冻结金额 //减去冻结金额
$project=self::project($vo['cost_id']); // $project=self::project($vo['cost_id']);
//
$cost_id= self::dept($project['data'][0]['jz_cur_dept']); // $cost_id= self::dept($project['data'][0]['jz_cur_dept']);
$cbzx_code='WJFX-1-16008';
$sql = " cost_id='$cost_id' and status = 1 and is_default=1"; $sql = " cost_id='$cost_id' and status = 1 and is_default=1";
$fund_account_cost = m('c_fund_account')->getone($sql, 'id,freeze_amount'); $fund_account_cost = m('c_fund_account')->getone($sql, 'id,freeze_amount');
...@@ -145,9 +145,9 @@ class flow_projectfkClassModel extends flowModel ...@@ -145,9 +145,9 @@ class flow_projectfkClassModel extends flowModel
foreach ($withhold_cost as $key => $vo) { foreach ($withhold_cost as $key => $vo) {
// 扣除账户余额 c_fund_account account_balance // 扣除账户余额 c_fund_account account_balance
$project=self::project($vo['cost_id']); // $project=self::project($vo['cost_id']);
$cbzxid= self::dept($project['data'][0]['jz_cur_dept']); // $cbzxid= self::dept($project['data'][0]['jz_cur_dept']);
$cbzx_code='WJFX-1-16008';
$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,freeze_amount'); $data = m($model)->getone($sql,'id,name,account_balance,freeze_amount');
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论