From b222800012bbdb5ff0c8329d10fea991aa35f77b Mon Sep 17 00:00:00 2001 From: phf Date: Wed, 23 Sep 2015 15:14:08 +0200 Subject: [PATCH 01/30] FIX clone customer order create new order with validate ref and not with PROV --- htdocs/commande/class/commande.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 767bf294d6f..567c3f1a702 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -988,14 +988,16 @@ class Commande extends CommonOrder $this->ref_client = ''; // Set ref - require_once DOL_DOCUMENT_ROOT ."/core/modules/commande/".$conf->global->COMMANDE_ADDON.'.php'; - $obj = $conf->global->COMMANDE_ADDON; - $modCommande = new $obj; - $this->ref = $modCommande->getNextValue($objsoc,$this); - + $this->ref = '(PROV)'; // Create clone $result=$this->create($user); + if ($result < 0) $error++; + + // Set new ref + $newref='(PROV'.$this->id.')'; + $sql = 'UPDATE '.MAIN_DB_PREFIX."commande SET ref='".$this->db->escape($newref)."' WHERE rowid=".$this->id; + $result=$this->db->query($sql); if ($result < 0) $error++; if (! $error) From 6f4cfc86e8e82b98092775113e9d4f1c79560103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 18 Oct 2015 11:25:55 +0200 Subject: [PATCH 02/30] Update notify.class.php http://www.dolibarr.fr/forum/12-howto--aide/54061-probleme-sur-la-validation-des-commande-fournisseu Fatal error: Call to a member function getFullName() on a non-object in /home/xxxx/public_html/xxxxx/htdocs/core/class/notify.class.php on line 374 --- htdocs/core/class/notify.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index b0d4b4e2690..0dbd47727fb 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -143,7 +143,7 @@ class Notify */ function send($action, $object) { - global $conf,$langs,$mysoc,$dolibarr_main_url_root; + global $user,$conf,$langs,$mysoc,$dolibarr_main_url_root; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; From 4e206fa80b3dc44ab92fa68f313dd8710b9b6efb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 19:53:59 +0100 Subject: [PATCH 03/30] Fix doxygen --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 9b0ef17b465..6d802e7f567 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5134,8 +5134,8 @@ class Form * @param int $width Width of photo * @param int $height Height of photo (auto if 0) * @param int $caneditfield Add edit fields - * @param string $imagesize 'mini', 'small' or '' (original) * @param string $cssclass CSS name to use on img for photo + * @param string $imagesize 'mini', 'small' or '' (original) * @return string HTML code to output photo */ static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='') From 295eb533f884a3da9ec4c5476b3c2f34ead761e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 20:14:57 +0100 Subject: [PATCH 04/30] FIX Bad picto for expense report --- htdocs/expensereport/class/expensereport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 78ca120516e..7de680d02f3 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1543,7 +1543,7 @@ class ExpenseReport extends CommonObject $response->warning_delay=$conf->expensereport->payment->warning_delay/60/60/24; $response->label=$langs->trans("ExpenseReportsToPay"); $response->url=DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&statut=5'; - $response->img=img_object($langs->trans("ExpenseReports"),"user"); + $response->img=img_object($langs->trans("ExpenseReports"),"trip"); while ($obj=$this->db->fetch_object($resql)) { From 77a0359cfc13bbcd896292bc86669b5154072bdd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 20:17:43 +0100 Subject: [PATCH 05/30] Fix bad test --- htdocs/core/class/html.form.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6d802e7f567..79ba773ad36 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5159,8 +5159,8 @@ class Form $dir=$conf->user->dir_output; if (! empty($object->photo)) { - if ($imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_mini'); - else if ($imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_small'); + if ((string) $imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_mini'); + else if ((string) $imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo; } if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility From 29b8919a4000e1957defdee0039e1091aa947ca3 Mon Sep 17 00:00:00 2001 From: atm-robin Date: Mon, 26 Oct 2015 14:34:46 +0100 Subject: [PATCH 06/30] FIX supplier rights for orderToInvoice --- htdocs/fourn/commande/orderstoinvoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 083ea05bc64..b63b3d9dd1d 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -44,7 +44,7 @@ $langs->load('orders'); $langs->load('deliveries'); $langs->load('companies'); -if (! $user->rights->facture->creer) +if (! $user->rights->fournisseur->facture->creer) accessforbidden(); $id = (GETPOST('id') ? GETPOST('id', 'int') : GETPOST("facid")); // For backward compatibility From fa3af485ef92c475b42ac2dc4e1ad2304c230d36 Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Mon, 26 Oct 2015 18:33:22 +0100 Subject: [PATCH 07/30] FIX action not appear before an update because of a lack of line in action ressource --- htdocs/comm/action/listactions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 509a9c90d77..977a91a404a 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -199,7 +199,7 @@ if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR ( if ($filtert > 0 || $usergroup > 0) { $sql.= " AND ("; - if ($filtert > 0) $sql.= "ar.fk_element = ".$filtert; + if ($filtert > 0) $sql.= "(ar.fk_element = ".$filtert." OR a.fk_user_action=".$filtert.")"; if ($usergroup > 0) $sql.= ($filtert>0?" OR ":"")." ugu.fk_usergroup = ".$usergroup; $sql.= ")"; } From 87c240252c4ade8a164ed5eab97cb309bab2631d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Oct 2015 22:24:18 +0100 Subject: [PATCH 08/30] FIX Can export a field into task time table with export project profile --- htdocs/core/modules/modProjet.class.php | 4 ++-- htdocs/langs/en_US/projects.lang | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 6ac8b877ad6..ff4adeb1986 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -300,8 +300,8 @@ class modProjet extends DolibarrModules } } // End add extra fields - $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('ptt.task_date'=>'TaskTimeDate','ptt.task_duration'=>"TimesSpent",'ptt.fk_user'=>"TaskTimeUser",'ptt.note'=>"TaskTimeNote")); - $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('ptt.task_date'=>'task_time','ptt.task_duration'=>"task_time",'ptt.fk_user'=>"task_time",'ptt.note'=>"task_time")); + $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('ptt.rowid'=>'IdTaskTime','ptt.task_date'=>'TaskTimeDate','ptt.task_duration'=>"TimesSpent",'ptt.fk_user'=>"TaskTimeUser",'ptt.note'=>"TaskTimeNote")); + $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('ptt.rowid'=>'task_time','ptt.task_date'=>'task_time','ptt.task_duration'=>"task_time",'ptt.fk_user'=>"task_time",'ptt.note'=>"task_time")); $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'projet as p'; diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index d9fecb40ad4..4ed6ccfc2f5 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -175,6 +175,7 @@ ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of opportunities by mo ProjectOpenedProjectByOppStatus=Opened project/lead by opportunity status ProjectsStatistics=Statistics on projects/leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. +IdTaskTime=Id task time OpenedProjectsByThirdparties=Opened projects by thirdparties OpportunityTotalAmount=Opportunities total amount OpportunityPonderatedAmount=Opportunities weighted amount From 9a95401473ae5f6deede751dab6ef8802dfae7ad Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 28 Oct 2015 11:27:39 +0100 Subject: [PATCH 09/30] FIX : add tag myuser_job into ODT replacement --- htdocs/core/class/commondocgenerator.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 24c2fe34a93..c2634cbaaed 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -75,6 +75,7 @@ abstract class CommonDocGenerator 'myuser_mobile'=>$user->user_mobile, 'myuser_email'=>$user->email, 'myuser_logo'=>$user->photo, + 'myuser_job'=>$user->job, 'myuser_web'=>'' // url not exist in $user object ); } From f385f8bcfa1c44930e46c94430d76b9aa9deba3f Mon Sep 17 00:00:00 2001 From: phf Date: Wed, 28 Oct 2015 14:34:34 +0100 Subject: [PATCH 10/30] FIX better fix to generate a PROV ref after clone --- htdocs/commande/class/commande.class.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 567c3f1a702..fff3f64de8d 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -978,6 +978,7 @@ class Commande extends CommonOrder } $this->id=0; + $this->ref = ''; $this->statut=self::STATUS_DRAFT; // Clear fields @@ -986,18 +987,9 @@ class Commande extends CommonOrder $this->date_creation = ''; $this->date_validation = ''; $this->ref_client = ''; - - // Set ref - $this->ref = '(PROV)'; - + // Create clone $result=$this->create($user); - if ($result < 0) $error++; - - // Set new ref - $newref='(PROV'.$this->id.')'; - $sql = 'UPDATE '.MAIN_DB_PREFIX."commande SET ref='".$this->db->escape($newref)."' WHERE rowid=".$this->id; - $result=$this->db->query($sql); if ($result < 0) $error++; if (! $error) From e2ba24826ffe5b9061808c084778d08780cbeceb Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 29 Oct 2015 06:06:56 +0100 Subject: [PATCH 11/30] Review 3.8 --- htdocs/langs/en_US/admin.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index fce013be146..9c2879db463 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -974,6 +974,7 @@ Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Tolerence delay (in days) before alert Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Tolerance delay (in days) before alert on pending bank reconciliation Delays_MAIN_DELAY_MEMBERS=Tolerance delay (in days) before alert on delayed membership fee Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Tolerance delay (in days) before alert for cheques deposit to do +Delays_MAIN_DELAY_EXPENSEREPORTS=Tolerance delay (in days) before alert for expense reports to approve SetupDescription1=All parameters available in the setup area allow you to setup Dolibarr before starting using it. SetupDescription2=The 2 most important setup steps are the 2 first ones in the left setup menu, this means Company/foundation setup page and Modules setup page: SetupDescription3=Parameters in menu Setup -> Company/foundation are required because input information is used on Dolibarr displays and to modify Dolibarr behaviour (for example for features related to your country). From 4e9d06785c762aaff28eba9305d5839175be84b4 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 29 Oct 2015 06:47:42 +0100 Subject: [PATCH 12/30] Fix #3818 & presentation --- htdocs/admin/security.php | 17 +++++++++++------ htdocs/langs/en_US/admin.lang | 3 +++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 84c5ecb92e4..fe20d868e83 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -292,6 +292,7 @@ $var=!$var; $this->NbRepeat = $tabConf[4]; $this->WithoutAmbi = $tabConf[5]; */ + print '
'; print ''; print ''; print ''; @@ -332,13 +333,17 @@ $var=!$var; print '"; print ''; print ''; - - $var=!$var; - print ""; - print ''; - print ''; + print '
'.$langs->trans("PasswordPatternDesc").'' . $langs->trans("NoAmbiCaracAutoGeneration")." '.($tabConf[5] ? $langs->trans("Activated") : $langs->trans("Disabled")).'
'.$langs->trans("Save").'
'; + print '
'; + print ''; + print ''; + print '
'; + print ''.$langs->trans("Save").''; + print '
'; + print '

'; + print ''."\n"; + print ''."\n"; } // jQuery jMobile if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0))