diff --git a/htdocs/includes/modules/commande/modules_commande.php b/htdocs/includes/modules/commande/modules_commande.php index a905fef4808..36e9a8b0e39 100644 --- a/htdocs/includes/modules/commande/modules_commande.php +++ b/htdocs/includes/modules/commande/modules_commande.php @@ -140,13 +140,16 @@ class ModeleNumRefCommandes * @param object object order * @param modele force le modele a utiliser ('' to not force) * @param outputlangs objet lang a utiliser pour traduction + * @param hidedetails Hide details of lines + * @param hidedesc Hide description */ -function commande_pdf_create($db, $object, $modele, $outputlangs) +function commande_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0) { global $conf,$langs; $langs->load("orders"); $dir = DOL_DOCUMENT_ROOT."/includes/modules/commande/"; + $srctemplatepath=''; $modelisok=0; $liste=array(); @@ -183,7 +186,7 @@ function commande_pdf_create($db, $object, $modele, $outputlangs) // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs) > 0) + if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc) > 0) { $outputlangs->charset_output=$sav_charset_output; // on supprime l'image correspondant au preview @@ -193,7 +196,7 @@ function commande_pdf_create($db, $object, $modele, $outputlangs) else { $outputlangs->charset_output=$sav_charset_output; - dol_syslog("Erreur dans commande_pdf_create"); + dol_syslog("Error"); dol_print_error($db,$obj->error); return 0; } diff --git a/htdocs/includes/modules/commande/pdf_edison.modules.php b/htdocs/includes/modules/commande/pdf_edison.modules.php index ad36ffa99cc..512f7ff6101 100644 --- a/htdocs/includes/modules/commande/pdf_edison.modules.php +++ b/htdocs/includes/modules/commande/pdf_edison.modules.php @@ -87,12 +87,16 @@ class pdf_edison extends ModelePDFCommandes /** - * \brief Fonction generant la commande sur le disque - * \param com id de la propale a generer - * \param outputlangs Lang output object - * \return int 1=ok, 0=ko + * Function to build pdf onto disk + * @param object Id of object to generate + * @param outputlangs Lang output object + * @param srctemplatepath Full path of source filename for generator using a template file + * @param hidedetails Do not show line details + * @param hidedesc Do not show desc + * @param hideref Do not show ref + * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs) + function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) { global $user,$conf,$langs,$mysoc; @@ -203,7 +207,7 @@ class pdf_edison extends ModelePDFCommandes $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page // Description de la ligne produit - pdf_writelinedesc($pdf,$object,$i,$outputlangs,100,3,30,$curY,1,GETPOST('hidedesc')); + pdf_writelinedesc($pdf,$object,$i,$outputlangs,100,3,30,$curY,1,$hidedesc); //$pdf->writeHTMLCell(100, 3, 30, $curY, $outputlangs->convToOutputCharset($libelleproduitservice), 0, 1); $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut @@ -213,19 +217,19 @@ class pdf_edison extends ModelePDFCommandes $pdf->SetXY (10, $curY); $pdf->MultiCell(20, 3, $ref, 0, 'C'); - $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, GETPOST('hidedetails')); + $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY (133, $curY); $pdf->MultiCell(12, 3, $vat_rate, 0, 'C'); - $qty = pdf_getlineqty($object, $i, $outputlangs, GETPOST('hidedetails')); + $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY (145, $curY); $pdf->MultiCell(10, 3, $qty, 0, 'C'); - $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY (156, $curY); $pdf->MultiCell(18, 3, $up_excl_tax, 0, 'R', 0); - $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY (174, $curY); $pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0); diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index 905ef0c21eb..e6dbd65ec4f 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -102,12 +102,16 @@ class pdf_einstein extends ModelePDFCommandes } /** - * \brief Fonction generant la commande sur le disque - * \param object Objet commande a generer - * \param outputlangs Lang object for output language - * \return int 1=ok, 0=ko + * Function to build pdf onto disk + * @param object Id of object to generate + * @param outputlangs Lang output object + * @param srctemplatepath Full path of source filename for generator using a template file + * @param hidedetails Do not show line details + * @param hidedesc Do not show desc + * @param hideref Do not show ref + * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs) + function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) { global $user,$langs,$conf; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -251,7 +255,7 @@ class pdf_einstein extends ModelePDFCommandes // Description of product line $curX = $this->posxdesc-1; - pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,GETPOST('hideref'),GETPOST('hidedesc')); + pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc); $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut $nexY = $pdf->GetY(); @@ -259,18 +263,18 @@ class pdf_einstein extends ModelePDFCommandes // TVA if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { - $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, GETPOST('hidedetails')); + $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->posxtva, $curY); $pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R'); } // Prix unitaire HT avant remise - $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->posxup, $curY); $pdf->MultiCell($this->posxqty-$this->posxup-1, 3, $up_excl_tax, 0, 'R', 0); // Quantity - $qty = pdf_getlineqty($object, $i, $outputlangs, GETPOST('hidedetails')); + $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->posxqty, $curY); $pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $qty, 0, 'R'); @@ -278,12 +282,12 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY ($this->posxdiscount, $curY); if ($object->lines[$i]->remise_percent) { - $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, GETPOST('hidedetails')); + $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent, 0, 'R'); } // Total HT ligne - $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->postotalht, $curY); $pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0); diff --git a/htdocs/includes/modules/facture/doc/pdf_crabe.modules.php b/htdocs/includes/modules/facture/doc/pdf_crabe.modules.php index b1068ee3d5e..f4a8858671f 100755 --- a/htdocs/includes/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/doc/pdf_crabe.modules.php @@ -104,12 +104,16 @@ class pdf_crabe extends ModelePDFFactures /** - * Write the object to document file to disk - * @param object Object invoice to build (or id if old method) - * @param outputlangs Lang object for output language - * @return int 1=OK, 0=KO + * Function to build pdf onto disk + * @param object Id of object to generate + * @param outputlangs Lang output object + * @param srctemplatepath Full path of source filename for generator using a template file + * @param hidedetails Do not show line details + * @param hidedesc Do not show desc + * @param hideref Do not show ref + * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs) + function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) { global $user,$langs,$conf; @@ -258,7 +262,7 @@ class pdf_crabe extends ModelePDFFactures // Description of product line $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage $curX = $this->posxdesc-1; - pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,GETPOST('hideref'),GETPOST('hidedesc')); + pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc); $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut $nexY = $pdf->GetY(); @@ -266,18 +270,18 @@ class pdf_crabe extends ModelePDFFactures // VAT Rate if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { - $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, GETPOST('hidedetails')); + $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->posxtva, $curY); $pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R'); } // Prix unitaire HT avant remise - $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->posxup, $curY); $pdf->MultiCell($this->posxqty-$this->posxup-1, 3, $up_excl_tax, 0, 'R', 0); // Quantity - $qty = pdf_getlineqty($object, $i, $outputlangs, GETPOST('hidedetails')); + $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->posxqty, $curY); $pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $qty, 0, 'R'); // Enough for 6 chars @@ -285,12 +289,12 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY ($this->posxdiscount, $curY); if ($object->lines[$i]->remise_percent) { - $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, GETPOST('hidedetails')); + $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent, 0, 'R'); } // Total HT ligne - $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->postotalht, $curY); $pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0); diff --git a/htdocs/includes/modules/facture/doc/pdf_oursin.modules.php b/htdocs/includes/modules/facture/doc/pdf_oursin.modules.php index a414d05a870..e22f877febb 100755 --- a/htdocs/includes/modules/facture/doc/pdf_oursin.modules.php +++ b/htdocs/includes/modules/facture/doc/pdf_oursin.modules.php @@ -102,12 +102,16 @@ class pdf_oursin extends ModelePDFFactures /** - * \brief Fonction generant la facture sur le disque - * \param fac Objet invoice to build (or id if old method) - * \param outputlangs Lang object for output language - * \return int 1=ok, 0=ko + * Function to build pdf onto disk + * @param object Id of object to generate + * @param outputlangs Lang output object + * @param srctemplatepath Full path of source filename for generator using a template file + * @param hidedetails Do not show line details + * @param hidedesc Do not show desc + * @param hideref Do not show ref + * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs) + function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) { global $user,$langs,$conf; @@ -219,7 +223,7 @@ class pdf_oursin extends ModelePDFFactures $curY = $nexY; // Description of product line - pdf_writelinedesc($pdf,$object,$i,$outputlangs,108,3,$this->posxdesc-1,$curY+1,GETPOST('hideref'),GETPOST('hidedesc')); + pdf_writelinedesc($pdf,$object,$i,$outputlangs,108,3,$this->posxdesc-1,$curY+1,$hideref,$hidedesc); $nexY = $pdf->GetY(); @@ -228,31 +232,31 @@ class pdf_oursin extends ModelePDFFactures { if ($this->franchise!=1) { - $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, GETPOST('hidedetails')); + $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->marges['g']+118, $curY); $pdf->MultiCell(12, 3, $vat_rate, 0, 'R'); } } // Prix unitaire HT avant remise - $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->marges['g']+132, $curY); $pdf->MultiCell(16, 3, $up_excl_tax, 0, 'R', 0); // Quantity - $qty = pdf_getlineqty($object, $i, $outputlangs, GETPOST('hidedetails')); + $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->marges['g']+150, $curY); $pdf->MultiCell(10, 3, $qty, 0, 'R'); // Remise sur ligne $pdf->SetXY ($this->marges['g']+160, $curY); if ($object->lines[$i]->remise_percent) { - $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, GETPOST('hidedetails')); + $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $pdf->MultiCell(14, 3, $remise_percent, 0, 'R'); } // Total HT - $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->marges['g']+168, $curY); $pdf->MultiCell(21, 3, $total_excl_tax, 0, 'R', 0); diff --git a/htdocs/includes/modules/facture/modules_facture.php b/htdocs/includes/modules/facture/modules_facture.php index c1c7a6966b5..f3212296f82 100644 --- a/htdocs/includes/modules/facture/modules_facture.php +++ b/htdocs/includes/modules/facture/modules_facture.php @@ -140,9 +140,11 @@ class ModeleNumRefFactures * @param message message * @param modele force le modele a utiliser ('' to not force) * @param outputlangs objet lang a utiliser pour traduction + * @param hidedetails Hide details of lines + * @param hidedesc Hide description * @return int <0 if KO, >0 if OK */ -function facture_pdf_create($db, $object, $message, $modele, $outputlangs) +function facture_pdf_create($db, $object, $message, $modele, $outputlangs, $hidedetails=0, $hidedesc=0) { global $conf,$langs; $langs->load("bills"); @@ -204,7 +206,7 @@ function facture_pdf_create($db, $object, $message, $modele, $outputlangs) // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs, $srctemplatepath) > 0) + if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc) > 0) { // Success in building document. We build meta file. facture_meta_create($db, $object->id); diff --git a/htdocs/includes/modules/propale/modules_propale.php b/htdocs/includes/modules/propale/modules_propale.php index aa7f5e38dcb..3de854facb0 100644 --- a/htdocs/includes/modules/propale/modules_propale.php +++ b/htdocs/includes/modules/propale/modules_propale.php @@ -136,14 +136,17 @@ class ModeleNumRefPropales * @param id id de la propale a creer * @param modele force le modele a utiliser ('' to not force) * @param outputlangs objet lang a utiliser pour traduction + * @param hidedetails Hide details of lines + * @param hidedesc Hide description * @return int 0 si KO, 1 si OK */ -function propale_pdf_create($db, $object, $modele, $outputlangs) +function propale_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0) { global $langs; $langs->load("propale"); $dir = "/includes/modules/propale/"; + $srctemplatepath=''; $modelisok=0; // Positionne modele sur le nom du modele de propale a utiliser @@ -188,7 +191,7 @@ function propale_pdf_create($db, $object, $modele, $outputlangs) // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs) > 0) + if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc) > 0) { $outputlangs->charset_output=$sav_charset_output; // on supprime l'image correspondant au preview diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index 276edbc2221..a6a5e8633e7 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -101,12 +101,16 @@ class pdf_propale_azur extends ModelePDFPropales } /** - * \brief Fonction generant la propale sur le disque - * \param object Objet propal a generer (ou id si ancienne methode) - * \param outputlangs Lang object for output language - * \return int 1=ok, 0=ko + * Function to build pdf onto disk + * @param object Id of object to generate + * @param outputlangs Lang output object + * @param srctemplatepath Full path of source filename for generator using a template file + * @param hidedetails Do not show line details + * @param hidedesc Do not show desc + * @param hideref Do not show ref + * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs) + function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) { global $user,$langs,$conf; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -239,7 +243,7 @@ class pdf_propale_azur extends ModelePDFPropales // Description de la ligne produit $curX = $this->posxdesc-1; - pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,GETPOST('hideref'),GETPOST('hidedesc')); + pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc); $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut $nexY = $pdf->GetY(); @@ -247,18 +251,18 @@ class pdf_propale_azur extends ModelePDFPropales // TVA if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { - $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, GETPOST('hidedetails')); + $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->posxtva, $curY); $pdf->MultiCell($this->posxup-$this->posxtva-1, 4, $vat_rate, 0, 'R'); } // Prix unitaire HT avant remise - $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->posxup, $curY); $pdf->MultiCell($this->posxqty-$this->posxup-1, 4, $up_excl_tax, 0, 'R', 0); // Quantity - $qty = pdf_getlineqty($object, $i, $outputlangs, GETPOST('hidedetails')); + $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->posxqty, $curY); $pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 4, $qty, 0, 'R'); @@ -266,12 +270,12 @@ class pdf_propale_azur extends ModelePDFPropales $pdf->SetXY ($this->posxdiscount, $curY); if ($object->lines[$i]->remise_percent) { - $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, GETPOST('hidedetails')); + $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, $remise_percent, 0, 'R'); } // Total HT ligne - $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY ($this->postotalht, $curY); $pdf->MultiCell(26, 4, $total_excl_tax, 0, 'R', 0); @@ -441,7 +445,7 @@ class pdf_propale_azur extends ModelePDFPropales $posy=$pdf->GetY()+4; } - + // Show availability conditions if ($object->type != 2 && ($object->availability_code || $object->availability)) { diff --git a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php index 4ff90f527af..49b1892bd84 100644 --- a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php @@ -77,12 +77,16 @@ class pdf_propale_jaune extends ModelePDFPropales /** - * \brief Fonction generant la propale sur le disque - * \param object Objet propal - * \param outputlangs Lang object for output language - * \return int 1=ok, 0=ko + * Function to build pdf onto disk + * @param object Id of object to generate + * @param outputlangs Lang output object + * @param srctemplatepath Full path of source filename for generator using a template file + * @param hidedetails Do not show line details + * @param hidedesc Do not show desc + * @param hideref Do not show ref + * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs) + function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) { global $user,$langs,$conf; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -192,7 +196,7 @@ class pdf_propale_jaune extends ModelePDFPropales $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page // Description de la ligne produit - pdf_writelinedesc($pdf,$object,$i,$outputlangs,102,4,30,$curY,1,GETPOST('hidedesc')); + pdf_writelinedesc($pdf,$object,$i,$outputlangs,102,4,30,$curY,1,$hidedesc); $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut $nexY = $pdf->GetY(); @@ -201,19 +205,19 @@ class pdf_propale_jaune extends ModelePDFPropales $pdf->SetXY (10, $curY ); $pdf->MultiCell(20, 4, $ref, 0, 'L', 0); - $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, GETPOST('hidedetails')); + $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY (132, $curY ); $pdf->MultiCell(12, 4, $vat_rate, 0, 'R'); - $qty = pdf_getlineqty($object, $i, $outputlangs, GETPOST('hidedetails')); + $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY (144, $curY ); $pdf->MultiCell(10, 4, $qty, 0, 'R', 0); - $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY (154, $curY ); $pdf->MultiCell(22, 4, $up_excl_tax, 0, 'R', 0); - $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, GETPOST('hidedetails')); + $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY (176, $curY ); $pdf->MultiCell(24, 4, $total_excl_tax, 0, 'R', 0); @@ -339,7 +343,7 @@ class pdf_propale_jaune extends ModelePDFPropales $posy=$pdf->GetY()+1; } - + // Show payments conditions if ($object->type != 2 && ($object->cond_reglement_code || $object->cond_reglement)) { @@ -370,10 +374,10 @@ class pdf_propale_jaune extends ModelePDFPropales $pdf->SetFont('','B', $default_font_size - 2); $pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0); $pdf->SetTextColor(0,0,0); - + $posy=$pdf->GetY()+1; }*/ - + // Show payment mode if ($object->mode_reglement_code && $object->mode_reglement_code != 'CHQ' @@ -383,16 +387,16 @@ class pdf_propale_jaune extends ModelePDFPropales $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentMode").':'; $pdf->MultiCell(80, 5, $titre, 0, 'L'); - + $pdf->SetFont('','', $default_font_size - 2); $pdf->SetXY(50, $posy); //print "xxx".$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code);exit; $lib_mode_reg=$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code)!=('PaymentType'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement); $pdf->MultiCell(80, 5, $lib_mode_reg,0,'L'); - + $posy=$pdf->GetY()+2; } - + // Show payment mode CHQ if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') { @@ -403,12 +407,12 @@ class pdf_propale_jaune extends ModelePDFPropales { $account = new Account($this->db); $account->fetch($conf->global->FACTURE_CHQ_NUMBER); - + $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','B', $default_font_size - 2); $pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$account->proprio).':',0,'L',0); $posy=$pdf->GetY()+1; - + $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','', $default_font_size - 2); $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); @@ -420,7 +424,7 @@ class pdf_propale_jaune extends ModelePDFPropales $pdf->SetFont('','B',$default_font_size - 2); $pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedToShort').' '.$outputlangs->convToOutputCharset($this->emetteur->name).' '.$outputlangs->transnoentities('SendTo').':',0,'L',0); $posy=$pdf->GetY()+1; - + $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','', $default_font_size - 2); $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); @@ -428,7 +432,7 @@ class pdf_propale_jaune extends ModelePDFPropales } } } - + // If payment mode not forced or forced to VIR, show payment with BAN /* Not enough space if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') @@ -437,18 +441,18 @@ class pdf_propale_jaune extends ModelePDFPropales { $account = new Account($this->db); $account->fetch($conf->global->FACTURE_RIB_NUMBER); - + $curx=$this->marge_gauche; $cury=$posy; - + $posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account); - + $posy+=2; } } */ } - + return $posy; } @@ -479,7 +483,7 @@ class pdf_propale_jaune extends ModelePDFPropales $pdf->SetFont('','', $default_font_size - 1); $haut=6; - + $pdf->SetXY(10,$tab_top); $pdf->MultiCell(20,$haut,$outputlangs->transnoentities("Ref"),0,'L',1);