提交 2c43458d authored 作者: fengzy's avatar fengzy

费用报销脚本

上级 962bb9ee
......@@ -22,7 +22,6 @@ class flow_projectfkClassModel extends flowModel
//明细
$projectfk=$this->db->getrows('oa_c_projectfk_details',"mid='".$this->rs['id']."'");
var_dump($this->rs);die;
$arr=[];
foreach ($projectfk as $k=> $value) {
......@@ -164,13 +163,9 @@ var_dump($this->rs);die;
$model['Model']['FRECTUNIT']['FNumber']=$supplier['number'];
$model['Model']['FPAYBILLENTRY']=$arr['FPAYBILLENTRY'];
$model['Model']['FDepartment']['FNumber']=self::deptname($applicationdpt);
// "FSETTLEORGID": {
// "FNumber": "1000"
// },
$model['Model']['FSETTLEORGID']['FNumber']=self::getorg($this->rs['org']);
$model['Model']['FPAYORGID']['FNumber']=self::getorg($this->rs['org']);
// "FSETTLEORGID": {
// "FNumber": "1000"
// },
$data_model=json_encode($model);
$data = array(
......@@ -216,7 +211,13 @@ var_dump($this->rs);die;
}
static function getorg($name)
{
$data = m('option')->getone("num='organization'", 'id,name');
$orglist = m('option')->getone("pid='".$data['id']."' and name='".$name."'", 'name,num');
return $orglist['num'];
}
public static function dept($data)
{
$sql=" id= '$data'";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论