*
* This program is free software; you can redistribute it and/or modify
@@ -51,7 +51,6 @@ $link='';
if ($statut == '') $link=''.$langs->trans("IncludeClosedAccount").'';
if ($statut == 'all') $link=''.$langs->trans("OnlyOpenedAccount").'';
print_fiche_titre($langs->trans("AccountsArea"),$link);
-print '
';
// On charge tableau des comptes financiers (ouverts par defaut)
diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php
index 63641d00ab8..997e27adb20 100644
--- a/htdocs/core/ajax/ajaxdirpreview.php
+++ b/htdocs/core/ajax/ajaxdirpreview.php
@@ -207,7 +207,6 @@ if ($type == 'directory')
if ($section === '0')
{
$filearray=array();
- $textifempty='
'.$langs->trans("DirNotSynchronizedSyncFirst").'
';
}
else $filearray=dol_dir_list($upload_dir,"files",0,'',array('^\.','(\.meta|_preview\.png)$','^temp$','^CVS$'),$sortfield, $sorting,1);
@@ -216,6 +215,7 @@ if ($type == 'directory')
$param.='§ion='.$section;
$textifempty = $langs->trans('NoFileFound');
}
+ else if ($section === '0') $textifempty='
'.$langs->trans("DirNotSynchronizedSyncFirst").'
';
else $textifempty=($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection"));
$formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty,$maxlengthname,'',$url);
diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php
index b4ceaeaced1..ae70d1a418a 100644
--- a/htdocs/core/ajax/ajaxdirtree.php
+++ b/htdocs/core/ajax/ajaxdirtree.php
@@ -145,7 +145,8 @@ if (file_exists($fullpathselecteddir))
{
if (empty($val['fullrelativename'])) // If we did not find entry into database, but found a directory (dol_is_dir was ok at previous test)
{
- $val['fullrelativename']=$file; $val['id']=0;
+ $val['fullrelativename']=$file;
+ $val['id']=0;
$val['label']=$file;
$val['description']='';
$nboffilesinsubdir=$langs->trans("Unknown");
diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php
index 3ba7cbf52ca..675e1cf0794 100644
--- a/htdocs/core/class/commonobjectline.class.php
+++ b/htdocs/core/class/commonobjectline.class.php
@@ -26,7 +26,7 @@
* Parent class for class inheritance lines of business objects
* This class is useless for the moment so no inherit are done on it
*/
-abstract class CommonObjectLine extends CommonObject
+abstract class CommonObjectLine
{
/**
* Call trigger based on this instance
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 7ffe021fe92..05a1e40b756 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -759,7 +759,7 @@ class FormFile
if ($nboffiles > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
- $var=true;
+ $var=false;
foreach($filearray as $key => $file) // filearray must be only files here
{
if ($file['name'] != '.'
diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php
index 7242a8e3bab..b8d2e87fdff 100644
--- a/htdocs/core/lib/fichinter.lib.php
+++ b/htdocs/core/lib/fichinter.lib.php
@@ -127,7 +127,7 @@ function fichinter_admin_prepare_head()
$h++;
$head[$h][0] = DOL_URL_ROOT.'/fichinter/admin/fichinterdet_extrafields.php';
- $head[$h][1] = $langs->trans("ExtraFields");
+ $head[$h][1] = $langs->trans("ExtraFieldsLines");
$head[$h][2] = 'attributesdet';
$h++;
diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php
index 52c698c240f..aae1e275d8f 100644
--- a/htdocs/ecm/class/ecmdirectory.class.php
+++ b/htdocs/ecm/class/ecmdirectory.class.php
@@ -154,7 +154,7 @@ class EcmDirectory // extends CommonObject
// Call trigger
$result=$this->call_trigger('MYECMDIR_CREATE',$user);
- if ($result < 0) { $error++; }
+ if ($result < 0) { $error++; }
// End call triggers
if (! $error)
@@ -219,7 +219,7 @@ class EcmDirectory // extends CommonObject
{
// Call trigger
$result=$this->call_trigger('MYECMDIR_MODIFY',$user);
- if ($result < 0) { $error++; }
+ if ($result < 0) { $error++; }
// End call triggers
}
@@ -356,10 +356,10 @@ class EcmDirectory // extends CommonObject
{
$this->db->rollback();
return -2;
- }
+ }
// End call triggers
}
-
+
if ($mode != 'databaseonly')
{
$file = $conf->ecm->dir_output . "/" . $relativepath;
@@ -511,7 +511,7 @@ class EcmDirectory // extends CommonObject
/**
- * Reconstruit l'arborescence des categories sous la forme d'un tableau
+ * Reconstruit l'arborescence des categories sous la forme d'un tableau à partir de la base de donnée
* Renvoi un tableau de tableau('id','id_mere',...) trie selon arbre et avec:
* id Id de la categorie
* id_mere Id de la categorie mere
@@ -693,7 +693,7 @@ class EcmDirectory // extends CommonObject
return -1;
}
}
-
+
/**
* Call trigger based on this instance
*
@@ -725,6 +725,6 @@ class EcmDirectory // extends CommonObject
return $result;
}
-
+
}
diff --git a/htdocs/ecm/tpl/enablefiletreeajax.tpl.php b/htdocs/ecm/tpl/enablefiletreeajax.tpl.php
index 301fa5f955b..b348cb03c72 100644
--- a/htdocs/ecm/tpl/enablefiletreeajax.tpl.php
+++ b/htdocs/ecm/tpl/enablefiletreeajax.tpl.php
@@ -42,7 +42,7 @@ $(document).ready(function() {
},
// Called if we click on a dir (not a file)
function(elem) {
- id=elem.attr('id').substr(12);
+ id=elem.attr('id').substr(12); // We get id that is 'fmdirlia_id_xxx' (id we want is xxx)
jQuery("#formuserfile_section_dir").val(elem.attr('rel'));
jQuery("#formuserfile_section_id").val(id);
jQuery('#formuserfile').show();
@@ -65,6 +65,9 @@ $(document).ready(function() {
function loadandshowpreview(filedirname,section)
{
//alert('filedirname='+filedirname);
+ //console.log(filedirname);
+ //console.log(section);
+
$('#ecmfileview').empty();
var url = '?action=preview&module=ecm§ion='+section+'&file='+urlencode(filedirname);
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index 776ea1fd355..91453c877a7 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -131,8 +131,9 @@ if ($object->client)
$obj = $db->fetch_object($resql);
$nbFactsClient = $obj->nb;
$thirdTypeArray['customer']=$langs->trans("customer");
- if($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice']=$langs->trans('Invoices');
if ($conf->commande->enabled && $user->rights->commande->lire) $elementTypeArray['order']=$langs->trans('Orders');
+ if ($conf->propal->enabled && $user->rights->propal->lire) $elementTypeArray['propal']=$langs->trans('Proposals');
+ if ($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice']=$langs->trans('Invoices');
}
if ($object->fournisseur)
@@ -177,6 +178,19 @@ if ($type_element == 'invoice')
$doc_number='f.facnumber';
$thirdTypeSelect='customer';
}
+if ($type_element == 'propal')
+{
+ require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+ $documentstatic=new Propal($db);
+ $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.datep as datePrint, ';
+ $tables_from = MAIN_DB_PREFIX."propal as c,".MAIN_DB_PREFIX."propaldet as d";
+ $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
+ $where.= " AND d.fk_propal = c.rowid";
+ $where.= " AND c.entity = ".$conf->entity;
+ $datePrint = 'c.datep';
+ $doc_number='c.ref';
+ $thirdTypeSelect='customer';
+}
if ($type_element == 'order')
{
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';