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