I saw this review as well. I would like to propose a change to the customer search to be able to search phone numbers and emails. I often get texts from clients and I am unclear as to whom i'm speaking with, or when scheduling delivery note, I forget who it was. I added all crm fields in the search but didnt include them in the table for fear of clutter. The crm table view does have all those things and looks ok to me.
change db function get_customers_search in '/sales/includes/db/customers_db.inc' to...
function get_customers_search($customer)
{
global $SysPrefs;
if (isset($SysPrefs->max_rows_in_search))
$limit = $SysPrefs->max_rows_in_search;
else
$limit = 10;
$sql = "SELECT d.debtor_no, d.name, d.debtor_ref, d.address, d.tax_id,
p.phone, p.phone2, p.fax, p.email
FROM ".TB_PREF."crm_persons p, ".TB_PREF."crm_contacts c,
".TB_PREF."debtors_master d
WHERE p.id = c.person_id AND c.entity_id = d.debtor_no AND
c.type = 'customer' AND
( d.name LIKE " . db_escape("%" . $customer. "%") . " OR
d.debtor_ref LIKE " . db_escape("%" . $customer. "%") . " OR
d.address LIKE " . db_escape("%" . $customer. "%") . " OR
d.tax_id LIKE " . db_escape("%" . $customer. "%")." OR
p.phone LIKE " . db_escape("%" . $customer. "%") . " OR
p.phone2 LIKE " . db_escape("%" . $customer. "%") . " OR
p.fax LIKE " . db_escape("%" . $customer. "%") . " OR
p.email LIKE " . db_escape("%" . $customer. "%").")
ORDER BY name LIMIT 0,".(int)($limit);
return db_query($sql, "Failed in retreiving customer list.");
}
add fields to table header and cells in '/sales/inquiry/customers_list.php' to have at least phone and email
Header array $th
$th = array("", _("Customer"), _("Short Name"), _("Address"), _("Tax ID"), _("Phone"), _("Email"));
Cell contents add email and phone
label_cell($myrow["name"]);
label_cell($myrow["debtor_ref"]);
label_cell($myrow["address"]);
label_cell($myrow["tax_id"]);
label_cell($myrow["phone"]);
label_cell($myrow["email"]);
@joe and @ apmuthu
?