PEEL Shopping
Open source ecommerce : PEEL Shopping
Invoice.php
Go to the documentation of this file.
1 <?php
2 // This file should be in UTF8 without BOM - Accents examples: éèê
3 // +----------------------------------------------------------------------+
4 // | Copyright (c) 2004-2015 Advisto SAS, service PEEL - contact@peel.fr |
5 // +----------------------------------------------------------------------+
6 // | This file is part of PEEL Shopping 8.0.0, which is subject to an |
7 // | opensource GPL license: you are allowed to customize the code |
8 // | for your own needs, but must keep your changes under GPL |
9 // | More information: https://www.peel.fr/lire/licence-gpl-70.html |
10 // +----------------------------------------------------------------------+
11 // | Author: Advisto SAS, RCS 479 205 452, France, https://www.peel.fr/ |
12 // +----------------------------------------------------------------------+
13 // $Id: Invoice.php 47345 2015-10-12 17:59:08Z sdelaporte $
14 if (!defined('IN_PEEL')) {
15  die();
16 }
17 require_once($GLOBALS['dirroot'] . "/lib/class/pdf/tcpdf.php");
18 
19 define('EURO', chr(128));
20 define('EURO_VAL', 6.55957);
21 define('FPDF_FONTPATH', $GLOBALS['dirroot'] . '/lib/class/pdf/font/');
22 
38 class Invoice extends TCPDF {
39  var $colonnes;
40  var $format;
41  var $angle = 0;
45 
57  function InvoiceRoundedRect($x, $y, $w, $h, $r, $style = '')
58  {
59  $k = $this->k;
60  $hp = $this->h;
61  if ($style == 'F')
62  $op = 'f';
63  elseif ($style == 'FD' or $style == 'DF')
64  $op = 'B';
65  else
66  $op = 'S';
67  $MyArc = 4 / 3 * (sqrt(2) - 1);
68  $this->_out(sprintf('%.2f %.2f m', ($x + $r) * $k, ($hp - $y) * $k));
69  $xc = $x + $w - $r ;
70  $yc = $y + $r;
71  $this->_out(sprintf('%.2f %.2f l', $xc * $k, ($hp - $y) * $k));
72 
73  $this->_Arc($xc + $r * $MyArc, $yc - $r, $xc + $r, $yc - $r * $MyArc, $xc + $r, $yc);
74  $xc = $x + $w - $r ;
75  $yc = $y + $h - $r;
76  $this->_out(sprintf('%.2f %.2f l', ($x + $w) * $k, ($hp - $yc) * $k));
77  $this->_Arc($xc + $r, $yc + $r * $MyArc, $xc + $r * $MyArc, $yc + $r, $xc, $yc + $r);
78  $xc = $x + $r ;
79  $yc = $y + $h - $r;
80  $this->_out(sprintf('%.2f %.2f l', $xc * $k, ($hp - ($y + $h)) * $k));
81  $this->_Arc($xc - $r * $MyArc, $yc + $r, $xc - $r, $yc + $r * $MyArc, $xc - $r, $yc);
82  $xc = $x + $r ;
83  $yc = $y + $r;
84  $this->_out(sprintf('%.2f %.2f l', ($x) * $k, ($hp - $yc) * $k));
85  $this->_Arc($xc - $r, $yc - $r * $MyArc, $xc - $r * $MyArc, $yc - $r, $xc, $yc - $r);
86  $this->_out($op);
87  }
88 
100  function _Arc($x1, $y1, $x2, $y2, $x3, $y3)
101  {
102  $h = $this->h;
103  $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $x1 * $this->k, ($h - $y1) * $this->k,
104  $x2 * $this->k, ($h - $y2) * $this->k, $x3 * $this->k, ($h - $y3) * $this->k));
105  }
106 
115  function Rotate($angle, $x = -1, $y = -1)
116  {
117  if ($x == -1)
118  $x = $this->x;
119  if ($y == -1)
120  $y = $this->y;
121  if ($this->angle != 0)
122  $this->_out('Q');
123  $this->angle = $angle;
124  if ($angle != 0) {
125  $angle *= M_PI / 180;
126  $c = cos($angle);
127  $s = sin($angle);
128  $cx = $x * $this->k;
129  $cy = ($this->h - $y) * $this->k;
130  $this->_out(sprintf('q %.5f %.5f %.5f %.5f %.2f %.2f cm 1 0 0 1 %.2f %.2f cm', $c, $s, - $s, $c, $cx, $cy, - $cx, - $cy));
131  }
132  }
133 
139  function _endpage()
140  {
141  if ($this->angle != 0) {
142  $this->angle = 0;
143  $this->_out('Q');
144  }
145  parent::_endpage();
146  }
154  function sizeOfText($texte, $largeur)
155  {
156  $index = 0;
157  $nb_lines = 0;
158  $loop = true;
159  while ($loop) {
160  $pos = String::strpos($texte, "\n");
161  if (!$pos) {
162  $loop = false;
163  $ligne = $texte;
164  } else {
165  $ligne = String::substr($texte, $index, $pos);
166  $texte = String::substr($texte, $pos + 1);
167  }
168  $length = floor($this->GetStringWidth($ligne));
169  if ($largeur != 0) {
170  $res = 1 + floor($length / $largeur) ;
171  } else {
172  $res = 1 + floor($length);
173  }
174  $nb_lines += $res;
175  }
176  return $nb_lines;
177  }
178 
187  function addSociete($adresse, $logo, $bill_mode)
188  {
189  if ($bill_mode == 'user_custom_products_list') {
190  $x1 = 90;
191  $y1 = 3;
192  } else {
193  $x1 = 10;
194  $y1 = 6;
195  }
196  if (!empty($logo)) {
197  // Positionnement du logo à droite des informations sur la société
198  $this->Image($logo, $x1 + 50, $y1, 35);
199  }
200  if ($bill_mode != 'user_custom_products_list') {
201  $this->SetXY($x1, $y1);
202  // $this->SetFont('Helvetica', 'B', 12);
203  // $length = $this->GetStringWidth( $nom );
204  // $this->Cell( $length, 2, $nom);
205  $this->SetFont('Helvetica', '', 10);
206  $length = $this->GetStringWidth($adresse);
207  // Coordonnées de la société
208  $lignes = $this->sizeOfText($adresse, $length) ;
209  $this->MultiCell($length, 4, $adresse);
210  }
211  }
212 
222  function fact_dev($libelle, $num, $change_background_color_by_type = false, $bill_mode = null)
223  {
224  if ($bill_mode == 'user_custom_products_list') {
225  $y1 = 25;
226  $r1 = $this->w - 100;
227  $r2 = $r1 + 90;
228  $y2 = 9;
229  } else {
230  $y1 = 6;
231  $r1 = $this->w - 100;
232  $r2 = $r1 + 90;
233  $y2 = $y1 + 2;
234  }
235  $mid = ($r1 + $r2) / 2;
236 
237  $texte = $libelle . " N° : " . $num;
238  $szfont = 12;
239  $loop = 0;
240 
241  while ($loop == 0) {
242  $this->SetFont("Helvetica", "B", $szfont);
243  $sz = $this->GetStringWidth($texte);
244  if (($r1 + $sz) > $r2)
245  $szfont --;
246  else
247  $loop ++;
248  }
249  $this->SetLineWidth(0.1);
250  $this->SetFillColor(210, 210, 255);
251  if($change_background_color_by_type) {
252  // On modifie la couleur de fond du cadre indiquant en fonction du type de document (Facture proforma,devis Bon de commande, Facture)
253  if($_GET['mode'] == 'proforma') {// Facture proforma - ROSE
254  $this->SetFillColor(241, 165,165);
255  }elseif ($_GET['mode'] == 'devis') { // devis - JAUNE
256  $this->SetFillColor(241,228,165);
257  }elseif ($_GET['mode'] == 'bdc') { // Bon de commande - BLEU
258  $this->SetFillColor(165,219,241);
259  }elseif ($_GET['mode'] == 'facture') { //Facture - VERT
260  $this->SetFillColor(165, 241, 173);
261  }
262  }
263  $this->InvoiceRoundedRect($r1, $y1, ($r2 - $r1), $y2, 2.5, 'DF');
264  $this->SetXY($r1 + 1, $y1 + 2);
265  $this->Cell($r2 - $r1 -1, 5, $texte, 0, 0, "C");
266  }
267 
274  function addFacture($numfact)
275  {
276  $string = sprintf("FA%04d", $numfact);
277  $this->fact_dev($GLOBALS['STR_PDF_BILL'], $string);
278  }
279 
287  function addDate($date, $date_a, $bill_mode)
288  {
289  if ($bill_mode == 'user_custom_products_list') {
290  $r1 = $this->w - 100;
291  $y1 = 38;
292  } else {
293  $r1 = $this->w - 100;
294  $y1 = 17;
295  }
296  $width = 90;
297  $height = 12;
298  $header_height = 5;
299 
300  $this->SetFillColor(240, 240, 240);
301  $this->Rect($r1, $y1, $width, $height, 'D');
302  $this->Rect($r1, $y1, $width, $header_height, 'DF');
303 
304  $this->SetFont("Helvetica", "B", 10);
305  $this->SetXY($r1, $y1 + 0.5);
306  $this->Cell(90, 4, $GLOBALS['STR_PDF_BILL_DATE'], 0, 0, "C");
307 
308  $this->SetFont("Helvetica", "", 10);
309  $this->SetXY($r1, $y1 + $this->cMargin + $header_height);
310 
311  if ($date_a != "") {
312  $date .= " - " . $GLOBALS['STR_PDF_DATE_PAID'] . " " . $date_a;
313  }
314  $this->Cell(90, 4, $date, 0, 0, "C");
315  }
316 
325  function addInfoTVA($tva, $mode = null, $id_utilisateur = null)
326  {
327  $r1 = $this->w / 2 - 15;
328  $y1 = $this->h-25;
329 
330  $text1 = ($mode != 'devis'?$GLOBALS['STR_INVOICE_BOTTOM_TEXT']:$GLOBALS['STR_INVOICE_BOTTOM_TEXT1']);
331  $this->SetXY($r1, $y1);
332  $this->SetFont("Helvetica", "", 8);
333  $this->Cell(30, 4, $text1 ,0, 0, "C");
334  if (floatval($tva)==0) {
335  if (check_if_module_active('micro_entreprise')) {
336  // Pour les entreprises bénéficiant du régime de franchise de base de TVA, il faut obligatoirement porter sur chaque facture la mention suivante : « TVA non applicable, article 293 B du CGI ».
337  // => Déjà géré par l'appel à addTVAs_part_micro
339  // Pour les livraisons de biens intracommunautaires, les factures doivent obligatoirement comporter la mention suivante : « Exonération de TVA, article 262 ter 1 du CGI ».
340  // Lorsqu'il s'agit de prestations de services intracommunautaires dont la taxe est autoliquidée par le preneur, il faudra faire figurer, à notre sens, les mentions « TVA due par le preneur, art. CGI 283-2, et art. 194 de la directive TVA 2006/112/CE »
341  // => Texte à définir en conséquence en fonction de votre site dans $GLOBALS['STR_INVOICE_BOTTOM_TEXT2']
342  $text2 = $GLOBALS['STR_INVOICE_BOTTOM_TEXT2'];
343  $this->SetXY($r1, $y1+4);
344  $this->Cell(30, 4, $text2, 0, 0, "C");
345  }
346  }
347  }
348 
356  {
357  $r1 = $this->w / 2 - 15;
358  $y1 = $this->h - 12;
359 
360  $this->SetXY($r1, $y1);
361  $this->SetFont("Helvetica", "", 8);
362  $this->Cell(30, 4, $GLOBALS['STR_PDF_BILL_PAGE'] . ' ' . $page, 0, 0, "C");
363  }
364 
372  function addClientAdresseFacturation($pdf_facturation, $id_utilisateur, $bill_mode)
373  {
374  if ($bill_mode == 'user_custom_products_list') {
375  $r1 = $this->w - 200;
376  $y1 = 6;
377  } else {
378  $r1 = $this->w - 200;
379  $y1 = 40;
380  }
381  $width = 90;
382  $height = 45;
383  $header_height = 5;
384 
385  $this->SetFillColor(240, 240, 240);
386  $this->Rect($r1, $y1, $width, $height, 'D');
387  $this->Rect($r1, $y1, $width, $header_height, 'DF');
388 
389  $this->SetFont("Helvetica", "B", 10);
390  $this->SetXY($r1, $y1 + 0.5);
391  $title = $GLOBALS['STR_PDF_FACTURATION'];
392  if (!empty($id_utilisateur)) {
393  $title .= ' ' . $id_utilisateur;
394  }
395  $this->Cell(90, 4, $GLOBALS['STR_PDF_FACTURATION'], 0, 0, "C");
396 
397  $this->SetFont("Helvetica", "", 10);
398  $this->SetXY($r1, $y1 + $this->cMargin + $header_height);
399  $this->MultiCell(90, 4, $pdf_facturation . "\n");
400  }
401 
408  function addClientAdresseExpedition($pdf_facturation2)
409  {
410  $r1 = $this->w - 100;
411  $y1 = 45;
412  $width = 90;
413  $height = 40;
414  $header_height = 5;
415 
416  $this->SetFillColor(240, 240, 240);
417  $this->Rect($r1, $y1, $width, $height, 'D');
418  $this->Rect($r1, $y1, $width, $header_height, 'DF');
419 
420  $this->SetFont("Helvetica", "B", 10);
421  $this->SetXY($r1, $y1 + 0.5);
422  $this->Cell(90, 4, $GLOBALS['STR_PDF_LIVRAISON'], 0, 0, "C");
423 
424  $this->SetFont("Helvetica", "", 10);
425  $this->SetXY($r1, $y1 + $this->cMargin + $header_height);
426  $this->MultiCell(90, 4, $pdf_facturation2 . "\n");
427  }
435  function addReglement($mode)
436  {
437  $r1 = $this->w - 100;
438  $y1 = 29;
439  $width = 90;
440  $height = 12;
441  $header_height = 5;
442 
443  $this->SetFillColor(240, 240, 240);
444  $this->Rect($r1, $y1, $width, $height, 'D');
445  $this->Rect($r1, $y1, $width, $header_height, 'DF');
446 
447  $this->SetFont("Helvetica", "B", 10);
448  $this->SetXY($r1, $y1 + 0.5);
449  $this->Cell(90, 4, $GLOBALS['STR_PDF_PAIEMENT'], 0, 0, "C");
450 
451  $this->SetFont("Helvetica", "", 10);
452  $this->SetXY($r1, $y1 + $this->cMargin + $header_height);
453  $this->Cell(90, 4, $mode, 0, 0, "C");
454  }
455 
462  function addEcheance($date)
463  {
464  $r1 = 80;
465  $r2 = $r1 + 40;
466  $y1 = 80;
467  $y2 = $y1 + 10;
468  $mid = $y1 + (($y2 - $y1) / 2);
469  $this->InvoiceRoundedRect($r1, $y1, ($r2 - $r1), ($y2 - $y1), 2.5, 'D');
470  $this->Line($r1, $mid, $r2, $mid);
471  $this->SetXY($r1 + ($r2 - $r1) / 2 - 5 , $y1 + 1);
472  $this->SetFont("Helvetica", "B", 10);
473  $this->Cell(10, 4, $GLOBALS['STR_PDF_DUE_DATE'], 0, 0, "C");
474  $this->SetXY($r1 + ($r2 - $r1) / 2 - 5 , $y1 + 5);
475  $this->SetFont("Helvetica", "", 10);
476  $this->Cell(10, 5, $date, 0, 0, "C");
477  }
478 
485  function addReference($ref)
486  {
487  $this->SetFont("Helvetica", "", 10);
488  $length = $this->GetStringWidth($GLOBALS['STR_PDF_REF'] . $GLOBALS['STR_BEFORE_TWO_POINTS'] . $ref);
489  $r1 = 10;
490  $r2 = $r1 + $length;
491  $y1 = 92;
492  $y2 = $y1 + 5;
493  $this->SetXY($r1 , $y1);
494  $this->Cell($length, 4, $GLOBALS['STR_PDF_REF'] . $GLOBALS['STR_BEFORE_TWO_POINTS'] . $ref);
495  }
496 
503  function addCols($y_max_allowed, $bill_mode=null)
504  {
505 
506  $r1 = 10;
507  $r2 = $this->w - ($r1 * 2) ;
508  if($bill_mode == 'user_custom_products_list') {
509  $y1 = 60;
510  $height = 8;
511  } else {
512  $y1 = 92;
513  $height = 5;
514  }
515  $y2 = $y_max_allowed - 10 - $y1;
516  $this->SetXY($r1, $y1);
517  $this->Rect($r1, $y1, $r2, $y2, "D");
518 
519  $this->SetFillColor(240, 240, 240);
520  $this->Rect($r1, $y1, $r2, $height, "DF");
521 
522  $colX = $r1;
523  $this->SetFont("Helvetica", "B", 8);
524  if(!empty($this->colonnes)) {
525  foreach($this->colonnes as $lib => $pos) {
526  $this->SetXY($colX, $y1 + 1);
527  if($bill_mode != 'user_custom_products_list') {
528  $this->Cell($pos, 1, $lib, 0, 0, "C");
529  } else {
530  $this->MultiCell($pos, $height-1, $lib, 0, 0, "C");
531  }
532  $colX += $pos;
533  if($bill_mode != 'user_custom_products_list') {
534  // pour l'affichage des listes de produits, les lignes sont horizontales (cf addLine)
535  $this->Line($colX, $y1, $colX, $y1 + $y2);
536  }
537  }
538  }
539  }
540 
547  function addLineFormat($tab)
548  {
549  if(!empty($this->colonnes)) {
550  foreach($this->colonnes as $lib => $pos) {
551  if (isset($tab["$lib"])) {
552  $this->format[$lib] = $tab["$lib"];
553  }
554  }
555  }
556  }
557 
564  function lineVert($tab)
565  {
566  $max_y_reached = 0;
567  if(!empty($this->colonnes)) {
568  foreach($this->colonnes as $lib => $pos) {
569  $texte = $tab[ $lib ];
570  $longCell = $pos -2;
571  $size = $this->sizeOfText($texte, $longCell);
572  if ($size > $max_y_reached) {
573  $max_y_reached = $size;
574  }
575  }
576  }
577  return $max_y_reached;
578  }
579 
587  function addLine($ligne, $tab, $bill_mode = null)
588  {
589  $x = 10;
590  $max_y_reached = $ligne;
591  if($bill_mode == 'user_custom_products_list') {
592  $this->SetFont("Helvetica", "", 7);
593  } else {
594  $this->SetFont("Helvetica", "", 8);
595  }
596  $line_height = 3.5;
597  if($bill_mode == 'user_custom_products_list') {
598  $ligne = $ligne-3;
599  }
600  if(!empty($this->colonnes)) {
601  foreach($this->colonnes as $lib => $pos) {
602  $longCell = $pos;
603  $texte = $tab[ $lib ];
604  $length = $this->GetStringWidth($texte);
605  $tailleTexte = $this->sizeOfText($texte, $length);
606  $formText = $this->format[ $lib ];
607  $this->SetXY($x, $ligne);
608  $this->MultiCell($longCell, $line_height, $texte, 0, $formText);
609  if ($max_y_reached < ($this->GetY())) {
610  $max_y_reached = $this->GetY() ;
611  }
612  $x += $pos;
613  }
614  if($bill_mode == 'user_custom_products_list') {
615  $y = $ligne-4;
616  // pour l'affichage des listes de produits, les lignes de séparations tracées sont horizontales. La séparation s'affiche au dessus des lignes.
617  $this->Line(10, $y, $x, $y);
618  }
619  }
620  return ($max_y_reached - $ligne);
621  }
622 
630  {
631  $r1 = $this->w - 31;
632  $r2 = $r1 + 19;
633  $y1 = 100;
634  $y2 = $y1;
635  $mid = $y1 + ($y2 / 2);
636  $this->SetXY($r1 + ($r2 - $r1) / 2 - 5, $y1 + 3);
637  $this->SetFont("Helvetica", "B", 10);
638  $this->Cell(10, 5, $GLOBALS['STR_PDF_TOTAL_HT'], 0, 0, "C");
639  $this->SetXY($r1 + ($r2 - $r1) / 2 - 5, $y1 + 9);
640  $this->SetFont("Helvetica", "", 10);
641  $this->Cell(10, 5, $total_ht . ' HT', 0, 0, "C");
642  }
643 
650  function addRemarque($remarque)
651  {
652  $this->SetFont("Helvetica", "", 8);
653  $r1 = 10;
654  $r2 = $this->w - ($r1 * 2) ;
655  $y1 = $this->h - 62 - $this->remarque_lignes * 4 - 5;
656  $y2 = $this->remarque_lignes * 4;
657  $this->SetXY($r1 , $y1);
658  if (!empty($GLOBALS['site_parameters']['bill_pdf_add_color_behind_comments'])) {
659  // On dessine un cadre coloré
660  $this->SetFillColor(240, 240, 240);
661  $this->Rect($r1, $y1-1, $r2, $y2+1, "DF");
662  }
663  // On écrit le texte de commentaire
664  $this->MultiCell($this->w - $r1 * 2, 4, $remarque . "\n");
665  }
666 
672  function addCadreTVAs()
673  {
674  $this->SetFont("Helvetica", "B", 8);
675  $r1 = 10;
676  $r2 = $r1 + 20;
677  $y1 = $this->h;
678  $y2 = $y1 + 5;
679  $this->Line($r1, $y1 + 4, $r2, $y1 + 4);
680  $this->Line($r1 + 5, $y1 + 4, $r1 + 5, $y2); // avant BASE HT
681  $this->Line($r1 + 27, $y1, $r1 + 27, $y2); // avant REMISE
682  $this->Line($r1 + 63, $y1, $r1 + 63, $y2); // avant % TVA
683  $this->Line($r1 + 75, $y1, $r1 + 75, $y2); // avant PORT
684  $this->Line($r1 + 91, $y1, $r1 + 91, $y2); // avant TOTAUX
685  $this->SetXY($r1 + 9, $y1);
686  $this->Cell(10, 4, $GLOBALS['STR_TOTAL_HT']);
687  $this->SetX($r1 + 63);
688  $this->Cell(10, 4, $GLOBALS['STR_PDF_BILL_TVA']);
689  $this->SetX($r1 + 78);
690  $this->Cell(10, 4, $GLOBALS['STR_PDF_BILL_SHIPPING']);
691  $this->SetX($r1 + 100);
692  $this->Cell(10, 4, $GLOBALS['STR_PDF_BILL_TOTALS']);
693  $this->SetFont("Helvetica", "B", 6);
694  $this->SetXY($r1 + 93, $y2 - 13);
695  $this->Cell(6, 0, $GLOBALS['STR_TTC'] . " :");
696  $this->SetXY($r1 + 93, $y2 - 8);
697  $this->Cell(6, 0, $GLOBALS['STR_HT'] . " :");
698  $this->SetXY($r1 + 93, $y2 - 3);
699  $this->Cell(6, 0, $GLOBALS['STR_PDF_BILL_TVA'] . " :");
700  }
701 
707  function addCadreSignature()
708  {
709  $this->SetFont("Helvetica", "B", 10);
710  $r1 = 10;
711  $r2 = $r1 + 60;
712  $y1 = $this->h - 60;
713  $y2 = $y1 + 30;
714  $this->InvoiceRoundedRect($r1, $y1, ($r2 - $r1), ($y2 - $y1), 2.5, 'D');
715  $this->Line($r1, $y1 + 6, $r2, $y1 + 6);
716  $this->SetXY($r1, $y1 + 1);
717  $this->Cell(60, 4, $GLOBALS['STR_ACCORD'], 0, 0, "C");
718  $this->SetFont("Helvetica", "B", 7);
719  $this->SetXY($r1, $y2 - 21);
720  $this->Cell(60, 0, $GLOBALS['STR_PDF_DATE']);
721  $this->SetXY($r1, $y2 - 16);
722  $this->Cell(60, 0, $GLOBALS['STR_ACCORD_OK']);
723  $this->SetXY($r1, $y2 - 11);
724  $this->Cell(60, 0, $GLOBALS['STR_PDF_SIGNATURE']);
725  }
726 
732  function addCadreRib()
733  {
734  $this->SetFont("Helvetica", "B", 10);
735  $r1 = 10;
736  $r2 = $r1 + 65;
737  $y1 = $this->h - 60;
738  $y2 = $y1 + 35;
739  $this->InvoiceRoundedRect($r1, $y1, ($r2 - $r1), ($y2 - $y1), 2.5, 'D');
740  $this->Line($r1, $y1 + 6, $r2, $y1 + 6);
741  $this->SetXY($r1, $y1 + 1);
742  $this->Cell(60, 4, $GLOBALS['STR_TRANSFER'], 0, 0, "C");
743 
744  $sql="SELECT code_banque, code_guichet, numero_compte, cle_rib, iban, swift
745  FROM peel_societe
746  WHERE " . get_filter_site_cond('societe') . "
747  LIMIT 1";
748  $query = query($sql);
750 
751  $this->SetXY($r1, $y1+6);
752  $this->SetFont('Helvetica', '', 10);
753  $rib = $GLOBALS['STR_BANK_ACCOUNT_CODE'].$GLOBALS['STR_BEFORE_TWO_POINTS'] . ':' . $result['code_banque'] . "\r\n" . $GLOBALS['STR_BANK_ACCOUNT_COUNTER'].$GLOBALS['STR_BEFORE_TWO_POINTS'] . ':' . $result['code_guichet'] . "\r\n" . $GLOBALS['STR_BANK_ACCOUNT_NUMBER'].$GLOBALS['STR_BEFORE_TWO_POINTS'] . ':'.$result['numero_compte'] . "\r\n" . $GLOBALS['STR_BANK_ACCOUNT_RIB_KEY'].$GLOBALS['STR_BEFORE_TWO_POINTS'] . ':'.$result['cle_rib'] . "\r\n" . $GLOBALS['STR_IBAN'].$GLOBALS['STR_BEFORE_TWO_POINTS'] . ':'.$result['iban'] . "\r\n" . $GLOBALS['STR_SWIFT'].$GLOBALS['STR_BEFORE_TWO_POINTS'] . ':'.$result['swift'];
754  // $length = $this->GetStringWidth($rib);
755  $this->MultiCell(66, 7, $rib, 0, "L");
756  }
757 
763  function addCadreNet()
764  {
765  $r1 = $this->w - 65;
766  $r2 = $r1 + 55;
767  $y1 = $this->h - 60;
768  $y2 = $y1 + 30;
769  $this->InvoiceRoundedRect($r1, $y1, ($r2 - $r1), ($y2 - $y1), 2.5, 'D');
770  }
771 
777  function addCadreTva()
778  {
779  $r1 = $this->w - 130;
780  $r2 = $r1 + 55;
781  $y1 = $this->h - 60;
782  $y2 = $y1 + 30;
783  $this->InvoiceRoundedRect($r1, $y1, ($r2 - $r1), ($y2 - $y1), 2.5, 'D');
784  }
785 
792  function addNETs($params1)
793  {
794  $re = $this->w - 65;
795  $y1 = $this->h - 55;
796  $this->SetFont("Helvetica", "B", 7);
797  $k = 0;
798 
799  if (abs(get_float_from_user_input($params1["tarif_paiement"])) >= 0.01) {
800  $this->SetXY($re, $y1 + $k);
801  $this->Cell(25, 4, $GLOBALS['STR_PDF_GESTION'] . $GLOBALS['STR_BEFORE_TWO_POINTS'] . ':');
802  $this->SetXY($re + 30, $y1 + $k);
803  $this->Cell(25, 4, $params1['tarif_paiement'], '', '', 'R');
804  $k = $k + 3;
805  }
806 
807  if (check_if_module_active('ecotaxe')) {
808  $this->SetXY($re, $y1 + $k);
809  $this->Cell(25, 4, $GLOBALS['STR_PDF_ECOTAXE_HT'] . $GLOBALS['STR_BEFORE_TWO_POINTS'] . ':');
810  $this->SetXY($re + 30, $y1 + $k);
811  $this->Cell(25, 4, $params1["total_ecotaxe_ht"], '', '', 'R');
812  $k = $k + 3;
813  }
814  if (!empty($GLOBALS['site_parameters']['mode_transport'])) {
815  $this->SetXY($re, $y1 + $k);
816  $this->Cell(25, 4, $GLOBALS['STR_PDF_COUT_TRANSPORT_HT'] . $GLOBALS['STR_BEFORE_TWO_POINTS'] . ':');
817  $this->SetXY($re + 30, $y1 + $k);
818  $this->Cell(25, 4, $params1["cout_transport_ht"], '', '', 'R');
819  $k = $k + 3;
820  }
821 
822  if (abs(get_float_from_user_input($params1["small_order_overcost_amount"])) >= 0.01) {
823  $this->SetXY($re, $y1 + $k);
824  $this->Cell(25, 4, $GLOBALS['STR_SMALL_ORDER_OVERCOST_TEXT'] . $GLOBALS['STR_BEFORE_TWO_POINTS'] . ':');
825  $this->SetXY($re + 30, $y1 + $k);
826  $this->Cell(25, 4, $params1["small_order_overcost_amount"], '', '', 'R');
827  $k = $k + 3;
828  }
829  if (!check_if_module_active('micro_entreprise')) {
830  $this->SetXY($re, $y1 + $k);
831  $this->Cell(25, 4, $GLOBALS['STR_PDF_TOTAL_HT']);
832  $this->SetXY($re + 30, $y1 + $k);
833  $this->Cell(25, 4, $params1["montant_ht"], '', '', 'R');
834  } else {
835  addNETs_part_micro($this, $re, $y1 + $k, $params1["totalttc"]);
836  }
837  $k = $k + 4;
838  if (abs(get_float_from_user_input($params1["avoir"])) >= 0.01) {
839  $this->SetXY($re, $y1 + $k);
840  $this->Cell(25, 4, $GLOBALS['STR_PDF_AVOIR']);
841  $this->SetXY($re + 30, $y1 + $k);
842  $this->Cell(25, 4, $params1["avoir"], '', '', 'R');
843  $k = $k + 3;
844  }
845 
846  $k = $k + 4;
847 
848  $this->SetFont("Helvetica", "B", 8);
849  $this->SetXY($re, $y1 + $k);
850  $this->Cell(25, 4, String::strtoupper($GLOBALS['STR_PDF_NET']) . $GLOBALS['STR_BEFORE_TWO_POINTS'] . ':');
851  $this->SetXY($re + 30, $y1 + $k);
852  $this->Cell(25, 4, $params1["montant"], '', '', 'R');
853  }
854 
861  function addTVAs($params2)
862  {
863  $re = $this->w - 130;
864  $y1 = $this->h - 55;
865  $this->SetFont("Helvetica", "B", 7);
866  $k = 0;
867 
868  if (check_if_module_active('micro_entreprise')) {
869  addTVAs_part_micro($this, $re, $y1 + $k);
870  } else {
871  if (!empty($params2["distinct_total_vat"])) {
872  foreach($params2["distinct_total_vat"] as $vat_percent => $value) {
873  $this->SetXY($re, $y1 + $k);
874  $this->Cell(25, 4, $GLOBALS['STR_PDF_TVA'] . ' ' . (String::substr($vat_percent, 0, strlen('transport')) == 'transport'? str_replace('transport', $GLOBALS['STR_PDF_SHIPMENT'], $vat_percent) : $vat_percent) . '%' . $GLOBALS['STR_BEFORE_TWO_POINTS'] . ':' . " ");
875  $this->SetXY($re + 30, $y1 + $k);
876  $this->Cell(25, 4, $value, '', '', 'R');
877  $k = $k + 3;
878  }
879  }
880  $this->SetXY($re, $y1 + $k);
881  $this->Cell(25, 4, $GLOBALS['STR_PDF_TVA'] . $GLOBALS['STR_BEFORE_TWO_POINTS'] . ':');
882  $this->SetXY($re + 30, $y1 + $k);
883  $this->Cell(25, 4, $params2['total_tva'], '', '', 'R');
884  $k = $k + 5;
885  }
886  }
887 
897  function backgoundBigWatermark($texte, $coordx = null, $coordy = null)
898  {
899  $this->SetFont('Helvetica', 'B', 50);
900  $this->SetTextColor(203, 203, 203);
901  $this->Rotate(45, 55, 190);
902  $this->Text((!empty($coordx)?$coordx:55), (!empty($coordy)?$coordy:190), $texte);
903  $this->Rotate(0);
904  $this->SetTextColor(0, 0, 0);
905  }
906 
923  function FillDocument($code_facture = null, $date_debut = null, $date_fin = null, $id_debut = null, $id_fin = null, $user_id = null, $id_statut_paiement_filter = null, $bill_mode = 'standard', $folder = false, $order_object=null, $product_infos_array = null, $order_array = null, $document_title = null, $ids_array=null)
924  {
925  $hook_result = call_module_hook('bill_get_configuration_array', array('bill_mode' => $bill_mode), 'array');
926  if(count($hook_result)) {
927  // Par exemple le module micro_-_entreprise définit le format des factures ici
928  $this->colonnes = $hook_result['width'];
929  $column_formats = $hook_result['alignement'];
930  } else {
931  if ($bill_mode!='user_custom_products_list') {
932  $this->colonnes = array($GLOBALS['STR_PDF_REFERENCE'] => 22,
933  $GLOBALS['STR_DESIGNATION'] => 53,
934  $GLOBALS['STR_PDF_PRIX_HT'] => 21,
935  $GLOBALS['STR_PDF_PRIX_TTC'] => 22,
936  $GLOBALS['STR_QUANTITY'] => 14,
937  $GLOBALS['STR_PDFTOTALHT'] => 21,
938  $GLOBALS['STR_PDFTOTALTTC'] => 23,
939  $GLOBALS['STR_TAXE'] => 14);
940  $column_formats = array($GLOBALS['STR_PDF_REFERENCE'] => "L",
941  $GLOBALS['STR_DESIGNATION'] => "L",
942  $GLOBALS['STR_PDF_PRIX_HT'] => "R",
943  $GLOBALS['STR_PDF_PRIX_TTC'] => "R",
944  $GLOBALS['STR_QUANTITY'] => "C",
945  $GLOBALS['STR_PDFTOTALHT'] => "R",
946  $GLOBALS['STR_PDFTOTALTTC'] => "R",
947  $GLOBALS['STR_TAXE'] => "R");
948  } else {
949  $this->colonnes = array($GLOBALS['STR_PHOTO'] => 25,
950  $GLOBALS['STR_DESIGNATION'] => 35,
951  $GLOBALS['STR_EAN_CODE'] => 62,
952  $GLOBALS['STR_BRAND'] => 16,
953  $GLOBALS['STR_CATEGORY'] => 20,
954  $GLOBALS['STR_QUANTITY_SHORT'] => 7,
955  $GLOBALS['STR_PDF_PRIX_TTC'] => 12,
956  $GLOBALS['STR_START_PRICE'].' '.$GLOBALS['STR_TTC'] => 13);
957  $column_formats = array($GLOBALS['STR_PHOTO'] => "C",
958  $GLOBALS['STR_DESIGNATION'] => "L",
959  $GLOBALS['STR_EAN_CODE'] => "C",
960  $GLOBALS['STR_BRAND'] => "C",
961  $GLOBALS['STR_CATEGORY'] => "L",
962  $GLOBALS['STR_QUANTITY_SHORT'] => "R",
963  $GLOBALS['STR_PDF_PRIX_TTC'] => "R",
964  $GLOBALS['STR_START_PRICE'].' '.$GLOBALS['STR_TTC'] => "R");
965  }
966  }
967  $i = 0;
968  $file_name = '';
969  $societeInfoText = $this->getSocieteInfoText();
970  if ($bill_mode != "user_custom_products_list") {
971  if (!empty($product_infos_array) || !empty($order_object)) {
972  // Dans un mode de commande standard, order_object et product_infos_array ne doivent pas être défini, ce n'est pas cohérent. order_object et product_infos_array sont défini uniquement si bill_mode = user_custom_products_list
973  return null;
974  }
975  if (!empty($code_facture)) {
976  // La collation sur la colonne code_facture est fixée à utf8_bin et non plus utf8_general, donc on peut faire une comparaison avec = qui va utiliser l'INDEX plutôt que de passer par HEX(code_facture) = HEX('" . nohtml_real_escape_string($code_facture) . "')
977  $sql_cond_array[] = "c.code_facture = '" . nohtml_real_escape_string($code_facture) . "'";
978  }
979  if (!empty($date_debut)) {
980  $sql_cond_array[] = "c.a_timestamp >= '" . nohtml_real_escape_string($date_debut) . "'";
981  }
982  if (!empty($date_fin)) {
983  $sql_cond_array[] = "c.a_timestamp <= '" . nohtml_real_escape_string($date_fin) . "'";
984  }
985  if (!empty($id_fin)) {
986  $sql_cond_array[] = "c.id BETWEEN '" . intval($id_debut) . "' AND '" . intval($id_fin) . "'";
987  } elseif (!empty($id_debut)) {
988  $sql_cond_array[] = "c.id>='" . intval($id_debut) . "'";
989  }
990  if (!empty($user_id)) {
991  $sql_cond_array[] = "c.id_utilisateur = '" . intval($user_id) . "'";
992  }
993  if (is_numeric($id_statut_paiement_filter)) {
994  $sql_cond_array[] = "c.id_statut_paiement = '" . intval($id_statut_paiement_filter) . "'";
995  }
996  if ($bill_mode == 'standard' || $bill_mode == 'facture') {
997  // Un numéro doit être obligatoirement renseigné dans la facture
998  $sql_cond_array[] = "c.numero != ''";
999  }
1000  if (is_array($ids_array)) {
1001  $sql_cond_array[] = "c.id IN (" . implode(',', $ids_array) . ")";
1002  }
1003  if (empty($sql_cond_array)) {
1004  return null;
1005  }
1006  $sql_bills = "SELECT c.*, sp.technical_code AS statut_paiement
1007  FROM peel_commandes c
1008  LEFT JOIN peel_statut_paiement sp ON sp.id=c.id_statut_paiement AND " . get_filter_site_cond('statut_paiement', 'sp') . "
1009  WHERE " . implode(' AND ', $sql_cond_array) . ' AND ' . get_filter_site_cond('commandes', 'c') . "
1010  ORDER BY c.o_timestamp ASC";
1011  $query = query($sql_bills);
1012  while ($order_object = fetch_object($query)) {
1013  $product_infos_array = get_product_infos_array_in_order($order_object->id, $order_object->devise, $order_object->currency_rate);
1014  $this->generatePdfOrderContent($column_formats, $bill_mode, $i, $order_object, $product_infos_array);
1015  if(empty($file_name)) {
1016  $file_name = $this->document_name . '_' . $this->document_id;
1017  if(!empty($commande->f_datetime) && substr($commande->f_datetime, 0, 10) != '0000-00-00') {
1018  $file_name .= '_' . get_formatted_date($commande->f_datetime);
1019  }
1020  $file_name .= '.pdf';
1021  } else {
1022  // Plusieurs factures
1023  $file_name = 'F-' . md5($sql_bills) . '.pdf';
1024  }
1025  $i++;
1026  }
1027  } else {
1028  // Affichage d'une liste de produit dans un document PDF sans que les produits ne soient associés à une commande
1029  $this->generatePdfOrderContent($column_formats, $bill_mode, 0, $order_object, $product_infos_array, $document_title);
1030  $file_name = $GLOBALS['STR_LIST_PRODUCT'] . ' ' . vb($order_object->nom_ship) . '.pdf';
1031  $i++;
1032  }
1033  if (!empty($i)) {
1034  $this->lastPage();
1035  $file_name = String::convert_accents(str_replace(array('/', ' '), '-', $file_name));
1036  if ($folder === false) {
1037  $this->Output($file_name);
1038  } else {
1039  $this->Output($folder . $file_name, "F");
1040  }
1041  return $file_name;
1042  } else {
1043  return false;
1044  }
1045  }
1046 
1052  function generatePdfOrderContent($column_formats, $bill_mode, $i, &$order_object, &$product_infos_array, $document_title = null) {
1053  if (!empty($order_object->id)) {
1054  $_SESSION['session_last_bill_viewed'] = vn($order_object->id);
1055  }
1056 
1057  $order_infos = get_order_infos_array($order_object, $product_infos_array);
1058  $societeLogoPath = $this->getSocieteLogoPath($order_object->lang);
1059  $societeInfoText = $this->getSocieteInfoText();
1060  unset($y);
1061  if (empty($i)) {
1062  $this->Open();
1063  $this->cMargin = 2;
1064  $this->SetAutoPageBreak(false, 10);
1065  $this->AliasNbPages('{nb}');
1066  }
1067  $this->startPageGroup();
1068  $next_product_max_size_forecasted = 30;
1069  if (empty($product_infos_array)) {
1070  // On rajoute un élément pour pouvoir passer dans la génération de page
1071  $product_infos_array[] = false;
1072  }
1073  $comments = array();
1074  if(!empty($order_infos['delivery_infos'])) {
1075  $comments[] = $GLOBALS["STR_SHIPPING_TYPE"] . $GLOBALS["STR_BEFORE_TWO_POINTS"]. ': ' . $order_infos['delivery_infos'];
1076  }
1077  if(!empty($order_object->commentaires)) {
1078  $comments[] = $order_object->commentaires;
1079  }
1080  $this->remarque_lignes = $this->sizeOfText(implode("\n", $comments), $this->w - 10 * 2);
1081  if(!empty($GLOBALS['site_parameters']['billing_as_transaction_receipt'])) {
1082  $sql_transaction = "SELECT t.reference
1083  FROM peel_transactions t
1084  LEFT JOIN peel_commandes c ON c.id = t.orders_id
1085  WHERE t.orders_id='".intval($order_object->id)."'
1086  LIMIT 1";
1087  $query = query($sql_transaction);
1088  }
1089  $this->document_name = '';
1090  if(!empty($GLOBALS['site_parameters']['billing_as_transaction_receipt']) && $result = fetch_assoc($query)) {
1091  $this->document_name = String::strtoupper($GLOBALS['STR_TRANSACTION']);
1092  $this->document_id = $result['reference'];
1093  } else {
1094  if ($bill_mode == "user_custom_products_list") {
1095  $this->document_id = 0;
1096  } elseif ($bill_mode == "bdc") {
1097  $this->document_name = String::strtoupper($GLOBALS['STR_ORDER_FORM']);
1098  $this->document_id = intval($order_object->order_id);
1099  } elseif ($bill_mode == "proforma") {
1100  $this->document_name = String::strtoupper($GLOBALS['STR_PROFORMA']);
1101  $this->document_id = intval($order_object->order_id);
1102  } elseif ($bill_mode == "devis") {
1103  $this->document_name = String::strtoupper($GLOBALS['STR_PDF_QUOTATION']);
1104  $this->document_id = intval($order_object->order_id);
1105  } else {
1106  if(!empty($order_object->numero)) {
1107  $this->document_name = String::strtoupper($GLOBALS['STR_INVOICE']);
1108  $this->document_id = $order_object->numero;
1109  } else {
1110  $this->document_name = String::strtoupper($GLOBALS['STR_ORDER_FORM']);
1111  $this->document_id = intval($order_object->order_id);
1112  }
1113  }
1114  }
1115  if(!empty($document_title)) {
1116  $this->document_name = String::strtoupper($document_title);
1117  }
1118  // On refera un test de saut de page juste avant l'affichage des remarques et blocs de fin
1119  $product_infos_array[] = null;
1120  foreach($product_infos_array as $this_ordered_product) {
1121  if ($bill_mode == "user_custom_products_list") {
1122  // on peut descendre plus bas et afficher plus de produits dans ce mode
1123  $y_max_allowed = $this->h + 5;
1124  if (empty($this_ordered_product)) {
1125  // On a fini la liste des produits, on veut la place pour les blocs de fin de facture. L'affichage des blocs de fin de facture dépend du mode
1126  $y_max_allowed += -13 - 4 * vn($this->remarque_lignes) - 5;
1127  }
1128  } else {
1129  $y_max_allowed = $this->h - 10;
1130  if (empty($this_ordered_product)) {
1131  // On a fini la liste des produits, on veut la place pour les blocs de fin de facture. L'affichage des blocs de fin de facture dépend du mode
1132  $y_max_allowed += -45 - 4 * vn($this->remarque_lignes) - 5;
1133  }
1134  }
1135  if (empty($y) || $y + $next_product_max_size_forecasted > $y_max_allowed -5) {
1136  if(!empty($y) && ($bill_mode !='user_custom_products_list' || ($bill_mode =='user_custom_products_list' && !empty($this_ordered_product)))) {
1137  // On dessine les colonnes de la page précédente, maintenant qu'on sait quelle taille cela a pris
1138  // La page précédente était avec produits sur hauteur totale
1139  $this->addCols($this->h - 10, $bill_mode);
1140  }
1141  if ($bill_mode !='user_custom_products_list' || ($bill_mode=='user_custom_products_list' && !empty($this_ordered_product))) {
1142  // Nécessité de créer une nouvelle page car on ne va plus avoir de place
1143  $next_product_max_size_forecasted = (30 + $next_product_max_size_forecasted) / 2;
1144  $this->AddPage();
1145  $this->addPageNumber($this->getGroupPageNo() . ' / ' . $this->getPageGroupAlias());
1146  $this->addSociete($societeInfoText, $societeLogoPath, $bill_mode);
1147  if ($bill_mode == "bdc") {
1148  $this->backgoundBigWatermark($GLOBALS['STR_ORDER_FORM'], 25, 190);
1149  } elseif ($bill_mode == "proforma") {
1150  $this->backgoundBigWatermark($GLOBALS['STR_PROFORMA'], 40, 190);
1151  } elseif ($bill_mode == "devis") {
1152  $this->backgoundBigWatermark($GLOBALS['STR_PDF_QUOTATION'], 80, 200);
1153  } else {
1154  if (!empty($GLOBALS['site_parameters']['show_invoice_filigrane'])) {
1155  // Option spécifique show_invoice_filigrane nécessaire pour afficher le filigrane en cas de facture
1156  $this->backgoundBigWatermark($GLOBALS['STR_INVOICE'], 80, 200);
1157  }
1158  }
1159  $this->fact_dev($this->document_name, $this->document_id, false, $bill_mode);
1160  if ($bill_mode != "user_custom_products_list") {
1161  if(in_array($order_object->statut_paiement, array('cancelled', 'refunded'))) {
1162  $this->backgoundBigWatermark(get_payment_status_name($order_object->id_statut_paiement), 65, 470);
1163  }
1164  }
1165  if(empty($order_object->o_timestamp) || substr($order_object->o_timestamp, 0, 10) == '0000-00-00') {
1166  // On a besoin d'une date à afficher par défaut : si pas de date de commande, alors on prend la date du jour
1167  $order_object->o_timestamp = date('Y-m-d H:i:s');
1168  }
1169  if($bill_mode == "bdc" || $bill_mode == "devis" || $bill_mode == "user_custom_products_list") {
1170  $displayed_date = get_formatted_date($order_object->o_timestamp, 'short', vb($GLOBALS['site_parameters']['order_hour_display_mode'], 'long'));
1171  } else {
1172  // On veut une date de facture si possible et pas de commande
1173  if(!empty($order_object->f_datetime) && String::substr($order_object->f_datetime, 0, 10) != '0000-00-00') {
1174  // Une date de facture est définie
1175  $displayed_date = get_formatted_date($order_object->f_datetime, 'short');
1176  } else {
1177  // Pas de date de facture, on indique la date de commande
1178  $displayed_date = $GLOBALS['STR_ORDER_NAME'] . $GLOBALS["STR_BEFORE_TWO_POINTS"] . ': ' . get_formatted_date($order_object->o_timestamp, 'short', vb($GLOBALS['site_parameters']['order_hour_display_mode'], 'long'));
1179  }
1180  }
1181  $this->addDate($displayed_date, $order_infos['displayed_paiement_date'], $bill_mode);
1182  if ($bill_mode != "user_custom_products_list") {
1183  $this->addReglement(String::str_shorten(get_payment_name($order_object->paiement), 30) . ' - ' . $order_object->devise);
1184  }
1185  $this->addClientAdresseFacturation($order_infos['client_infos_bill'], $order_object->id_utilisateur, $bill_mode);
1186  if ($bill_mode != "user_custom_products_list" && !empty($GLOBALS['site_parameters']['mode_transport']) && !empty($order_infos['client_infos_ship'])) {
1187  // Ajout de l'adresse de livraison seulement si la boutique a une gestion du port
1188  $this->addClientAdresseExpedition($order_infos['client_infos_ship']);
1189  }
1190  // Alignement du contenu des cellules de chaque ligne
1191  $this->addLineFormat($column_formats);
1192  // Initialisation du début de l'affichage des produits
1193  if ($bill_mode == "user_custom_products_list") {
1194  $y = 75;
1195  } else {
1196  $y = 100;
1197  }
1198  }
1199  }
1200  if (!empty($this_ordered_product)) {
1201  $prix = fprix($this_ordered_product["prix"], ($bill_mode != "user_custom_products_list"), $order_object->devise, true, $order_object->currency_rate);
1202  $prix_ht = fprix($this_ordered_product["prix_ht"], true, $order_object->devise, true, $order_object->currency_rate);
1203  $total_prix_ht = fprix($this_ordered_product["total_prix_ht"], true, $order_object->devise, true, $order_object->currency_rate);
1204  $total_prix = fprix($this_ordered_product["total_prix"], true, $order_object->devise, true, $order_object->currency_rate);
1205  $product_text = filtre_pdf($this_ordered_product["product_text"]);
1206  if ($bill_mode != "user_custom_products_list") {
1207  if (!check_if_module_active('micro_entreprise')) {
1208  $line = array($GLOBALS['STR_PDF_REFERENCE'] => $this_ordered_product["reference"],
1209  $GLOBALS['STR_DESIGNATION'] => $product_text,
1210  $GLOBALS['STR_PDF_PRIX_HT'] => $prix_ht,
1211  $GLOBALS['STR_PDF_PRIX_TTC'] => $prix,
1212  $GLOBALS['STR_QUANTITY'] => $this_ordered_product["quantite"],
1213  $GLOBALS['STR_PDFTOTALHT'] => $total_prix_ht,
1214  $GLOBALS['STR_PDFTOTALTTC'] => $total_prix,
1215  $GLOBALS['STR_TAXE'] => "" . number_format($this_ordered_product['tva_percent'], 1) . "%");
1216  } else {
1217  $line = array($GLOBALS['STR_PDF_REFERENCE'] => $this_ordered_product["reference"],
1218  $GLOBALS['STR_DESIGNATION'] => $product_text,
1219  $GLOBALS['STR_PDF_PRIX_TTC'] => $prix,
1220  $GLOBALS['STR_QUANTITY'] => $this_ordered_product["quantite"],
1221  $GLOBALS['STR_PDFTOTALTTC'] => $total_prix);
1222  }
1223  } else {
1224  if (!empty($this_ordered_product["photo"]) && file_exists($GLOBALS['uploaddir'].'/thumbs/'.thumbs($this_ordered_product["photo"],50, 35))) {
1225  // Positionnement du logo à droite des informations sur la société
1226  $this->Image($GLOBALS['uploaddir'].'/thumbs/'.thumbs($this_ordered_product["photo"], 50, 35), 15, $y-4);
1227  }
1228  if (!empty($this_ordered_product["barcode_image_src"])) {
1229  // Positionnement du logo à droite des informations sur la société
1230  $this->Image($this_ordered_product['barcode_image_src'], 73, $y-6, 58, 12);
1231  }
1232  $line = array($GLOBALS['STR_PHOTO'] => "",
1233  $GLOBALS['STR_DESIGNATION'] => $this_ordered_product["reference"]."\r\n".$product_text,
1234  $GLOBALS['STR_EAN_CODE'] => "\r\n\r\n\r\n".$this_ordered_product["ean_code"],
1235  $GLOBALS['STR_BRAND'] => $this_ordered_product["brand"],
1236  $GLOBALS['STR_CATEGORY'] => $this_ordered_product["category"],
1237  $GLOBALS['STR_PDF_PRIX_TTC'] => $prix,
1238  $GLOBALS['STR_QUANTITY_SHORT'] => $this_ordered_product["quantite"],
1239  $GLOBALS['STR_START_PRICE'].' '.$GLOBALS['STR_TTC'] => $this_ordered_product["minimal_price"]);
1240  }
1241  $size = $this->addLine($y, $line, $bill_mode);
1242  $next_product_max_size_forecasted = max($next_product_max_size_forecasted, min(60, $size));
1243  $y += $size + 4;
1244  }
1245  }
1246  if($y > ($bill_mode != "user_custom_products_list" ?100: 70)) {
1247  // La page en cours est avec produits sur hauteur restreinte, pour laisser de la place pour les blocs qui suivent
1248  $this->addCols($y_max_allowed, $bill_mode);
1249  }
1250  if (!empty($order_infos['code_promo_text'])) {
1251  foreach($line as $this_key => $this_item) {
1252  $line[$this_key] = '';
1253  }
1254  $line[$GLOBALS['STR_DESIGNATION']] = $order_infos['code_promo_text'];
1255  $size = $this->addLine($y, $line);
1256  $y += $size + 4;
1257  }
1258  if(!empty($comments)) {
1259  $this->addRemarque(implode("\n", $comments));
1260  }
1261  if (empty($GLOBALS['site_parameters']['pdf_invoice_display_rib_on_invoice_bottom'])) {
1262  if ($bill_mode == "bdc") {
1263  $this->addCadreSignature();
1264  }
1265  } else {
1266  $this->addCadreRib();
1267  }
1268  if ($bill_mode != "user_custom_products_list") {
1269  $this->addCadreNet();
1270  $this->addNETs($order_infos['net_infos_array']);
1271  $this->addCadreTva();
1272  $this->addTVAs($order_infos['tva_infos_array']);
1273  $this->addInfoTVA($order_object->total_tva, $bill_mode, $order_object->id_utilisateur);
1274  } else {
1275  $y1 = $this->h-21;
1276  if (!empty($GLOBALS['site_parameters']['add_copyright_on_pdf_file'])) {
1277  $qid = query("SELECT *
1278  FROM peel_societe
1279  WHERE " . get_filter_site_cond('societe') . "
1280  LIMIT 1");
1281  $ligne = fetch_assoc($qid);
1282  $text = '<a href="' .get_url('/') . '">' . get_url('/') . '</a> Copyright ' . $GLOBALS['site'] . ' ' . date('Y').' / '.$GLOBALS['STR_TEL'].$GLOBALS['STR_BEFORE_TWO_POINTS'].': '.$ligne['tel'].' / '.$GLOBALS['STR_FAX'].$GLOBALS['STR_BEFORE_TWO_POINTS'].': '.$ligne['fax'].' / '.$ligne['email'] ;
1283  $this->writeHTMLCell("", 4, 10, $y1, $text, 0, 1, false, true, "C");
1284  $this->SetFont("Helvetica", "", 6);
1285  $text = template_tags_replace($GLOBALS['STR_INVOICE_BOTTOM_TEXT2']);
1286  $this->writeHTMLCell("", 4, 10, $y1+4, $text, 0, 1, false, true,"C");
1287  }
1288  }
1289  }
1290 
1297  {
1298  $qid = query("SELECT *
1299  FROM peel_societe
1300  WHERE " . get_filter_site_cond('societe') . "
1301  LIMIT 1");
1302  if ($ligne = fetch_object($qid)) {
1303  $pdf_societe = filtre_pdf($ligne->societe) . "\n" ;
1304  $pdf_adresse = filtre_pdf($ligne->adresse) . "\n" ;
1305  $pdf_codepostal = filtre_pdf($ligne->code_postal);
1306  $pdf_ville = filtre_pdf($ligne->ville);
1307  $pdf_pays = filtre_pdf($ligne->pays) . "\n" ;
1308  if (!empty($ligne->tel)) {
1309  $pdf_tel = $GLOBALS['STR_SHORT_TEL'] . $GLOBALS['STR_BEFORE_TWO_POINTS'] . ': ' . filtre_pdf($ligne->tel) . "\n";
1310  } else {
1311  $pdf_tel = "" ;
1312  }
1313  $pdf_fax = $ligne->fax ;
1314  if (!empty($ligne->siren)) {
1315  $pdf_siret = $GLOBALS['STR_PDF_RCS'] . $GLOBALS['STR_BEFORE_TWO_POINTS'] . ': ' . filtre_pdf($ligne->siren) . "\n";
1316  } else {
1317  $pdf_siret = "" ;
1318  }
1319  if (!empty($ligne->tvaintra)) {
1320  $pdf_tvaintra_company = $GLOBALS['STR_VAT_INTRACOM'] . $GLOBALS['STR_BEFORE_TWO_POINTS'] . ': ' . filtre_pdf($ligne->tvaintra) . "\n";
1321  } else {
1322  $pdf_tvaintra_company = "" ;
1323  }
1324  $pdf_siteweb = filtre_pdf($ligne->siteweb);
1325  if (file_exists($GLOBALS['dirroot'] . '/factures/logo.jpg')) {
1326  $pdf_logo = $GLOBALS['dirroot'] . '/factures/logo.jpg';
1327  } else {
1328  $pdf_logo = $ligne->logo ;
1329  }
1330  return $pdf_societe . $pdf_adresse . $pdf_codepostal . " " . $pdf_ville . " - " . $pdf_pays . $pdf_siret . $pdf_tvaintra_company . $pdf_tel . $pdf_siteweb . "\n";
1331  } else {
1332  return null;
1333  }
1334  }
1335 
1341  function getSocieteLogoPath($lang = null)
1342  {
1343  $pdf_logo = '';
1344  if (!empty($lang)) {
1345  if (!empty($GLOBALS['site_parameters']['logo_bill_'.$lang])) {
1346  $pdf_logo = $GLOBALS['site_parameters']['logo_bill_'.$lang];
1347  } elseif (!empty($GLOBALS['site_parameters']['logo_'.$lang])) {
1348  $pdf_logo = $GLOBALS['site_parameters']['logo_'.$lang];
1349  }
1350  }
1351  if(empty($pdf_logo) && file_exists($GLOBALS['dirroot'] . '/factures/logo.jpg')) {
1352  $pdf_logo = $GLOBALS['dirroot'] . '/factures/logo.jpg';
1353  }
1354  if(!empty($pdf_logo) && strpos($pdf_logo, $GLOBALS['dirroot']) === false) {
1355  // on découpe le contenu du champs à la recherche du non de l'image fixe
1356  // ceci évitera d'envoyer la transmition du logo avec un chemin en http::// (qui n'est pas pris en compte)
1357  $pdf_logo = String::rawurldecode(str_replace($GLOBALS['wwwroot'], $GLOBALS['dirroot'], $pdf_logo));
1358  if (!empty($pdf_logo) && file_exists($GLOBALS['dirroot'] . '/' . $pdf_logo)) {
1359  // si le logo renseigné n'existe pas, on ne retourne pas d'information
1360  $pdf_logo = $GLOBALS['dirroot'] . '/' . $pdf_logo;
1361  } elseif (!empty($pdf_logo) && file_exists($GLOBALS['dirroot'] . '/images/' . $pdf_logo)) {
1362  // si le logo renseigné n'existe pas, on ne retourne pas d'information
1363  $pdf_logo = $GLOBALS['dirroot'] . '/images/' . $pdf_logo;
1364  } elseif (empty($pdf_logo) || !($handle = @String::fopen_utf8($pdf_logo, 'rb'))) {
1365  // si le logo renseigné n'existe pas, on ne retourne pas d'information
1366  $pdf_logo = false;
1367  }
1368  if(!empty($handle)) {
1369  fclose($handle);
1370  }
1371  }
1372  return $pdf_logo;
1373  }
1374 }
1375 
SetLineWidth($width)
Defines the line width.
Definition: tcpdf.php:15278
static strtoupper($string)
Returns string with all alphabetic characters converted to uppercase.
Definition: String.php:154
addEcheance($date)
Affiche un cadre avec la date d'echeance (en haut, au centre)
Definition: Invoice.php:462
FillDocument($code_facture=null, $date_debut=null, $date_fin=null, $id_debut=null, $id_fin=null, $user_id=null, $id_statut_paiement_filter=null, $bill_mode= 'standard', $folder=false, $order_object=null, $product_infos_array=null, $order_array=null, $document_title=null, $ids_array=null)
Cette fonction génère :
Definition: Invoice.php:923
get_payment_status_name($id)
get_payment_status_name()
Definition: order.php:1065
getGroupPageNo()
Return the current page in the group.
Definition: tcpdf.php:18573
$lang
Definition: spellchecker.php:9
getPageGroupAlias()
Return the alias for the total number of pages in the current page group.
Definition: tcpdf.php:18545
$result
addRemarque($remarque)
Ajoute une remarque (en bas, a gauche)
Definition: Invoice.php:650
addCadreTva()
Invoice::addCadreTva()
Definition: Invoice.php:777
static strpos($haystack, $needle, $offset=0)
Returns the numeric position of the first occurrence of needle in the haystack string.
Definition: String.php:54
addClientAdresseExpedition($pdf_facturation2)
Invoice::addClientAdresseExpedition()
Definition: Invoice.php:408
get_product_infos_array_in_order($order_id, $devise=null, $currency_rate=null, $order_by=null, $add_total_prix_attribut=false)
get_product_infos_array_in_order()
Definition: order.php:1469
static rawurldecode($string, $avoid_slash=false)
Returns rawurldecode.
Definition: String.php:909
is_user_tva_intracom_for_no_vat($user_id=null)
is_user_tva_intracom_for_no_vat()
Definition: user.php:959
addNETs($params1)
Invoice::addNETs()
Definition: Invoice.php:792
Output($name='doc.pdf', $dest='I')
Send the document to a given destination: string, local file or browser.
Definition: tcpdf.php:8958
static fopen_utf8($filename, $mode, $force_filename_in_iso_8859=false, $try_filename_in_iso_8859_if_file_not_found=true)
Ouvre un fichier.
Definition: String.php:793
addClientAdresseFacturation($pdf_facturation, $id_utilisateur, $bill_mode)
Affiche l'adresse du client (en haut, a droite)
Definition: Invoice.php:372
sizeOfText($texte, $largeur)
Invoice::sizeOfText()
Definition: Invoice.php:154
$k
Scale factor (number of points in user unit).
Definition: tcpdf.php:233
$w
Current width of page in user unit.
Definition: tcpdf.php:263
addLineFormat($tab)
Mémorise le format (gauche, centre, droite) d'une colonne.
Definition: Invoice.php:547
$colonnes
Definition: Invoice.php:39
Rect($x, $y, $w, $h, $style='', $border_style=array(), $fill_color=array())
Draws a rectangle.
Definition: tcpdf.php:15510
SetX($x, $rtloff=false)
Defines the abscissa of the current position.
Definition: tcpdf.php:8827
addReference($ref)
Affiche une ligne avec des references (en haut, a gauche)
Definition: Invoice.php:485
$mode
nohtml_real_escape_string($value, $allowed_tags=null)
Protège les données pour insertion dans MySQL ET supprime les tags HTML pour protéger de toute sorte ...
Definition: database.php:400
lastPage($resetmargins=false)
Reset pointer to the last document page.
Definition: tcpdf.php:3953
addSociete($adresse, $logo, $bill_mode)
Cette fonction affiche en haut à gauche le nom de la societe dans la police Helvetica-12-Bold les coo...
Definition: Invoice.php:187
$title
Document title.
Definition: tcpdf.php:519
get_float_from_user_input($string, $from_currency_rate=1)
Transforme tout nombre formaté en un float au format PHP Exemples : 12 004,34 ou 12,324.50.
Definition: format.php:196
if(!defined('IN_PEEL')) thumbs($source_filename, $width, $height, $method= 'fit', $source_folder=null, $thumb_folder=null, $thumb_rename=true, $return_absolute_path=false)
Charge l'image dont le nom est $source_filename dans le répertoire d'upload, et crée une vignette pou...
Definition: fonctions.php:33
SetFillColor($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='')
Defines the color used for all filling operations (filled rectangles and cell backgrounds).
Definition: tcpdf.php:4942
$y
Current vertical position in user unit for cell positioning.
Definition: tcpdf.php:331
getSocieteInfoText()
getSocieteInfoText()
Definition: Invoice.php:1296
filtre_pdf($string)
filtre_pdf()
Definition: format.php:265
addCols($y_max_allowed, $bill_mode=null)
Trace le cadre des colonnes du devis/facture.
Definition: Invoice.php:503
Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
Prints a cell (rectangular area) with optional borders, background color and character string...
Definition: tcpdf.php:5946
Text($x, $y, $txt, $fstroke=false, $fclip=false, $ffill=true, $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M', $rtloff=false)
Prints a text cell at the specified position.
Definition: tcpdf.php:5821
addLine($ligne, $tab, $bill_mode=null)
Invoice::addLine()
Definition: Invoice.php:587
get_filter_site_cond($table_technical_code, $table_alias=null, $use_strict_rights_if_in_admin=false, $specific_site_id=null, $exclude_public_items=false, $admin_force_multisite_if_allowed=false)
Retourne la condition SQL permettant de filtrer les données pour une table.
Definition: fonctions.php:4643
query($query, $die_if_error=false, $database_object=null, $silent_if_error=false, $security_sql_filter=true)
The query() function is meant to be called anywhere you want to make a query.
Definition: database.php:158
SetFont($family, $style='', $size=null, $fontfile='', $subset='default', $out=true)
Sets the font used to print character strings.
Definition: tcpdf.php:5384
SetTextColor($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='')
Defines the color used for text.
Definition: tcpdf.php:4959
$total_ht
vb(&$var, $default=null)
Variable blanche if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:97
$document_name
Definition: Invoice.php:43
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
Definition: chart-data.php:160
addDate($date, $date_a, $bill_mode)
Affiche un cadre avec la date de la facture / devis (en haut, a droite)
Definition: Invoice.php:287
addCadreSignature()
Invoice::addCadreSignature()
Definition: Invoice.php:707
Open()
This method begins the generation of the PDF document.
Definition: tcpdf.php:3850
backgoundBigWatermark($texte, $coordx=null, $coordy=null)
Permet de rajouter un commentaire (Devis temporaire, REGLE, DUPLICATA, ...) en sous-impression ATTENT...
Definition: Invoice.php:897
startPageGroup($page= '')
Create a new page group.
Definition: tcpdf.php:18452
$h
Current height of page in user unit.
Definition: tcpdf.php:269
fetch_object($query_result)
fetch_object()
Definition: database.php:302
Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false, $alt=false, $altimgs=array())
Puts an image in the page.
Definition: tcpdf.php:7915
AddPage($orientation='', $format='', $keepmargins=false, $tocpage=false)
Adds a new page to the document.
Definition: tcpdf.php:4013
addCadreNet()
trace le cadre des totaux
Definition: Invoice.php:763
fetch_assoc($query_result)
fetch_assoc()
Definition: database.php:283
InvoiceRoundedRect($x, $y, $w, $h, $r, $style= '')
PRIVATE FUNCTION : Invoice::InvoiceRoundedRect()
Definition: Invoice.php:57
call_module_hook($hook, $params, $mode= 'boolean')
Appelle la fonction correspondant au $hook pour chaque module installé La fonction doit s'appeler : [...
SetAutoPageBreak($auto, $margin=0)
Enables or disables the automatic page breaking mode.
Definition: tcpdf.php:3643
get_formatted_date($datetime_or_timestamp=null, $mode= 'short', $hour_minute=false)
Afficher une date formatée, en évitant les problèmes liés aux noms de mois sur les serveurs qui ne so...
Definition: format.php:440
addCadreTVAs()
Trace le cadre des TVAs.
Definition: Invoice.php:672
writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true)
Prints a cell (rectangular area) with optional borders, background color and html text string...
Definition: tcpdf.php:22277
$id_utilisateur
Definition: rpc.php:32
_out($s)
Output a string to the document.
Definition: tcpdf.php:13623
AliasNbPages($s='')
This method is DEPRECATED and doesn't have any effect.
Definition: tcpdf.php:18466
GetY()
Returns the ordinate of the current position.
Definition: tcpdf.php:8814
$GLOBALS['page_columns_count']
GetStringWidth($s, $fontname='', $fontstyle='', $fontsize=0, $getarray=false)
Returns the length of a string in user unit.
Definition: tcpdf.php:4975
_endpage()
PRIVATE FUNCTION : Invoice::_endpage()
Definition: Invoice.php:139
Rotate($angle, $x=-1, $y=-1)
PRIVATE FUNCTION : Invoice::Rotate()
Definition: Invoice.php:115
fact_dev($libelle, $num, $change_background_color_by_type=false, $bill_mode=null)
Affiche en haut, a droite le libelle (FACTURE, $GLOBALS['STR_DEVIS'], Bon de commande, etc...) et son numero La taille de la fonte est auto-adaptee au cadre.
Definition: Invoice.php:222
addTVAs($params2)
Invoice::addTVAs()
Definition: Invoice.php:861
vn(&$var, $default=0)
Variable nulle if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:110
$x
Current horizontal position in user unit for cell positioning.
Definition: tcpdf.php:325
lineVert($tab)
Invoice::lineVert()
Definition: Invoice.php:564
$hook_result
addReglement($mode)
Affiche un cadre avec le règlement (chèque, etc...) (en haut, a gauche)
Definition: Invoice.php:435
Line($x1, $y1, $x2, $y2, $style=array())
Draws a line between two points.
Definition: tcpdf.php:15480
SetXY($x, $y, $rtloff=false)
Defines the abscissa and ordinate of the current position.
Definition: tcpdf.php:8893
addFacture($numfact)
Génère automatiquement un numéro de facture.
Definition: Invoice.php:274
addInfoTVA($tva, $mode=null, $id_utilisateur=null)
Affiche un cadre avec les informations sur la TVA (en bas au milieu)
Definition: Invoice.php:325
get_order_infos_array($order_object)
get_order_infos_array()
Definition: order.php:1320
fprix($price, $display_currency=false, $currency_code_or_default=null, $convertion_needed_into_currency=true, $currency_rate=null, $display_iso_currency_code=false, $format=true, $force_format_separator=null, $add_rdfa_properties=false, $round_even_if_no_format=false)
fprix formatte le prix donné en le convertissant si nécessaire au préalable et en ajoutant éventuelle...
Definition: fonctions.php:242
addTotalHt($total_ht)
Invoice::addTotalHt()
Definition: Invoice.php:629
MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0, $valign='T', $fitcell=false)
This method allows printing text with line breaks.
Definition: tcpdf.php:6709
_Arc($x1, $y1, $x2, $y2, $x3, $y3)
PRIVATE FUNCTION : Invoice::_Arc()
Definition: Invoice.php:100
get_payment_name($id_or_code)
get_payment_name()
Definition: order.php:1046
$document_id
Definition: Invoice.php:44
$page
Current page number.
Definition: tcpdf.php:173
PHP class for generating PDF documents without requiring external extensions.
Definition: tcpdf.php:157
static convert_accents($string, $convert_umlaut=false, $strip_umlaut=true)
convert_accents()
Definition: String.php:341
static substr($string, $start, $length=null)
Returns the portion of string specified by the start and length parameters.
Definition: String.php:112
check_if_module_active($module_name, $specific_file_name=null)
Renvoie si un module est présent et activé ou non - Peut être appelé avant ou après le chargement d'u...
$remarque_lignes
Definition: Invoice.php:42
template_tags_replace($text, $custom_template_tags=array(), $replace_only_custom_tags=false, $format=null, $lang=null, $avoid_load_urls=false)
Remplace les tags d'un texte au format [TAG] par les valeurs correspondantes.
Definition: format.php:599
generatePdfOrderContent($column_formats, $bill_mode, $i, &$order_object, &$product_infos_array, $document_title=null)
generatePdfOrderContent()
Definition: Invoice.php:1052
static str_shorten($string, $length_limit, $middle_separator= '', $ending_if_no_middle_separator= '...', $ideal_length_with_clean_cut_if_possible=null)
Raccourcit une chaine de caractère en insérant au milieu ou à la fin un séparateur.
Definition: String.php:233
addPageNumber($page)
Affiche un cadre avec un numéro de page (en haut, a droite)
Definition: Invoice.php:355
addCadreRib()
Invoice::addCadreRib()
Definition: Invoice.php:732
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']
getSocieteLogoPath($lang=null)
getSocieteLogoPath()
Definition: Invoice.php:1341

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:30:03 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.