CREATE TABLE tblcustomer_billing_addresses (
 id INT AUTO_INCREMENT PRIMARY KEY,
 tenant_id BIGINT UNSIGNED,
 client_id BIGINT UNSIGNED,
 address_type varchar(100),
 street_1 VARCHAR(255),
 street_2 VARCHAR(255),
 city VARCHAR(255),
 state VARCHAR(255),
 state_id BIGINT UNSIGNED,
 zip VARCHAR(15),
 country BIGINT UNSIGNED,
 created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
 created_by  BIGINT UNSIGNED,
 updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 updated_by  BIGINT UNSIGNED,
 FOREIGN KEY (`tenant_id`) REFERENCES `tbltenants` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
);
ALTER TABLE tblinvoices
ADD COLUMN billing_id BIGINT UNSIGNED default null after sale_agent;
ALTER TABLE tblestimates
ADD COLUMN billing_id BIGINT UNSIGNED default null after sale_agent;
ALTER TABLE tblclients
ADD COLUMN billing_address_id BIGINT UNSIGNED default null after leadid;
