New: Can show professionnal ids on address
This commit is contained in:
parent
02206c3fa4
commit
acf961a506
@ -96,10 +96,30 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
||||
}
|
||||
// Intra VAT
|
||||
if ($targetcompany->tva_intra) $stringaddress.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($targetcompany->tva_intra);
|
||||
if ($conf->global->MAIN_PROFID1_IN_ADDRESS) $stringaddress.="\n".$outputlangs->transcountrynoentities("ProfId1",$targetcompany->pays_code).': '.$outputlangs->convToOutputCharset($targetcompany->idprof1);
|
||||
if ($conf->global->MAIN_PROFID2_IN_ADDRESS) $stringaddress.="\n".$outputlangs->transcountrynoentities("ProfId2",$targetcompany->pays_code).': '.$outputlangs->convToOutputCharset($targetcompany->idprof2);
|
||||
if ($conf->global->MAIN_PROFID3_IN_ADDRESS) $stringaddress.="\n".$outputlangs->transcountrynoentities("ProfId3",$targetcompany->pays_code).': '.$outputlangs->convToOutputCharset($targetcompany->idprof3);
|
||||
if ($conf->global->MAIN_PROFID4_IN_ADDRESS) $stringaddress.="\n".$outputlangs->transcountrynoentities("ProfId4",$targetcompany->pays_code).': '.$outputlangs->convToOutputCharset($targetcompany->idprof4);
|
||||
if ($conf->global->MAIN_PROFID1_IN_ADDRESS)
|
||||
{
|
||||
$tmp=$outputlangs->transcountrynoentities("ProfId1",$targetcompany->pays_code);
|
||||
if (preg_match('/\((.+)\)/',$tmp,$reg)) $tmp=$reg[1];
|
||||
$stringaddress.="\n".$tmp.': '.$outputlangs->convToOutputCharset($targetcompany->idprof1);
|
||||
}
|
||||
if ($conf->global->MAIN_PROFID2_IN_ADDRESS)
|
||||
{
|
||||
$tmp=$outputlangs->transcountrynoentities("ProfId2",$targetcompany->pays_code);
|
||||
if (preg_match('/\((.+)\)/',$tmp,$reg)) $tmp=$reg[1];
|
||||
$stringaddress.="\n".$tmp.': '.$outputlangs->convToOutputCharset($targetcompany->idprof2);
|
||||
}
|
||||
if ($conf->global->MAIN_PROFID3_IN_ADDRESS)
|
||||
{
|
||||
$tmp=$outputlangs->transcountrynoentities("ProfId3",$targetcompany->pays_code);
|
||||
if (preg_match('/\((.+)\)/',$tmp,$reg)) $tmp=$reg[1];
|
||||
$stringaddress.="\n".$tmp.': '.$outputlangs->convToOutputCharset($targetcompany->idprof3);
|
||||
}
|
||||
if ($conf->global->MAIN_PROFID4_IN_ADDRESS)
|
||||
{
|
||||
$tmp=$outputlangs->transcountrynoentities("ProfId4",$targetcompany->pays_code);
|
||||
if (preg_match('/\((.+)\)/',$tmp,$reg)) $tmp=$reg[1];
|
||||
$stringaddress.="\n".$tmp.': '.$outputlangs->convToOutputCharset($targetcompany->idprof4);
|
||||
}
|
||||
}
|
||||
|
||||
return $stringaddress;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user