-- Update existing invoice templates to the new user format
UPDATE public.sms_settings
SET invoice_template = 'প্রিয় {name}, ইনভয়েস:{invoice} মোট:৳{bill} পূর্ব বকেয়া:৳{previous_due} জমা:৳{received} বাকি:৳{current_due} -নিয়ামাহ্'
WHERE invoice_template IS NOT NULL;

-- Update default template for new settings
-- (handled by the application layer, but ensure consistency in DB)