Files
xinhu/webmain/flow/input/mode_finhkdAction.php
2023-12-21 21:15:19 +08:00

37 lines
883 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
class mode_finhkdClassAction extends inputAction{
protected function savebefore($table, $arr, $id, $addbo){
$uid = $arr['uid'];
$money = floatval($arr['money']);
$to = m('fina')->totaljie($uid, $id);
if($money > floatval($to))return '还款金额超过需还金额';
$rows['type'] = '3';//一定要是3不能去掉
return array(
'rows'=>$rows
);
}
protected function saveafter($table, $arr, $id, $addbo){
}
public function jiekuantongs()
{
$mid = (int)$this->get('mid');
$moenky = m('fina')->totaljie($this->adminid, $mid);
return ''.$this->rock->number($moenky).'元';
}
public function getlastAjax()
{
$rs = m('fininfom')->getone("`uid`='$this->adminid' and `type`=3 order by `optdt` desc",'paytype,cardid,openbank,fullname');
if(!$rs)$rs='';
$this->returnjson($rs);
}
}