bugfix
This commit is contained in:
parent
45a0d11bb7
commit
5c38e1214e
@ -184,7 +184,7 @@ class Commande
|
||||
{
|
||||
if (!dol_delete_file($file))
|
||||
{
|
||||
$this->error=$langs->trans("ErrorCanNotDeleteFile",$dir);
|
||||
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,6 +290,7 @@ class Expedition
|
||||
$this->db->begin();
|
||||
|
||||
$error = 0;
|
||||
$provref = $this->ref;
|
||||
|
||||
if ($user->rights->expedition->valider)
|
||||
{
|
||||
@ -350,18 +351,18 @@ class Expedition
|
||||
}
|
||||
|
||||
// On efface le répertoire de pdf provisoire
|
||||
$expeditionref = sanitize_string($this->ref);
|
||||
$expeditionref = sanitize_string($provref);
|
||||
$expeditionref = str_replace("(","",$expeditionref);
|
||||
$expeditionref = str_replace(")","",$expeditionref);
|
||||
if ($conf->expedition->dir_output)
|
||||
{
|
||||
$dir = $conf->expedition->dir_output . "/" . $expeditionref ;
|
||||
$file = $conf->expedition->dir_output . "/" . $expeditionref . "/" . $expeditionref . ".pdf";
|
||||
$dir = $conf->expedition->dir_output . "/" . $expeditionref;
|
||||
$file = $dir . "/" . $expeditionref . ".pdf";
|
||||
if (file_exists($file))
|
||||
{
|
||||
if (!dol_delete_file($file))
|
||||
{
|
||||
$this->error=$langs->trans("ErrorCanNotDeleteFile",$dir);
|
||||
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -346,12 +346,12 @@ class Livraison
|
||||
if ($conf->expedition->dir_output)
|
||||
{
|
||||
$dir = $conf->livraison->dir_output . "/" . $livraisonref ;
|
||||
$file = $conf->livraison->dir_output . "/" . $livraisonref . "/" . $livraisonref . ".pdf";
|
||||
$file = $dir . "/" . $livraisonref . ".pdf";
|
||||
if (file_exists($file))
|
||||
{
|
||||
if (!dol_delete_file($file))
|
||||
{
|
||||
$this->error=$langs->trans("ErrorCanNotDeleteFile",$dir);
|
||||
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user