Compare commits
37 Commits
production
...
production
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a880677c4 | ||
|
|
f2f737d6f8 | ||
|
|
024df6bcd8 | ||
|
|
2b867f27ea | ||
|
|
416f4b030a | ||
|
|
2d3196ffe4 | ||
|
|
fc37e8583d | ||
|
|
db6839451b | ||
|
|
625e81ac30 | ||
|
|
fbce8789c1 | ||
|
|
5396c6ad1b | ||
|
|
01f9176d32 | ||
|
|
f5d1426d12 | ||
|
|
8f13e48206 | ||
|
|
459fda7106 | ||
|
|
45f0f81c03 | ||
|
|
1c4a972222 | ||
|
|
d065671291 | ||
|
|
5512c23004 | ||
|
|
3ea9d4ed52 | ||
|
|
602466d9a9 | ||
|
|
b1fabe9804 | ||
|
|
2bbfe390eb | ||
|
|
12a751c1c3 | ||
|
|
0276655040 | ||
|
|
5ab91d4be7 | ||
|
|
91c67452c2 | ||
|
|
31633b04d9 | ||
|
|
dc3da8d425 | ||
|
|
ea119f5c73 | ||
|
|
4bd86ae762 | ||
|
|
2c1e771472 | ||
|
|
c07c4aaf88 | ||
|
|
95be6e4827 | ||
|
|
e7c51a4d73 | ||
|
|
f509f5e988 | ||
|
|
f8ff4c6b3e |
@ -40,7 +40,7 @@ class DevisPdfHandler extends FPDF {
|
|||||||
function Header()
|
function Header()
|
||||||
{
|
{
|
||||||
if($this->logo != "nothing"){
|
if($this->logo != "nothing"){
|
||||||
$this->Image($this->logoPath."logo.png", 2, 2, 50,35);
|
$this->Image($this->logoPath."logo.png", 10, 10, 75, 25);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$this->Cell(55,30,'');
|
$this->Cell(55,30,'');
|
||||||
|
|||||||
@ -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 ) + 21; // 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
|
||||||
@ -98,11 +98,11 @@ class InvoicePdfHandler extends FPDF
|
|||||||
$this->SetY(-34);
|
$this->SetY(-34);
|
||||||
$this->SetFont('ComicSans', '', 7);
|
$this->SetFont('ComicSans', '', 7);
|
||||||
|
|
||||||
$this->MultiCell(0,4,utf8_decode(html_entity_decode('Tout retard de paiement entraînera de plein droit une pénalité de retard de 3 fois le taux légal ')));
|
$this->MultiCell(0, 4, utf8_decode(html_entity_decode('Tout retard de paiement entraînera de plein droit une pénalité de retard de 3 fois le taux légal ')));
|
||||||
$this->MultiCell(0,4,utf8_decode(html_entity_decode('(Loi 2008-776 du 4 août 2008) et une indemnité forfaitaire de 40 EUR pour frais de recouvrement sera appliquée.')));
|
$this->MultiCell(0, 4, utf8_decode(html_entity_decode('(Loi 2008-776 du 4 août 2008) et une indemnité forfaitaire de 40 EUR pour frais de recouvrement sera appliquée.')));
|
||||||
$this->Ln(1);
|
$this->Ln(1);
|
||||||
$this->MultiCell(0,4,utf8_decode(html_entity_decode('Si les frais de recouvrement sont supérieurs à ce montant forfaitaire, une indemnisation complémentaire')));
|
$this->MultiCell(0, 4, utf8_decode(html_entity_decode('Si les frais de recouvrement sont supérieurs à ce montant forfaitaire, une indemnisation complémentaire')));
|
||||||
$this->MultiCell(0,4,utf8_decode(html_entity_decode('sera due sur présentation de justificatifs (articles L.441-3 et L.441-6 du code de commerce).')));
|
$this->MultiCell(0, 4, utf8_decode(html_entity_decode('sera due sur présentation de justificatifs (articles L.441-3 et L.441-6 du code de commerce).')));
|
||||||
|
|
||||||
$this->SetY(-10);
|
$this->SetY(-10);
|
||||||
$this->SetFont('ComicSans', '', 7);
|
$this->SetFont('ComicSans', '', 7);
|
||||||
@ -204,7 +204,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,'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']);
|
||||||
@ -268,16 +268,16 @@ class InvoicePdfHandler extends FPDF
|
|||||||
$this->SetLineWidth(0.2);
|
$this->SetLineWidth(0.2);
|
||||||
$gapBetweenStartingOfArticlesTableAndColumnName = 8;
|
$gapBetweenStartingOfArticlesTableAndColumnName = 8;
|
||||||
$tableHeight = $this->thereIsOrderOrCaseNumber ? $this->articleTablesHeight : $this->articleTablesHeight + 9;
|
$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);
|
||||||
// les traits verticaux colonnes
|
// les traits verticaux colonnes
|
||||||
$additionalMargRight = 1;
|
$additionalMargRight = 1;
|
||||||
$endingLine = $this->thereIsOrderOrCaseNumber ? 231 : 230; // mois +1 pour le groupe
|
$endingLine = $this->thereIsOrderOrCaseNumber ? 231 : 230; // mois +1 pour le groupe
|
||||||
$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);
|
||||||
$this->Line(182 + $additionalMargRight, $this->startingYOfArticlesTable, 182+ $additionalMargRight , $endingLine);
|
$this->Line(182 + $additionalMargRight, $this->startingYOfArticlesTable, 182 + $additionalMargRight, $endingLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function DrawArticlesTableHeader()
|
private function DrawArticlesTableHeader()
|
||||||
@ -332,7 +332,7 @@ class InvoicePdfHandler extends FPDF
|
|||||||
$this->Cell(5, 6, $dateValue, 0, 0);
|
$this->Cell(5, 6, $dateValue, 0, 0);
|
||||||
|
|
||||||
$this->SetXY(30, $yValue);
|
$this->SetXY(30, $yValue);
|
||||||
$this->MultiAlignCell($maxDescriptionWidth , 6, utf8_decode(html_entity_decode($productDescription)), 0, '0',);
|
$this->MultiAlignCell($maxDescriptionWidth, 6, utf8_decode(html_entity_decode($productDescription)), 0, '0', );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -358,13 +358,13 @@ class InvoicePdfHandler extends FPDF
|
|||||||
private function DrawBankAndTotalPriceInfo($totalPriceArray)
|
private function DrawBankAndTotalPriceInfo($totalPriceArray)
|
||||||
{
|
{
|
||||||
$startOfYAfterMainTable = 236;
|
$startOfYAfterMainTable = 236;
|
||||||
$this->SetY( $startOfYAfterMainTable);
|
$this->SetY($startOfYAfterMainTable);
|
||||||
$this->SetFont('ComicSans', '', 8);
|
$this->SetFont('ComicSans', '', 8);
|
||||||
$this->MultiCell(0,4,utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de ". $this->factureData['configuration']->entreprise)));
|
$this->MultiCell(0, 4, utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de " . $this->factureData['configuration']->entreprise)));
|
||||||
$this->MultiCell(0,4,utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :")));
|
$this->MultiCell(0, 4, utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :")));
|
||||||
|
|
||||||
$this->Ln(1);
|
$this->Ln(1);
|
||||||
$startOftable = 3 ;
|
$startOftable = 3;
|
||||||
$this->SetX($startOftable);
|
$this->SetX($startOftable);
|
||||||
// Table IBAN
|
// Table IBAN
|
||||||
$this->SetFont('ComicSans', '', 8);
|
$this->SetFont('ComicSans', '', 8);
|
||||||
@ -384,11 +384,11 @@ class InvoicePdfHandler extends FPDF
|
|||||||
|
|
||||||
$this->SetFont('ComicSans', '', 10);
|
$this->SetFont('ComicSans', '', 10);
|
||||||
|
|
||||||
foreach($totalPriceArray as $label => $price){
|
foreach ($totalPriceArray as $label => $price) {
|
||||||
$this->SetXY($startOfArrayX,$startOfArrayY);
|
$this->SetXY($startOfArrayX, $startOfArrayY);
|
||||||
$this->Cell(24, 6.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, 6.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 += 6.5;
|
$startOfArrayY += 6.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -437,7 +437,7 @@ class InvoicePdfHandler extends FPDF
|
|||||||
if ($w == 0)
|
if ($w == 0)
|
||||||
$w = $this->w - $this->rMargin - $this->x;
|
$w = $this->w - $this->rMargin - $this->x;
|
||||||
$wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
|
$wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
|
||||||
$s = str_replace("\r", '', (string)$txt);
|
$s = str_replace("\r", '', (string) $txt);
|
||||||
$nb = strlen($s);
|
$nb = strlen($s);
|
||||||
if ($nb > 0 && $s[$nb - 1] == "\n")
|
if ($nb > 0 && $s[$nb - 1] == "\n")
|
||||||
$nb--;
|
$nb--;
|
||||||
|
|||||||
@ -171,7 +171,7 @@ class InvoiceRecapService {
|
|||||||
|
|
||||||
// logo : 80 de largeur et 55 de hauteur
|
// logo : 80 de largeur et 55 de hauteur
|
||||||
if($doesLogoExist){
|
if($doesLogoExist){
|
||||||
$pdf->Image($this->defaultImagePath."logo.png", 2, 2, 50,35);
|
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
//adresse de mon entreprise
|
//adresse de mon entreprise
|
||||||
@ -276,7 +276,7 @@ class InvoiceRecapService {
|
|||||||
$pdf->SetMargins(0,0,10);
|
$pdf->SetMargins(0,0,10);
|
||||||
|
|
||||||
if($doesLogoExist){
|
if($doesLogoExist){
|
||||||
$pdf->Image($this->defaultImagePath."logo.png", 2, 2, 50,35);
|
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
//adresse de mon entreprise
|
//adresse de mon entreprise
|
||||||
@ -589,7 +589,7 @@ class InvoiceRecapService {
|
|||||||
|
|
||||||
// logo : 80 de largeur et 55 de hauteur
|
// logo : 80 de largeur et 55 de hauteur
|
||||||
if($doesLogoExist){
|
if($doesLogoExist){
|
||||||
$pdf->Image($this->defaultImagePath."logo.png", 2, 2, 50,35);
|
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
//adresse de mon entreprise
|
//adresse de mon entreprise
|
||||||
@ -692,7 +692,7 @@ class InvoiceRecapService {
|
|||||||
$pdf->SetAutoPagebreak(False);
|
$pdf->SetAutoPagebreak(False);
|
||||||
$pdf->SetMargins(0,0,10);
|
$pdf->SetMargins(0,0,10);
|
||||||
if($doesLogoExist){
|
if($doesLogoExist){
|
||||||
$pdf->Image($this->defaultImagePath."logo.png", 2, 2, 50,35);
|
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
//adresse de mon entreprise
|
//adresse de mon entreprise
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user