提交 5d82548e authored 作者: fengzy's avatar fengzy

费用报销脚本

上级 65506816
......@@ -157,34 +157,34 @@ class flow_projectfkClassModel extends flowModel
}';
$model=json_decode($data_model,true);
var_dump($model);
// $model['Model']['FDATE']=$applydt;
// $model['Model']['FCONTACTUNIT']['FNumber']=$supplier['number'];
// $model['Model']['F_PAEZ_OADJBH']=$this->rs['docnum'];
// $model['Model']['FRECTUNIT']['FNumber']=$supplier['number'];
// $model['Model']['FPAYBILLENTRY']=$arr['FPAYBILLENTRY'];
// $model['Model']['FDepartment']['FNumber']=self::deptname($applicationdpt);
// $data_model=json_encode($model);
$model['Model']['FDATE']=$applydt;
$model['Model']['FCONTACTUNIT']['FNumber']=$supplier['number'];
$model['Model']['F_PAEZ_OADJBH']=$this->rs['docnum'];
$model['Model']['FRECTUNIT']['FNumber']=$supplier['number'];
$model['Model']['FPAYBILLENTRY']=$arr['FPAYBILLENTRY'];
$model['Model']['FDepartment']['FNumber']=self::deptname($applicationdpt);
// $data = array(
// 'AP_PAYBILL',//业务对象标识FormId
// $data_model//具体Json字串
// );
$data_model=json_encode($model);
// $post_content = self::create_postdata($data);
// $result = self::invoke_add($cloudUrl,$post_content,$cookie_jar);
// $array = json_decode($result,true);
$data = array(
'AP_PAYBILL',//业务对象标识FormId
$data_model//具体Json字串
);
// $num=$array['Result']['Number'];
// if($array['Result']['ResponseStatus']['IsSuccess']){
$post_content = self::create_postdata($data);
$result = self::invoke_add($cloudUrl,$post_content,$cookie_jar);
$array = json_decode($result,true);
// $this->update("`fbillno`='$num'", $this->rs['id']);
// $this->erplog($this->rs['docnum'],'c_projectfk','保存成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],1);
// }else{
$num=$array['Result']['Number'];
if($array['Result']['ResponseStatus']['IsSuccess']){
// $this->erplog($this->rs['docnum'],'c_projectfk','保存失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],1);
// }
$this->update("`fbillno`='$num'", $this->rs['id']);
$this->erplog($this->rs['docnum'],'c_projectfk','保存成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],1);
}else{
$this->erplog($this->rs['docnum'],'c_projectfk','保存失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],1);
}
}
......@@ -217,6 +217,12 @@ var_dump($model);
$cbzxid = m('tmp_department')->getone($sql, 'id,cost');//查询账户表成本中心id
return $cbzxid['cost'];
}
public static function deptname($data)
{
$sql=" name= '$data'";
$data = m('tmp_department')->getone($sql, 'id,number');//查询账户表成本中心id
return $data['number'];
}
public static function project($project_code){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论