还款日设置

This commit is contained in:
2020-08-22 21:00:23 +08:00
parent 2383d24c12
commit 6fb1da3141
2 changed files with 23 additions and 1 deletions

View File

@ -116,6 +116,7 @@ class Note extends Base
$name = input("post.name");
$cur_cash = input('post.cur_cash');
$credit_cash = input('post.credit_cash');
$return_date = input('post.return_date', 1);
if ($id == 0){
Db::startTrans();
try {
@ -124,6 +125,7 @@ class Note extends Base
"cur_cash" => $cur_cash,
'name' => $name,
'credit_cash' => $credit_cash,
"return_date" => $return_date,
]);
Db::name("note_credit_detail")->insert([
"credit_id" => $id,
@ -159,7 +161,7 @@ class Note extends Base
}
Db::name('note_credit')
->where(["user_id" => $userId, "id" => $id])
->update(compact('name', 'credit_cash'));
->update(compact('name', 'credit_cash', 'return_date'));
Db::commit();
return WSTReturn("OK", 1);
} catch (Exception $e) {