@@ -344,7 +344,7 @@ public function genererFacture($id_cotisation, $chemin = null)
344
344
345
345
// A l'attention du client [adresse]
346
346
$ pdf ->SetFont ('Arial ' , 'BU ' , 10 );
347
- $ pdf ->Cell (130 , 5 , utf8_decode ( 'Objet : Facture n° ' . $ cotisation ['numero_facture ' ]) );
347
+ $ pdf ->Cell (130 , 5 , 'Objet : Facture n° ' . $ cotisation ['numero_facture ' ]);
348
348
$ pdf ->SetFont ('Arial ' , '' , 10 );
349
349
350
350
if ($ cotisation ['type_personne ' ] == AFUP_PERSONNES_MORALES ) {
@@ -355,33 +355,33 @@ public function genererFacture($id_cotisation, $chemin = null)
355
355
$ patternPrefix = $ personne ['nom ' ];
356
356
}
357
357
$ pdf ->Ln (10 );
358
- $ pdf ->MultiCell (130 , 5 , utf8_decode ( $ nom . "\n" . $ personne ['adresse ' ] . "\n" . $ personne ['code_postal ' ] . "\n" . $ personne ['ville ' ]) );
358
+ $ pdf ->MultiCell (130 , 5 , $ nom . "\n" . $ personne ['adresse ' ] . "\n" . $ personne ['code_postal ' ] . "\n" . $ personne ['ville ' ]);
359
359
360
360
if (isset ($ cotisation ['reference_client ' ])) {
361
361
$ pdf ->Ln (10 );
362
- $ pdf ->MultiCell (180 , 5 , utf8_decode ( sprintf (
362
+ $ pdf ->MultiCell (180 , 5 , sprintf (
363
363
"Référence client : %s " ,
364
364
$ cotisation ['reference_client ' ]
365
- ))) ;
365
+ ));
366
366
}
367
367
368
368
$ pdf ->Ln (15 );
369
369
370
- $ pdf ->MultiCell (180 , 5 , utf8_decode ( "Facture concernant votre adhésion à l'Association Française des Utilisateurs de PHP (AFUP). " ) );
370
+ $ pdf ->MultiCell (180 , 5 , "Facture concernant votre adhésion à l'Association Française des Utilisateurs de PHP (AFUP). " );
371
371
372
372
if (false === $ isSubjectedToVat ) {
373
373
// Cadre
374
374
$ pdf ->Ln (10 );
375
375
$ pdf ->SetFillColor (200 , 200 , 200 );
376
376
$ pdf ->Cell (50 , 5 , 'Code ' , 1 , 0 , 'L ' , 1 );
377
- $ pdf ->Cell (100 , 5 , utf8_decode ( 'Désignation ' ) , 1 , 0 , 'L ' , 1 );
377
+ $ pdf ->Cell (100 , 5 , 'Désignation ' , 1 , 0 , 'L ' , 1 );
378
378
$ pdf ->Cell (40 , 5 , 'Prix ' , 1 , 0 , 'L ' , 1 );
379
379
380
380
$ pdf ->Ln ();
381
381
$ pdf ->SetFillColor (255 , 255 , 255 );
382
382
$ pdf ->Cell (50 , 5 , 'ADH ' , 1 );
383
- $ pdf ->Cell (100 , 5 , utf8_decode ( "Adhésion AFUP jusqu'au " . date ('d/m/Y ' , (int ) $ cotisation ['date_fin ' ]) ), 1 );
384
- $ pdf ->Cell (40 , 5 , utf8_decode ( $ cotisation ['montant ' ] . ' ' ) , 1 );
383
+ $ pdf ->Cell (100 , 5 , "Adhésion AFUP jusqu'au " . date ('d/m/Y ' , (int ) $ cotisation ['date_fin ' ]), 1 );
384
+ $ pdf ->Cell (40 , 5 , $ cotisation ['montant ' ] . ' € ' , 1 );
385
385
386
386
$ pdf ->Ln (15 );
387
387
$ pdf ->Cell (10 , 5 , 'TVA non applicable - art. 293B du CGI ' );
@@ -397,7 +397,7 @@ public function genererFacture($id_cotisation, $chemin = null)
397
397
$ pdf ->Ln (10 );
398
398
$ pdf ->SetFillColor (200 , 200 , 200 );
399
399
$ pdf ->Cell (20 , 5 , 'Code ' , 1 , 0 , 'L ' , 1 );
400
- $ pdf ->Cell (95 , 5 , utf8_decode ( 'Désignation ' ) , 1 , 0 , 'L ' , 1 );
400
+ $ pdf ->Cell (95 , 5 , 'Désignation ' , 1 , 0 , 'L ' , 1 );
401
401
$ pdf ->Cell (25 , 5 , 'Prix HT ' , 1 , 0 , 'R ' , 1 );
402
402
$ pdf ->Cell (25 , 5 , 'Taux TVA ' , 1 , 0 , 'R ' , 1 );
403
403
$ pdf ->Cell (25 , 5 , 'Prix TTC ' , 1 , 0 , 'R ' , 1 );
@@ -411,28 +411,28 @@ public function genererFacture($id_cotisation, $chemin = null)
411
411
$ pdf ->Ln ();
412
412
$ pdf ->SetFillColor (225 , 225 , 225 );
413
413
$ pdf ->Cell (165 , 5 , 'Total HT ' , 1 , 0 , 'R ' , 1 );
414
- $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ totalHt ) . utf8_decode ( ' ' ) , 1 , 0 , 'R ' , 1 );
414
+ $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ totalHt ) . ' € ' , 1 , 0 , 'R ' , 1 );
415
415
416
416
$ pdf ->Ln ();
417
417
$ pdf ->SetFillColor (255 , 255 , 255 );
418
418
$ pdf ->Cell (165 , 5 , 'Total TVA 20% ' , 1 , 0 , 'R ' , 1 );
419
- $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ total - $ totalHt ) . utf8_decode ( ' ' ) , 1 , 0 , 'R ' , 1 );
419
+ $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ total - $ totalHt ) . ' € ' , 1 , 0 , 'R ' , 1 );
420
420
421
421
$ pdf ->Ln ();
422
422
$ pdf ->SetFillColor (225 , 225 , 225 );
423
423
$ pdf ->Cell (165 , 5 , 'Total TTC ' , 1 , 0 , 'R ' , 1 );
424
- $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ total ) . utf8_decode ( ' ' ) , 1 , 0 , 'R ' , 1 );
424
+ $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ total ) . ' € ' , 1 , 0 , 'R ' , 1 );
425
425
}
426
426
427
427
$ pdf ->Ln (15 );
428
- $ pdf ->Cell (10 , 5 , utf8_decode ( 'Lors de votre règlement, merci de préciser la mention : "Facture n° ' . $ cotisation ['numero_facture ' ]) . '" ' );
428
+ $ pdf ->Cell (10 , 5 , 'Lors de votre règlement, merci de préciser la mention : "Facture n° ' . $ cotisation ['numero_facture ' ] . '" ' );
429
429
430
430
if (is_null ($ chemin )) {
431
431
$ pattern = str_replace (' ' , '' , $ patternPrefix ) . '_ ' . $ cotisation ['numero_facture ' ] . '_ ' . date ('dmY ' , (int ) $ cotisation ['date_debut ' ]) . '.pdf ' ;
432
432
433
- $ pdf ->Output ($ pattern , 'D ' );
433
+ $ pdf ->Output ($ pattern , 'D ' , true );
434
434
} else {
435
- $ pdf ->Output ($ chemin , 'F ' );
435
+ $ pdf ->Output ($ chemin , 'F ' , true );
436
436
}
437
437
438
438
return $ cotisation ['numero_facture ' ];
@@ -444,10 +444,10 @@ private function buildDetailsPersonneMorale(PDF_Facture $pdf, $montant, $dateFin
444
444
$ pdf ->Ln ();
445
445
$ pdf ->SetFillColor (255 , 255 , 255 );
446
446
$ pdf ->Cell (20 , 5 , 'ADH ' , 1 );
447
- $ pdf ->Cell (95 , 5 , utf8_decode ( "Adhésion AFUP jusqu'au " . date ('d/m/Y ' , (int ) $ dateFin) ), 1 );
448
- $ pdf ->Cell (25 , 5 , utf8_decode ( $ this ->formatFactureValue ($ montant ) . ' ' ) , 1 , 0 , 'R ' );
449
- $ pdf ->Cell (25 , 5 , utf8_decode (( Utils::MEMBERSHIP_FEE_VAT_RATE * 100 ) . ' % ' ), 1 , 0 , 'R ' );
450
- $ pdf ->Cell (25 , 5 , utf8_decode ( $ this ->formatFactureValue ($ montantTtc ) . ' ' ) , 1 , 0 , 'R ' );
447
+ $ pdf ->Cell (95 , 5 , "Adhésion AFUP jusqu'au " . date ('d/m/Y ' , (int ) $ dateFin ), 1 );
448
+ $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ montant ) . ' € ' , 1 , 0 , 'R ' );
449
+ $ pdf ->Cell (25 , 5 , ( Utils::MEMBERSHIP_FEE_VAT_RATE * 100 . ' % ' ), 1 , 0 , 'R ' );
450
+ $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ montantTtc ) . ' € ' , 1 , 0 , 'R ' );
451
451
$ totalHt = $ montant ;
452
452
$ total = $ montantTtc ;
453
453
@@ -463,18 +463,18 @@ private function buildDetailsPersonnePhysique(PDF_Facture $pdf, $montant, $dateF
463
463
$ pdf ->Ln ();
464
464
$ pdf ->SetFillColor (255 , 255 , 255 );
465
465
$ pdf ->Cell (20 , 5 , 'ADH-var ' , 1 );
466
- $ pdf ->Cell (95 , 5 , utf8_decode ( "Adhésion AFUP jusqu'au " . date ('d/m/Y ' , (int ) $ dateFin ) . ' - part variable ' ) , 1 );
467
- $ pdf ->Cell (25 , 5 , utf8_decode ( $ this ->formatFactureValue ($ montantFixeHt ) . ' ' ) , 1 , 0 , 'R ' );
468
- $ pdf ->Cell (25 , 5 , utf8_decode (( Utils::MEMBERSHIP_FEE_VAT_RATE * 100 ) . ' % ' ), 1 , 0 , 'R ' );
469
- $ pdf ->Cell (25 , 5 , utf8_decode ( $ this ->formatFactureValue ($ montantFixeTTc ) . ' ' ) , 1 , 0 , 'R ' );
466
+ $ pdf ->Cell (95 , 5 , "Adhésion AFUP jusqu'au " . date ('d/m/Y ' , (int ) $ dateFin ) . ' - part variable ' , 1 );
467
+ $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ montantFixeHt ) . ' € ' , 1 , 0 , 'R ' );
468
+ $ pdf ->Cell (25 , 5 , ( Utils::MEMBERSHIP_FEE_VAT_RATE * 100 . ' % ' ), 1 , 0 , 'R ' );
469
+ $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ montantFixeTTc ) . ' € ' , 1 , 0 , 'R ' );
470
470
471
471
$ pdf ->Ln ();
472
472
$ pdf ->SetFillColor (255 , 255 , 255 );
473
473
$ pdf ->Cell (20 , 5 , 'ADH-fixe ' , 1 );
474
- $ pdf ->Cell (95 , 5 , utf8_decode ( "Adhésion AFUP jusqu'au " . date ('d/m/Y ' , (int ) $ dateFin ) . ' - part fixe ' ) , 1 );
475
- $ pdf ->Cell (25 , 5 , utf8_decode ( $ this ->formatFactureValue ($ montantVariable ) . ' ' ) , 1 , 0 , 'R ' );
476
- $ pdf ->Cell (25 , 5 , utf8_decode ( '0 % ' ) , 1 , 0 , 'R ' );
477
- $ pdf ->Cell (25 , 5 , utf8_decode ( $ this ->formatFactureValue ($ montantVariable ) . ' ' ) , 1 , 0 , 'R ' );
474
+ $ pdf ->Cell (95 , 5 , "Adhésion AFUP jusqu'au " . date ('d/m/Y ' , (int ) $ dateFin ) . ' - part fixe ' , 1 );
475
+ $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ montantVariable ) . ' € ' , 1 , 0 , 'R ' );
476
+ $ pdf ->Cell (25 , 5 , '0 % ' , 1 , 0 , 'R ' );
477
+ $ pdf ->Cell (25 , 5 , $ this ->formatFactureValue ($ montantVariable ) . ' € ' , 1 , 0 , 'R ' );
478
478
479
479
$ totalHt = $ montantFixeHt + $ montantVariable ;
480
480
$ total = $ montantFixeTTc + $ montantVariable ;
0 commit comments