finish invoice recap groupe adress à la lignen wip on facture
This commit is contained in:
parent
a24b9e613c
commit
2b1381bd2a
@ -202,7 +202,17 @@ class InvoiceRecapService {
|
||||
$pdf->Cell( 0, 7, utf8_decode($clientGroupFacturation["group_facturation_name"]));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientGroupFacturation["address"]))));
|
||||
$clientAdress = FileExportHelpers::FormatTextForExport($clientGroupFacturation["address"]);
|
||||
$clientAdressWidth = $pdf->GetStringWidth($clientAdress);
|
||||
$maxWidth = $pdf->GetPageWidth();
|
||||
$availableWidhtForClientInfo = $maxWidth - 10 - $clientInfoXAxis;
|
||||
$clientAdressIsMultiline = $clientAdressWidth > $availableWidhtForClientInfo;
|
||||
$pdf->SetMargins(0,0,10);
|
||||
$pdf->MultiCell( 0, 7, trim($clientAdress));
|
||||
$pdf->SetMargins(0,0,0);
|
||||
if($clientAdressIsMultiline){
|
||||
$clientInfoYAxis += 7;
|
||||
}
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientGroupFacturation["postal_code"]. ' ' .$clientGroupFacturation["city"]))));
|
||||
@ -290,13 +300,18 @@ class InvoiceRecapService {
|
||||
|
||||
// adresse du facture
|
||||
$clientInfoXAxis = 125;
|
||||
$clientInfoYAxis = 40;
|
||||
$clientInfoYAxis = $clientAdressIsMultiline ? 33 : 40;
|
||||
$pdf->SetFont('ComicSans','',size: 11);
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, utf8_decode('Groupe '.$clientGroupFacturation["group_facturation_name"]));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientGroupFacturation["address"]))));
|
||||
$pdf->SetMargins(0,0,10);
|
||||
$pdf->MultiCell( 0, 7, trim($clientAdress));
|
||||
$pdf->SetMargins(0,0,0);
|
||||
if($clientAdressIsMultiline){
|
||||
$clientInfoYAxis += 7;
|
||||
}
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientGroupFacturation["postal_code"]. ' '.$clientGroupFacturation["city"]))));
|
||||
@ -584,7 +599,17 @@ class InvoiceRecapService {
|
||||
$pdf->Cell( 0, 7, utf8_decode($clientHeaderLabel));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientAddress))));
|
||||
$clientAddress = FileExportHelpers::FormatTextForExport($clientAddress);
|
||||
$clientAdressWidth = $pdf->GetStringWidth($clientAddress);
|
||||
$maxWidth = $pdf->GetPageWidth();
|
||||
$availableWidhtForClientInfo = $maxWidth - 10 - $clientInfoXAxis;
|
||||
$clientAdressIsMultiline = $clientAdressWidth > $availableWidhtForClientInfo;
|
||||
$pdf->SetMargins(0,0,10);
|
||||
$pdf->MultiCell( 0, 7, trim($clientAddress));
|
||||
$pdf->SetMargins(0,0,0);
|
||||
if($clientAdressIsMultiline){
|
||||
$clientInfoYAxis += 7;
|
||||
}
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientCity))));
|
||||
@ -672,13 +697,18 @@ class InvoiceRecapService {
|
||||
|
||||
// adresse du facture
|
||||
$clientInfoXAxis = 125;
|
||||
$clientInfoYAxis = 40;
|
||||
$clientInfoYAxis = $clientAdressIsMultiline ? 33 : 40;
|
||||
$pdf->SetFont('ComicSans','',size: 11);
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, utf8_decode($clientHeaderLabel));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientAddress))));
|
||||
$pdf->SetMargins(0,0,10);
|
||||
$pdf->MultiCell( 0, 7, trim($clientAddress));
|
||||
$pdf->SetMargins(0,0,0);
|
||||
if($clientAdressIsMultiline){
|
||||
$clientInfoYAxis += 7;
|
||||
}
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientCity))));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user