Modification dans la génération du courrier, issue #0000146
This commit is contained in:
parent
f4356ce4fa
commit
79427a04e5
@ -24,19 +24,21 @@ class PDF extends FPDI {
|
||||
|
||||
function Footer() {}
|
||||
}
|
||||
|
||||
function normaliseVoie($txt)
|
||||
{
|
||||
$replace_pairs = array(
|
||||
'BD' => 'BOULEVARD',
|
||||
'BVD' => 'BOULEVARD',
|
||||
'AV' => 'AVENUE',
|
||||
'AVE' => 'AVENUE',
|
||||
'PL' => 'PLACE',
|
||||
'PLA' => 'PLACE',
|
||||
'ESP' => 'ESP',
|
||||
'RTE' => 'ROUTE',
|
||||
'ST' => 'SAINT',
|
||||
'STE' => 'SAINTE',
|
||||
'BD ' => 'BOULEVARD ',
|
||||
'BVD ' => 'BOULEVARD ',
|
||||
'AV ' => 'AVENUE ',
|
||||
'AVE ' => 'AVENUE ',
|
||||
'PL ' => 'PLACE ',
|
||||
'PLA ' => 'PLACE ',
|
||||
'ESP ' => 'ESP ',
|
||||
'RTE ' => 'ROUTE ',
|
||||
'ST ' => 'SAINT ',
|
||||
'STE ' => 'SAINTE ',
|
||||
'QU ' => 'QUAI ',
|
||||
);
|
||||
return strtr($txt, $replace_pairs);
|
||||
}
|
||||
@ -155,6 +157,7 @@ $pdf->SetY(50);
|
||||
|
||||
//Bloc Addresse destinataire
|
||||
$txt = '';
|
||||
/*
|
||||
$txt.= strtr(
|
||||
$pdfInfo->tribunal['Nom'],
|
||||
array(
|
||||
@ -165,6 +168,7 @@ $txt.= strtr(
|
||||
)
|
||||
);
|
||||
$txt.= "\n";
|
||||
*/
|
||||
$txt.= "REGISTRE DU COMMERCE - GREFFE" . "\n";
|
||||
$txt.= normaliseVoie($pdfInfo->tribunal['Adr']) . "\n";
|
||||
$txt.= normaliseVoie($pdfInfo->tribunal['AdrComp']) . "\n";
|
||||
@ -196,8 +200,8 @@ $pdf->MultiCell(0, 5, "Madame, Monsieur,", $border, 'L', 0, 1, '', $positionY, t
|
||||
$txt = '';
|
||||
if( $typeDocument == 'bilans' )
|
||||
{
|
||||
$txt.= 'une copie des comptes au';
|
||||
preg_match('/^[0-9]{3}_.*?-([0-9]{8}).*?/', $commande->refDocument, $matches);
|
||||
$txt.= 'une copie du bilan au ';
|
||||
preg_match('/^[0-9]{4}_.*?-([0-9]{8}).*?/', $commande->refDocument, $matches);
|
||||
$txt.= substr($matches[1],6,2).'/'.substr($matches[1],4,2).'/'.substr($matches[1],0,4);
|
||||
}
|
||||
elseif( $typeDocument == 'actes' )
|
||||
@ -210,6 +214,7 @@ elseif( $typeDocument == 'actes' )
|
||||
substr($commande->refDocument,7,2).'/'.
|
||||
substr($commande->refDocument,3,4);
|
||||
}
|
||||
|
||||
$positionY = $pdf->GetY()+2;
|
||||
$pdf->MultiCell(0, 5, "Je vous prie de nous faire parvenir $txt concernant la société:", $border, 'L', 0, 1, '', $positionY, true);
|
||||
|
||||
@ -218,7 +223,9 @@ $txt = '';
|
||||
$txt.= $pdfInfo->nom;
|
||||
$txt.= ' ( ' . $pdfInfo->siren . $pdfInfo->libTrib . ' )' . "\n";
|
||||
foreach($pdfInfo->adresse as $item){
|
||||
$txt.= normaliseVoie(htmlspecialchars_decode($item, ENT_QUOTES)) . "\n";
|
||||
if( !empty($item) ){
|
||||
$txt.= normaliseVoie(htmlspecialchars_decode($item, ENT_QUOTES)) . "\n";
|
||||
}
|
||||
}
|
||||
$positionY = $pdf->GetY()+2;
|
||||
$pdf->MultiCell(0, 5, $txt, $border, 'L', 0, 1, '', $positionY, true);
|
||||
@ -227,7 +234,7 @@ $pdf->MultiCell(0, 5, $txt, $border, 'L', 0, 1, '', $positionY, true);
|
||||
$positionY = $pdf->GetY()+5;
|
||||
if($pdfInfo->enveloppe)
|
||||
{
|
||||
$txt = "Ci joint une enveloppe timbré ainsi qu'un chèque d'un montant de ".
|
||||
$txt = "Ci joint une enveloppe timbrée ainsi qu'un chèque d'un montant de ".
|
||||
$pdfInfo->prix." euros en règlement de cette commande.";
|
||||
}else{
|
||||
$txt = "Ci joint un chèque d'un montant de ".
|
||||
|
Loading…
x
Reference in New Issue
Block a user