Skip to content

Commit

Permalink
Fix: label if id not defined for country
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 16, 2011
1 parent 112ad5b commit 4d8bd95
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions htdocs/admin/pdf.php
Expand Up @@ -113,25 +113,33 @@

// Show prof id 1 in address into pdf
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$langs->transcountry("ProfId1",$mysoc->pays_code).'</td><td>';
$pid1=$langs->transcountry("ProfId1",$mysoc->pays_code);
if ($pid1 == '-') $pid1=$langs->transcountry("ProfId1");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
print $html->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1);
print '</td></tr>';

// Show prof id 2 in address into pdf
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$langs->transcountry("ProfId2",$mysoc->pays_code).'</td><td>';
$pid2=$langs->transcountry("ProfId2",$mysoc->pays_code);
if ($pid2 == '-') $pid2=$langs->transcountry("ProfId2");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
print $html->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1);
print '</td></tr>';

// Show prof id 3 in address into pdf
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$langs->transcountry("ProfId3",$mysoc->pays_code).'</td><td>';
$pid3=$langs->transcountry("ProfId3",$mysoc->pays_code);
if ($pid3 == '-') $pid3=$langs->transcountry("ProfId3");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
print $html->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1);
print '</td></tr>';

// Show prof id 4 in address into pdf
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$langs->transcountry("ProfId4",$mysoc->pays_code).'</td><td>';
$pid4=$langs->transcountry("ProfId4",$mysoc->pays_code);
if ($pid4 == '-') $pid4=$langs->transcountry("ProfId4");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
print $html->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1);
print '</td></tr>';

Expand Down Expand Up @@ -199,25 +207,33 @@

// Show prof id 1 in address into pdf
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$langs->transcountry("ProfId1",$mysoc->pays_code).'</td><td>';
$pid1=$langs->transcountry("ProfId1",$mysoc->pays_code);
if ($pid1 == '-') $pid1=$langs->transcountry("ProfId1");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
print yn($conf->global->MAIN_PROFID1_IN_ADDRESS,1);
print '</td></tr>';

// Show prof id 2 in address into pdf
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$langs->transcountry("ProfId2",$mysoc->pays_code).'</td><td>';
$pid2=$langs->transcountry("ProfId2",$mysoc->pays_code);
if ($pid2 == '-') $pid2=$langs->transcountry("ProfId2");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
print yn($conf->global->MAIN_PROFID2_IN_ADDRESS,1);
print '</td></tr>';

// Show prof id 3 in address into pdf
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$langs->transcountry("ProfId3",$mysoc->pays_code).'</td><td>';
$pid3=$langs->transcountry("ProfId3",$mysoc->pays_code);
if ($pid3 == '-') $pid3=$langs->transcountry("ProfId3");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
print yn($conf->global->MAIN_PROFID3_IN_ADDRESS,1);
print '</td></tr>';

// Show prof id 4 in address into pdf
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$langs->transcountry("ProfId4",$mysoc->pays_code).'</td><td>';
$pid4=$langs->transcountry("ProfId4",$mysoc->pays_code);
if ($pid4 == '-') $pid4=$langs->transcountry("ProfId4");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
print yn($conf->global->MAIN_PROFID4_IN_ADDRESS,1);
print '</td></tr>';

Expand Down

0 comments on commit 4d8bd95

Please sign in to comment.