Skip to content

Commit

Permalink
No limit on free text on PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 12, 2009
1 parent f1f4dd2 commit 7edbbc9
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 9 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -10,6 +10,7 @@ For users:
- New: EMails links are show with function dol_print_email
- New: Add graph report on number of entities in product statistics page.
- 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
future bank transaction already wrote.
- Fix: Bad ref in supplier list.
Expand Down
5 changes: 4 additions & 1 deletion htdocs/html.form.class.php
Expand Up @@ -154,7 +154,10 @@ function textwithtooltip($text,$htmltext,$tooltipon=1,$direction=0,$img='',$i=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));
}

/**
Expand Down
2 changes: 0 additions & 2 deletions htdocs/includes/modules/action/rapport.pdf.php
Expand Up @@ -208,9 +208,7 @@ function _pages(&$pdf, $outputlangs)
$y2 = $pdf->GetY();

$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->writeHTMLCell(dol_htmlentitiesbr($obj->note,1));
$y3 = $pdf->GetY();

//$pdf->MultiCell(94,2,"y=$y y3=$y3",0,'L',0);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/includes/modules/commande/pdf_einstein.modules.php
Expand Up @@ -324,7 +324,7 @@ function write_file($com,$outputlangs)
//on recupere la description du produit suivant
$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)
$nblineFollowDesc = (num_lines($follow_descproduitservice,52)*4);
$nblineFollowDesc = (dol_num_lines($follow_descproduitservice,52)*4);
}
else // If it's last line
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/includes/modules/facture/pdf_crabe.modules.php
Expand Up @@ -344,7 +344,7 @@ function write_file($fac,$outputlangs)
//on récupère la description du produit suivant
$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)
$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
if ($fac->lignes[$i]->date_start && $fac->lignes[$i]->date_end)
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/includes/modules/fichinter/pdf_soleil.modules.php
Expand Up @@ -281,7 +281,7 @@ function write_file($fichinter,$outputlangs)
$pdf->SetXY (10, $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);
//$tab_height+=num_lines($fichinterligne->desc,52)*4;
//$tab_height+=dol_nboflines_bis($fichinterligne->desc,52)*4;
$tab_height+=($height+4);

$j++;
Expand Down
Expand Up @@ -335,7 +335,7 @@ function write_file($propale,$outputlangs)
//on récupère la description du produit suivant
$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)
$nblineFollowDesc = (num_lines($follow_descproduitservice,52)*4);
$nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52)*4);
}
else // If it's last line
{
Expand Down
10 changes: 8 additions & 2 deletions htdocs/lib/functions.lib.php
Expand Up @@ -1102,15 +1102,21 @@ function img_delete($alt = "default")

/**
* \brief Affiche logo help avec curseur "?"
* \return string Retourne tag img
* \param usehelpcursor
* \param usealttitle
* \return string Retourne tag img
*/
function img_help($usehelpcursor=1,$usealttitle=1)
{
global $conf,$langs;
$s ='<img ';
if ($usehelpcursor) $s.='style="cursor: help;" ';
$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.='>';
return $s;
}
Expand Down

0 comments on commit 7edbbc9

Please sign in to comment.