|
@@ -169,12 +169,15 @@ class merchantControl extends SystemControl
|
|
|
$update_credit_bonus = ncPriceFormat($_POST['credit_bonus']);
|
|
|
$operatetype = $_POST['operatetype'];
|
|
|
if ($update_credit_bonus > 0) {
|
|
|
- if ($merchant['credit_bonus'] + $update_credit_bonus < 0) {
|
|
|
- showMessage('授信金额调整后不能小于0');
|
|
|
- }
|
|
|
if ($operatetype == 'add') {
|
|
|
+ if ($merchant['credit_bonus'] + $update_credit_bonus < 0) {
|
|
|
+ showMessage('授信金额调整后不能小于0');
|
|
|
+ }
|
|
|
$update['credit_bonus'] = ['exp', 'credit_bonus+' . $update_credit_bonus];
|
|
|
} elseif ($operatetype == 'del') {
|
|
|
+ if ($merchant['credit_bonus'] - $update_credit_bonus < 0) {
|
|
|
+ showMessage('授信金额调整后不能小于0');
|
|
|
+ }
|
|
|
$update['credit_bonus'] = ['exp', 'credit_bonus-' . $update_credit_bonus];
|
|
|
}
|
|
|
}
|