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

费用报销脚本

上级 e19ec067
...@@ -275,10 +275,21 @@ class flow_projectfkClassModel extends flowModel ...@@ -275,10 +275,21 @@ class flow_projectfkClassModel extends flowModel
if($flowid['nowcheckid']==$checkid){ if($flowid['nowcheckid']==$checkid){
$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');
$sumamount=0; // $sumamount=0;
foreach ($data as $v) { // foreach ($data as $v) {
$sumamount +=(int)$v['amount']; // $sumamount +=(int)$v['amount'];
// }
foreach($data as $v){
if(!isset($ret[$v['cbzxid']])){
$ret[$v['cbzxid']] = $v;
}else{
$ret[$v['cbzxid']]['amount'] += $v['amount'];
}
} }
echo "<pre>";
print_r(array_values($ret));
foreach ($data as $key => $vo) { foreach ($data as $key => $vo) {
$project=self::project(substr($vo['cbzxid'],0,strpos($vo['cbzxid'], "("))); $project=self::project(substr($vo['cbzxid'],0,strpos($vo['cbzxid'], "(")));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论