/* Insert Finix Processing Fees into plan_features */
start transaction
ALTER TABLE `tblplan_features_value`
MODIFY COLUMN value VARCHAR(500);
INSERT INTO `tblplan_features` (`id`, `name`, `codename`, `description`, `type`, `is_highlight`, `order`, `added_on`)
VALUES (NULL, 'Finix (Pass processing fee to client)', 'finix_pass_processing_fee_to_client', 'Finix (Pass processing fee to client)', 'allow', '0', '999', CURRENT_TIMESTAMP);
SET @finix_pass_processing = LAST_INSERT_ID();
SET @common_json_value = '{
    "outside_message":"Currently you don\'t have enough permission to pass processing fee to your client. To use this feature Upgrade to PRO.",
    "inside_message":"Currently you don\'t have enough permission to pass processing fee to your client. To use this feature Upgrade to PRO.",
    "tag_color":"#EB0E0E",
    "tag_title":"Upgrade",
    "link":"https://my.dev.getcontractorplus.com/pricing_web/{webview_token_prefix}{webview_token}",
    "count":"0"
}';

INSERT INTO `tblplan_features_value` (`id`, `plans_id`, `plans_features_id`, `value`, `other_data`, `added_on`) VALUES
(NULL, 9, @finix_pass_processing, '0', @common_json_value, CURRENT_TIMESTAMP),
(NULL, 10, @finix_pass_processing, '1', @common_json_value, CURRENT_TIMESTAMP),
(NULL, 11, @finix_pass_processing, '1', @common_json_value, CURRENT_TIMESTAMP),
(NULL, 12, @finix_pass_processing, '1', @common_json_value, CURRENT_TIMESTAMP),
(NULL, 13, @finix_pass_processing, '0', @common_json_value, CURRENT_TIMESTAMP),
(NULL, 14, @finix_pass_processing, '1', @common_json_value, CURRENT_TIMESTAMP),
(NULL, 15, @finix_pass_processing, '1', @common_json_value, CURRENT_TIMESTAMP);
/* Insert Finix Processing Fees into plan_features */
INSERT INTO `tblplan_features` (`id`, `name`, `codename`, `description`, `type`, `is_highlight`, `order`, `added_on`) VALUES (NULL, 'Contractor+ Payments', 'finix_transaction_fees', 'Accept all major credit cards and eChecks 100% FREE! If you bank with Chase, you\'ll get access to your funds the SAME day! Get setup in minutes with ZERO monthly fees!', 'custom', '1', '25', CURRENT_TIMESTAMP);
SET @finix_process_fees = LAST_INSERT_ID();

INSERT INTO `tblplan_features_value` (`id`, `plans_id`, `plans_features_id`, `value`, `other_data`, `added_on`) VALUES
(NULL, 9, @finix_process_fees, '{\"cc_percent\":\"3.5\",\"cc_flat\":\"30\",\"ach_percent\":\"1.5\",\"ach_flat\":\"0\",\"ach_cap\":\"0\",\"profile_id\":\"FPgQJRLdy2Bd1TDBfn2sTPuS\",\"card_present_profile_id\":\"FPjCBMJQmTtZPc9XVhQMqcm2\",\"cpcc_percent\":\"2.9\",\"cpcc_flat\":\"30\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 10, @finix_process_fees, '{\"cc_percent\":\"3.0\",\"cc_flat\":\"30\",\"ach_percent\":\"1.0\",\"ach_flat\":\"0\",\"ach_cap\":\"0\",\"profile_id\":\"FPx7UBekeHUFQxW9vKjBRp6s\",\"card_present_profile_id\":\"FPsUV7kit4CTHP1jCcajPezn\",\"cpcc_percent\":\"2.7\",\"cpcc_flat\":\"30\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 11, @finix_process_fees, '{\"cc_percent\":\"3.0\",\"cc_flat\":\"30\",\"ach_percent\":\"1.0\",\"ach_flat\":\"0\",\"ach_cap\":\"0\",\"profile_id\":\"FPx7UBekeHUFQxW9vKjBRp6s\",\"card_present_profile_id\":\"FPsUV7kit4CTHP1jCcajPezn\",\"cpcc_percent\":\"2.7\",\"cpcc_flat\":\"30\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 12, @finix_process_fees, '{\"cc_percent\":\"2.9\",\"cc_flat\":\"30\",\"ach_percent\":\"1.0\",\"ach_flat\":\"0\",\"ach_cap\":\"10\",\"profile_id\":\"FP38DSQjE7iVcED2TZKT9728\",\"card_present_profile_id\":\"FPsUV7kit4CTHP1jCcajPezn\",\"cpcc_percent\":\"2.7\",\"cpcc_flat\":\"30\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 13, @finix_process_fees, '{\"cc_percent\":\"3.5\",\"cc_flat\":\"30\",\"ach_percent\":\"1.5\",\"ach_flat\":\"0\",\"ach_cap\":\"0\",\"profile_id\":\"FPgQJRLdy2Bd1TDBfn2sTPuS\",\"card_present_profile_id\":\"FPjCBMJQmTtZPc9XVhQMqcm2\",\"cpcc_percent\":\"2.9\",\"cpcc_flat\":\"30\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 14, @finix_process_fees, '{\"cc_percent\":\"3.0\",\"cc_flat\":\"30\",\"ach_percent\":\"1.0\",\"ach_flat\":\"0\",\"ach_cap\":\"0\",\"profile_id\":\"FPx7UBekeHUFQxW9vKjBRp6s\",\"card_present_profile_id\":\"FPsUV7kit4CTHP1jCcajPezn\",\"cpcc_percent\":\"2.7\",\"cpcc_flat\":\"30\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 15, @finix_process_fees, '{\"cc_percent\":\"2.9\",\"cc_flat\":\"30\",\"ach_percent\":\"1.0\",\"ach_flat\":\"0\",\"ach_cap\":\"10\",\"profile_id\":\"FP38DSQjE7iVcED2TZKT9728\",\"card_present_profile_id\":\"FPsUV7kit4CTHP1jCcajPezn\",\"cpcc_percent\":\"2.7\",\"cpcc_flat\":\"30\"}', NULL, CURRENT_TIMESTAMP);
UPDATE tblplan_features SET is_highlight = 0 WHERE codename = 'tilled_transaction_fees';
/* Refresh Staff Permissions */
UPDATE tblstaff SET refresh_permissions = 1 where 1=1;
commit