From b222800012bbdb5ff0c8329d10fea991aa35f77b Mon Sep 17 00:00:00 2001 From: phf Date: Wed, 23 Sep 2015 15:14:08 +0200 Subject: [PATCH 01/14] 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 9a95401473ae5f6deede751dab6ef8802dfae7ad Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 28 Oct 2015 11:27:39 +0100 Subject: [PATCH 02/14] 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 03/14] 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 04/14] 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 05/14] 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 '