diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index a27d9c55237ed15f7e37a4f3ee3df23fa08cee93..81fef27114661d4a463b852fa4097daa7508f3fa 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -203,13 +203,13 @@ class pdf_einstein extends ModelePDFCommandes $tab_height_newpage = 180; // Affiche notes - if ($com->note_public) + if (! empty($com->note_public)) { $tab_top = 88; $pdf->SetFont('Arial','', 9); // Dans boucle pour g�rer multi-page $pdf->SetXY ($this->posxdesc-1, $tab_top); - $pdf->MultiCell(190, 3, $com->note_public, 0, 'J'); + $pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($com->note_public), 0, 'J'); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index 185ecc93e7c54b59f819184431732493bc962a37..94b310a2bdd89dbb64b104c874ee6996a12f0bc7 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -206,13 +206,13 @@ class pdf_crabe extends ModelePDFFactures $tab_height_newpage = 180; // Affiche notes - if ($fac->note_public) + if (! empty($fac->note_public)) { $tab_top = 88; $pdf->SetFont('Arial','', 9); // Dans boucle pour gerer multi-page $pdf->SetXY ($this->posxdesc-1, $tab_top); - $pdf->MultiCell(190, 3, $fac->note_public, 0, 'J'); + $pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($fac->note_public), 0, 'J'); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; diff --git a/htdocs/includes/modules/facture/pdf_huitre.modules.php b/htdocs/includes/modules/facture/pdf_huitre.modules.php index 97055910593da87ae046e19461ad8eace02c17b7..ee21611b4506e5fb4a872215c6f6267424b5ff1e 100644 --- a/htdocs/includes/modules/facture/pdf_huitre.modules.php +++ b/htdocs/includes/modules/facture/pdf_huitre.modules.php @@ -239,7 +239,7 @@ class pdf_huitre extends ModelePDFFactures * */ - if ( $fac->note_public) + if (! empty($fac->note_public)) { $pdf->SetFont('Arial','',7); $pdf->SetXY(10, 211); diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index c353b26db69c831b109b9f8b8fd0ed528e880ead..5a34a5a8a28a69207ba066d765081aad5f06f23e 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -206,7 +206,7 @@ class pdf_propale_azur extends ModelePDFPropales $tab_height_middlepage = 190; // Affiche notes - if ($propale->note_public) + if (! empty($propale->note_public)) { $tab_top = 88; @@ -232,7 +232,7 @@ class pdf_propale_azur extends ModelePDFPropales $curY = $tab_top + 8; $nexY = $tab_top + 8; - // Boucle sur les lignes + // Loop on each lines for ($i = 0 ; $i < $nblignes ; $i++) { $curY = $nexY; diff --git a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php index 6eabb8c48e09183ef9435ec7289233f336065f45..3f43bf39b16b21332f6d745fafb05719d47a2bcf 100644 --- a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php @@ -84,7 +84,7 @@ class pdf_propale_jaune extends ModelePDFPropales /** - * \brief Fonction g�n�rant la propale sur le disque + * \brief Fonction generant la propale sur le disque * \param propale Objet propal * \param outputlangs Lang object for output language * \return int 1=ok, 0=ko @@ -117,7 +117,7 @@ class pdf_propale_jaune extends ModelePDFPropales $ret=$propale->fetch($id); } - // D�finition de $dir et $file + // Definition de $dir et $file if ($propale->specimen) { $dir = $conf->propal->dir_output; @@ -189,20 +189,47 @@ class pdf_propale_jaune extends ModelePDFPropales $nexY = $pdf->GetY(); $nblignes = sizeof($propale->lignes); + // Loop on each lines for ($i = 0 ; $i < $nblignes ; $i++) { $curY = $nexY; + // Description de la ligne produit + $libelleproduitservice=dol_htmlentitiesbr($propale->lignes[$i]->libelle,1); + if ($propale->lignes[$i]->desc && $propale->lignes[$i]->desc!=$propale->lignes[$i]->libelle) + { + if ($libelleproduitservice) $libelleproduitservice.="<br>"; + + if ($propale->lignes[$i]->desc == '(CREDIT_NOTE)' && $propale->lignes[$i]->fk_remise_except) + { + $discount=new DiscountAbsolute($this->db); + $discount->fetch($propale->lignes[$i]->fk_remise_except); + $libelleproduitservice=dol_htmlentitiesbr($langs->trans("DiscountFromCreditNote",$discount->ref_facture_source),1); + } + else + { + $libelleproduitservice.=dol_htmlentitiesbr($propale->lignes[$i]->desc,1); + } + } + if ($propale->lignes[$i]->date_start && $propale->lignes[$i]->date_end) + { + // Affichage dur�e si il y en a une + $libelleproduitservice.="<br>".dol_htmlentitiesbr("(".$outputlangs->transnoentities("From")." ".dolibarr_print_date($propale->lignes[$i]->date_start,'',false,$outputlangs)." ".$outputlangs->transnoentities("to")." ".dolibarr_print_date($propale->lignes[$i]->date_end,'',false,$outputlangs).")",1); + } + + $pdf->SetXY (30, $curY ); - $pdf->MultiCell(102, 5, $outputlangs->convToOutputCharset($propale->lignes[$i]->desc), 0, 'J', 0); + $pdf->MultiCell(102, 5, $outputlangs->convToOutputCharset($libelleproduitservice), 0, 'J', 0); $nexY = $pdf->GetY(); + $ref=dol_htmlentitiesbr($propale->lignes[$i]->ref); + $pdf->SetXY (10, $curY ); - $pdf->MultiCell(20, 5, $outputlangs->convToOutputCharset($propale->lignes[$i]->ref), 0, 'C', 0); + $pdf->MultiCell(20, 5, $outputlangs->convToOutputCharset($ref), 0, 'C', 0); $pdf->SetXY (132, $curY ); - $pdf->MultiCell(12, 5, $propale->lignes[$i]->tva_tx, 0, 'C', 0); + $pdf->MultiCell(12, 5, vatrate($propale->lignes[$i]->tva_tx,0,$propale->lignes[$i]->info_bits), 0, 'C', 0); $pdf->SetXY (144, $curY ); $pdf->MultiCell(10, 5, $propale->lignes[$i]->qty, 0, 'C', 0); diff --git a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php index cb09527cc8b275c2aa29fef994fdfc812f7a0eda..2239cd973dde35d519cfb57e9eb032f1ed53a7c0 100644 --- a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -207,13 +207,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $tab_height_newpage = 180; // Affiche notes - if ($com->note_public) + if (! empty($com->note_public)) { $tab_top = 88; $pdf->SetFont('Arial','', 9); // Dans boucle pour g�rer multi-page $pdf->SetXY ($this->posxdesc-1, $tab_top); - $pdf->MultiCell(190, 3, $com->note_public, 0, 'J'); + $pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($com->note_public), 0, 'J'); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top;