forked from Wavyzz/dolibarr
Fix #15438
This commit is contained in:
@@ -1780,6 +1780,17 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
'border-left' => true, // add left line separator
|
||||
);
|
||||
|
||||
// Adapt dynamically the width of subprice, if text is too long.
|
||||
$tmpwidth = 0;
|
||||
$nblines = count($object->lines);
|
||||
for ($i = 0; $i < $nblines; $i++) {
|
||||
$tmpwidth2 = dol_strlen(dol_string_nohtmltag(pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails)));
|
||||
$tmpwidth = max($tmpwidth, $tmpwidth2);
|
||||
}
|
||||
if ($tmpwidth > 10) {
|
||||
$this->cols['subprice']['width'] += (2 * ($tmpwidth - 10));
|
||||
}
|
||||
|
||||
$rank = $rank + 10;
|
||||
$this->cols['qty'] = array(
|
||||
'rank' => $rank,
|
||||
|
||||
@@ -2307,6 +2307,17 @@ class pdf_sponge extends ModelePDFFactures
|
||||
'border-left' => true, // add left line separator
|
||||
);
|
||||
|
||||
// Adapt dynamically the width of subprice, if text is too long.
|
||||
$tmpwidth = 0;
|
||||
$nblines = count($object->lines);
|
||||
for ($i = 0; $i < $nblines; $i++) {
|
||||
$tmpwidth2 = dol_strlen(dol_string_nohtmltag(pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails)));
|
||||
$tmpwidth = max($tmpwidth, $tmpwidth2);
|
||||
}
|
||||
if ($tmpwidth > 10) {
|
||||
$this->cols['subprice']['width'] += (2 * ($tmpwidth - 10));
|
||||
}
|
||||
|
||||
$rank = $rank + 10;
|
||||
$this->cols['qty'] = array(
|
||||
'rank' => $rank,
|
||||
|
||||
@@ -1933,6 +1933,17 @@ class pdf_cyan extends ModelePDFPropales
|
||||
'border-left' => true, // add left line separator
|
||||
);
|
||||
|
||||
// Adapt dynamically the width of subprice, if text is too long.
|
||||
$tmpwidth = 0;
|
||||
$nblines = count($object->lines);
|
||||
for ($i = 0; $i < $nblines; $i++) {
|
||||
$tmpwidth2 = dol_strlen(dol_string_nohtmltag(pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails)));
|
||||
$tmpwidth = max($tmpwidth, $tmpwidth2);
|
||||
}
|
||||
if ($tmpwidth > 10) {
|
||||
$this->cols['subprice']['width'] += (2 * ($tmpwidth - 10));
|
||||
}
|
||||
|
||||
$rank = $rank + 10;
|
||||
$this->cols['qty'] = array(
|
||||
'rank' => $rank,
|
||||
|
||||
Reference in New Issue
Block a user