diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index c4ccd6fe982..0ea6af8d5de 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -375,6 +375,10 @@ class Conf $this->service->dir_output=$rootfordata."/produit"; $this->service->dir_temp =$rootfordata."/produit/temp"; + // Module productbatch + $this->productbatch->multidir_output=array($this->entity => $rootfordata."/produitlot"); + $this->productbatch->multidir_temp =array($this->entity => $rootfordata."/produitlot/temp"); + // Module contrat $this->contrat->dir_output=$rootfordata."/contracts"; $this->contrat->dir_temp =$rootfordata."/contracts/temp"; diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index e25709fd303..648f1295c25 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -94,6 +94,9 @@ class FileUpload elseif ($element == 'product') { $dir_output = $conf->product->multidir_output[$conf->entity]; } + elseif ($element == 'productbatch') { + $dir_output = $conf->productbatch->multidir_output[$conf->entity]; + } elseif ($element == 'action') { $pathname = 'comm/action'; $filename='actioncomm'; $dir_output=$conf->agenda->dir_output; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 0e125a7b944..50386e277a1 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -469,6 +469,15 @@ class FormFile $modellist=ModelePDFProduct::liste_modeles($this->db); } } + elseif ($modulepart == 'product_batch') + { + if (is_array($genallowed)) $modellist=$genallowed; + else + { + include_once DOL_DOCUMENT_ROOT.'/core/modules/product_batch/modules_product_batch.class.php'; + $modellist=ModelePDFProductBatch::liste_modeles($this->db); + } + } elseif ($modulepart == 'export') { if (is_array($genallowed)) $modellist=$genallowed; @@ -740,7 +749,7 @@ class FormFile // Show file size $size=(! empty($file['size'])?$file['size']:dol_filesize($filedir."/".$file["name"])); - $out.= '
| '.$langs->trans("NbOfAttachedFiles").' | '.count($filearray).' | ||
| '.$langs->trans("TotalSizeOfAttachedFiles").' | '.dol_print_size($totalsize,1,1).' | ||