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

oa付款单

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