/* Insert Tilled Processing Fees into plan_features */
INSERT INTO `tblplan_features` (`id`, `name`, `codename`, `description`, `type`, `is_highlight`, `order`, `added_on`) VALUES (NULL, 'Tilled (Pass processing fee to client)', 'tilled_pass_processing_fee_to_client', 'Tilled (Pass processing fee to client)', 'allow', '0', '999', CURRENT_TIMESTAMP);
SET @tilled_pass_processing = LAST_INSERT_ID();

/* Insert Pass Processing Fees to Client Structure */ 
INSERT INTO `tblplan_features_value` (`id`, `plans_id`, `plans_features_id`, `value`, `other_data`, `added_on`) VALUES
(NULL, 9, @tilled_pass_processing, '0', '{\"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\"}', CURRENT_TIMESTAMP),
(NULL, 10, @tilled_pass_processing, '1', '{\"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\"}', CURRENT_TIMESTAMP),
(NULL, 11, @tilled_pass_processing, '1', '{\"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\"}', CURRENT_TIMESTAMP),
(NULL, 12, @tilled_pass_processing, '1', '{\"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\"}', CURRENT_TIMESTAMP),
(NULL, 13, @tilled_pass_processing, '0', '{\"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\"}', CURRENT_TIMESTAMP),
(NULL, 14, @tilled_pass_processing, '1', '{\"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\"}', CURRENT_TIMESTAMP),
(NULL, 15, @tilled_pass_processing, '1', '{\"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\"}', CURRENT_TIMESTAMP);


/* Insert Tilled Processing Fees into plan_features */
INSERT INTO `tblplan_features` (`id`, `name`, `codename`, `description`, `type`, `is_highlight`, `order`, `added_on`) VALUES (NULL, 'Contractor+ Payments', 'tilled_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 @tilled_process_fees = LAST_INSERT_ID();

INSERT INTO `tblplan_features_value` (`id`, `plans_id`, `plans_features_id`, `value`, `other_data`, `added_on`) VALUES
(NULL, 9, @tilled_process_fees, '{\"cc_percent\":\"3.5\",\"cc_flat\":\"30\",\"ach_percent\":\"1.5\",\"ach_flat\":\"0\",\"ach_cap\":\"0\",\"cc_pricing_id\":\"pt_jnmtFiWcsllT8xzeRw8x5\",\"ach_pricing_id\":\"pt_CygivFc5Gkm0PEyc8RxQf\"}', NULL, CURRENT_TIMESTAMP), 
(NULL, 10, @tilled_process_fees, '{\"cc_percent\":\"3.0\",\"cc_flat\":\"30\",\"ach_percent\":\"1.0\",\"ach_flat\":\"0\",\"ach_cap\":\"0\",\"cc_pricing_id\":\"pt_rPcWusdbUARle4xltC3Pj\",\"ach_pricing_id\":\"pt_pyy27x5DXOAGcCzu7gdiO\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 11, @tilled_process_fees, '{\"cc_percent\":\"3.0\",\"cc_flat\":\"30\",\"ach_percent\":\"1.0\",\"ach_flat\":\"0\",\"ach_cap\":\"0\",\"cc_pricing_id\":\"pt_rPcWusdbUARle4xltC3Pj\",\"ach_pricing_id\":\"pt_pyy27x5DXOAGcCzu7gdiO\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 12, @tilled_process_fees, '{\"cc_percent\":\"2.9\",\"cc_flat\":\"30\",\"ach_percent\":\"1.0\",\"ach_flat\":\"0\",\"ach_cap\":\"15\",\"cc_pricing_id\":\"pt_dYCGE1b1VWMVje8dBLzhd\",\"ach_pricing_id\":\"pt_wqFc4T3UvAPE9Gswt0Vm1\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 13, @tilled_process_fees, '{\"cc_percent\":\"3.5\",\"cc_flat\":\"30\",\"ach_percent\":\"1.5\",\"ach_flat\":\"0\",\"ach_cap\":\"0\",\"cc_pricing_id\":\"pt_jnmtFiWcsllT8xzeRw8x5\",\"ach_pricing_id\":\"pt_CygivFc5Gkm0PEyc8RxQf\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 14, @tilled_process_fees, '{\"cc_percent\":\"3.0\",\"cc_flat\":\"30\",\"ach_percent\":\"1.0\",\"ach_flat\":\"0\",\"ach_cap\":\"0\",\"cc_pricing_id\":\"pt_rPcWusdbUARle4xltC3Pj\",\"ach_pricing_id\":\"pt_pyy27x5DXOAGcCzu7gdiO\"}', NULL, CURRENT_TIMESTAMP),
(NULL, 15, @tilled_process_fees, '{\"cc_percent\":\"2.9\",\"cc_flat\":\"30\",\"ach_percent\":\"1.0\",\"ach_flat\":\"0\",\"ach_cap\":\"15\",\"cc_pricing_id\":\"pt_dYCGE1b1VWMVje8dBLzhd\",\"ach_pricing_id\":\"pt_wqFc4T3UvAPE9Gswt0Vm1\"}', NULL, CURRENT_TIMESTAMP);

UPDATE tblplan_features SET is_highlight = 0 WHERE codename = 'wepay_transaction_fees';
/* Refresh Staff Permissions */
UPDATE tblstaff SET refresh_permissions = 1;