-- Case Invoice Preview modal definition
INSERT INTO ui_modals (name, config, tenant_id, branch_id)
SELECT 'Case Invoice Preview',
       '{"title":"Case Invoice","body":[{"type":"html","id":"ciPreview","html":""},{"type":"form","formName":"Case Invoice"}],"footer":[{"type":"button","label":"Close","onClick":"closeModal"}]}',
       NULL, NULL
WHERE NOT EXISTS (SELECT 1 FROM ui_modals WHERE name = 'Case Invoice Preview');
