From 9c7c1ddceb31d8878482c16e6e57a89f67008665 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 6 Jun 2019 11:20:10 +0200 Subject: [PATCH 01/13] Fix multicurrency setup page --- htdocs/admin/multicurrency.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 54ba9e6b1ce..b8479735d18 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -49,15 +49,14 @@ $action = GETPOST('action', 'alpha'); if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; - $value=(GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1); + $value=GETPOST($code, 'alpha'); if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - dol_print_error($db); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -66,12 +65,11 @@ if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) $code=$reg[1]; if (dolibarr_del_const($db, $code, 0) > 0) { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - dol_print_error($db); + setEventMessages($langs->trans("Error"), null, 'errors'); } } From cab91e75c6a2fd77682fb08c03d45dc2d3f7002d Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Mon, 10 Jun 2019 10:10:16 +0200 Subject: [PATCH 02/13] add missing column adherent list --- htdocs/adherents/list.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index eaeb1fe305c..02f3d319aa3 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -130,6 +130,7 @@ $arrayfields=array( 'd.note_private'=>array('label'=>$langs->trans("NotePrivate"), 'checked'=>0),*/ 'd.datefin'=>array('label'=>$langs->trans("EndSubscription"), 'checked'=>1, 'position'=>500), 'd.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), + 'd.birth'=>array('label'=>$langs->trans("Birthday"), 'checked'=>0, 'position'=>500), 'd.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), 'd.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000) ); @@ -591,6 +592,12 @@ if (! empty($arrayfields['d.datec']['checked'])) print ''; print ''; } +//Birthday +if (! empty($arrayfields['d.birth']['checked'])) +{ + print ''; + print ''; +} // Date modification if (! empty($arrayfields['d.tms']['checked'])) { @@ -646,6 +653,7 @@ $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sort $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (! empty($arrayfields['d.datec']['checked'])) print_liste_field_titre($arrayfields['d.datec']['label'], $_SERVER["PHP_SELF"], "d.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); +if (! empty($arrayfields['d.birth']['checked'])) print_liste_field_titre($arrayfields['d.birth']['label'], $_SERVER["PHP_SELF"], "d.birth", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['d.tms']['checked'])) print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['d.statut']['checked'])) print_liste_field_titre($arrayfields['d.statut']['label'], $_SERVER["PHP_SELF"], "d.statut", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); @@ -865,6 +873,14 @@ while ($i < min($num, $limit)) print ''; if (! $i) $totalarray['nbfield']++; } + // Birth + if (! empty($arrayfields['d.birth']['checked'])) + { + print ''; + print dol_print_date($db->jdate($obj->birth), 'day', 'tzuser'); + print ''; + if (! $i) $totalarray['nbfield']++; + } // Date modification if (! empty($arrayfields['d.tms']['checked'])) { From 0ce2c2aab54bdcbce9582d34c4033f8d41ceb3b0 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 10 Jun 2019 10:11:26 +0200 Subject: [PATCH 03/13] Fix missing massaction hook params --- htdocs/core/actions_massactions.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 9be0e0a4b77..71c3f98420a 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1269,9 +1269,10 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) $parameters['toselect']=$toselect; $parameters['uploaddir']=$uploaddir; +$parameters['massaction']=$massaction; +$parameters['diroutputmassaction']=$diroutputmassaction; $reshook=$hookmanager->executeHooks('doMassActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - From a72e36cd013bb95c23a0e0d422621713a51a39db Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jun 2019 20:05:49 +0200 Subject: [PATCH 04/13] Fix show version removed from left menu --- htdocs/main.inc.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 319ee2dc363..d283abd7d15 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1695,12 +1695,8 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead if ($mode == 'wiki') $text.=sprintf($helpbaseurl, urlencode(html_entity_decode($helppage))); else $text.=sprintf($helpbaseurl, $helppage); $text.='">'; - //$text.=img_picto('', 'helpdoc_top').' '; $text.=''; - //$toprightmenu.=$langs->trans($mode == 'wiki' ? 'OnlineHelp': 'Help'); - //if ($mode == 'wiki') $text.=' ('.dol_trunc(strtr($helppage,'_',' '),8).')'; $text.=''; - //$toprightmenu.=''."\n"; $toprightmenu.=@Form::textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2); } } @@ -1815,6 +1811,19 @@ function top_menu_user(User $user, Translate $langs) $profilName = ' '.$profilName; } + // Define version to show + $appli=constant('DOL_APPLICATION_TITLE'); + if (! empty($conf->global->MAIN_APPLICATION_TITLE)) + { + $appli=$conf->global->MAIN_APPLICATION_TITLE; + if (preg_match('/\d\.\d/', $appli)) + { + if (! preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) $appli.=" (".DOL_VERSION.")"; // If new title contains a version that is different than core + } + else $appli.=" ".DOL_VERSION; + } + else $appli.=" ".DOL_VERSION; + $btnUser = '

'; - print '
'; print ''; print ''; - print ''; - - - print ''; - - - print ''; - - - print ''; - - print ''; - - print ''; - - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print '
'.$langs->trans("Day").''.$langs->trans("Value").'
'.$langs->trans("Monday").'' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '
'.$langs->trans("Tuesday").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '
'.$langs->trans("Wednesday").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '
'.$langs->trans("Thursday").''; - if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY)) - { - $code = getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 2); - $img=picto_from_langcode($code); - print $img?$img.' ':''; - print getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 1); - } - print '
'.$langs->trans("Friday").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code) . '
'.$langs->trans("Saturday").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code) . '
'.$langs->trans("Sunday").'' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80) . '
'.$langs->trans("Monday").'' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_MONDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_MONDAY) . '
'.$langs->trans("Tuesday").'' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY) . '
'.$langs->trans("Wednesday").'' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY) . '
'.$langs->trans("Thursday").'' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY) . '
'.$langs->trans("Friday").'' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY) . '
'.$langs->trans("Saturday").'' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY) . '
'.$langs->trans("Sunday").'' . (empty($conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY)?'':$conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY) . '
'; print "
"; From eb4dc36e055b4f73f390776613135b567e725017 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 12 Jun 2019 04:56:16 +0200 Subject: [PATCH 08/13] Responsive on invoice index --- htdocs/compta/index.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index c872fae3def..cc077ed55e1 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -351,6 +351,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $num = $db->num_rows($resql); $i = 0; + print '
'; print ''; print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; @@ -428,7 +429,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; } - print '
'.$langs->trans("BoxTitleLastCustomerBills", $max).''.$langs->trans("AmountHT").'
'.$langs->trans("NoInvoice").'

'; + print '

'; $db->free($resql); } else @@ -472,6 +473,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- { $num = $db->num_rows($resql); + print '
'; print ''; print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; @@ -524,7 +526,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; } - print '
'.$langs->trans("BoxTitleLastSupplierBills", $max).''.$langs->trans("AmountHT").'
'.$langs->trans("NoInvoice").'

'; + print '

'; } else { @@ -561,6 +563,7 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire) $i = 0; + print '
'; print ''; print ''; print ''; @@ -600,7 +603,7 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire) { print ''; } - print '
'.$langs->trans("BoxTitleLastModifiedDonations", $max).'
'.$langs->trans("None").'

'; + print '

'; } else dol_print_error($db); } @@ -634,6 +637,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) { $num = $db->num_rows($resql); + print '
'; print ''; print ''; print ''; @@ -676,7 +680,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) { print ''; } - print "
'.$langs->trans("ContributionsToPay").($num?' '.$num.'':'').'
'.$langs->trans("None").'

"; + print "

"; $db->free($resql); } else @@ -726,6 +730,8 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us if ($num) { $i = 0; + + print '
'; print ''; print ""; print ''; @@ -795,7 +801,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us print ''; print ''; print ''; - print '
'.$langs->trans("OrdersDeliveredToBill").' '.$num.''.price($tot_tobill).' 

'; + print '

'; } $db->free($resql); } @@ -1053,6 +1059,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $resql = 0; if ($resql) { + print '
'; print ''; print ''.$langs->trans("TasksToDo").''; print "\n"; @@ -1067,7 +1074,7 @@ if ($resql) $i++; } $db->free($resql); - print "

"; + print "

"; } From 420f3bbdabfa80206058a8a5c5c707ad58ba091b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Jun 2019 10:05:53 +0200 Subject: [PATCH 09/13] FIX #11316 --- htdocs/core/modules/modProjet.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index dcfef83f8e3..54cd897102e 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -247,8 +247,8 @@ class modProjet extends DolibarrModules $keyforselect='projet'; $keyforelement='project'; $keyforaliasextra='extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; // Add fields for tasks - $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('pt.rowid'=>'RefTask','pt.label'=>'LabelTask','pt.dateo'=>"TaskDateStart",'pt.datee'=>"TaskDateEnd",'pt.duration_effective'=>"DurationEffective",'pt.planned_workload'=>"PlannedWorkload",'pt.progress'=>"Progress",'pt.description'=>"TaskDescription")); - $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('pt.rowid'=>'projecttask','pt.label'=>'projecttask','pt.dateo'=>"projecttask",'pt.datee'=>"projecttask",'pt.duration_effective'=>"projecttask",'pt.planned_workload'=>"projecttask",'pt.progress'=>"projecttask",'pt.description'=>"projecttask")); + $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('pt.rowid'=>'TaskId', 'pt.ref'=>'RefTask', 'pt.label'=>'LabelTask','pt.dateo'=>"TaskDateStart",'pt.datee'=>"TaskDateEnd",'pt.duration_effective'=>"DurationEffective",'pt.planned_workload'=>"PlannedWorkload",'pt.progress'=>"Progress",'pt.description'=>"TaskDescription")); + $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('pt.rowid'=>'projecttask', 'pt.ref'=>'projecttask', 'pt.label'=>'projecttask','pt.dateo'=>"projecttask",'pt.datee'=>"projecttask",'pt.duration_effective'=>"projecttask",'pt.planned_workload'=>"projecttask",'pt.progress'=>"projecttask",'pt.description'=>"projecttask")); // Add extra fields for task $keyforselect='projet_task'; $keyforelement='projecttask'; $keyforaliasextra='extra2'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; From 91a4e8bc0a79d0a94cb32a8010fe2f2958ab1213 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Jun 2019 12:09:56 +0200 Subject: [PATCH 10/13] Merge --- htdocs/core/modules/modProjet.class.php | 6 +++--- htdocs/langs/en_US/projects.lang | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 5d2ed5126af..106517c638a 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -220,7 +220,7 @@ class modProjet extends DolibarrModules $this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom::thirdparty",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_country:label', 's.phone'=>'Text','s.email'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text', 'p.rowid'=>"List:projet:ref::project",'p.ref'=>"Text",'p.title'=>"Text",'p.datec'=>"Date",'p.dateo'=>"Date",'p.datee'=>"Date",'p.fk_statut'=>'Status','cls.code'=>"Text",'p.opp_percent'=>'Numeric','p.opp_amount'=>'Numeric','p.description'=>"Text",'p.entity'=>'Numeric', - 'pt.rowid'=>'Text','pt.label'=>'Text','pt.dateo'=>"Date",'pt.datee'=>"Date",'pt.duration_effective'=>"Duree",'pt.planned_workload'=>"Numeric",'pt.progress'=>"Numeric",'pt.description'=>"Text", + 'pt.rowid'=>'Numeric','pt.ref'=>'Text','pt.label'=>'Text','pt.dateo'=>"Date",'pt.datee'=>"Date",'pt.duration_effective'=>"Duree",'pt.planned_workload'=>"Numeric",'pt.progress'=>"Numeric",'pt.description'=>"Text", 'ptt.rowid'=>'Numeric','ptt.task_date'=>'Date','ptt.task_duration'=>"Duree",'ptt.fk_user'=>"List:user:CONCAT(lastname,' ',firstname)",'ptt.note'=>"Text"); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company', 's.phone'=>'company','s.email'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company'); @@ -247,8 +247,8 @@ class modProjet extends DolibarrModules $keyforselect='projet'; $keyforelement='project'; $keyforaliasextra='extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; // Add fields for tasks - $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('pt.rowid'=>'TaskId', 'pt.ref'=>'RefTask', 'pt.label'=>'LabelTask','pt.dateo'=>"TaskDateStart",'pt.datee'=>"TaskDateEnd",'pt.duration_effective'=>"DurationEffective",'pt.planned_workload'=>"PlannedWorkload",'pt.progress'=>"Progress",'pt.description'=>"TaskDescription")); - $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('pt.rowid'=>'projecttask', 'pt.ref'=>'projecttask', 'pt.label'=>'projecttask','pt.dateo'=>"projecttask",'pt.datee'=>"projecttask",'pt.duration_effective'=>"projecttask",'pt.planned_workload'=>"projecttask",'pt.progress'=>"projecttask",'pt.description'=>"projecttask")); + $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('pt.rowid'=>'TaskId', 'pt.ref'=>'RefTask', 'pt.label'=>'LabelTask', 'pt.dateo'=>"TaskDateStart", 'pt.datee'=>"TaskDateEnd", 'pt.duration_effective'=>"DurationEffective", 'pt.planned_workload'=>"PlannedWorkload", 'pt.progress'=>"Progress", 'pt.description'=>"TaskDescription")); + $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('pt.rowid'=>'projecttask', 'pt.ref'=>'projecttask', 'pt.label'=>'projecttask', 'pt.dateo'=>"projecttask", 'pt.datee'=>"projecttask", 'pt.duration_effective'=>"projecttask", 'pt.planned_workload'=>"projecttask", 'pt.progress'=>"projecttask", 'pt.description'=>"projecttask")); // Add extra fields for task $keyforselect='projet_task'; $keyforelement='projecttask'; $keyforaliasextra='extra2'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index fbc43d6e990..ca9a1e2452f 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -45,8 +45,9 @@ TimeSpent=Time spent TimeSpentByYou=Time spent by you TimeSpentByUser=Time spent by user TimesSpent=Time spent -RefTask=Ref. task -LabelTask=Label task +TaskId=Task ID +RefTask=Task ref. +LabelTask=Task label TaskTimeSpent=Time spent on tasks TaskTimeUser=User TaskTimeNote=Note From 5554bd231f697c664b2221abaae92df4b842ae48 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Jun 2019 12:11:06 +0200 Subject: [PATCH 11/13] Update openinghours.php --- htdocs/admin/openinghours.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/openinghours.php b/htdocs/admin/openinghours.php index 435b99bc7f1..b68508f557a 100644 --- a/htdocs/admin/openinghours.php +++ b/htdocs/admin/openinghours.php @@ -17,7 +17,7 @@ /** * \file htdocs/admin/openinghours.php - * \ingroup Opening hours + * \ingroup core * \brief Setup page to configure opening hours */ From 44f383c8b976537de95d045dd802725671365bfa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Jun 2019 13:57:34 +0200 Subject: [PATCH 12/13] Fix data lost when creation in error --- htdocs/accountancy/bookkeeping/card.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index d94ce0ec315..ca0476f3a3c 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -373,7 +373,7 @@ if ($action == 'create') print ''; print '' . $langs->trans("Piece") . ''; - print ''; + print ''; print ''; /* @@ -615,23 +615,23 @@ if ($action == 'create') if ($action == 'update' && $line->id == $id) { print ''; - print $formaccounting->select_account($line->numero_compte, 'accountingaccount_number', 1, array (), 1, 1, ''); + print $formaccounting->select_account((GETPOSTISSET("accountingaccount_number") ? GETPOST("accountingaccount_number", "alpha") : $line->numero_compte), 'accountingaccount_number', 1, array (), 1, 1, ''); print ''; print ''; // TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not // use setup of keypress to select thirdparty and this hang browser on large database. if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { - print $formaccounting->select_auxaccount($line->subledger_account, 'subledger_account', 1); + print $formaccounting->select_auxaccount((GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account), 'subledger_account', 1); } else { - print ''; + print 'subledger_account).'">'; } print ''; - print ''; - print ''; - print ''; + print 'label_operation). '">'; + print 'debit)) . '">'; + print 'credit)) . '">'; print ''; print '' . "\n"; print ''; @@ -672,21 +672,21 @@ if ($action == 'create') if ($action == "" || $action == 'add') { print ''; print ''; - print $formaccounting->select_account($accountingaccount_number, 'accountingaccount_number', 1, array (), 1, 1, ''); + print $formaccounting->select_account('', 'accountingaccount_number', 1, array (), 1, 1, ''); print ''; print ''; // TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not // use setup of keypress to select thirdparty and this hang browser on large database. if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { - print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1); + print $formaccounting->select_auxaccount('', 'subledger_account', 1); } else { print ''; } print ''; - print ''; + print ''; print ''; print ''; print ''; From bf6f9dd7eae4d8904c13717c8bccef7166b2db53 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Jun 2019 13:58:48 +0200 Subject: [PATCH 13/13] Fix phpcs --- htdocs/admin/multicurrency.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 3b071f57fa8..206c251309e 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -46,7 +46,7 @@ $action = GETPOST('action', 'alpha'); */ -if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) +if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code=$reg[1]; $value=GETPOST($code, 'alpha'); @@ -60,7 +60,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) } } -if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) +if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, 0) > 0)