diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php
index 075510fa915a1720fa0059277568a01b94d3b62b..592881b2b72035732d8ce72994706c50f8d49c08 100644
--- a/htdocs/adherents/liste.php
+++ b/htdocs/adherents/liste.php
@@ -136,7 +136,7 @@ if ($filter == 'uptodate')
}
if ($filter == 'outofdate')
{
- $sql.=" AND datefin < '".$db->idate($now)."'";
+ $sql.=" AND (datefin IS NULL OR datefin < '".$db->idate($now)."')";
}
// Count total nb of records with no order and no limits
diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php
index 05ff763d67f14db6c931a17e96bcdd9cb3cbd589..267d26c30ea276c57d6532af03b8b234dc441689 100644
--- a/htdocs/categories/categorie.php
+++ b/htdocs/categories/categorie.php
@@ -62,6 +62,7 @@ if ($id || $ref)
$elementtype = 'fournisseur';
$objecttype = 'societe&categorie';
$objectid = isset($id)?$id:(isset($socid)?$socid:'');
+ $dbtablename = '&societe';
$fieldid = 'rowid';
}
elseif ($type == 2) {
@@ -537,4 +538,4 @@ function formCategory($db,$object,$typeid,$socid=0)
llxFooter();
$db->close();
-?>
\ No newline at end of file
+?>
diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php
index 5aa17340f22cbe6977fdffa9b11fe1896e833c51..d25e8801090c6022ffce716821d9a3347e99cc78 100755
--- a/htdocs/compta/journal/purchasesjournal.php
+++ b/htdocs/compta/journal/purchasesjournal.php
@@ -220,7 +220,7 @@ foreach ($tabfac as $key => $val)
print "</td><td>".$langs->trans("ThirdParty");
print ' ('.$companystatic->getNomUrl(0,'supplier',16).')';
print "</td>";
- print '<td align="right">'.($mt<0?-price(-$mt):'')."</td>";
+ print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
}
print "</tr>";
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 446d6cdf984563547587652602bd8d42277c417c..d4f22200fdbea84e08339fb7c0c3e69f88061416 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -59,13 +59,14 @@ class FormFile
* @param int $size Length of input file area
* @param Object $object Object to use (when attachment is done on an element)
* @param string $options Options
+ * @param boolean $useajax Use ajax if enabled
* @return int <0 if KO, >0 if OK
*/
- function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='')
+ function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=true)
{
global $conf,$langs;
- if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD))
+ if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) && $useajax)
{
return $this->_formAjaxFileUpload($object);
}
diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php
index 6d8f453357d3b2d61f346e120a8a65a90d82be5c..254543f5960d5ea470c171cbb47959f3e5d24980 100644
--- a/htdocs/fourn/fiche.php
+++ b/htdocs/fourn/fiche.php
@@ -44,7 +44,7 @@ $action = GETPOST('action');
// Security check
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
if ($user->societe_id) $id=$user->societe_id;
-$result = restrictedArea($user, 'societe&fournisseur', $id, '');
+$result = restrictedArea($user, 'societe&fournisseur', $id, '&societe');
$object = new Fournisseur($db);
@@ -403,10 +403,10 @@ if ($object->fetch($id))
// List of contacts
show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?id='.$object->id);
}
-
- // Addresses list
- if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
- {
+
+ // Addresses list
+ if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
+ {
$result=show_addresses($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
}
diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php
index 805bb6fe86eb751f43ea8b1ab90d27e50c048198..bfff310636f6414c349ab5f557fc5ad06fad272b 100644
--- a/htdocs/societe/admin/societe.php
+++ b/htdocs/societe/admin/societe.php
@@ -213,7 +213,7 @@ print_fiche_titre($langs->trans("CompanySetup"),$linkback,'setup');
$head = societe_admin_prepare_head(null);
-dol_fiche_head($head, 'general', $langs->trans("ThirdParty"), 0, 'company');
+dol_fiche_head($head, 'general', $langs->trans("ThirdParties"), 0, 'company');
dol_htmloutput_mesg($mesg);
diff --git a/htdocs/societe/admin/societe_extrafields.php b/htdocs/societe/admin/societe_extrafields.php
index 8d964f7d2645af3e4ef1a078748aee6e75aae35b..81c60a3cfb489ee52a9c0f434eb67bda8de2ec23 100755
--- a/htdocs/societe/admin/societe_extrafields.php
+++ b/htdocs/societe/admin/societe_extrafields.php
@@ -70,7 +70,7 @@ print_fiche_titre($langs->trans("CompanySetup"),$linkback,'setup');
$head = societe_admin_prepare_head(null);
-dol_fiche_head($head, 'attributes', $langs->trans("ThirdParty"), 0, 'company');
+dol_fiche_head($head, 'attributes', $langs->trans("ThirdParties"), 0, 'company');
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";