From 647956576d53af41dbb9f66d140315d2a673c673 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 28 Apr 2013 08:21:46 +0200 Subject: [PATCH 01/19] fix some indefined index --- htdocs/contact/class/contact.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index e8208fd6df6..4dcbdd09349 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -246,11 +246,11 @@ class Contact extends CommonObject $sql .= ", poste='".$this->db->escape($this->poste)."'"; $sql .= ", fax='".$this->db->escape($this->fax)."'"; $sql .= ", email='".$this->db->escape($this->email)."'"; - $sql .= ", note='".$this->db->escape($this->note)."'"; - $sql .= ", phone = '".$this->db->escape($this->phone_pro)."'"; - $sql .= ", phone_perso = '".$this->db->escape($this->phone_perso)."'"; - $sql .= ", phone_mobile = '".$this->db->escape($this->phone_mobile)."'"; - $sql .= ", jabberid = '".$this->db->escape($this->jabberid)."'"; + $sql .= ", note='".(isset($this->db->escape($this->note))?"'".$this->db->escape($this->note))."'":"null")."'"; + $sql .= ", phone = '".(isset($this->db->escape($this->phone_pro))?"'".$this->db->escape($this->phone_pro))."'":"null")."'"; + $sql .= ", phone_perso = '".(isset($this->db->escape($this->phone_perso))?"'".$this->db->escape($this->phone_perso))."'":"null")."'"; + $sql .= ", phone_mobile = '".(isset($this->db->escape($this->phone_mobile))?"'".$this->db->escape($this->phone_mobile))."'":"null")."'"; + $sql .= ", jabberid = '".(isset($this->db->escape($this->jabberid))?"'".$this->db->escape($this->jabberid))."'":"null")."'"; $sql .= ", priv = '".$this->priv."'"; $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"null"); $sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"null"); From 0661f9f1f8bf09f23226b0ae667407ef7402268d Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 28 Apr 2013 10:40:25 +0200 Subject: [PATCH 02/19] fix: Assigning the return value of new by reference is deprecated --- htdocs/includes/nusoap/lib/Mail/PEAR.php | 4 ++-- htdocs/includes/nusoap/lib/Mail/mimeDecode.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/includes/nusoap/lib/Mail/PEAR.php b/htdocs/includes/nusoap/lib/Mail/PEAR.php index 3e0c465b00e..406ef9c23ba 100755 --- a/htdocs/includes/nusoap/lib/Mail/PEAR.php +++ b/htdocs/includes/nusoap/lib/Mail/PEAR.php @@ -559,10 +559,10 @@ class PEAR $ec = 'PEAR_Error'; } if ($skipmsg) { - $a = &new $ec($code, $mode, $options, $userinfo); + $a = new $ec($code, $mode, $options, $userinfo); return $a; } else { - $a = &new $ec($message, $code, $mode, $options, $userinfo); + $a = new $ec($message, $code, $mode, $options, $userinfo); return $a; } } diff --git a/htdocs/includes/nusoap/lib/Mail/mimeDecode.php b/htdocs/includes/nusoap/lib/Mail/mimeDecode.php index 4a09f567c89..7ac931c2fb4 100755 --- a/htdocs/includes/nusoap/lib/Mail/mimeDecode.php +++ b/htdocs/includes/nusoap/lib/Mail/mimeDecode.php @@ -307,7 +307,7 @@ class Mail_mimeDecode extends PEAR break; case 'message/rfc822': - $obj = &new Mail_mimeDecode($body); + $obj = new Mail_mimeDecode($body); $return->parts[] = $obj->decode(array('include_bodies' => $this->_include_bodies, 'decode_bodies' => $this->_decode_bodies, 'decode_headers' => $this->_decode_headers)); From 1d52d50ac19b2c3f9ed511c2af9bef0f5de503e1 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 28 Apr 2013 12:17:04 +0200 Subject: [PATCH 03/19] fix: issue from last commit --- htdocs/contact/class/contact.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4dcbdd09349..27b9f08fd9c 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -246,11 +246,11 @@ class Contact extends CommonObject $sql .= ", poste='".$this->db->escape($this->poste)."'"; $sql .= ", fax='".$this->db->escape($this->fax)."'"; $sql .= ", email='".$this->db->escape($this->email)."'"; - $sql .= ", note='".(isset($this->db->escape($this->note))?"'".$this->db->escape($this->note))."'":"null")."'"; - $sql .= ", phone = '".(isset($this->db->escape($this->phone_pro))?"'".$this->db->escape($this->phone_pro))."'":"null")."'"; - $sql .= ", phone_perso = '".(isset($this->db->escape($this->phone_perso))?"'".$this->db->escape($this->phone_perso))."'":"null")."'"; - $sql .= ", phone_mobile = '".(isset($this->db->escape($this->phone_mobile))?"'".$this->db->escape($this->phone_mobile))."'":"null")."'"; - $sql .= ", jabberid = '".(isset($this->db->escape($this->jabberid))?"'".$this->db->escape($this->jabberid))."'":"null")."'"; + $sql .= ", note='".(isset($this->db->escape($this->note))?"'".$this->db->escape($this->note)."'":"null")."'"; + $sql .= ", phone = '".(isset($this->db->escape($this->phone_pro))?"'".$this->db->escape($this->phone_pro)."'":"null")."'"; + $sql .= ", phone_perso = '".(isset($this->db->escape($this->phone_perso))?"'".$this->db->escape($this->phone_perso)."'":"null")."'"; + $sql .= ", phone_mobile = '".(isset($this->db->escape($this->phone_mobile))?"'".$this->db->escape($this->phone_mobile)."'":"null")."'"; + $sql .= ", jabberid = '".(isset($this->db->escape($this->jabberid))?"'".$this->db->escape($this->jabberid)."'":"null")."'"; $sql .= ", priv = '".$this->priv."'"; $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"null"); $sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"null"); From c4a064d10410b4b20624bbcdcd3ac19141d891bd Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 28 Apr 2013 19:35:10 +0200 Subject: [PATCH 04/19] fix: Undefined property: mod_codeclient_monkey::$prefixIsRequired --- htdocs/core/modules/societe/mod_codeclient_monkey.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 2fa4c667b9d..1e55a6256f3 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -43,6 +43,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode var $prefixcustomer='CU'; var $prefixsupplier='SU'; + var $prefixIsRequired; // Le champ prefix du tiers doit etre renseigne quand on utilise {pre} /** @@ -57,6 +58,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode $this->code_modifiable_invalide = 1; $this->code_modifiable_null = 1; $this->code_auto = 1; + $this->prefixIsRequired = 0; } From 63c474e2ccf6fd085dee4f8101b086baf4dec6cc Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 28 Apr 2013 22:29:50 +0200 Subject: [PATCH 05/19] fix: Undefined index --- htdocs/core/menus/standard/eldy.lib.php | 94 ++++++++++++------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 3b16988abe5..18becb5d0e4 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -48,7 +48,7 @@ function print_eldy_menu($db,$atarget,$type_user) // Home $classname=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "home") + if (isset($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "home") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; } @@ -76,7 +76,7 @@ function print_eldy_menu($db,$atarget,$type_user) $langs->load("suppliers"); $classname=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "companies") + if (isset($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "companies") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; } @@ -110,14 +110,14 @@ function print_eldy_menu($db,$atarget,$type_user) } // Products-Services - $tmpentry=array('enabled'=>($conf->product->enabled || $conf->service->enabled), 'perms'=>($user->rights->produit->lire || $user->rights->service->lire), 'module'=>'product|service'); - $showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal); - if ($showmode) - { + $tmpentry=array('enabled'=>($conf->product->enabled || $conf->service->enabled), 'perms'=>($user->rights->produit->lire || $user->rights->service->lire), 'module'=>'product|service'); + $showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal); + if ($showmode) + { $langs->load("products"); $classname=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "products") + if (isset($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "products") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; } @@ -167,7 +167,7 @@ function print_eldy_menu($db,$atarget,$type_user) $langs->load("commercial"); $classname=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "commercial") + if (isset($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "commercial") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; } @@ -209,7 +209,7 @@ function print_eldy_menu($db,$atarget,$type_user) $langs->load("compta"); $classname=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "accountancy") + if (isset($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "accountancy") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; } @@ -252,7 +252,7 @@ function print_eldy_menu($db,$atarget,$type_user) $langs->load("banks"); $classname=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "bank") + if (isset($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "bank") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; } @@ -294,7 +294,7 @@ function print_eldy_menu($db,$atarget,$type_user) $langs->load("projects"); $classname=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "project") + if (isset($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "project") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; } @@ -336,7 +336,7 @@ function print_eldy_menu($db,$atarget,$type_user) $langs->load("other"); $classname=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "tools") + if (isset($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "tools") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; } @@ -378,7 +378,7 @@ function print_eldy_menu($db,$atarget,$type_user) $langs->load("shop"); $classname=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "shop") + if (isset($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "shop") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; } @@ -406,7 +406,7 @@ function print_eldy_menu($db,$atarget,$type_user) if ($showmode) { $classname=""; - if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "members") + if (isset($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "members") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; } @@ -451,10 +451,10 @@ function print_eldy_menu($db,$atarget,$type_user) { $idsel=(empty($newTabMenu[$i]['mainmenu'])?'none':$newTabMenu[$i]['mainmenu']); - $showmode=dol_eldy_showmenu($type_user,$newTabMenu[$i],$listofmodulesforexternal); + $showmode=dol_eldy_showmenu($type_user,$newTabMenu[$i],$listofmodulesforexternal); - if ($showmode == 1) - { + if ($showmode == 1) + { if (preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url'])) { $url = $newTabMenu[$i]['url']; @@ -1462,36 +1462,36 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) } -/** - * Function to test if an entry is enabled or not - * - * @param string $type_user 0=We need backoffice menu, 1=We need frontoffice menu - * @param array &$menuentry Array for menu entry - * @param array &$listofmodulesforexternal Array with list of modules allowed to external users - * @return int 0=Hide, 1=Show, 2=Show gray - */ -function dol_eldy_showmenu($type_user, &$menuentry, &$listofmodulesforexternal) -{ - //print 'type_user='.$type_user.' module='.$menuentry['module'].' enabled='.$menuentry['enabled'].' perms='.$menuentry['perms']; - //print 'ok='.in_array($menuentry['module'], $listofmodulesforexternal); - - if (empty($menuentry['enabled'])) return 0; // Entry disabled by condition - if ($type_user && $menuentry['module']) - { - $tmploops=explode('|',$menuentry['module']); - $found=0; - foreach($tmploops as $tmploop) - { - if (in_array($tmploop, $listofmodulesforexternal)) { - $found++; break; - } - } - if (! $found) return 0; // Entry is for menus all excluded to external users - } - if (! $menuentry['perms'] && $type_user) return 0; // No permissions and user is external - if (! $menuentry['perms'] && ! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) return 0; // No permissions and option to hide when not allowed, even for internal user, is on - if (! $menuentry['perms']) return 2; // No permissions and user is external - return 1; +/** + * Function to test if an entry is enabled or not + * + * @param string $type_user 0=We need backoffice menu, 1=We need frontoffice menu + * @param array &$menuentry Array for menu entry + * @param array &$listofmodulesforexternal Array with list of modules allowed to external users + * @return int 0=Hide, 1=Show, 2=Show gray + */ +function dol_eldy_showmenu($type_user, &$menuentry, &$listofmodulesforexternal) +{ + //print 'type_user='.$type_user.' module='.$menuentry['module'].' enabled='.$menuentry['enabled'].' perms='.$menuentry['perms']; + //print 'ok='.in_array($menuentry['module'], $listofmodulesforexternal); + + if (empty($menuentry['enabled'])) return 0; // Entry disabled by condition + if ($type_user && $menuentry['module']) + { + $tmploops=explode('|',$menuentry['module']); + $found=0; + foreach($tmploops as $tmploop) + { + if (in_array($tmploop, $listofmodulesforexternal)) { + $found++; break; + } + } + if (! $found) return 0; // Entry is for menus all excluded to external users + } + if (! $menuentry['perms'] && $type_user) return 0; // No permissions and user is external + if (! $menuentry['perms'] && ! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) return 0; // No permissions and option to hide when not allowed, even for internal user, is on + if (! $menuentry['perms']) return 2; // No permissions and user is external + return 1; } ?> From 947bda1af85f23ae5810ea0a2fb0acd73cdd64bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Mon, 29 Apr 2013 21:37:25 +0200 Subject: [PATCH 06/19] Removed duplicated entries and ordered fixes by bug ID --- ChangeLog | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 993eff9c2da..6c7dc510b48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,27 +7,25 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.3.2 compared to 3.3.1 ***** - Fix: Dutch (nl_NL) translation -- Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated - Generalize fix: file with a specific mask not found, again - Fix: translations and BILL_SUPPLIER_BUILDDOC trigger - Fix: Can't reset payment due date -- Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment -- Fix: [ bug #794 ] Lost filter on zipcode in prospect list -- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed -- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes -- Fix: [ bug #816 ] Sales journal does not reflect localtaxes -- Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price - Fix: Orderstoinvoice didn't act as expected when no order was checked - Fix: Bad link to all proposals into Third party card if customer is prospect - Fix: [ bug #774 ] Bug on creating event with box "all day" crossed +- Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment - Fix: [ bug #789 ] VAT not being calculated in POS -- Fix: [ bug #794 ] Lost filter on zipcode in prospect list +- Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated +- Fix: [ bug #794 ] Lost filter on zipcode in prospect list +- Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price - Fix: [ bug #810 ] Cannot update ODT template path +- Fix: [ bug #816 ] Sales journal does not reflect localtaxes +- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes - Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary - Fix: [ bug #828 ] Error when code_region is not a number in llx_c_regions (with postgres) -- Fix: [ bug #857 ] Invoice created from shipment does not have the order discount -- Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email - Fix: [ bug #855 ] Holiday approval email in French +- Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email +- Fix: [ bug #857 ] Invoice created from shipment does not have the order discount ***** ChangeLog for 3.3.1 compared to 3.3 ***** From 4a9ed428f0f361d25359332e84bfafd8b6c93ec5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Apr 2013 09:58:30 +0200 Subject: [PATCH 07/19] Fix: isset on scalar value --- htdocs/contact/class/contact.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 27b9f08fd9c..e0df3ac276f 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -246,11 +246,11 @@ class Contact extends CommonObject $sql .= ", poste='".$this->db->escape($this->poste)."'"; $sql .= ", fax='".$this->db->escape($this->fax)."'"; $sql .= ", email='".$this->db->escape($this->email)."'"; - $sql .= ", note='".(isset($this->db->escape($this->note))?"'".$this->db->escape($this->note)."'":"null")."'"; - $sql .= ", phone = '".(isset($this->db->escape($this->phone_pro))?"'".$this->db->escape($this->phone_pro)."'":"null")."'"; - $sql .= ", phone_perso = '".(isset($this->db->escape($this->phone_perso))?"'".$this->db->escape($this->phone_perso)."'":"null")."'"; - $sql .= ", phone_mobile = '".(isset($this->db->escape($this->phone_mobile))?"'".$this->db->escape($this->phone_mobile)."'":"null")."'"; - $sql .= ", jabberid = '".(isset($this->db->escape($this->jabberid))?"'".$this->db->escape($this->jabberid)."'":"null")."'"; + $sql .= ", note='".(isset($this->note)?"'".$this->db->escape($this->note)."'":"null")."'"; + $sql .= ", phone = '".(isset($this->phone_pro)?"'".$this->db->escape($this->phone_pro)."'":"null")."'"; + $sql .= ", phone_perso = '".(isset($this->phone_perso)?"'".$this->db->escape($this->phone_perso)."'":"null")."'"; + $sql .= ", phone_mobile = '".(isset($this->phone_mobile)?"'".$this->db->escape($this->phone_mobile)."'":"null")."'"; + $sql .= ", jabberid = '".(isset($this->jabberid)?"'".$this->db->escape($this->jabberid)."'":"null")."'"; $sql .= ", priv = '".$this->priv."'"; $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"null"); $sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"null"); From 114ace6499965594b8b3352827a7a37427f5a982 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Tue, 30 Apr 2013 15:22:39 +0200 Subject: [PATCH 08/19] fix: undefined property --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 22c6aa0e6c1..b9ad2991738 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -431,7 +431,7 @@ class Product extends CommonObject $this->ref = dol_string_nospecial(trim($this->ref)); $this->libelle = trim($this->libelle); $this->description = trim($this->description); - $this->note = trim($this->note); + $this->note = (isset($this->note)? trim($this->note):"null"); $this->weight = price2num($this->weight); $this->weight_units = trim($this->weight_units); $this->length = price2num($this->length); From 59f218ab42d2525f8016c5cafaa24c099f1b1aeb Mon Sep 17 00:00:00 2001 From: fhenry Date: Tue, 30 Apr 2013 16:00:30 +0200 Subject: [PATCH 09/19] [ bug #865 ] Dolibarr navigation array in project/task do not work --- htdocs/projet/class/project.class.php | 2 ++ htdocs/projet/fiche.php | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 97eb27745a8..9465fb815e2 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -35,6 +35,7 @@ class Project extends CommonObject public $table_element = 'projet'; //!< Name of table without prefix where object is stored public $table_element_line = 'projet_task'; public $fk_element = 'fk_projet'; + protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $id; var $ref; @@ -51,6 +52,7 @@ class Project extends CommonObject var $statuts_short; var $statuts; var $oldcopy; + /** * Constructor diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index f5870301860..2511a65ee10 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -43,12 +43,6 @@ if ($id == '' && $ref == '' && ($action != "create" && $action != "add" && $acti $mine = GETPOST('mode')=='mine' ? 1 : 0; //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects - -// Security check -$socid=0; -if ($user->societe_id > 0) $socid=$user->societe_id; -$result = restrictedArea($user, 'projet', $id); - // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager=new HookManager($db); @@ -61,6 +55,11 @@ if ($object->id > 0) $object->fetch_thirdparty(); } +// Security check +$socid=0; +if ($user->societe_id > 0) $socid=$user->societe_id; +$result = restrictedArea($user, 'projet', $object->id); + $date_start=dol_mktime(0,0,0,GETPOST('projectmonth','int'),GETPOST('projectday','int'),GETPOST('projectyear','int')); $date_end=dol_mktime(0,0,0,GETPOST('projectendmonth','int'),GETPOST('projectendday','int'),GETPOST('projectendyear','int'));; @@ -720,10 +719,13 @@ else print ''; - // List of actions on element - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions=new FormActions($db); - $somethingshown=$formactions->showactions($object,'project',$socid); + if (!empty($object->id)) + { + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions=new FormActions($db); + $somethingshown=$formactions->showactions($object,'project',$socid); + } print ''; } From ac6e56f0586fc20c9e30201e2e12fb507a73adcc Mon Sep 17 00:00:00 2001 From: fhenry Date: Tue, 30 Apr 2013 21:10:26 +0200 Subject: [PATCH 10/19] Fix bug [ bug #861 ] Erreur de droit groupe et utilisateur --- htdocs/core/lib/security.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index b4ddaf160e4..b2b3ebbd579 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -219,7 +219,9 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature { foreach($feature2 as $subfeature) { - if (empty($user->rights->$feature->$subfeature->creer) && empty($user->rights->$feature->$subfeature->write)) $createok=0; + if (empty($user->rights->$feature->$subfeature->creer) + && empty($user->rights->$feature->$subfeature->write) + && empty($user->rights->$feature->$subfeature->create)) $createok=0; else { $createok=1; break; } // For bypass the second test if the first is ok } } From 440912a4d3b24165271ae256c2cc656404965c81 Mon Sep 17 00:00:00 2001 From: fhenry Date: Tue, 30 Apr 2013 21:35:27 +0200 Subject: [PATCH 11/19] fix [ bug #827 ] AJAX search does not respect multiprice level --- htdocs/product/ajax/products.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 8fd68e2b954..3fed5d5152c 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -157,7 +157,7 @@ else $form = new Form($db); if (empty($mode) || $mode == 1) { - $arrayresult=$form->select_produits_do("",$htmlname,$type,"",$pricelevel,$searchkey,$status,2,$outjson); + $arrayresult=$form->select_produits_do("",$htmlname,$type,"",$price_level,$searchkey,$status,2,$outjson); } elseif ($mode == 2) { From e9f02ebacf477a19951071902c4cae238da09201 Mon Sep 17 00:00:00 2001 From: fhenry Date: Tue, 30 Apr 2013 21:45:40 +0200 Subject: [PATCH 12/19] Update change log --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6c7dc510b48..2057fe6e065 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,9 @@ English Dolibarr ChangeLog - Fix: [ bug #855 ] Holiday approval email in French - Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email - Fix: [ bug #857 ] Invoice created from shipment does not have the order discount +- Fix: [ bug #861 ] Erreur de droit groupe et utilisateur +- Fix: [ bug #827 ] AJAX search does not respect multiprice level +- Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work ***** ChangeLog for 3.3.1 compared to 3.3 ***** From 3933fb318c217db2b5b55a8645d22d4a883b3d7d Mon Sep 17 00:00:00 2001 From: fhenry Date: Tue, 30 Apr 2013 21:57:34 +0200 Subject: [PATCH 13/19] update change log --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2057fe6e065..78461615bf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,7 +26,7 @@ English Dolibarr ChangeLog - Fix: [ bug #855 ] Holiday approval email in French - Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email - Fix: [ bug #857 ] Invoice created from shipment does not have the order discount -- Fix: [ bug #861 ] Erreur de droit groupe et utilisateur +- Fix: [ bug #861 ] Impossible to create a new event in agenda - Fix: [ bug #827 ] AJAX search does not respect multiprice level - Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work From c84427bd225ba8bb0bf860e96712784cdc812fcd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Apr 2013 22:52:56 +0200 Subject: [PATCH 14/19] Fix: delete of files with [ and glob. Conflicts: test/phpunit/FilesLibTest.php --- htdocs/core/lib/files.lib.php | 6 ++++-- test/phpunit/FilesLibTest.php | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 5211841fc02..3f4331420a1 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -751,12 +751,14 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n { $error=0; - //print "x".$file." ".$disableglob; + //print "x".$file." ".$disableglob;exit; $ok=true; $file_osencoded=dol_osencode($file); // New filename encoded in OS filesystem encoding charset if (empty($disableglob) && ! empty($file_osencoded)) { - foreach (glob($file_osencoded) as $filename) + $globencoded=str_replace('[','\[',$file_osencoded); + $globencoded=str_replace(']','\]',$globencoded); + foreach (glob($globencoded) as $filename) { if ($nophperrors) $ok=@unlink($filename); // The unlink encapsulated by dolibarr else $ok=unlink($filename); // The unlink encapsulated by dolibarr diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index 7a3d0f10aa9..17d36944f86 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -326,7 +326,7 @@ class FilesLibTest extends PHPUnit_Framework_TestCase // Again to test with overwriting=1 $result=dol_copy($file, $conf->admin->dir_temp.'/file.csv',0,1); print __METHOD__." result=".$result."\n"; - $this->assertGreaterThanOrEqual(1,$result); // Should be 1 + $this->assertGreaterThanOrEqual(1,$result,'copy destination already exists, overwrite'); // Should be 1 // Again to test with overwriting=1 $result=dol_move($conf->admin->dir_temp.'/file.csv',$conf->admin->dir_temp.'/file2.csv',0,1); @@ -340,7 +340,17 @@ class FilesLibTest extends PHPUnit_Framework_TestCase // Again to test no erreor when deleteing a non existing file $result=dol_delete_file($conf->admin->dir_temp.'/file2.csv'); print __METHOD__." result=".$result."\n"; - $this->assertTrue($result); + $this->assertTrue($result,'delete file that does not exists'); + + // Test copy with special char / delete with blob + $result=dol_copy($file, $conf->admin->dir_temp.'/file with [x] and é.csv',0,1); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThanOrEqual(1,$result,'copy file with special char, overwrite'); // Should be 1 + + // Try to delete using a glob criteria + $result=dol_delete_file($conf->admin->dir_temp.'/file with [x]*é.csv'); + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result,'delete file using glob criteria'); } /** @@ -377,4 +387,4 @@ class FilesLibTest extends PHPUnit_Framework_TestCase $this->assertEquals(0,count($result)); } } -?> \ No newline at end of file +?> From 7d71be2227327ec292ad5c91104fa00ecf17256a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Apr 2013 22:56:52 +0200 Subject: [PATCH 15/19] Fix: Import of contact/address not complete and not working with pgsql Conflicts: htdocs/core/modules/modSociete.class.php --- htdocs/core/db/mysqli.class.php | 2 +- htdocs/core/db/pgsql.class.php | 2 +- .../modules/import/import_csv.modules.php | 32 +++++++------------ htdocs/core/modules/modSociete.class.php | 4 +-- htdocs/core/tpl/admin_extrafields_add.tpl.php | 2 +- htdocs/imports/import.php | 4 +-- 6 files changed, 18 insertions(+), 28 deletions(-) diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 5ccdb661ec2..ba24d5c53bf 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -938,7 +938,7 @@ class DoliDBMysqli * * @param string $table Name of table * @param string $field Optionnel : Name of field if we want description of field - * @return resource Resource + * @return resultset Resultset x (x->Field, x->Type, ...) */ function DDLDescTable($table,$field="") { diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 695ab573fc4..a94d9dd96ba 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -1169,7 +1169,7 @@ class DoliDBPgsql * * @param string $table Name of table * @param string $field Optionnel : Name of field if we want description of field - * @return resource Resource + * @return resultset Resultset x (x->attname) */ function DDLDescTable($table,$field="") { diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 1b6f255a4f0..b1eaa2a725f 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -66,8 +66,7 @@ class ImportCsv extends ModeleImports global $conf,$langs; $this->db = $db; - $this->separator=','; // Change also function cleansep - if (! empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE)) $this->separator=$conf->global->IMPORT_CSV_SEPARATOR_TO_USE; + $this->separator=(GETPOST('separator')?GETPOST('separator'):(empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE)?',':$conf->global->IMPORT_CSV_SEPARATOR_TO_USE)); $this->enclosure='"'; $this->escape='"'; @@ -579,7 +578,7 @@ class ImportCsv extends ModeleImports //var_dump($objimport->array_import_convertvalue); exit; // Build SQL request - if (! tablewithentity($tablename)) + if (! tablewithentity($tablename)) { $sql ='INSERT INTO '.$tablename.'('.$listfields.', import_key'; if (! empty($objimport->array_import_tables_creator[0][$alias])) $sql.=', '.$objimport->array_import_tables_creator[0][$alias]; @@ -651,25 +650,16 @@ function cleansep($value) function tablewithentity($table) { global $db; - $sql = "SHOW COLUMNS FROM ".$table." LIKE 'entity'"; - - $resql=$db->query($sql); - if ($resql) - { - $numrows=$db->num_rows($resql); - if ($numrows) - { - return 1; - } - else - { - return 0; - } - } - else - { - return -1; + + $resql=$db->DDLDescTable($table,'entity'); + if ($resql) + { + $i=0; + $obj=$db->fetch_object($resql); + if ($obj) return 1; + else return 0; } + else return -1; } ?> \ No newline at end of file diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index d532b20d5a0..d6ee18c9b6c 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -355,7 +355,7 @@ class modSociete extends DolibarrModules $this->import_label[$r]='ImportDataset_company_2'; $this->import_icon[$r]='contact'; $this->import_entities_array[$r]=array('s.fk_soc'=>'company'); // We define here only fields that use another icon that the one defined into import_icon - $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople'); // List of tables to insert into (insert done in same order) + $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople','extra'=>MAIN_DB_PREFIX.'socpeople_extrafields'); // List of tables to insert into (insert done in same order) $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.civilite'=>'UserTitle','s.name'=>"Name*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note'=>"Note",'s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'contact'"; @@ -370,7 +370,7 @@ class modSociete extends DolibarrModules } } // End add extra fields - $this->import_fieldshidden_array[$r]=array('s.fk_user_creat'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) + $this->import_fieldshidden_array[$r]=array('s.fk_user_creat'=>'user->id','extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'socpeople'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_convertvalue_array[$r]=array( 's.fk_soc'=>array('rule'=>'fetchidfromref','file'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'), 's.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/cpays.class.php','class'=>'Cpays','method'=>'fetch','dict'=>'DictionnaryCountry'), diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index eba68cc646c..90662ebb70b 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -33,7 +33,7 @@ else if (type == 'varchar') { size.val('255').removeAttr('disabled'); unique.removeAttr('disabled','disabled'); } else size.val('').attr('disabled','disabled'); } - init_typeoffields(''); + init_typeoffields(''); jQuery("#type").change(function() { init_typeoffields($(this).val()); }); diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 85c8410da7e..01f85c32df4 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1017,7 +1017,7 @@ if ($step == 4 && $datatoimport) } else { - print ''.$langs->trans("NextStep").''; + print ''.$langs->trans("NextStep").''; } } @@ -1281,7 +1281,7 @@ if ($step == 5 && $datatoimport) } else { - print ''.$langs->trans("RunSimulateImportFile").''; + print ''.$langs->trans("RunSimulateImportFile").''; } print ''; } From 7f27801c3c4ae94b43314d2a068e03909a7aa41b Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Wed, 1 May 2013 09:41:36 +0200 Subject: [PATCH 16/19] fix: Undefined property: stdClass::$xxx --- htdocs/contrat/class/contrat.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 60186fe8aef..483301591d7 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -524,20 +524,20 @@ class Contrat extends CommonObject $objp = $this->db->fetch_object($result); $line = new ContratLigne($this->db); - $line->id = $objp->rowid; + $line->id = $objp->rowid; $line->fk_contrat = $objp->fk_contrat; $line->libelle = $objp->description; $line->desc = $objp->description; $line->qty = $objp->qty; - $line->statut = $objp->statut; - $line->ref = $objp->ref; + $line->statut = $objp->statut; + $line->ref = (isset($objp->ref)?$objp->ref:NULL); $line->tva_tx = $objp->tva_tx; $line->localtax1_tx = $objp->localtax1_tx; $line->localtax2_tx = $objp->localtax2_tx; $line->subprice = $objp->subprice; $line->remise_percent = $objp->remise_percent; $line->price_ht = $objp->price_ht; - $line->price = $objp->price; // For backward compatibility + $line->price = (isset($objp->price)?$objp->price:NULL); // For backward compatibility $line->total_ht = $objp->total_ht; $line->total_tva = $objp->total_tva; $line->total_localtax1= $objp->total_localtax1; From 95f63a8171706891103b5316a448166f171f56d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 1 May 2013 20:43:08 +0200 Subject: [PATCH 17/19] Corrected some es_ES translations and fixed problems with translations not being translated --- htdocs/compta/clients.php | 2 ++ htdocs/compta/prelevement/factures.php | 1 + htdocs/compta/prelevement/fiche-rejet.php | 1 + htdocs/compta/prelevement/fiche-stat.php | 1 + htdocs/compta/prelevement/lignes.php | 1 + htdocs/langs/es_ES/admin.lang | 4 ++-- htdocs/langs/es_ES/withdrawals.lang | 2 +- 7 files changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index a866b4cac79..c6007e05460 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -140,6 +140,8 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + $langs->load('commercial'); + print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',$num); print '
'; diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 0ec6018f9eb..3ede6674fd3 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; $langs->load("companies"); $langs->load("categories"); $langs->load('withdrawals'); +$langs->load('bills'); // Securite acces client if ($user->societe_id > 0) accessforbidden(); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index c88df2483a3..60f955eb670 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; $langs->load("categories"); $langs->load('withdrawals'); +$langs->load('bills'); // Securite acces client if ($user->societe_id > 0) accessforbidden(); diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 28cf71231b5..7ec2bbe9a2c 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -33,6 +33,7 @@ if ($user->societe_id > 0) accessforbidden(); $langs->load("withdrawals"); $langs->load("categories"); +$langs->load('bills'); // Get supervariables $prev_id = GETPOST('id','int'); diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php index 0f87e78213d..238cd21b98b 100644 --- a/htdocs/compta/prelevement/lignes.php +++ b/htdocs/compta/prelevement/lignes.php @@ -36,6 +36,7 @@ if ($user->societe_id > 0) accessforbidden(); $langs->load("categories"); $langs->load('withdrawals'); +$langs->load('bills'); // Get supervariables $prev_id = GETPOST('id','int'); diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 769f635bc4c..9b6ed424c46 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -646,8 +646,8 @@ Permission1002=Crear/modificar stocks Permission1003=Eliminar stocks Permission1004=Consultar movimientos de stock Permission1005=Crear/modificar movimientos de stock -Permission1101=Consultar ordenes de envío -Permission1102=Crear/modificar ordenes de envío +Permission1101=Consultar órdenes de envío +Permission1102=Crear/modificar órdenes de envío Permission1104=Validar orden de envío Permission1109=Eliminar orden de envío Permission1181=Consultar proveedores diff --git a/htdocs/langs/es_ES/withdrawals.lang b/htdocs/langs/es_ES/withdrawals.lang index 75156b22660..736577af6d3 100644 --- a/htdocs/langs/es_ES/withdrawals.lang +++ b/htdocs/langs/es_ES/withdrawals.lang @@ -9,7 +9,7 @@ StandingOrderToProcess=A procesar StandingOrderProcessed=Procesados Withdrawals=Reintegros Withdrawal=Reintegro -WithdrawalsReceipts=Ordenes domiciliadas +WithdrawalsReceipts=Órdenes domiciliadas WithdrawalReceipt=Orden domiciliación WithdrawalReceiptShort=Orden LastWithdrawalReceipts=Las %s últimas órdenes de domiciliación From 97478ccbf24299b41e497a9e1a4cfa7b8c2342ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 1 May 2013 20:54:45 +0200 Subject: [PATCH 18/19] Error statut image + not translated strings --- htdocs/compta/prelevement/bons.php | 2 +- htdocs/compta/prelevement/rejets.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index bc69163e000..108ce0bb274 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -27,7 +27,7 @@ require '../bank/pre.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; -$langs->load("widthdrawals"); +$langs->load("withdrawals"); $langs->load("categories"); // Security check diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index b22289b5f50..6cd04c95162 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -26,6 +26,7 @@ require '../bank/pre.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; $langs->load("withdrawals"); @@ -56,6 +57,7 @@ if ($sortorder == "") $sortorder="DESC"; if ($sortfield == "") $sortfield="p.datec"; $rej = new RejetPrelevement($db, $user); +$ligne = new LignePrelevement($db); /* * Liste des factures @@ -84,7 +86,7 @@ if ($result) print"\n\n"; print ''; print ''; - print_liste_field_titre($langs->trans("Nb"),"rejets.php","p.ref",'',$urladd); + print_liste_field_titre($langs->trans("Line"),"rejets.php","p.ref",'',$urladd); print_liste_field_titre($langs->trans("ThirdParty"),"rejets.php","s.nom",'',$urladd); print_liste_field_titre($langs->trans("Reason"),"rejets.php","pr.motif","",$urladd); print ''; @@ -98,7 +100,7 @@ if ($result) $obj = $db->fetch_object($result); print ""; From 7e47b37adedeed0e58caf39251c667532b6bb63b Mon Sep 17 00:00:00 2001 From: fhenry Date: Thu, 2 May 2013 13:56:14 +0200 Subject: [PATCH 19/19] Fix [ bug #788 ] Date of linked interventions are not shown --- ChangeLog | 1 + htdocs/projet/element.php | 1 + 2 files changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 78461615bf6..7ee5a3e341c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ English Dolibarr ChangeLog - Fix: [ bug #861 ] Impossible to create a new event in agenda - Fix: [ bug #827 ] AJAX search does not respect multiprice level - Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work +- Fix: [ bug #788 ] Date of linked interventions are not shown ***** ChangeLog for 3.3.1 compared to 3.3 ***** diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 9e5f8da0e3b..0f6f7b55313 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -223,6 +223,7 @@ foreach ($listofreferent as $key => $value) $date=$element->date; if (empty($date)) $date=$element->datep; if (empty($date)) $date=$element->date_contrat; + if (empty($date)) $date=$element->datev; //Fiche inter print ''; // Third party
"; - print ' '; + print $ligne->LibStatut($obj->statut,2).' '; print ''; print substr('000000'.$obj->rowid, -6)."'.dol_print_date($date,'day').'