FIX File attachment on lots

This commit is contained in:
Laurent Destailleur 2021-02-26 12:47:57 +01:00
parent 634d94b0b7
commit 16906abc09
3 changed files with 5 additions and 5 deletions

View File

@ -437,8 +437,8 @@ class Conf
$this->service->dir_temp = $rootfortemp."/produit/temp";
// Module productbatch
$this->productbatch->multidir_output = array($this->entity => $rootfordata."/produitlot");
$this->productbatch->multidir_temp = array($this->entity => $rootfortemp."/produitlot/temp");
$this->productbatch->multidir_output = array($this->entity => $rootfordata."/productlot");
$this->productbatch->multidir_temp = array($this->entity => $rootfortemp."/productlot/temp");
// Module contrat
$this->contrat->multidir_output = array($this->entity => $rootfordata."/contract");

View File

@ -397,7 +397,7 @@ if (empty($action))
print '<a name="builddoc"></a>'; // ancre
// Documents
$filedir = $conf->productbatch->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product_batch').dol_sanitizeFileName($object->ref);
$filedir = $conf->productbatch->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product_batch');
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed = $usercanread;
$delallowed = $usercancreate;

View File

@ -26,7 +26,7 @@
/**
* \file htdocs/product/stock/productlot_document.php
* \ingroup product
* \brief Page des documents joints sur les lots produits
* \brief Page of attached documents for porudct lots
*/
require '../../main.inc.php';
@ -79,7 +79,7 @@ if ($id || $ref)
$object->fetch($id, $productid, $batch);
$object->ref = $object->batch; // For document management ( it use $object->ref)
if (!empty($conf->productbatch->enabled)) $upload_dir = $conf->productbatch->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, $modulepart).dol_sanitizeFileName($object->ref);
if (!empty($conf->productbatch->enabled)) $upload_dir = $conf->productbatch->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, $modulepart);
}