2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Laurent Destailleur
2020-11-24 20:56:11 +01:00
parent faa33f2d3c
commit d17ecbeccd
3 changed files with 33 additions and 0 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,