set project_priority_id [im_id_from_category [list$project_priority]"Intranet Department Planner Project Priority"]
# customer_id
if {"" == $customer_id }{ set customer_id [db_string cust "select company_id from im_companies where lower(company_name) = trim(lower(:customer_name))" -default ""]}
if {"" == $customer_id }{ set customer_id [db_string cust "select company_id from im_companies where lower(company_path) = trim(lower(:customer_name))" -default ""]}
if {"" == $customer_id }{
set customer_id [db_string cust "select company_id from im_companies where lower(company_name) = trim(lower(:customer_name))" -default ""]
}
if {"" == $customer_id }{
set customer_id [db_string cust "select company_id from im_companies where lower(company_path) = trim(lower(:customer_name))" -default ""]
}
if {"" == $customer_id }{
if {$ns_write_p}{
ns_write "<li><font color=red>Error: Didn't find customer for '$customer_name'.<br>