我想在SugarCRM 7中为引号创建自定义pdf模板。 带有页脚,徽标等的模板正在运行,但我无法输出与报价有关的线索的地址,名称等。
我可以在编辑视图中选择一个潜在客户,并且报价正确地与潜在客户相关联。
那么,我如何打印报价中的主要信息?
我的尝试:
require_once('modules/Leads/Lead.php');
$contact = new Lead();
$contact->retrieve($this->bean->leadsid_c);
$lead = new Lead();
$lead->retrieve($bean->leads_quotes_1_c.contacts_leads_1contacts_ida );
$addressBS[0][$mod_strings['LBL_PDF_BILLING_ADDRESS']] = $lead->first_name.' '. $lead->last_name;
// $addressBS[1][$mod_strings['LBL_PDF_BILLING_ADDRESS']] = $this->bean->billing_account_name;
$addressBS[1][$mod_strings['LBL_PDF_BILLING_ADDRESS']] = $lead->primary_address_street;
if(!empty($lead->primary_address_city) || !empty($lead->primary_address_postalcode)) {
$addressBS[2][$mod_strings['LBL_PDF_BILLING_ADDRESS']] = $lead->primary_address_city.", ".$lead->primary_address_state." ".$lead->primary_address_postalcode;}