Merge branch 'staging' of https://gitlab.com/sottye/hytha35 into staging
This commit is contained in:
commit
4ca58c2668
@ -80,7 +80,7 @@ class DevisPdfHandler extends FPDF {
|
|||||||
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration_adresse_city']), 0, 0);border:
|
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration_adresse_city']), 0, 0);border:
|
||||||
$this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->devisData['client_adress_city'])), 0, 1,'R');
|
$this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->devisData['client_adress_city'])), 0, 1,'R');
|
||||||
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport('Tél : ') . FileExportHelpers::FormatTextForExport($this->devisData['configuration']->telephone),0,0);
|
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport('Tél : ') . FileExportHelpers::FormatTextForExport($this->devisData['configuration']->telephone),0,0);
|
||||||
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . $this->devisData['siret'], 0, 1,'R');
|
$this->Cell(0, 7, 'Siret: ' . $this->devisData['siret'], 0, 1,'R');
|
||||||
$this->Cell(0, 7, 'Mail : ' . $this->devisData['configuration']->mail, 0, 1);
|
$this->Cell(0, 7, 'Mail : ' . $this->devisData['configuration']->mail, 0, 1);
|
||||||
$this->Ln(3);
|
$this->Ln(3);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,7 +84,7 @@ class InvoiceGroupPdfHandler extends FPDF {
|
|||||||
$height = $originalHeight * $scale;
|
$height = $originalHeight * $scale;
|
||||||
// Calculer la position pour centrer l'image
|
// Calculer la position pour centrer l'image
|
||||||
$x = (210 - $width) / 2 + 15; // Décalage à droite de 15 mm
|
$x = (210 - $width) / 2 + 15; // Décalage à droite de 15 mm
|
||||||
$y = ((297 - $height) / 2 ) + 19; // 297 mm est la hauteur d'une page A4
|
$y = ((297 - $height) / 2 ) + 21; // 297 mm est la hauteur d'une page A4
|
||||||
|
|
||||||
// Ajouter l'image en filigrane
|
// Ajouter l'image en filigrane
|
||||||
$this->Image($imagePath, $x, $y, $width, $height); // Chemin, position x, position y, largeur, hauteur
|
$this->Image($imagePath, $x, $y, $width, $height); // Chemin, position x, position y, largeur, hauteur
|
||||||
@ -265,14 +265,15 @@ class InvoiceGroupPdfHandler extends FPDF {
|
|||||||
|
|
||||||
$this->SetLineWidth(0.2);
|
$this->SetLineWidth(0.2);
|
||||||
$gapBetweenStartingOfArticlesTableAndColumnName = 7;
|
$gapBetweenStartingOfArticlesTableAndColumnName = 7;
|
||||||
$tableHeight = $this->thereIsOrderOrCaseNumber ? 137 : 137 + 7;
|
$additionnalheight = 0.75;
|
||||||
|
$tableHeight = $this->thereIsOrderOrCaseNumber ? (137 + $additionnalheight) : ( 137 + 6 + $additionnalheight);
|
||||||
$this->Rect(3, $this->startingYOfArticlesTable, 204, $tableHeight, "D");
|
$this->Rect(3, $this->startingYOfArticlesTable, 204, $tableHeight, "D");
|
||||||
// $this->RoundedRect(3, $this->startingYOfArticlesTable, 204, $tableHeight,5 ,'1234',"D");
|
// $this->RoundedRect(3, $this->startingYOfArticlesTable, 204, $tableHeight,5 ,'1234',"D");
|
||||||
// cadre titre des colonnes
|
// cadre titre des colonnes
|
||||||
$this->Line(3, $this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName, 207,$this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName);
|
$this->Line(3, $this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName, 207,$this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName);
|
||||||
// les traits verticaux colonnes
|
// les traits verticaux colonnes
|
||||||
$additionalMargRight = 1;
|
$additionalMargRight = 1;
|
||||||
$endingLine = 234;
|
$endingLine = 233 + $additionnalheight;
|
||||||
$this->Line(27 + $additionalMargRight, $this->startingYOfArticlesTable, 27+ $additionalMargRight , $endingLine);
|
$this->Line(27 + $additionalMargRight, $this->startingYOfArticlesTable, 27+ $additionalMargRight , $endingLine);
|
||||||
$this->Line(142 + $additionalMargRight, $this->startingYOfArticlesTable, 142+ $additionalMargRight , $endingLine);
|
$this->Line(142 + $additionalMargRight, $this->startingYOfArticlesTable, 142+ $additionalMargRight , $endingLine);
|
||||||
$this->Line(164 + $additionalMargRight, $this->startingYOfArticlesTable, 164+ $additionalMargRight , $endingLine);
|
$this->Line(164 + $additionalMargRight, $this->startingYOfArticlesTable, 164+ $additionalMargRight , $endingLine);
|
||||||
|
|||||||
@ -57,7 +57,7 @@ class InvoiceOgfPdfHandler extends InvoiceGroupPdfHandler {
|
|||||||
$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'])));
|
||||||
$clientInfoYAxis += $this->interLigneHeader;
|
$clientInfoYAxis += $this->interLigneHeader;
|
||||||
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||||
$this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . $this->factureData['siret']);
|
$this->Cell(0, $this->interLigneHeader, 'Siret: ' . $this->factureData['siret']);
|
||||||
$clientInfoYAxis += $this->interLigneHeader;
|
$clientInfoYAxis += $this->interLigneHeader;
|
||||||
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
$this->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||||
$this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport('Mail : ') . $this->factureData['client_mail']);
|
$this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport('Mail : ') . $this->factureData['client_mail']);
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class InvoicePdfHandler extends FPDF
|
|||||||
$height = $originalHeight * $scale;
|
$height = $originalHeight * $scale;
|
||||||
// Calculer la position pour centrer l'image
|
// Calculer la position pour centrer l'image
|
||||||
$x = (210 - $width) / 2 + 15; // Décalage à droite de 15 mm
|
$x = (210 - $width) / 2 + 15; // Décalage à droite de 15 mm
|
||||||
$y = ((297 - $height) / 2 ) + 19; // 297 mm est la hauteur d'une page A4
|
$y = ((297 - $height) / 2 ) + 21; // 297 mm est la hauteur d'une page A4
|
||||||
|
|
||||||
// Ajouter l'image en filigrane
|
// Ajouter l'image en filigrane
|
||||||
$this->Image($imagePath, $x, $y, $width, $height); // Chemin, position x, position y, largeur, hauteur
|
$this->Image($imagePath, $x, $y, $width, $height); // Chemin, position x, position y, largeur, hauteur
|
||||||
@ -186,7 +186,7 @@ class InvoicePdfHandler extends FPDF
|
|||||||
$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'])));
|
||||||
$clientInfoYAxis += $this->interLigneHeader;
|
$clientInfoYAxis += $this->interLigneHeader;
|
||||||
$this->SetXY($clientInfoXAxis, $clientInfoYAxis);
|
$this->SetXY($clientInfoXAxis, $clientInfoYAxis);
|
||||||
$this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . $this->factureData['siret']);
|
$this->Cell(0, $this->interLigneHeader,'Siret: ' . $this->factureData['siret']);
|
||||||
$clientInfoYAxis += $this->interLigneHeader;
|
$clientInfoYAxis += $this->interLigneHeader;
|
||||||
$this->SetXY($clientInfoXAxis, $clientInfoYAxis);
|
$this->SetXY($clientInfoXAxis, $clientInfoYAxis);
|
||||||
$this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport('Mail : ') . $this->factureData['client_mail']);
|
$this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport('Mail : ') . $this->factureData['client_mail']);
|
||||||
@ -246,9 +246,10 @@ class InvoicePdfHandler extends FPDF
|
|||||||
|
|
||||||
private function DrawArticlesTable()
|
private function DrawArticlesTable()
|
||||||
{
|
{
|
||||||
|
$this->startingYOfArticlesTable = $this->startingYOfArticlesTable - 2;
|
||||||
$this->SetLineWidth(0.2);
|
$this->SetLineWidth(0.2);
|
||||||
$gapBetweenStartingOfArticlesTableAndColumnName = 8;
|
$gapBetweenStartingOfArticlesTableAndColumnName = 8;
|
||||||
$tableHeight = $this->thereIsOrderOrCaseNumber ? $this->articleTablesHeight : $this->articleTablesHeight + 7;
|
$tableHeight = $this->thereIsOrderOrCaseNumber ? $this->articleTablesHeight : $this->articleTablesHeight + 9;
|
||||||
$this->Rect(3, $this->startingYOfArticlesTable , 204, $tableHeight, "D");
|
$this->Rect(3, $this->startingYOfArticlesTable , 204, $tableHeight, "D");
|
||||||
// cadre titre des colonnes
|
// cadre titre des colonnes
|
||||||
$this->Line(3, $this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName, 207, $this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName);
|
$this->Line(3, $this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName, 207, $this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName);
|
||||||
@ -268,7 +269,7 @@ class InvoicePdfHandler extends FPDF
|
|||||||
$columnNameY = $this->startingYOfArticlesTable - 1;
|
$columnNameY = $this->startingYOfArticlesTable - 1;
|
||||||
$this->SetFont('ComicSans', '', 10);
|
$this->SetFont('ComicSans', '', 10);
|
||||||
$this->SetXY(12 + $additionalMargRight, $columnNameY);
|
$this->SetXY(12 + $additionalMargRight, $columnNameY);
|
||||||
$this->Cell(7, 10, "Date", 0, 0, 'C');
|
$this->Cell(7, 10, "Datess", 0, 0, 'C');
|
||||||
|
|
||||||
$this->SetXY(30 + $additionalMargRight, $columnNameY);
|
$this->SetXY(30 + $additionalMargRight, $columnNameY);
|
||||||
$this->Cell(100, 10, "Description", 0, 0, 'C');
|
$this->Cell(100, 10, "Description", 0, 0, 'C');
|
||||||
@ -385,7 +386,7 @@ class InvoicePdfHandler extends FPDF
|
|||||||
public function SetFactureContent()
|
public function SetFactureContent()
|
||||||
{
|
{
|
||||||
$this->AddPage();
|
$this->AddPage();
|
||||||
$this->SetMargins(2, 0, 3);
|
$this->SetMargins(3, 0, 3);
|
||||||
$this->DrawInvoiceCompanyAndClientInfo();
|
$this->DrawInvoiceCompanyAndClientInfo();
|
||||||
$this->DrawInvoiceInfoTable();
|
$this->DrawInvoiceInfoTable();
|
||||||
$this->DrawArticlesTable();
|
$this->DrawArticlesTable();
|
||||||
|
|||||||
@ -322,7 +322,7 @@ class InvoiceRecapService {
|
|||||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientGroupFacturation["postal_code"]. ' '.$clientGroupFacturation["city"]))));
|
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientGroupFacturation["postal_code"]. ' '.$clientGroupFacturation["city"]))));
|
||||||
$clientInfoYAxis += 7;
|
$clientInfoYAxis += 7;
|
||||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||||
$pdf->Cell( 0, 7, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . FileExportHelpers::FormatTextForExport($clientGroupFacturation["siret_number"]));
|
$pdf->Cell( 0, 7, 'Siret: ' . FileExportHelpers::FormatTextForExport($clientGroupFacturation["siret_number"]));
|
||||||
$clientInfoYAxis += 7;
|
$clientInfoYAxis += 7;
|
||||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||||
$pdf->Cell( 0, 7, 'Email: ' . utf8_decode(html_entity_decode($clientGroupFacturation["email"])),0,1);
|
$pdf->Cell( 0, 7, 'Email: ' . utf8_decode(html_entity_decode($clientGroupFacturation["email"])),0,1);
|
||||||
@ -738,7 +738,7 @@ class InvoiceRecapService {
|
|||||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientCity))));
|
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientCity))));
|
||||||
$clientInfoYAxis += 7;
|
$clientInfoYAxis += 7;
|
||||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||||
$pdf->Cell( 0, 7, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . FileExportHelpers::FormatTextForExport($tvaIntraCommuValue));
|
$pdf->Cell( 0, 7, 'Siret: ' . FileExportHelpers::FormatTextForExport($tvaIntraCommuValue));
|
||||||
$clientInfoYAxis += 7;
|
$clientInfoYAxis += 7;
|
||||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||||
$pdf->Cell( 0, 7, 'Email: ' . utf8_decode(html_entity_decode($clientMail)),0,1);
|
$pdf->Cell( 0, 7, 'Email: ' . utf8_decode(html_entity_decode($clientMail)),0,1);
|
||||||
|
|||||||
@ -83,7 +83,7 @@ class InvoiceRecapPdfHandler extends FPDF {
|
|||||||
$current_client = '';
|
$current_client = '';
|
||||||
$clientAddress = '';
|
$clientAddress = '';
|
||||||
$clientCity = '';
|
$clientCity = '';
|
||||||
$date_facture;
|
$date_facture = '';
|
||||||
$j=1;
|
$j=1;
|
||||||
foreach ($client as $key => $facture) {
|
foreach ($client as $key => $facture) {
|
||||||
if($j==1) {
|
if($j==1) {
|
||||||
@ -194,7 +194,7 @@ class InvoiceRecapPdfHandler extends FPDF {
|
|||||||
if($clientCity != ''){
|
if($clientCity != ''){
|
||||||
$pdf->Cell( 0, 6, trim(utf8_decode(html_entity_decode($clientCity))), 0, 1, 'R');
|
$pdf->Cell( 0, 6, trim(utf8_decode(html_entity_decode($clientCity))), 0, 1, 'R');
|
||||||
}
|
}
|
||||||
$pdf->Cell( 0, 6, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . FileExportHelpers::FormatTextForExport($tvaIntraCommuValue), 0, 1, 'R');
|
$pdf->Cell( 0, 6, ' Siret: ' . FileExportHelpers::FormatTextForExport($tvaIntraCommuValue), 0, 1, 'R');
|
||||||
$pdf->Cell( 0, 6, 'Email: ' . utf8_decode(html_entity_decode($facture['mail_client'])), 0, 1, 'R');
|
$pdf->Cell( 0, 6, 'Email: ' . utf8_decode(html_entity_decode($facture['mail_client'])), 0, 1, 'R');
|
||||||
|
|
||||||
// ***********************
|
// ***********************
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user