add siret on all invoice and ajuste position in facture
This commit is contained in:
parent
3a690ed967
commit
1e8b2c4381
@ -176,16 +176,18 @@ class InvoiceGroupPdfHandler extends FPDF {
|
|||||||
$clientAddress = $this->factureData['client_real_adress'];
|
$clientAddress = $this->factureData['client_real_adress'];
|
||||||
$maxWidth = $this->GetPageWidth();
|
$maxWidth = $this->GetPageWidth();
|
||||||
$availableWidhtForClientInfo = $maxWidth - 2 - $clientInfoXAxis;
|
$availableWidhtForClientInfo = $maxWidth - 2 - $clientInfoXAxis;
|
||||||
|
$address = FileExportHelpers::FormatTextForExport(trim($clientAddress));
|
||||||
|
$addressWidth = $this->GetStringWidth($address);
|
||||||
|
$addressWidthGreaterThanMaxWidth = $addressWidth > $availableWidhtForClientInfo;
|
||||||
|
$addressIsMoreThanTwoLines = ($addressWidth/$availableWidhtForClientInfo) > 2;
|
||||||
|
|
||||||
$clientInfoYAxis = 40;
|
|
||||||
|
$clientInfoYAxis =$addressIsMoreThanTwoLines ? 35 : 40;
|
||||||
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||||
$this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport($clientName));
|
$this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport($clientName));
|
||||||
$clientInfoYAxis += $this->interLigneHeader;
|
$clientInfoYAxis += $this->interLigneHeader;
|
||||||
$gapBetweenAddressLines = 0;
|
$gapBetweenAddressLines = 0;
|
||||||
if ( $this->factureData['group_type'] == 'single' ) {
|
if ( $this->factureData['group_type'] == 'single' ) {
|
||||||
$address = FileExportHelpers::FormatTextForExport(trim($clientAddress));
|
|
||||||
$addressWidth = $this->GetStringWidth($address);
|
|
||||||
$addressWidthGreaterThanMaxWidth = $addressWidth > $availableWidhtForClientInfo;
|
|
||||||
$isMultiline = false;
|
$isMultiline = false;
|
||||||
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||||
if ($addressWidthGreaterThanMaxWidth) {
|
if ($addressWidthGreaterThanMaxWidth) {
|
||||||
@ -236,8 +238,13 @@ class InvoiceGroupPdfHandler extends FPDF {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->SetXY($clientInfoXAxis,$clientInfoYAxis + 1);
|
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||||
$this->Cell(0, $this->interLigneHeader, trim(FileExportHelpers::FormatTextForExport($this->factureData['client_adress_city'])));
|
$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