mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix regression
This commit is contained in:
parent
20a3fab437
commit
0027335e3b
|
|
@ -1418,10 +1418,6 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
|||
|
||||
// Description long of product line
|
||||
if (!empty($desc) && ($desc != $label)) {
|
||||
if ($libelleproduitservice && empty($hidedesc)) {
|
||||
$libelleproduitservice .= '__N__';
|
||||
}
|
||||
|
||||
if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except) {
|
||||
$discount = new DiscountAbsolute($db);
|
||||
$discount->fetch($object->lines[$i]->fk_remise_except);
|
||||
|
|
@ -1547,7 +1543,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
|||
// Adding the descriptions if they are filled
|
||||
$desccateg = $cate->description;
|
||||
if ($desccateg) {
|
||||
$libelleproduitservice .= '__N__'.$desccateg;
|
||||
$libelleproduitservice = dol_concatdesc($libelleproduitservice, $desccateg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1572,7 +1568,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
|||
}
|
||||
$libelleproduitservice .= '<br><b style="color:#333666;" ><em>'.$period.'</em></b>';
|
||||
} else {
|
||||
$libelleproduitservice .= "__N__".$period;
|
||||
$libelleproduitservice = dol_concatdesc($libelleproduitservice, $period);
|
||||
}
|
||||
//print $libelleproduitservice;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,11 +160,11 @@ class PdfDocTest extends PHPUnit\Framework\TestCase
|
|||
|
||||
$result=pdf_getlinedesc($localobject, 0, $langs);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals($result, "PINKDRESS - Label 1<br>This is a description with a é accent<br>(Country of origin: France)");
|
||||
$this->assertEquals("PINKDRESS - Label 1<br>This is a description with a é accent<br>(Country of origin: France)", $result);
|
||||
|
||||
$result=doc_getlinedesc($localobject->lines[0], $langs);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals($result, "PINKDRESS - Label 1\nThis is a description with a é accent\n(Country of origin: France)");
|
||||
$this->assertEquals("PINKDRESS - Label 1\nThis is a description with a é accent\n(Country of origin: France)", $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user