INSERT INTO tbloptions SELECT id, null, 'show_cp_branding','1',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'show_cp_branding','1',1);

INSERT INTO tbloptions SELECT id, null, 'attach_invoice_to_payment_receipt_email','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'attach_invoice_to_payment_receipt_email','0',1);

INSERT INTO tbloptions SELECT id, null, 'invoice_display_team_members_info','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'invoice_display_team_members_info','0',1);

INSERT INTO tbloptions SELECT id, null, 'invoice_show_late_stamp','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'invoice_show_late_stamp','0',1);

INSERT INTO tbloptions SELECT id, null, 'invoice_show_paid_date','1',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'invoice_show_paid_date','1',1);

INSERT INTO tbloptions SELECT id, null, 'invoice_show_financing_offer_to_client','1',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'invoice_show_financing_offer_to_client','1',1);

INSERT INTO tbloptions SELECT id, null, 'invoice_show_contract','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'invoice_show_contract','0',1);

INSERT INTO tbloptions SELECT id, null, 'invoice_send_overdue_reminders','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'invoice_send_overdue_reminders','0',1);

INSERT INTO tbloptions SELECT id, null, 'automatically_send_invoice_overdue_reminder_where','email',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'automatically_send_invoice_overdue_reminder_where','email',1);

INSERT INTO tbloptions SELECT id, null, 'invoice_show_phone_number_in_header','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'invoice_show_phone_number_in_header','0',1);
INSERT INTO tbloptions SELECT id, null, 'invoice_show_email_in_header','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'invoice_show_email_in_header','0',1);
INSERT INTO tbloptions SELECT id, null, 'invoice_show_website_in_header','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'invoice_show_website_in_header','0',1);
INSERT INTO tbloptions SELECT id, null, 'invoice_show_client_phone_number','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'invoice_show_client_phone_number','0',1);

INSERT INTO tbloptions SELECT id, null, 'estimate_show_phone_number_in_header','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_phone_number_in_header','0',1);
INSERT INTO tbloptions SELECT id, null, 'estimate_show_email_in_header','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_email_in_header','0',1);
INSERT INTO tbloptions SELECT id, null, 'estimate_show_website_in_header','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_website_in_header','0',1);
INSERT INTO tbloptions SELECT id, null, 'estimate_show_client_phone_number','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_client_phone_number','0',1);

INSERT INTO tbloptions SELECT id, null, 'pi_show_phone_number_in_header','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'pi_show_phone_number_in_header','0',1);
INSERT INTO tbloptions SELECT id, null, 'pi_show_email_in_header','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'pi_show_email_in_header','0',1);
INSERT INTO tbloptions SELECT id, null, 'pi_show_website_in_header','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'pi_show_website_in_header','0',1);
INSERT INTO tbloptions SELECT id, null, 'pi_show_client_phone_number','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'pi_show_client_phone_number','0',1);

update tbloptions_static SET value = "#ee1e25" WHERE name="company_primary_color";
update tbloptions SET value = "#ee1e25" WHERE name="company_primary_color";

update tbloptions_static SET value = 7 WHERE  name="invoice_due_after";
update tbloptions SET value = 7 WHERE  name="invoice_due_after";

update tbloptions_static SET value = 0 WHERE  name="estimate_auto_convert_to_invoice_on_client_accept";
update tbloptions SET value = 0 WHERE  name="estimate_auto_convert_to_invoice_on_client_accept";

INSERT INTO tbloptions SELECT id, null, 'send_estimate_expiry_reminders','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'send_estimate_expiry_reminders','0',1);

INSERT INTO tbloptions SELECT id, null, 'automatically_send_estimate_expiry_reminder_where','email',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'automatically_send_estimate_expiry_reminder_where','email',1);

INSERT INTO tbloptions SELECT id, null, 'estimate_display_team_members_info','1',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_display_team_members_info','1',1);

INSERT INTO tbloptions SELECT id, null, 'estimate_show_total_per_line_item','1',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_total_per_line_item','1',1);

INSERT INTO tbloptions SELECT id, null, 'automatically_resend_invoice_overdue_reminder_type','every',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'automatically_resend_invoice_overdue_reminder_type','every',1);

INSERT INTO tbloptions SELECT id, null, 'estimate_show_labour_hours','per_estimate',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_labour_hours','per_estimate',1);

INSERT INTO tbloptions SELECT id, null, 'estimate_show_labour_totals','per_estimate',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_labour_totals','per_estimate',1);

INSERT INTO tbloptions SELECT id, null, 'estimate_show_supply_totals','per_estimate',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_supply_totals','per_estimate',1);

INSERT INTO tbloptions SELECT id, null, 'estimate_show_totals','per_estimate',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_totals','per_estimate',1);

INSERT INTO tbloptions SELECT id, null, 'estimate_show_financing_offer_to_client','1',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_financing_offer_to_client','1',1);

INSERT INTO tbloptions SELECT id, null, 'estimate_show_contract','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'estimate_show_contract','0',1);

INSERT INTO tbloptions SELECT id, null, 'job_auto_convert_to_pi_on_complete','0',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'job_auto_convert_to_pi_on_complete','0',1);

INSERT INTO tbloptions SELECT id, null, 'pi_default_staff_id','',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'pi_default_staff_id','',1);

INSERT INTO tbloptions SELECT id, null, 'pi_display_team_members_info','1',1 FROM tbltenants;
INSERT INTO tbloptions_static VALUES (null,'pi_display_team_members_info','1',1);

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Update Branding Color', 'update_branding_color', 'Update Branding Color', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '80', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '80', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '80', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '80', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Update CP Branding Preference', 'update_cp_branding_preference', 'Update CP Branding Preference', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '81', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '81', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '81', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '81', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Update Invoice Attach To Payment', 'update_invoice_attach_to_payment', 'Update Invoice Attach To Payment', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '82', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '82', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '82', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '82', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Update Team Member Info Preference', 'update_team_member_info_preference', 'Update Team Member Info Preference', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '83', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '83', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '83', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '83', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Update Invoice Show Late Stamp', 'update_invoice_show_late_stamp', 'Update Invoice Show Late Stamp', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '84', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '84', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '84', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '84', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Update Display Financing Offer to Client', 'update_display_financing_offer_to_client', 'Update Display Financing Offer to Client', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '85', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '85', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '85', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '85', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Update Display Contract to Client', 'update_display_contract_to_client', 'Update Display Contract to Client', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '86', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '86', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '86', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '86', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Update Invoice Send Overdue Reminders', 'update_invoice_send_overdue_reminders', 'Update Invoice Send Overdue Reminders', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '87', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '87', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '87', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '87', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Estimate Auto Convert To Invoice', 'estimate_auto_convert_to_invoice', 'Estimate Auto Convert To Invoice', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '88', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '88', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '88', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '88', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Send Estimate Expiry Reminders', 'send_estimate_expiry_reminders', 'Send Estimate Expiry Reminders', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '89', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '89', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '89', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '89', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Estimate Show Total Per Line Item', 'estimate_show_total_per_line_item', 'Estimate Show Total Per Line Item', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '90', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '90', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '90', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '90', '1', UTC_TIMESTAMP());

INSERT INTO `tblplan_features` (`name`, `codename`, `description`, `type`, `added_on`) VALUES ('Job Auto Convert To Post Inspection Complete', 'job_auto_convert_to_pi_on_complete', 'Job Auto Convert To Post Inspection Complete', 'restrict', NOW());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('9', '91', '0', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('10', '91', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('11', '91', '1', UTC_TIMESTAMP());
INSERT INTO `tblplan_features_value` (`plans_id`, `plans_features_id`, `value`, `added_on`) VALUES ('12', '91', '1', UTC_TIMESTAMP());