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
|
// Description long of product line
|
||||||
if (!empty($desc) && ($desc != $label)) {
|
if (!empty($desc) && ($desc != $label)) {
|
||||||
if ($libelleproduitservice && empty($hidedesc)) {
|
|
||||||
$libelleproduitservice .= '__N__';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except) {
|
if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except) {
|
||||||
$discount = new DiscountAbsolute($db);
|
$discount = new DiscountAbsolute($db);
|
||||||
$discount->fetch($object->lines[$i]->fk_remise_except);
|
$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
|
// Adding the descriptions if they are filled
|
||||||
$desccateg = $cate->description;
|
$desccateg = $cate->description;
|
||||||
if ($desccateg) {
|
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>';
|
$libelleproduitservice .= '<br><b style="color:#333666;" ><em>'.$period.'</em></b>';
|
||||||
} else {
|
} else {
|
||||||
$libelleproduitservice .= "__N__".$period;
|
$libelleproduitservice = dol_concatdesc($libelleproduitservice, $period);
|
||||||
}
|
}
|
||||||
//print $libelleproduitservice;
|
//print $libelleproduitservice;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -160,11 +160,11 @@ class PdfDocTest extends PHPUnit\Framework\TestCase
|
|||||||
|
|
||||||
$result=pdf_getlinedesc($localobject, 0, $langs);
|
$result=pdf_getlinedesc($localobject, 0, $langs);
|
||||||
print __METHOD__." result=".$result."\n";
|
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);
|
$result=doc_getlinedesc($localobject->lines[0], $langs);
|
||||||
print __METHOD__." result=".$result."\n";
|
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