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

'测试费用报销与借款抵扣'

上级 35d45a59
...@@ -24,7 +24,32 @@ class flow_finfybxClassModel extends flowModel ...@@ -24,7 +24,32 @@ class flow_finfybxClassModel extends flowModel
$sql = " docnum ='$jk_num' "; $sql = " docnum ='$jk_num' ";
$fininfom_jk = m('c_fininfom_jk')->getone($sql,'amount');//金额 $fininfom_jk = m('c_fininfom_jk')->getone($sql,'amount');//金额
var_dump($fininfom_jk['amount']);die; if($this->rs['money'] <= $fininfom_jk['amount']){
$balance = array(
'balance' => 0,
);
$docnum=$this->rs['docnum'];
m('fininfom')->update($balance, "`docnum`='$docnum'");
$jkbalance = array(
'balance' => $fininfom_jk['amount']-$this->rs['money'],
);
m('c_fininfom_jk')->update($jkbalance, "`docnum`='$jk_num'");
$deduct_detail = array(
'jk_num' => $jk_num,
'bx_num' => $docnum,
'dk_amount' => $this->rs['money'],
'status' =>0,
'create_time' => date("Y-m-d H:i:s"),
);
m('c_deduct_detail')->insert($deduct_detail);
}
// if($this->rs['money'] > $fininfom_jk['amount']){
//
// }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论