提交 d032f014 authored 作者: fengzy's avatar fengzy

'测试'

上级 1cf64c92
...@@ -45,7 +45,7 @@ class flow_projectfkClassModel extends flowModel ...@@ -45,7 +45,7 @@ class flow_projectfkClassModel extends flowModel
$allcheckid=explode(',',$flow_bill['allcheckid']); $allcheckid=explode(',',$flow_bill['allcheckid']);
$optionid = m('option')->getone("num = 'pro_manager' ",'id'); $optionid = m('option')->getone("num = 'pro_manager' ",'id');
$optionid=$optionid['id']; $optionid=$optionid['id'];
$option = m('option')->getall("pid = '$optionid' and num =1 order by sort desc",'num,name,value,sort'); $option = m('option')->getall("num = '$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'];
...@@ -72,10 +72,10 @@ class flow_projectfkClassModel extends flowModel ...@@ -72,10 +72,10 @@ class flow_projectfkClassModel extends flowModel
$data = m('c_projectfk_details')->getall('mid='.$this->rs['id'], 'id,cbzxid,amount'); $data = m('c_projectfk_details')->getall('mid='.$this->rs['id'], 'id,cbzxid,amount');
foreach ($data as $key => $vo) { foreach ($data as $key => $vo) {
$pro_code='WJFX-1-16008';
// $project=self::project($vo['cbzxid']); // $project=self::project($vo['cbzxid']);
$project=self::project($pro_code); $project=self::project('WHDF-1-03999');
var_dump($project);die;
$cbzx_code= self::dept($project['data'][0]['jz_cur_dept']); $cbzx_code= self::dept($project['data'][0]['jz_cur_dept']);
$sql = " cost_id='$cbzx_code' and status = 1 and is_default=1"; $sql = " cost_id='$cbzx_code' and status = 1 and is_default=1";
...@@ -85,7 +85,6 @@ var_dump($project);die; ...@@ -85,7 +85,6 @@ var_dump($project);die;
return $cost['name']."余额不足";die; return $cost['name']."余额不足";die;
} }
} }
$id=$cost['id']; $id=$cost['id'];
$c_withhold = array( $c_withhold = array(
...@@ -112,12 +111,13 @@ var_dump($project);die; ...@@ -112,12 +111,13 @@ var_dump($project);die;
$docnum=$this->rs['docnum']; $docnum=$this->rs['docnum'];
//将单据状态作废余额 //将单据状态作废余额
$withhold_cost = m('c_withhold_projectfk')->getall("docnum='$docnum' and status =1", 'id,cost_id,amount'); $withhold_cost = m('c_withhold_projectfk')->getall("docnum='$docnum' and status =1", 'id,cost_id,amount');
foreach ($withhold_cost as $key => $vo) { foreach ($withhold_cost as $key => $vo) {
//减去冻结金额 //减去冻结金额
$pro_code='WJFX-1-16008'; $project=self::project($vo['cost_id']);
$project=self::project($pro_code);
//$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']);
$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,7 @@ var_dump($project);die; ...@@ -145,9 +145,7 @@ var_dump($project);die;
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']);
$procode='WJFX-1-16008';
$project=self::project($procode);
$cbzxid= self::dept($project['data'][0]['jz_cur_dept']); $cbzxid= self::dept($project['data'][0]['jz_cur_dept']);
$model = 'c_fund_account'; $model = 'c_fund_account';
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论