No limit on free text on PDF

This commit is contained in:
Laurent Destailleur 2009-01-12 17:36:14 +00:00
parent f1f4dd2f9b
commit 7edbbc9048
8 changed files with 17 additions and 9 deletions

View File

@ -10,6 +10,7 @@ For users:
- New: EMails links are show with function dol_print_email - New: EMails links are show with function dol_print_email
- New: Add graph report on number of entities in product statistics page. - New: Add graph report on number of entities in product statistics page.
- New: Can delete a supplier order whatever is its status. - New: Can delete a supplier order whatever is its status.
- New: No limit on free text on PDF generated documents.
- Fix: Failed to go on the future view of bank transaction if there is no - Fix: Failed to go on the future view of bank transaction if there is no
future bank transaction already wrote. future bank transaction already wrote.
- Fix: Bad ref in supplier list. - Fix: Bad ref in supplier list.

View File

@ -154,7 +154,10 @@ class Form
*/ */
function textwithhelp($text,$htmltext,$direction=1,$usehelpcursor=1) function textwithhelp($text,$htmltext,$direction=1,$usehelpcursor=1)
{ {
return $this->textwithtooltip($text,$htmltext,2,$direction,img_help($usehelpcursor,0)); global $conf;
$alt='';
if (empty($conf->use_javascript_ajax)) $alt='Help disabled (javascript disabled)';
return $this->textwithtooltip($text,$htmltext,2,$direction,img_help($usehelpcursor,$alt));
} }
/** /**

View File

@ -208,9 +208,7 @@ class CommActionRapport
$y2 = $pdf->GetY(); $y2 = $pdf->GetY();
$pdf->SetXY(106,$y); $pdf->SetXY(106,$y);
//$pdf->Cell(94, 4, eregi_replace('<br>',"\n",dolibarr_trunc($obj->note,150)), 0, 'L', 0);
$pdf->MultiCell(94, $height, $outputlangs->convToOutputCharset($text), 0, 'L', 0); $pdf->MultiCell(94, $height, $outputlangs->convToOutputCharset($text), 0, 'L', 0);
//$pdf->writeHTMLCell(dol_htmlentitiesbr($obj->note,1));
$y3 = $pdf->GetY(); $y3 = $pdf->GetY();
//$pdf->MultiCell(94,2,"y=$y y3=$y3",0,'L',0); //$pdf->MultiCell(94,2,"y=$y y3=$y3",0,'L',0);

View File

@ -324,7 +324,7 @@ class pdf_einstein extends ModelePDFCommandes
//on recupere la description du produit suivant //on recupere la description du produit suivant
$follow_descproduitservice = $outputlangs->convToOutputCharset($com->lignes[$i+1]->desc); $follow_descproduitservice = $outputlangs->convToOutputCharset($com->lignes[$i+1]->desc);
//on compte le nombre de ligne afin de verifier la place disponible (largeur de ligne 52 caracteres) //on compte le nombre de ligne afin de verifier la place disponible (largeur de ligne 52 caracteres)
$nblineFollowDesc = (num_lines($follow_descproduitservice,52)*4); $nblineFollowDesc = (dol_num_lines($follow_descproduitservice,52)*4);
} }
else // If it's last line else // If it's last line
{ {

View File

@ -344,7 +344,7 @@ class pdf_crabe extends ModelePDFFactures
//on récupère la description du produit suivant //on récupère la description du produit suivant
$follow_descproduitservice = $fac->lignes[$i+1]->desc; $follow_descproduitservice = $fac->lignes[$i+1]->desc;
//on compte le nombre de ligne afin de vérifier la place disponible (largeur de ligne 52 caracteres) //on compte le nombre de ligne afin de vérifier la place disponible (largeur de ligne 52 caracteres)
$nblineFollowDesc = num_lines($follow_descproduitservice,52)*4; $nblineFollowDesc = dol_nboflines_bis($follow_descproduitservice,52)*4;
// Et si on affiche dates de validite, on ajoute encore une ligne // Et si on affiche dates de validite, on ajoute encore une ligne
if ($fac->lignes[$i]->date_start && $fac->lignes[$i]->date_end) if ($fac->lignes[$i]->date_start && $fac->lignes[$i]->date_end)
{ {

View File

@ -281,7 +281,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetXY (10, $tab_top + 4 + $j * $height); $pdf->SetXY (10, $tab_top + 4 + $j * $height);
$pdf->writeHTMLCell(0, 4, 20, $tab_top + 4 + $j * $height, $pdf->writeHTMLCell(0, 4, 20, $tab_top + 4 + $j * $height,
dol_htmlentitiesbr($outputlangs->convToOutputCharset($fichinterligne->desc),1), 0, 0, 0); dol_htmlentitiesbr($outputlangs->convToOutputCharset($fichinterligne->desc),1), 0, 0, 0);
//$tab_height+=num_lines($fichinterligne->desc,52)*4; //$tab_height+=dol_nboflines_bis($fichinterligne->desc,52)*4;
$tab_height+=($height+4); $tab_height+=($height+4);
$j++; $j++;

View File

@ -335,7 +335,7 @@ class pdf_propale_azur extends ModelePDFPropales
//on récupère la description du produit suivant //on récupère la description du produit suivant
$follow_descproduitservice = $propale->lignes[$i+1]->desc; $follow_descproduitservice = $propale->lignes[$i+1]->desc;
//on compte le nombre de ligne afin de vérifier la place disponible (largeur de ligne 52 caracteres) //on compte le nombre de ligne afin de vérifier la place disponible (largeur de ligne 52 caracteres)
$nblineFollowDesc = (num_lines($follow_descproduitservice,52)*4); $nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52)*4);
} }
else // If it's last line else // If it's last line
{ {

View File

@ -1102,6 +1102,8 @@ function img_delete($alt = "default")
/** /**
* \brief Affiche logo help avec curseur "?" * \brief Affiche logo help avec curseur "?"
* \param usehelpcursor
* \param usealttitle
* \return string Retourne tag img * \return string Retourne tag img
*/ */
function img_help($usehelpcursor=1,$usealttitle=1) function img_help($usehelpcursor=1,$usealttitle=1)
@ -1110,7 +1112,11 @@ function img_help($usehelpcursor=1,$usealttitle=1)
$s ='<img '; $s ='<img ';
if ($usehelpcursor) $s.='style="cursor: help;" '; if ($usehelpcursor) $s.='style="cursor: help;" ';
$s.='src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/info.png" border="0"'; $s.='src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/info.png" border="0"';
if ($usealttitle) $s.=' alt="'.$langs->trans("Info").'" title="'.$langs->trans("Info").'"'; if ($usealttitle)
{
if (is_string($usealttitle)) $s.=' alt="'.$usealttitle.'" title="'.$usealttitle.'"';
else $s.=' alt="'.$langs->trans("Info").'" title="'.$langs->trans("Info").'"';
}
$s.='>'; $s.='>';
return $s; return $s;
} }