Merge branch 'staging' into production
This commit is contained in:
commit
fc37e8583d
@ -183,16 +183,18 @@ class InvoiceGroupPdfHandler extends FPDF
|
||||
$clientAddress = $this->factureData['client_real_adress'];
|
||||
$maxWidth = $this->GetPageWidth();
|
||||
$availableWidhtForClientInfo = $maxWidth - 2 - $clientInfoXAxis;
|
||||
$address = FileExportHelpers::FormatTextForExport(trim($clientAddress));
|
||||
$addressWidth = $this->GetStringWidth($address);
|
||||
$addressWidthGreaterThanMaxWidth = $addressWidth > $availableWidhtForClientInfo;
|
||||
$addressIsMoreThanTwoLines = ($addressWidth/$availableWidhtForClientInfo) > 2;
|
||||
|
||||
$clientInfoYAxis = 40;
|
||||
$this->SetXY($clientInfoXAxis, $clientInfoYAxis);
|
||||
|
||||
$clientInfoYAxis =$addressIsMoreThanTwoLines ? 35 : 40;
|
||||
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport($clientName));
|
||||
$clientInfoYAxis += $this->interLigneHeader;
|
||||
$gapBetweenAddressLines = 0;
|
||||
if ( $this->factureData['group_type'] == 'single' ) {
|
||||
$address = FileExportHelpers::FormatTextForExport(trim($clientAddress));
|
||||
$addressWidth = $this->GetStringWidth($address);
|
||||
$addressWidthGreaterThanMaxWidth = $addressWidth > $availableWidhtForClientInfo;
|
||||
$isMultiline = false;
|
||||
$this->SetXY($clientInfoXAxis, $clientInfoYAxis);
|
||||
if ($addressWidthGreaterThanMaxWidth) {
|
||||
@ -242,9 +244,14 @@ class InvoiceGroupPdfHandler extends FPDF
|
||||
$clientInfoYAxis += $this->interLigneHeader;
|
||||
}
|
||||
}
|
||||
|
||||
$this->SetXY($clientInfoXAxis, $clientInfoYAxis + 1);
|
||||
|
||||
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$this->Cell(0, $this->interLigneHeader, trim(FileExportHelpers::FormatTextForExport($this->factureData['client_adress_city'])));
|
||||
if($this->factureData['siret']){
|
||||
$clientInfoYAxis += $this->interLigneHeader;
|
||||
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$this->Cell(0, $this->interLigneHeader, 'Siret: ' . $this->factureData['siret']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user