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

'测试'

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