UPDATE tblterm_contracts_static SET description = "By accepting this estimate, you certify that you understand that you are personally/individually responsible for payment of the services rendered. You further certify that you understand if full payment is not received by the due date, interest will be charged at the rate of {interest_rate_percent}% or {currency}{interest_rate_amount} per what is greater month until the balance is paid in full. If the account is greater than {max_post_invoice_due_days} days old, {company_name} reserves the right to turn the account over to an attorney for collections at which point you would be responsible for all collection costs including reasonable attorney's fees." WHERE title = "Generic";

INSERT INTO tblterm_contracts (`tenant_id`, `title`, `description`, `is_default_for_invoice`, `is_default_for_estimate`, `added_on`) SELECT t.id, "Generic (Updated)", "By accepting this estimate, you certify that you understand that you are personally/individually responsible for payment of the services rendered. You further certify that you understand if full payment is not received by the due date, interest will be charged at the rate of {interest_rate_percent}% or {currency}{interest_rate_amount} per what is greater month until the balance is paid in full. If the account is greater than {max_post_invoice_due_days} days old, {company_name} reserves the right to turn the account over to an attorney for collections at which point you would be responsible for all collection costs including reasonable attorney's fees.", 0, 0, NOW()
FROM tbltenants t
ORDER BY t.id;


INSERT INTO tbloptions_static (name, value, autoload) VALUES ('interest_rate_percent', '20', '1');
INSERT INTO tbloptions_static (name, value, autoload) VALUES ('interest_rate_amount', '20', '1');
INSERT INTO tbloptions_static (name, value, autoload) VALUES ('max_post_invoice_due_days', '30', '1');

INSERT INTO tbloptions (tenant_id, name, value, autoload) SELECT id, 'interest_rate_percent', '20', '1' FROM tbltenants;
INSERT INTO tbloptions (tenant_id, name, value, autoload) SELECT id, 'interest_rate_amount', '20', '1' FROM tbltenants;
INSERT INTO tbloptions (tenant_id, name, value, autoload) SELECT id, 'max_post_invoice_due_days', '30', '1' FROM tbltenants;