The following is defaulted in the view for "pdf_invoice":

[billing_first_name] [billing_last_name] <br />
<?php $company = '[billing_company]'; if(!empty($company)) { echo $company.'<br />'; } ?> 
[billing_street1] <br />
<?php $street2 = '[billing_street2]'; if(!empty($street2)) { echo $street2.'<br />'; } ?> 
[country_iso_code_2]-[billing_postal_code] [billing_city]

The output in the pdf is the following:
[billing_first_name] [billing_last_name]
[billing_company]
[billing_street1]
[billing_street2]
[country_iso_code_2]-[billing_postal_code]
[billing_city]

Comments

stevesmename’s picture

I replaced the Customfield PHP code with the following:

echo "$data->uc_orders_billing_first_name $data->uc_orders_billing_last_name";
echo '<br />';

$company = $data->uc_orders_billing_company; 
if(!empty($company)) { echo $company.'<br />'; }

echo "$data->uc_orders_billing_street1"; 
echo '<br />';

$street2 = $data->uc_orders_billing_street2; 
if(!empty($street2)) { echo $street2.'<br />'; }

echo "$data->uc_orders_billing_postal_code";
$postal_code2 = $data->uc_orders_country_iso_code_2;
if(!empty($postal_code2)) { echo '-'.$postal_code2; }

echo " $data->uc_orders_billing_city"; 
caw67’s picture

tokens not working with custon php, only in custom text or rewrite field!

fonant’s picture

Issue summary: View changes

Agree, tokens don't work here, so the PHP code method is required.