forked from kevinowino869/mitrobill
Add Setting to disable Voucher
This commit is contained in:
@ -206,6 +206,7 @@ switch ($action) {
|
||||
case 'app-post':
|
||||
$company = _post('company');
|
||||
$footer = _post('footer');
|
||||
$disable_voucher = _post('disable_voucher');
|
||||
$telegram_bot = _post('telegram_bot');
|
||||
$telegram_target_id = _post('telegram_target_id');
|
||||
$sms_url = _post('sms_url');
|
||||
@ -245,6 +246,17 @@ switch ($action) {
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'disable_voucher')->find_one();
|
||||
if($d){
|
||||
$d->value = $disable_voucher;
|
||||
$d->save();
|
||||
}else{
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'disable_voucher';
|
||||
$d->value = $disable_voucher;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'telegram_bot')->find_one();
|
||||
if($d){
|
||||
$d->value = $telegram_bot;
|
||||
|
Reference in New Issue
Block a user