-- KINET MikroTik Admin Module - Update v21 Voucher Online Generate On Paid
-- Voucher online tidak mengambil stok. Voucher baru dibuat ke MikroTik setelah payment gateway mengirim notifikasi paid.

INSERT INTO settings (setting_key, setting_value) VALUES
('voucher_online_generate_mode', 'generate_on_paid'),
('voucher_online_prefix', 'ON'),
('voucher_online_format', '123ABC'),
('voucher_online_code_length', '6'),
('voucher_online_wait_gateway_note', 'Order pending. Voucher baru digenerate otomatis ke MikroTik setelah payment gateway mengirim notifikasi paid. Tidak mengambil stok voucher.')
ON DUPLICATE KEY UPDATE setting_key = setting_key;

UPDATE settings SET setting_value='generate_on_paid' WHERE setting_key='voucher_online_generate_mode';
UPDATE settings SET setting_value='0' WHERE setting_key='voucher_online_auto_payment';
