From da94ec8fa4bc9a9e58b17231403d40fd4afb2254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Tue, 16 Oct 2012 01:36:42 +0200 Subject: [PATCH 1/5] Normalized thirdparties module card name --- htdocs/societe/admin/societe.php | 2 +- htdocs/societe/admin/societe_extrafields.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 805bb6fe86e..bfff310636f 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 8d964f7d264..81c60a3cfb4 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).'
'."\n"; From 26a5ac53d71de830c7204808819d1b9e1c135b6c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 16 Oct 2012 16:07:44 +0200 Subject: [PATCH 2/5] Fix: possibility to disable ajax --- htdocs/core/class/html.formfile.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 446d6cdf984..d4f22200fdb 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); } From 15aa2497abbf519ba7aabad3148c9071a7803d79 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 16 Oct 2012 17:59:00 +0200 Subject: [PATCH 3/5] Fix: compatibility with multicompany sharings --- htdocs/categories/categorie.php | 3 ++- htdocs/fourn/fiche.php | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 05ff763d67f..267d26c30ea 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/fourn/fiche.php b/htdocs/fourn/fiche.php index 6d8f453357d..254543f5960 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); } From 7bf56630967c10bc70e4bbc3a1afe0cee8796c0f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 Oct 2012 18:33:49 +0200 Subject: [PATCH 4/5] =?UTF-8?q?Fix:=20[=20bug=20#552=20]=20l'option=20"Adh?= =?UTF-8?q?=C3=A9rents=20non=20=C3=A0=20jour"=20ne=20fonctionne=20pas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/adherents/liste.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 075510fa915..592881b2b72 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 From 4854c723488f37fc8893a630e8a7beb8791469df Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 Oct 2012 19:15:36 +0200 Subject: [PATCH 5/5] Fix: [ bug #565 ] Display error bills have suppliers. --- htdocs/compta/journal/purchasesjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 5aa17340f22..d25e8801090 100755 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -220,7 +220,7 @@ foreach ($tabfac as $key => $val) print "".$langs->trans("ThirdParty"); print ' ('.$companystatic->getNomUrl(0,'supplier',16).')'; print ""; - print ''.($mt<0?-price(-$mt):'').""; + print ''.($mt<0?price(-$mt):'').""; print ''.($mt>=0?price($mt):'').""; } print "";