Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. function preDisplay(){
  2.  
  3.  
  4. global $mod_strings, $timedate, $user;
  5. parent::preDisplay();
  6.  
  7. // require_once('modules/Contacts/Contact.php');
  8. // $contact = new Contact();
  9. // $contact->retrieve($this->bean->contact_id_c);
  10.  
  11. $this->_initOptions();
  12. //retrieve the sales person's first name
  13. global $beanFiles;
  14. require_once($beanFiles['User']);
  15. $rep = BeanFactory::getBean('Users', $this->bean->assigned_user_id);
  16.  
  17. // require_once($beanFiles['Lead']);
  18. // $contact = BeanFactory::getBean('Leads', $this->bean->assigned_user_id);
  19.  
  20.  
  21.  
  22.  
  23. $quote[0]['TITLE'] = $mod_strings['LBL_PDF_QUOTE_NUMBER'];
  24. $quote[1]['TITLE'] = $mod_strings['LBL_PDF_QUOTE_DATE'];
  25. $quote[2]['TITLE'] = $mod_strings['LBL_PDF_SALES_PERSON'];
  26. $quote[3]['TITLE'] = $mod_strings['LBL_PDF_QUOTE_CLOSE'];
  27.  
  28. $quote[0]['VALUE']['value'] = format_number_display($this->bean->quote_num,$this->bean->system_id);
  29. $quote[1]['VALUE']['value'] = $timedate->nowDate();
  30. $quote[2]['VALUE']['value'] = $rep->first_name.' '.$rep->last_name;
  31. $quote[3]['VALUE']['value'] = $this->bean->date_quote_expected_closed;
  32.  
  33. // these options override the params of the $options array.
  34. $quote[0]['VALUE']['options'] = array();
  35. $quote[1]['VALUE']['options'] = array();
  36. $quote[2]['VALUE']['options'] = array();
  37. $quote[3]['VALUE']['options'] = array();
  38.  
  39. $html = $this->writeHTMLTable($quote, true, $this->headerOptions);
  40. $this->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, $mod_strings['LBL_PDF_QUOTE_TITLE'], $html);
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement