diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index b5467f74a02..c1381be0ea5 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -40,6 +40,7 @@ if (! empty($conf->projet->enabled)) {
$langs->load('bills');
$langs->load('compta');
+$langs->load('admin');
// Security check
$id=(GETPOST('facid','int')?GETPOST('facid','int'):GETPOST('id','int'));
diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php
index dc4d229dc6e..836e2fd82f6 100644
--- a/htdocs/contrat/services.php
+++ b/htdocs/contrat/services.php
@@ -364,11 +364,16 @@ if ($resql)
while ($i < min($num,$limit))
{
$obj = $db->fetch_object($resql);
- $var=!$var;
- print "
";
+
+ // Ref
+ print '| ';
print $contractstatic->getNomUrl(1,16);
print ' | ';
@@ -404,7 +409,7 @@ if ($resql)
{
print '';
print ($obj->date_ouverture_prevue?dol_print_date($db->jdate($obj->date_ouverture_prevue)):' ');
- if ($db->jdate($obj->date_ouverture_prevue) && ($db->jdate($obj->date_ouverture_prevue) < ($now - $conf->contrat->services->inactifs->warning_delay)))
+ if ($db->jdate($obj->date_ouverture_prevue) && ($db->jdate($obj->date_ouverture_prevue) < ($now - $conf->contrat->services->inactifs->warning_delay)) && $obj->statut == 0)
print ' '.img_picto($langs->trans("Late"),"warning");
else print ' ';
print ' | ';
@@ -413,7 +418,7 @@ if ($resql)
{
print ''.($obj->date_ouverture?dol_print_date($db->jdate($obj->date_ouverture)):' ').' | ';
}
- // Date fin
+ // End date
if (($mode == "" || $mode == -1) || $mode < 5)
{
print ''.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite)):' ');
diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php
index ef750e70253..90e4970b9d6 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -108,7 +108,7 @@ class DolEditor
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
$modulepart='fckeditor';
- $this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&file=';
+ $this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&entity='.$conf->entity.'&file=';
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ;
$this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false');
diff --git a/htdocs/core/filemanagerdol/connectors/php/config.php b/htdocs/core/filemanagerdol/connectors/php/config.php
index 8733e6a7c17..de8b4d7e8bf 100644
--- a/htdocs/core/filemanagerdol/connectors/php/config.php
+++ b/htdocs/core/filemanagerdol/connectors/php/config.php
@@ -45,10 +45,12 @@ $Config['Enabled'] = true ;
// Path to user files relative to the document root.
-$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=medias'.(empty($website)?'':'_'.$website).'&file=' ;
+$extEntity=(empty($entity) ? 1 : $entity); // For multicompany with external access
+$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=medias'.(empty($website)?'':'_'.$website).'&entity='.$extEntity.'&file=' ;
$Config['UserFilesAbsolutePathRelative'] = (empty($website) ? ((!empty($entity) ? '/' . $entity : '') . '/medias/') : ('/websites/'.$website));
+
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php
index 3914b59b9f6..0193a33b305 100644
--- a/htdocs/core/lib/ajax.lib.php
+++ b/htdocs/core/lib/ajax.lib.php
@@ -35,7 +35,7 @@
* @param string $urloption More parameters on URL request
* @param int $minLength Minimum number of chars to trigger that Ajax search
* @param int $autoselect Automatic selection if just one value
- * @param array $ajaxoptions Multiple options array
+ * @param array $ajaxoptions Multiple options array
* Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
* Ex: array('disabled'=>
* Ex: array('show'=>
@@ -61,8 +61,8 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
$("input#search_'.$htmlname.'").keydown(function() {
$("#'.$htmlname.'").val("");
});
-
- /* I disable this. A call to trigger is already done later into the select action of the autocomplete code
+
+ /* I disable this. A call to trigger is already done later into the select action of the autocomplete code
$("input#search_'.$htmlname.'").change(function() {
console.log("Call the change trigger on input '.$htmlname.' because of a change on search_'.$htmlname.' was triggered");
$("#'.$htmlname.'").trigger("change");
@@ -291,7 +291,7 @@ function ajax_multiautocompleter($htmlname, $fields, $url, $option='', $minLengt
needtotrigger="#" + fields[i];
}
}
-
+
if (needtotrigger != "") // To force select2 to refresh visible content
{
// We introduce a delay so hand is back to js and all other js change can be done before the trigger that may execute a submit is done
@@ -356,9 +356,10 @@ function ajax_dialog($title,$message,$w=350,$h=150)
* @param array $events More events option. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @param int $minLengthToAutocomplete Minimum length of input string to start autocomplete
* @param int $forcefocus Force focus on field
+ * @param string $widthTypeOfAutocomplete 'resolve' or 'off'
* @return string Return html string to convert a select field into a combo, or '' if feature has been disabled for some reason.
*/
-function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0)
+function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve')
{
global $conf;
@@ -375,7 +376,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
$(document).ready(function () {
$(\''.(preg_match('/^\./',$htmlname)?$htmlname:'#'.$htmlname).'\').'.$tmpplugin.'({
dir: \'ltr\',
- width: \'resolve\', /* off or resolve */
+ width: \''.$widthTypeOfAutocomplete.'\', /* off or resolve */
minimumInputLength: '.$minLengthToAutocomplete.'
})';
if ($forcefocus) $msg.= '.select2(\'focus\')';
diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang
index a56e0f27e09..5671adf71aa 100644
--- a/htdocs/langs/fr_FR/companies.lang
+++ b/htdocs/langs/fr_FR/companies.lang
@@ -173,6 +173,12 @@ ProfId3FR=Id. prof. 3 (NAF-APE)
ProfId4FR=Id. prof. 4 (RCS/RM)
ProfId5FR=-
ProfId6FR=-
+ProfId1GA=Id. prof. 1 (NIF)
+ProfId2GA=Id. prof. 2 (RCCM)
+ProfId3GA=Id. prof. 3 (CAE)
+ProfId4GA=Id. prof. 4
+ProfId5GA=-
+ProfId6GA=-
ProfId1GB=Numéro d'enregistrement
ProfId2GB=-
ProfId3GB=SIC
diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php
index b6d33de99ae..6fa65660df1 100644
--- a/htdocs/viewimage.php
+++ b/htdocs/viewimage.php
@@ -36,7 +36,13 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); // Disable "main.inc.php" hooks
// Some value of modulepart can be used to get resources that are public so no login are required.
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
-if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
+if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') && ! defined("NOLOGIN"))
+{
+ define("NOLOGIN",'1');
+ // For multicompany
+ $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
+ if (is_numeric($entity)) define("DOLENTITY", $entity);
+}
/**
* Header empty
|