INSERT INTO `tblapad_emailtemplates`
(`emailtemplateid`, `type`, `slug`, `language`, `name`, `subject`, `message`, `fromname`, `fromemail`, `plaintext`, `active`, `order`, `is_tenant_email_config_allowed`, `is_tenant`)
VALUES
    (NULL, 'finix', 'finix-payment-dispute-created', 'english', 'Finix Payment Dispute Created', 'Urgent: Respond to Dispute on Payment for Invoice #{invoice_number}',
     '<p style="font-size: 12pt;">Hello {first_name},</p>
     <p style="font-size: 12pt;">A dispute has been raised regarding a payment for Invoice <b>#{invoice_number}</b> (Amount: <b>{payment_amount}</b>). To ensure timely resolution, please review and submit your response by <b>{dispute_due_date}</b></p>
     <p style="font-size: 12pt;"><b>Dispute Details:</b></p>
     <ol style="font-size: 12pt;">
         <li>
             <b>Client:</b> {client_name}             
         </li>
         <li>
            <b>Transaction ID:</b> {transaction_id}            
         </li>
         <li>
           <b>Dispute ID:</b> {dispute_id}            
         </li>     
     </ol>
     <p style="font-size: 12pt;">To view details and respond, <a href="{dispute_url}" >click here</a>.</p>
     <br/>

     <p style="font-size: 12pt;">Regards,</p>
     <p style="font-size: 12pt;">Contractor+ Pay Underwriting Team</p>',
     '', NULL, '0', '1', '0', '0', '0');


INSERT INTO `tblin_app_activity_events` (`module_name`, `event_key`, `message`, `icon`, `priority`, `is_actionable`, `web_redirection`, `mobile_redirection`, `added_by`, `added_on`, `updated_by`, `updated_on`) VALUES
('payment_dispute', 'payment_dispute_created', 'Action Required: Payment Dispute for Invoice {invoice_number}', 'payments.svg', 0, 1, '/dispute', '{"type":"internal_activity","internal_activity":{"module":"invoice_payments_disputes","action":"detailview","data":{"dispute_id":"{id}"}}}', NULL, CURRENT_TIMESTAMP, NULL, CURRENT_TIMESTAMP);

SET @event_id = LAST_INSERT_ID();  

INSERT INTO `tblin_app_activity_actions` ( `activity_event_id`, `action_name`, `action_label`, `icon`, `permission`, `web_redirection`, `mobile_redirection`, `added_on`, `updated_on`) VALUES
( @event_id, 'respond', 'Respond', 'general-activity.svg', '', '/dispute', '{"type":"internal_activity","internal_activity":{"module":"invoice_payments_disputes","action":"detailview","data":{"dispute_id":"{id}"}}}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
