bugfix
This commit is contained in:
parent
cd6bd7c8a7
commit
ac976cb85b
@ -1439,8 +1439,8 @@ else
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
$comref = sanitize_string($commande->ref);
|
$comref = sanitize_string($commande->ref);
|
||||||
//$comref = str_replace("(","",$comref);
|
$comref = str_replace("(","",$comref);
|
||||||
//$comref = str_replace(")","",$comref);
|
$comref = str_replace(")","",$comref);
|
||||||
$file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf';
|
$file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf';
|
||||||
$relativepath = $comref.'/'.$comref.'.pdf';
|
$relativepath = $comref.'/'.$comref.'.pdf';
|
||||||
$filedir = $conf->commande->dir_output . '/' . $comref;
|
$filedir = $conf->commande->dir_output . '/' . $comref;
|
||||||
|
|||||||
@ -508,41 +508,6 @@ class Livraison
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Genere le pdf
|
|
||||||
*/
|
|
||||||
function PdfWrite()
|
|
||||||
{
|
|
||||||
global $conf;
|
|
||||||
|
|
||||||
//LIVRAISON_ADDON_PDF
|
|
||||||
if (defined("LIVRAISON_ADDON_PDF") && strlen(LIVRAISON_ADDON_PDF) > 0)
|
|
||||||
{
|
|
||||||
$module_file_name = DOL_DOCUMENT_ROOT."/livraison/mods/pdf/pdf_".LIVRAISON_ADDON_PDF.".modules.php";
|
|
||||||
|
|
||||||
$mod = "pdf_".LIVRAISON_ADDON_PDF;
|
|
||||||
$this->fetch_commande();
|
|
||||||
|
|
||||||
require_once($module_file_name);
|
|
||||||
|
|
||||||
$pdf = new $mod($this->db);
|
|
||||||
|
|
||||||
$dir = $conf->livraison->dir_output . "/" .get_exdir($this->id);
|
|
||||||
|
|
||||||
if (! file_exists($dir))
|
|
||||||
{
|
|
||||||
create_exdir($dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
$file = $dir . $this->id . ".pdf";
|
|
||||||
|
|
||||||
if (file_exists($dir))
|
|
||||||
{
|
|
||||||
$pdf->generate($this, $file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lit la commande associée
|
* Lit la commande associée
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user