Fix: bug #34545 : Sauts de lignes en vue de produit libre - New lines in
free product line view
This commit is contained in:
parent
76dc867e24
commit
0bfbffbe5f
@ -36,14 +36,14 @@
|
|||||||
$discount->fetch($line->fk_remise_except);
|
$discount->fetch($line->fk_remise_except);
|
||||||
echo ' - '.$langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
|
echo ' - '.$langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
|
||||||
} else {
|
} else {
|
||||||
echo ' - '.dol_nl2br($line->description,1,true);
|
echo ' - '.dol_htmlentitiesbr($line->description,1,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
|
if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
|
||||||
if ($type==1) $text = img_object($langs->trans('Service'),'service');
|
if ($type==1) $text = img_object($langs->trans('Service'),'service');
|
||||||
else $text = img_object($langs->trans('Product'),'product');
|
else $text = img_object($langs->trans('Product'),'product');
|
||||||
echo $text.' '.dol_nl2br($line->description,1,true);
|
echo $text.' '.dol_htmlentitiesbr($line->description,1,true);
|
||||||
// Show range
|
// Show range
|
||||||
print_date_range($line->date_start,$line->date_end);
|
print_date_range($line->date_start,$line->date_end);
|
||||||
} ?>
|
} ?>
|
||||||
|
|||||||
@ -149,6 +149,19 @@ function propale_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
|
|||||||
$srctemplatepath='';
|
$srctemplatepath='';
|
||||||
$modelisok=0;
|
$modelisok=0;
|
||||||
|
|
||||||
|
// Positionne le modele sur le nom du modele a utiliser
|
||||||
|
if (! dol_strlen($modele))
|
||||||
|
{
|
||||||
|
if (! empty($conf->global->PROPALE_ADDON_PDF))
|
||||||
|
{
|
||||||
|
$modele = $conf->global->PROPALE_ADDON_PDF;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$modele = 'azur';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Positionne modele sur le nom du modele de propale a utiliser
|
// Positionne modele sur le nom du modele de propale a utiliser
|
||||||
$file = "pdf_propale_".$modele.".modules.php";
|
$file = "pdf_propale_".$modele.".modules.php";
|
||||||
|
|
||||||
@ -168,7 +181,7 @@ function propale_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Si model pas encore bon
|
// Si model pas encore bon
|
||||||
if (! $modelisok)
|
if (! $modelisok && is_array($liste))
|
||||||
{
|
{
|
||||||
$liste=array();
|
$liste=array();
|
||||||
$model=new ModelePDFPropales();
|
$model=new ModelePDFPropales();
|
||||||
@ -196,14 +209,14 @@ function propale_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
|
|||||||
$outputlangs->charset_output=$sav_charset_output;
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
// on supprime l'image correspondant au preview
|
// on supprime l'image correspondant au preview
|
||||||
propale_delete_preview($db, $object->id);
|
propale_delete_preview($db, $object->id);
|
||||||
|
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
||||||
$interface=new Interfaces($db);
|
$interface=new Interfaces($db);
|
||||||
$result=$interface->run_triggers('PROPAL_BUILDDOC',$object,$user,$langs,$conf);
|
$result=$interface->run_triggers('PROPAL_BUILDDOC',$object,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user