Add more default search types
Add more default search types that ship with the system:
Customer Module:
Name/Company union search (replaces the two boxes with one that either name or company can be typed in)
(SELECT * FROM customer WHERE name LIKE '%%s1%%') UNION (SELECT * FROM customer WHERE company LIKE '%%s1%%')
Phone Number
SELECT name,company,
signup date range
SELECT * FROM customer c LEFT JOIN billing b on b.id = c.default_
street address
SELECT cu.account_number, cu.name, cu.company, cu.street, cu.phone
FROM customer cu WHERE cu.street LIKE '%%s1%%'
Billing Module:
Invoice Number
SELECT bh.id AS InvoiceNumber, b.account_number, b.name, b.company FROM `billing_history` bh LEFT JOIN billing b ON bh.billing_id = b.id WHERE bh.id = '%s1%'
Billing Email
SELECT * FROM billing WHERE contact_email LIKE '%%s1%%'
Next Billing Date Range
SELECT b.id id, b.name, b.company, b.account_number account_number, b.next_billing_date next_billing_date, bt.name billing_type, c.cancel_date cancel_date, c.removal_date removal_date, ms.service_
Support Module:
Creation Date
SELECT * FROM customer_history WHERE DATE(creation_date) = '%s1%' ORDER BY created_by ASC
Created By
SELECT * FROM customer_history WHERE created_by = '%s1%' ORDER BY creation_date DESC
Blueprint information
Related branches
Related bugs
Sprints
Whiteboard
this will only really work for new installs who use the citrus.sql file. Upgrades would have to add these manually so that they don't interfere with id's of search queryes they already have added themselves.