提交 05dcde4f authored 作者: fengzy's avatar fengzy

oa付款单

上级 06a90f9f
......@@ -248,80 +248,103 @@ class flow_oafkClassModel extends flowModel
$paymentMethod = $this->rs['paymentMethod'];//付款方式
$cbxmid = $this->rs['cbzxid'];//成本中心
$cbxmid = substr($cbxmid, 0, strpos($cbxmid, "("));
$oafk_details=$this->db->getrows('oa_c_fund_details_fk',"mid='".$this->rs['id']."'");
$arr=[];
foreach ($oafk_details as $k=> $value) {
foreach ($value as $key => $val) {
switch ($key) {
case 'charge_amount':
$arr['FPAYAPPLYENTRY'][$k]['FAPPLYAMOUNTFOR']=$val;
break;
break;
default:
$arr['FPAYAPPLYENTRY'][$k]['FSETTLETYPEID']['FNumber']='JSFS04_SYS';
$arr['FPAYAPPLYENTRY'][$k]['FPAYPURPOSEID']['FNumber']='SFKYT08_SYS';
$arr['FPAYAPPLYENTRY'][$k]['FENDDATE']=$this->rs['applydt'].' 00:00:00';
$arr['FPAYAPPLYENTRY'][$k]['FEXPECTPAYDATE']=$this->rs['applydt'].' 00:00:00';
$arr['FPAYAPPLYENTRY'][$k]['FEACHBANKACCOUNT'] = $data['bank_code'];
$arr['FPAYAPPLYENTRY'][$k]['FEACHCCOUNTNAME'] = $data['bank_holder'];
$arr['FPAYAPPLYENTRY'][$k]['FEACHBANKNAME'] = $data['open_bank_name'];
break;
}
}
}
$data_model = '{
"Creator": "",
"NeedUpDateFields": [],
"NeedReturnFields": [],
"IsDeleteEntry": "true",
"SubSystemId": "",
"IsVerifyBaseDataField": "false",
"IsEntryBatchFill": "true",
"ValidateFlag": "true",
"NumberSearch": "true",
"InterationFlags": "",
"IsAutoSubmitAndAudit": "false",
"Model": {
"FID": 0,
"FBILLTYPEID": {
"FNUMBER": "FKSQ008"
},
"FCREATORID": {
"FNUMBER": ""
},
"FDATE": "2020-03-02 00:00:00",
"FCONTACTUNITTYPE": "BD_Supplier",
"FCONTACTUNIT": {
"FNumber": "GSGYS-0005"
},
"FRECTUNITTYPE": "BD_Supplier",
"FRECTUNIT": {
"FNumber": "GSGYS-0005"
},
"FCURRENCYID": {
"FNumber": "PRE001"
},
"FAPPLYORGID": {
"FNumber": "1000"
},
"FPAYORGID": {
"FNumber": "1000"
},
"FSETTLEORGID": {
"FNumber": "1000"
},
"FPURCHASEORGID": {
"FNumber": "1000"
},
"FDOCUMENTSTATUS": "Z",
"FCANCELSTATUS": "A",
"FMAINBOOKID": {
"FNUMBER": "PRE001"
},
"FIsCredit": false,
"FSETTLECUR": {
"FNUMBER": "PRE001"
},
"FISCARRYRATE": false,
"F_PAEZ_Cbzx": {
"FNUMBER": "GS.BJ.B01.02"
"Creator": "",
"NeedUpDateFields": [],
"NeedReturnFields": [],
"IsDeleteEntry": "true",
"SubSystemId": "",
"IsVerifyBaseDataField": "false",
"IsEntryBatchFill": "true",
"ValidateFlag": "true",
"NumberSearch": "true",
"InterationFlags": "",
"IsAutoSubmitAndAudit": "false",
"Model": {
"FID": 0,
"FBILLTYPEID": {
"FNUMBER": "FKSQ008"
},
"FDATE": "2020-06-29 00:00:00",
"FCONTACTUNITTYPE": "BD_Supplier",
"FCONTACTUNIT": {
"FNumber": "GDGYS-0003"
},
"FRECTUNITTYPE": "BD_Supplier",
"FRECTUNIT": {
"FNumber": "GDGYS-0003"
},
"FCURRENCYID": {
"FNumber": "PRE001"
},
"FAPPLYORGID": {
"FNumber": "1000"
},
"FPAYORGID": {
"FNumber": "1000"
},
"FSETTLEORGID": {
"FNumber": "1000"
},
"FPURCHASEORGID": {
"FNumber": "1000"
},
"FDOCUMENTSTATUS": "Z",
"FCANCELSTATUS": "A",
"FMAINBOOKID": {
"FNUMBER": "PRE001"
},
"FIsCredit": false,
"FSETTLECUR": {
"FNUMBER": "PRE001"
},
"FISCARRYRATE": false,
"F_PAEZ_Cbzx": {
"FNUMBER": "GS.BJ.B01.02"
},
"F_PAEZ_OADJBH": "213123213",
}
}
}';
}';
$arr['FPAYAPPLYENTRY'][0]['FENDDATE'] = $this->rs['applydt'] . ' 00:00:00';
$arr['FPAYAPPLYENTRY'][0]['FEXPECTPAYDATE'] = $this->rs['applydt'] . ' 00:00:00';
$arr['FPAYAPPLYENTRY'][0]['FAPPLYAMOUNTFOR'] = intval($amountOfThisPayment);
$arr['FPAYAPPLYENTRY'][0]['FEACHBANKACCOUNT'] = $data['bank_code'];
$arr['FPAYAPPLYENTRY'][0]['FEACHCCOUNTNAME'] = $data['bank_holder'];
$arr['FPAYAPPLYENTRY'][0]['FEACHBANKNAME'] = $data['open_bank_name'];
$model = json_decode($data_model, true);
$model['Model']['F_PAEZ_Cbzx']['FNUMBER'] = $cbxmid;
$model['Model']['FCREATORID']['FNUMBER'] = $gonncode;
$model['Model']['FDATE'] = $applydt;
// $model['Model']['FCONTACTUNIT']['FNumber']=$suppliername;
// $model['Model']['FRECTUNIT']['FNumber']=$suppliername;
$model['Model']['F_PAEZ_OADJBH'] = $this->rs['docnum'];;
$model['Model']['FCONTACTUNIT']['FNumber']=$suppliername;
$model['Model']['FRECTUNIT']['FNumber']=$suppliername;
$model['Model']['FPAYAPPLYENTRY'] = $arr['FPAYAPPLYENTRY'];
......@@ -334,6 +357,7 @@ class flow_oafkClassModel extends flowModel
$post_content = self::create_postdata($data);
$result = self::invoke_add($cloudUrl, $post_content, $cookie_jar);
$array = json_decode($result, true);
var_dump($array);
if ($array['Result']['ResponseStatus']['IsSuccess']) {
$num = $array['Result']['Number'];
$this->update("`fbillno`='$num'", $this->rs['id']);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论