~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to htdocs/main.php

  • Committer: Bryan Alsdorf
  • Date: 2013-08-23 03:50:34 UTC
  • mto: (4033.1.168 eventum-skysql)
  • mto: This revision was merged to the branch mainline in revision 4660.
  • Revision ID: bryan@montyprogram.com-20130823035034-7f5r3pt1xg0xnnhk
Initial commit of CRM migration

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
$tpl->assign('hide_closed', $hide_closed);
57
57
 
58
58
if ($role_id == User::getRoleID('customer')) {
 
59
    $crm = CRM::getInstance($prj_id);
59
60
    // need the activity dashboard here
60
 
    $customer_id = User::getCustomerID($usr_id);
61
 
    $tpl->assign("customer_stats", Customer::getOverallStats($prj_id, $customer_id));
62
 
    $tpl->assign("profile", Customer::getProfile($prj_id, $usr_id));
63
 
    $tpl->assign('customer_template_path', Customer::getTemplatePath($prj_id));
 
61
    $contact_id = User::getCustomerContactID($usr_id);
 
62
    $customer_id = Auth::getCurrentCustomerID();
 
63
    $tpl->assign(array(
 
64
        "contact"   =>  $crm->getContact($contact_id),
 
65
        "customer"  =>  $crm->getCustomer($customer_id),
 
66
    ));
64
67
} else {
65
68
    if ((Auth::getCurrentRole() <= User::getRoleID("Reporter")) && (Project::getSegregateReporters($prj_id))) {
66
69
        $tpl->assign('hide_stats', true);