make-center-all text-in-table- and same-font
This commit is contained in:
parent
cffd462048
commit
0d4b17ae30
@ -3114,7 +3114,6 @@ class Bdd {
|
|||||||
$factureData["siret"] = $devis["group_siret_number"];
|
$factureData["siret"] = $devis["group_siret_number"];
|
||||||
$factureData["group_name"] = $devis["group_name"] ?? "";
|
$factureData["group_name"] = $devis["group_name"] ?? "";
|
||||||
$templateType = $devis['fk_template_type_key'] ?? ClientTemplateTypeConstant::PRIVEES;
|
$templateType = $devis['fk_template_type_key'] ?? ClientTemplateTypeConstant::PRIVEES;
|
||||||
$templateType = $devis['code_comptable'] ?? '-';
|
|
||||||
$factureData["group_type"] = "group";
|
$factureData["group_type"] = "group";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,7 +73,7 @@ class InvoiceFunecapPdfHandler extends InvoiceGroupPdfHandler {
|
|||||||
$productDescription .= " de " . $currentDevis["defunt_nom"] ?? "";
|
$productDescription .= " de " . $currentDevis["defunt_nom"] ?? "";
|
||||||
}
|
}
|
||||||
$tvaAmount = $valueTtc - $valueHt;
|
$tvaAmount = $valueTtc - $valueHt;
|
||||||
$this->SetXY( 5,$yValue );
|
$this->SetXY( 4.5,$yValue );
|
||||||
$this->Cell(5, 6, $dateValue, 0,0);
|
$this->Cell(5, 6, $dateValue, 0,0);
|
||||||
|
|
||||||
$this->SetXY( 29,$yValue );
|
$this->SetXY( 29,$yValue );
|
||||||
|
|||||||
@ -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 ) + 30; // 297 mm est la hauteur d'une page A4
|
$y = ((297 - $height) / 2 ) + 25; // 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
|
||||||
@ -246,17 +246,17 @@ class InvoiceGroupPdfHandler extends FPDF {
|
|||||||
$factureDateEcheance->modify('last day of next month');
|
$factureDateEcheance->modify('last day of next month');
|
||||||
$factureDateEcheance = $factureDateEcheance->format('d-m-Y');
|
$factureDateEcheance = $factureDateEcheance->format('d-m-Y');
|
||||||
|
|
||||||
$this->SetFont('ComicSans', '', 9);
|
$this->SetFont('ComicSans', '', 10);
|
||||||
$this->Cell(25, 7, 'DATE', 1, 0, 'C');
|
$this->Cell(25, 7, 'DATE', 1, 0, 'C');
|
||||||
$this->Cell(104, 7, 'CLIENT', 1, 0, 'C');
|
$this->Cell(104, 7, 'CLIENT', 1, 0, 'C');
|
||||||
$this->Cell(39, 7, 'FACTURE', 1, 0, 'C');
|
$this->Cell(39, 7, 'FACTURE', 1, 0, 'C');
|
||||||
$this->Cell(36, 7, 'ECHEANCE', 1, 1, 'C');
|
$this->Cell(36, 7, 'ECHEANCE', 1, 1, 'C');
|
||||||
|
|
||||||
$this->SetFont('ComicSans', '', 9);
|
$this->SetFont('ComicSans', '', 10);
|
||||||
$this->Cell(25, 11, $factureDatePaiement, 1, 0, 'C');
|
$this->Cell(25, 9, $factureDatePaiement, 1, 0, 'C');
|
||||||
$this->Cell(104, 11, utf8_decode(html_entity_decode($this->factureData['group_name'])), 1, 0, 'C');
|
$this->Cell(104, 9, utf8_decode(html_entity_decode($this->factureData['group_name'])), 1, 0, 'C');
|
||||||
$this->Cell(39, 11, $this->factureData['num'], 1, 0, 'C');
|
$this->Cell(39, 9, $this->factureData['num'], 1, 0, 'C');
|
||||||
$this->Cell(36, 11, $factureDateEcheance, 1, 1, 'C');
|
$this->Cell(36, 9, $factureDateEcheance, 1, 1, 'C');
|
||||||
|
|
||||||
$this->startingYOfArticlesTable = $startInvoiceInfoTable + 20;
|
$this->startingYOfArticlesTable = $startInvoiceInfoTable + 20;
|
||||||
}
|
}
|
||||||
@ -264,7 +264,7 @@ class InvoiceGroupPdfHandler extends FPDF {
|
|||||||
public function DrawArticlesTableRect(){
|
public function DrawArticlesTableRect(){
|
||||||
|
|
||||||
$this->SetLineWidth(0.2);
|
$this->SetLineWidth(0.2);
|
||||||
$gapBetweenStartingOfArticlesTableAndColumnName = 10;
|
$gapBetweenStartingOfArticlesTableAndColumnName = 8;
|
||||||
$tableHeight = $this->thereIsOrderOrCaseNumber ? 137 : 137 + 10;
|
$tableHeight = $this->thereIsOrderOrCaseNumber ? 137 : 137 + 10;
|
||||||
$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");
|
||||||
@ -279,22 +279,22 @@ class InvoiceGroupPdfHandler extends FPDF {
|
|||||||
|
|
||||||
public function DrawArticlesTableHeader(){
|
public function DrawArticlesTableHeader(){
|
||||||
$tvaValue = $this->factureData["configuration"]->tva_default;
|
$tvaValue = $this->factureData["configuration"]->tva_default;
|
||||||
$columnNameY = $this->startingYOfArticlesTable + 1;
|
$columnNameY = $this->startingYOfArticlesTable - 1;
|
||||||
$this->SetFont('ComicSans', '', 10);
|
$this->SetFont('ComicSans', '', 10);
|
||||||
$this->SetXY(12, $columnNameY);
|
$this->SetXY(12, $columnNameY);
|
||||||
$this->Cell(7, 8, "Date", 0, 0, 'C');
|
$this->Cell(7, 10, "Date", 0, 0, 'C');
|
||||||
|
|
||||||
$this->SetXY(28, $columnNameY);
|
$this->SetXY(28, $columnNameY);
|
||||||
$this->Cell(100, 8, "Description", 0, 0, 'C');
|
$this->Cell(100, 10, "Description", 0, 0, 'C');
|
||||||
|
|
||||||
$this->SetXY(135, $columnNameY);
|
$this->SetXY(135, $columnNameY);
|
||||||
$this->Cell(20, 8, "Prix Uni. HT", 0, 0, 'C');
|
$this->Cell(20, 10, "Prix Uni. HT", 0, 0, 'C');
|
||||||
|
|
||||||
$this->SetXY(159, $columnNameY);
|
$this->SetXY(159, $columnNameY);
|
||||||
$this->Cell(20, 8, 'TVA ' . $tvaValue . '%', 0, 0, 'C');
|
$this->Cell(20, 10, 'TVA ' . $tvaValue . '%', 0, 0, 'C');
|
||||||
|
|
||||||
$this->SetXY(185, $columnNameY);
|
$this->SetXY(185, $columnNameY);
|
||||||
$this->Cell(20, 8, "Prix Uni. TTC", 0, 0, 'C');
|
$this->Cell(20, 10, "Prix Uni. TTC", 0, 0, 'C');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function DrawArticlesTableValue(){
|
public function DrawArticlesTableValue(){
|
||||||
@ -329,7 +329,7 @@ class InvoiceGroupPdfHandler extends FPDF {
|
|||||||
$productDescription .= " de " . $currentDevis["defunt_nom"] ?? "";
|
$productDescription .= " de " . $currentDevis["defunt_nom"] ?? "";
|
||||||
}
|
}
|
||||||
$tvaAmount = $valueTtc - $valueHt;
|
$tvaAmount = $valueTtc - $valueHt;
|
||||||
$this->SetXY( 5,$yValue );
|
$this->SetXY(4,$yValue );
|
||||||
$this->Cell(5, 6, $dateValue, 0,0);
|
$this->Cell(5, 6, $dateValue, 0,0);
|
||||||
|
|
||||||
$this->SetXY( 29,$yValue );
|
$this->SetXY( 29,$yValue );
|
||||||
@ -386,9 +386,9 @@ class InvoiceGroupPdfHandler extends FPDF {
|
|||||||
$this->SetFont('ComicSans', '', 8);
|
$this->SetFont('ComicSans', '', 8);
|
||||||
$ibanWidth = 62;
|
$ibanWidth = 62;
|
||||||
$ibanCursorY = $this->GetY();
|
$ibanCursorY = $this->GetY();
|
||||||
$this->Cell($ibanWidth, 5, 'IBAN : FR76 1360 6000 1436 5418 1800 038', 1, 1, 'C');
|
$this->Cell($ibanWidth, 6.5, 'IBAN : FR76 1360 6000 1436 5418 1800 038', 1, 1, 'C');
|
||||||
$ibanCursorX = $this->GetX();
|
$ibanCursorX = $this->GetX();
|
||||||
$this->Cell($ibanWidth, 5, 'Code SWIFT : AGRI FR PP 836', 1, 1, 'C');
|
$this->Cell($ibanWidth, 6.5, 'Code SWIFT : AGRI FR PP 836', 1, 1, 'C');
|
||||||
|
|
||||||
//TABLE HT
|
//TABLE HT
|
||||||
$tableWidth = 48; // Largeur totale de la 2e table (20+20)
|
$tableWidth = 48; // Largeur totale de la 2e table (20+20)
|
||||||
@ -403,10 +403,10 @@ class InvoiceGroupPdfHandler extends FPDF {
|
|||||||
$totalPriceArray = $this->totalPrices;
|
$totalPriceArray = $this->totalPrices;
|
||||||
foreach($totalPriceArray as $label => $price){
|
foreach($totalPriceArray as $label => $price){
|
||||||
$this->SetXY($startOfArrayX,$startOfArrayY);
|
$this->SetXY($startOfArrayX,$startOfArrayY);
|
||||||
$this->Cell(24, 5, $label, 1, 1, 'C');
|
$this->Cell(24, 6.5, $label, 1, 1, 'C');
|
||||||
$this->SetXY($startOfArrayX + 24,$startOfArrayY);
|
$this->SetXY($startOfArrayX + 24,$startOfArrayY);
|
||||||
$this->Cell(24, 5, number_format($price,2,'.','').chr(128), 1, 1, 'C');
|
$this->Cell(24, 6.5, number_format($price,2,'.','').chr(128), 1, 1, 'C');
|
||||||
$startOfArrayY += 5;
|
$startOfArrayY += 6.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user