Add Setting to disable Voucher

This commit is contained in:
Ibnu Maksum
2023-07-18 16:30:12 +07:00
parent dea73fb2a6
commit 5e474e4bf7
7 changed files with 61 additions and 14 deletions

View File

@ -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;

View File

@ -331,3 +331,4 @@ $_L['Your_account_not_connected_to_internet'] = 'Your account not connected to i
$_L['Failed_to_create_transaction_'] = 'Failed to create transaction. ';
$_L['Failed_to_check_status_transaction_'] = 'Failed to check status transaction. ';
$_L['Disable_Voucher'] = 'Disable Voucher';