Merge branch 'staging' into production
This commit is contained in:
commit
416f4b030a
@ -186,15 +186,15 @@ class InvoiceGroupPdfHandler extends FPDF
|
||||
$address = FileExportHelpers::FormatTextForExport(trim($clientAddress));
|
||||
$addressWidth = $this->GetStringWidth($address);
|
||||
$addressWidthGreaterThanMaxWidth = $addressWidth > $availableWidhtForClientInfo;
|
||||
$addressIsMoreThanTwoLines = ($addressWidth/$availableWidhtForClientInfo) > 2;
|
||||
$addressIsMoreThanTwoLines = ($addressWidth / $availableWidhtForClientInfo) > 2;
|
||||
|
||||
|
||||
$clientInfoYAxis =$addressIsMoreThanTwoLines ? 35 : 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' ) {
|
||||
if ($this->factureData['group_type'] == 'single') {
|
||||
$isMultiline = false;
|
||||
$this->SetXY($clientInfoXAxis, $clientInfoYAxis);
|
||||
if ($addressWidthGreaterThanMaxWidth) {
|
||||
@ -202,25 +202,24 @@ class InvoiceGroupPdfHandler extends FPDF
|
||||
$this->MultiCell($availableWidhtForClientInfo, $this->interLigneHeader, $address, 0, 'L');
|
||||
$yAfter = $this->GetY();
|
||||
$gapBetweenAddressLines = $yAfter - $yBefore;
|
||||
$isMultiline = ($gapBetweenAddressLines) > $this->interLigneHeader;
|
||||
if($isMultiline){
|
||||
$this->SetXY($this->GetX(),$yBefore);
|
||||
$isMultiline = ($gapBetweenAddressLines) > $this->interLigneHeader;
|
||||
if ($isMultiline) {
|
||||
$this->SetXY($this->GetX(), $yBefore);
|
||||
}
|
||||
} else {
|
||||
$this->Cell($availableWidhtForClientInfo, $this->interLigneHeader, $address);
|
||||
}
|
||||
if($isMultiline){
|
||||
if($gapBetweenAddressLines > 0){
|
||||
$modulo = (int) round($gapBetweenAddressLines/$this->interLigneHeader);
|
||||
$clientInfoYAxis += $modulo*$this->interLigneHeader;
|
||||
if ($isMultiline) {
|
||||
if ($gapBetweenAddressLines > 0) {
|
||||
$modulo = (int) round($gapBetweenAddressLines / $this->interLigneHeader);
|
||||
$clientInfoYAxis += $modulo * $this->interLigneHeader;
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$clientInfoYAxis += $this->interLigneHeader;
|
||||
}
|
||||
|
||||
}else{
|
||||
$clientAddresses = explode(",",$clientAddress);
|
||||
} else {
|
||||
$clientAddresses = explode(",", $clientAddress);
|
||||
foreach ($clientAddresses as $address) {
|
||||
$address = FileExportHelpers::FormatTextForExport(trim($address));
|
||||
$addressWidth = $this->GetStringWidth($address);
|
||||
@ -244,11 +243,12 @@ class InvoiceGroupPdfHandler extends FPDF
|
||||
$clientInfoYAxis += $this->interLigneHeader;
|
||||
}
|
||||
}
|
||||
|
||||
$this->SetXY($clientInfoXAxis, $clientInfoYAxis);
|
||||
$this->Cell(0, $this->interLigneHeader, trim(FileExportHelpers::FormatTextForExport($this->factureData['client_adress_city'])));
|
||||
if($this->factureData['siret']){
|
||||
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$this->Cell(0, $this->interLigneHeader, 'Siret: ' . $this->factureData['siret']);
|
||||
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