提交 3a38a893 authored 作者: fengzy's avatar fengzy

测试付款单

上级 4dfb9479
......@@ -14,14 +14,11 @@ class flow_oafkClassModel extends flowModel
if($na=='编辑'){
var_dump($this->flowcheckname(604));
$this->flowcheckname(604);
}
}
protected function flowcheckname($num){
$sid = '737';
$sna = '王群';
......@@ -30,99 +27,87 @@ class flow_oafkClassModel extends flowModel
}
//审核完成后调用
// protected function flowcheckbefore($zt, $sm){
// if($zt==1){
// $flowid=$this->getflow();
// echo "<pre>";
// var_dump($flowid);die;
// }else{
// echo '444';
// }
// echo "<pre>";
// var_dump($zt);
// echo "111111111111111";
// var_dump($sm);die;
// $deptdata = m('admin')->getone('id='.$this->adminid,'deptname');
// // $deptdata['deptname'];//当前人部门
// $deptdata['deptname']='建设运营二中心合规部';
// $option = m('option')->getall('pid = 1497','num,name');//当前部门
// foreach ($option as $key => $vo) {
// if($vo['name']==$deptdata['deptname']){
// $num= $vo['num'];
// }
// }
// $flowid=$this->getflow();
// echo "<pre>";
// var_dump($flowid);die;
// if($flowid['nowcheckid']==989){
// $mid= $this->rs['id'];
// $datafk = m('c_fund_details_fk')->getall('mid='.$mid);
// foreach ($datafk as $key => $value) {
// // 扣除账户余额 c_fund_account account_balance
// $cbzxid= $value['cbzx_code'];
// $model = 'c_fund_account';
// $sql = " cost_id ='$cbzxid' and status = 1 and is_default=1";
// $data = m($model)->getone($sql,'id,name,account_balance');
// $zfarr = array(
// 'account_balance' =>$data['account_balance']-$value['charge_amount'],
// );
// $id=$data['id'];
// m('c_fund_account')->update($zfarr,"`id`='$id'");
// // 成本中心 amount 变更
// $cbzx = substr($cbzxid,0,strrpos($cbzxid,"("));
// $cbzxsql = " code ='$cbzx' and status = 1";
// $cbzxdata = m('c_cbzx')->getone($cbzxsql,'id,amount');
// $cbarr = array(
// 'amount' =>$cbzxdata['amount']+$value['charge_amount'],
// );
// m('c_cbzx')->update($cbarr,"`code`='$cbzx'");
// //账户明细 c_account_detail
// $account_detail=array(
// 'account' => $data['name'],
// 'opt_type' => 2,
// 'amount' =>$value['charge_amount'],
// 'trans_numb' => $this->rs['docnum'],
// 'account_balance' => $data['account_balance']-$value['charge_amount'],
// 'create_time' =>date("Y-m-d H:i:s"),
// 'uid' =>$this->rs['uid'],
// );
// m('c_account_detail')->insert($account_detail);
// // 业务付款8业务预付款10费用报销11 oa_c_fund_detail
// $fund_detail=array(
// 'trans_numb' =>$this->rs['docnum'],
// 'account' => $data['name'],
// 'toaccount' =>$this->rs['payee'],
// 'trans_amount' =>$value['charge_amount'],
// 'business_type' =>8,
// 'opt_type' =>2,
// 'account_balance'=>$data['account_balance']-$value['charge_amount'],
// 'create_time' =>date("Y-m-d H:i:s"),
// 'uid' =>$this->rs['uid'],
// );
// m('c_fund_detail')->insert($fund_detail);
// }
// }
// }
// //流程全部完成后调用
//二级 或一级审批同意之后进行预扣款
protected function flowcheckbefore($zt, $sm){
//zt 1代表同意
if($zt==1){
$deptdata = m('admin')->getone('id='.$this->adminid,'deptname');
// $deptdata['deptname'];//当前人部门
$deptdata['deptname']='建设运营二中心合规部';
$option = m('option')->getall('pid = 1497','num,name');//当前部门
foreach ($option as $key => $vo) {
if($vo['name']==$deptdata['deptname']){
$num= $vo['num'];
}
}
$flowid=$this->getflow();
echo "<pre>";
var_dump($flowid);die;
}
}
//流程全部完成后调用
// protected function flowcheckfinsh($zt){
// $mid= $this->rs['id'];
// $datafk = m('c_fund_details_fk')->getall('mid='.$mid);
// foreach ($datafk as $key => $value) {
// // 扣除账户余额 c_fund_account account_balance
// $cbzxid= $value['cbzx_code'];
// $model = 'c_fund_account';
// $sql = " cost_id ='$cbzxid' and status = 1 and is_default=1";
// $data = m($model)->getone($sql,'id,name,account_balance');
// $zfarr = array(
// 'account_balance' =>$data['account_balance']-$value['charge_amount'],
// );
// $id=$data['id'];
// m('c_fund_account')->update($zfarr,"`id`='$id'");
// // 成本中心 amount 变更
// $cbzx = substr($cbzxid,0,strrpos($cbzxid,"("));
// $cbzxsql = " code ='$cbzx' and status = 1";
// $cbzxdata = m('c_cbzx')->getone($cbzxsql,'id,amount');
// $cbarr = array(
// 'amount' =>$cbzxdata['amount']+$value['charge_amount'],
// );
// m('c_cbzx')->update($cbarr,"`code`='$cbzx'");
// //账户明细 c_account_detail
// $account_detail=array(
// 'account' => $data['name'],
// 'opt_type' => 2,
// 'amount' =>$value['charge_amount'],
// 'trans_numb' => $this->rs['docnum'],
// 'account_balance' => $data['account_balance']-$value['charge_amount'],
// 'create_time' =>date("Y-m-d H:i:s"),
// 'uid' =>$this->rs['uid'],
// );
// m('c_account_detail')->insert($account_detail);
// // 业务付款8业务预付款10费用报销11 oa_c_fund_detail
// $fund_detail=array(
// 'trans_numb' =>$this->rs['docnum'],
// 'account' => $data['name'],
// 'toaccount' =>$this->rs['payee'],
// 'trans_amount' =>$value['charge_amount'],
// 'business_type' =>8,
// 'opt_type' =>2,
// 'account_balance'=>$data['account_balance']-$value['charge_amount'],
// 'create_time' =>date("Y-m-d H:i:s"),
// 'uid' =>$this->rs['uid'],
// );
// m('c_fund_detail')->insert($fund_detail);
// }
// }
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论