New: Intervention documents are now available in ECM module

This commit is contained in:
Maxime Kohlhaas 2014-08-05 15:24:49 +02:00
parent fe2f96ab20
commit 90c397d1a4
4 changed files with 12 additions and 2 deletions

View File

@ -33,6 +33,7 @@ For users:
Differentiate text and img.
Use label into quick search form.
Use accesskey on form search.
- New: Intervention documents are now available in ECM module
- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
- Fix: [ bug #1470, #1472, #1473] User trigger problem
- Fix: [ bug #1489, #1491 ] Intervention trigger problem

View File

@ -153,7 +153,7 @@ if ($type == 'directory')
$sorting = (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC);
// Right area. If module is defined, we are in automatic ecm.
$automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project');
$automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project', 'fichinter');
// TODO change for multicompany sharing
// Auto area for suppliers invoices
@ -184,6 +184,8 @@ if ($type == 'directory')
else if ($module == 'tax') $upload_dir = $conf->tax->dir_output;
// Auto area for projects
else if ($module == 'project') $upload_dir = $conf->projet->dir_output;
// Auto area for interventions
else if ($module == 'fichinter') $upload_dir = $conf->ficheinter->dir_output;
if (in_array($module, $automodules))
{

View File

@ -936,6 +936,11 @@ class FormFile
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$object_instance=new Project($this->db);
}
else if ($modulepart == 'fichinter')
{
include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
$object_instance=new Fichinter($this->db);
}
$var=true;
foreach($filearray as $key => $file)
@ -962,7 +967,8 @@ class FormFile
if ($modulepart == 'contract') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); }
if ($modulepart == 'product') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); }
if ($modulepart == 'tax') { preg_match('/(\d+)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:''); }
if ($modulepart == 'project') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');}
if ($modulepart == 'project') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');}
if ($modulepart == 'fichinter') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');}
if (! $id && ! $ref) continue;

View File

@ -409,6 +409,7 @@ if (! empty($conf->global->ECM_AUTO_TREE_ENABLED))
if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsByInvoices")); }
if (! empty($conf->tax->enabled)) { $langs->load("compta"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBySocialContributions")); }
if (! empty($conf->projet->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsByProjects")); }
if (! empty($conf->ficheinter->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsByInterventions")); }
}
print_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager"));