Merge remote-tracking branch 'dolibarr/3.6' into 3.6
This commit is contained in:
commit
c976d32e7d
@ -141,15 +141,18 @@ abstract class ModelNumRefExpedition
|
||||
}
|
||||
|
||||
/**
|
||||
* Cree un bon d'expedition sur disque
|
||||
* Cree un bon d'expedition sur disque
|
||||
*
|
||||
* @param DoliDB $db Objet base de donnee
|
||||
* @param Object $object Object expedition
|
||||
* @param string $modele Force le modele a utiliser ('' to not force)
|
||||
* @param Translate $outputlangs Objet lang a utiliser pour traduction
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
* @param DoliDB $db Objet base de donnee
|
||||
* @param Object $object Object expedition
|
||||
* @param string $modele Force le modele a utiliser ('' to not force)
|
||||
* @param Translate $outputlangs Objet lang a utiliser pour traduction
|
||||
* @param int $hidedetails Hide details of lines
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
*/
|
||||
function expedition_pdf_create($db, $object, $modele, $outputlangs)
|
||||
function expedition_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
|
||||
@ -214,7 +217,7 @@ function expedition_pdf_create($db, $object, $modele, $outputlangs)
|
||||
// We save charset_output to restore it because write_file can change it if needed for
|
||||
// output format that does not support UTF8.
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
if ($obj->write_file($object, $outputlangs, $srctemplatepath) > 0)
|
||||
if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0)
|
||||
{
|
||||
$outputlangs->charset_output=$sav_charset_output;
|
||||
|
||||
|
||||
@ -1540,6 +1540,8 @@ class Expedition extends CommonObject
|
||||
if ($this->db->query($sql) )
|
||||
{
|
||||
//TODO: Option to set order billed if 100% of order is shipped
|
||||
$this->billed=1;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
@ -255,7 +255,7 @@ if (empty($reshook)) {
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
$ret=$object->fetch($id); // Reload to get new records
|
||||
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs);
|
||||
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
@ -355,7 +355,7 @@ if (empty($reshook)) {
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs);
|
||||
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_print_error($db,$result);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user