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

oa付款单

上级 39f78a74
......@@ -127,10 +127,17 @@ class flow_finfybxClassModel extends flowModel
$fund_account_cost = m('c_fund_account')->getone($sql, 'id,freeze_amount');
$id=$fund_account_cost['id'];
$freeze = array(
'freeze_amount' => $fund_account_cost['freeze_amount'] - $vo['amount'],
);
if($fund_account_cost['freeze_amount']==0){
$freeze = array(
'freeze_amount' => $vo['amount'],
);
}else{
$freeze = array(
'freeze_amount' => $fund_account_cost['freeze_amount'] - $vo['amount'],
);
}
m('c_fund_account')->update($freeze, "`id`='$id'");
}
......
......@@ -29,12 +29,9 @@ class flow_fund_depositClassModel extends flowModel
$account_balance=$this->rs['trans_amount']+$data['account_balance'];//当前余额
$detail = array(
'account_balance' =>$account_balance,
'opt_type' => 1,
);
m('c_fund_detail')->update($detail,"`id`='$id'");
m('c_fund_detail')->update($detail,"`id`='$id'");
$toacc_detail = array(
'account' => $this->rs['toaccount'],
'opt_type' => 1,
......
......@@ -213,7 +213,7 @@ class flow_oafkClassModel extends flowModel
$cloudUrl = "http://36.110.39.211/k3cloud/";
//登陆参数
$data = array(
'5ef2c166ad1afa',//帐套Id
'5e64f6ff0bd47f',//帐套Id
'Administrator',//用户名
'666666',//密码
'2052'//语言标识359010087
......@@ -256,85 +256,88 @@ class flow_oafkClassModel extends flowModel
foreach ($oafk_details as $k=> $value) {
foreach ($value as $key => $val) {
switch ($key) {
case 'charge_amount':
$arr['FPAYAPPLYENTRY'][$k]['FAPPLYAMOUNTFOR']=$val;
$arr['FPAYBILLENTRY'][$k]['FPAYTOTALAMOUNTFOR']=$val;
$arr['FPAYBILLENTRY'][$k]['FPAYAMOUNTFOR_E']=$val;
$arr['FPAYBILLENTRY'][$k]['FSETTLEPAYAMOUNTFOR']=$val;
$arr['FPAYBILLENTRY'][$k]['FREALPAYAMOUNTFOR_D']=$val;
break;
case 'cbzx_code':
$arr['FPAYBILLENTRY'][$k]['F_PAEZ_Cbzx']['FNUMBER']=$val;
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'];
$arr['FPAYBILLENTRY'][$k]['FSETTLETYPEID']['FNumber']='JSFS04_SYS';
$arr['FPAYBILLENTRY'][$k]['FPURPOSEID']['FNumber']='SFKYT12_SYS';
$arr['FPAYBILLENTRY'][$k]['FENDDATE']=$this->rs['applydt'].' 00:00:00';
$arr['FPAYBILLENTRY'][$k]['FPOSTDATE']=$this->rs['applydt'].' 00:00:00';
$arr['FPAYBILLENTRY'][$k]['FACCOUNTID']['FNumber'] = $data['bank_code'];
// $arr['FPAYBILLENTRY'][$k]['FEACHCCOUNTNAME'] = $data['bank_holder'];
// $arr['FPAYBILLENTRY'][$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"
},
"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"
}
}';
"Creator": "",
"NeedUpDateFields": [],
"NeedReturnFields": [],
"IsDeleteEntry": "true",
"SubSystemId": "",
"IsVerifyBaseDataField": "false",
"IsEntryBatchFill": "true",
"ValidateFlag": "true",
"NumberSearch": "true",
"InterationFlags": "",
"IsAutoSubmitAndAudit": "false",
"Model": {
"FID": 0,
"FBillTypeID": {
"FNUMBER": "FKDLX06_SYS"
},
"FDATE": "2020-07-02 00:00:00",
"FCONTACTUNITTYPE": "BD_Supplier",
"FCONTACTUNIT": {
"FNumber": "GDGYS-0001"
},
"FRECTUNITTYPE": "BD_Supplier",
"FRECTUNIT": {
"FNumber": "GDGYS-0001"
},
"FISINIT": false,
"FCURRENCYID": {
"FNumber": "PRE001"
},
"FEXCHANGERATE": 1.0,
"FSETTLERATE": 1.0,
"FSETTLEORGID": {
"FNumber": "1000"
},
"FDOCUMENTSTATUS": "Z",
"FCancelStatus": "A",
"FPAYORGID": {
"FNumber": "1000"
},
"FISSAMEORG": true,
"FIsCredit": false,
"FSETTLECUR": {
"FNUMBER": "PRE001"
},
"FIsWriteOff": false,
"FREALPAY": false,
"FREMARK": "211111112121",
"FISCARRYRATE": false,
"FSETTLEMAINBOOKID": {
"FNUMBER": "PRE001"
},
"F_PAEZ_Cbzx1": {
"FNUMBER": "CBZX000022"
},
"F_PAEZ_OADJBH": "321123213213"
}
}';
......@@ -342,15 +345,16 @@ class flow_oafkClassModel extends flowModel
// $model['Model']['F_PAEZ_Cbzx']['FNUMBER'] = $cbxmid;
$model['Model']['FCREATORID']['FNUMBER'] = $gonncode;
$model['Model']['FDATE'] = $applydt;
$model['Model']['FREMARK'] = $this->rs['paymentBy'];;
$model['Model']['F_PAEZ_OADJBH'] = $this->rs['docnum'];;
// $model['Model']['FCONTACTUNIT']['FNumber']=$suppliername;
// $model['Model']['FRECTUNIT']['FNumber']=$suppliername;
$model['Model']['FPAYAPPLYENTRY'] = $arr['FPAYAPPLYENTRY'];
$model['Model']['FPAYBILLENTRY'] = $arr['FPAYBILLENTRY'];
$data_model = json_encode($model);
$data = array(
'CN_PAYAPPLY',//业务对象标识FormId
'AP_PAYBILL',//业务对象标识FormId
$data_model//具体Json字串
);
......@@ -404,7 +408,7 @@ class flow_oafkClassModel extends flowModel
'InterationFlags': ''
}";
$data = array(
'CN_PAYAPPLY',//业务对象标识FormId
'AP_PAYBILL',//业务对象标识FormId
$data_model//具体Json字串
);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论