From d7614af96e13b63d5c5feed677a7a8c13ab3973c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 14 Feb 2017 06:45:12 +0100 Subject: [PATCH 1/9] Fix : Link to loan admin isn't required, already support by page default account --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index b60845c60af..5fee069ef72 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -956,11 +956,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { if (preg_match('/accountancy_admin/',$leftmenu)) $newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"),2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 30); } + /* not required yet, already supported by default account if (! empty($conf->loan->enabled)) { if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/',$leftmenu)) $newmenu->add("/admin/loan.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuLoanAccounts"), 2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_loan', 45); } - /* not required yet, already supported by default account if (! empty($conf->don->enabled)) { if (preg_match('/accountancy_admin/',$leftmenu)) $newmenu->add("/don/admin/donation.php?from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDonationAccounts"), 2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_donation', 47); From 66ff7fab3486234e420ddf44ec96695e208d4318 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 14 Feb 2017 06:50:57 +0100 Subject: [PATCH 2/9] Remove one step in accountancy index --- htdocs/accountancy/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 3a9dde2811b..54772ebf1a4 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -114,14 +114,14 @@ if (! empty($conf->expensereport->enabled)) // TODO Move this in the default ac print "
\n"; print "
\n"; } -if (! empty($conf->loan->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several. +/* +if (! empty($conf->loan->enabled)) { $step++; print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, ''.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").'-'.$langs->transnoentitiesnoconv("Loans").' '.$langs->transnoentitiesnoconv("or").' '.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); print "
\n"; print "
\n"; } -/* if (! empty($conf->don->enabled)) { $step++; From d9f32f7ae132b118868cb3c7dfeb07ad7c81b8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Wed, 15 Feb 2017 13:18:24 +0100 Subject: [PATCH 3/9] Fix: [Multicurrency] properly display API error --- htdocs/admin/multicurrency.php | 4 ++-- htdocs/langs/en_US/multicurrency.lang | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index de3c2f3965a..b03872a8fbd 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -131,7 +131,7 @@ elseif ($action == 'synchronize') } else { - setEventMessages($langs->trans('multicurrency_syncronize_error', $reponse->error->info), null, 'errors'); + setEventMessages($langs->trans('multicurrency_syncronize_error', $response->error->info), null, 'errors'); } } @@ -377,4 +377,4 @@ print ' llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/langs/en_US/multicurrency.lang b/htdocs/langs/en_US/multicurrency.lang index 805356a2e46..222583c5516 100644 --- a/htdocs/langs/en_US/multicurrency.lang +++ b/htdocs/langs/en_US/multicurrency.lang @@ -3,7 +3,7 @@ MultiCurrency=Multi currency ErrorAddRateFail=Error in added rate ErrorAddCurrencyFail=Error in added currency ErrorDeleteCurrencyFail=Error delete fail -multicurrency_syncronize_error=Error in synchronization +multicurrency_syncronize_error=Synchronisation error: %s multicurrency_useOriginTx=When an object is created from another, keep the original rate of source object (otherwise use the new known rate) CurrencyLayerAccount=CurrencyLayer API CurrencyLayerAccount_help_to_synchronize=You sould create an account on their website to use this functionnality
Get your API key
If you use a free account you can't change the currency source (USD by default)
But if your main currency isn't USD you can use the alternate currency source to force you main currency

You are limited at 1000 synchronizations per month @@ -15,4 +15,4 @@ CurrenciesUsed_help_to_add=Add the differents currencies and rates you need to u rate=rate MulticurrencyReceived=Received, original currency MulticurrencyRemainderToTake=Remaining amout, original currency -MulticurrencyPaymentAmount=Payment amount, original currency \ No newline at end of file +MulticurrencyPaymentAmount=Payment amount, original currency From 979a5e70bf105a4894c07f0b89de0c3227ee0b1c Mon Sep 17 00:00:00 2001 From: De Coninck Laurent Date: Thu, 16 Feb 2017 07:51:46 +0100 Subject: [PATCH 4/9] allow the drag and drop of an event only for allowed users The drag and drop of the event didn't take into account the user rights. --- htdocs/comm/action/index.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index f63bbd7ab79..f8b50fb588a 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1328,7 +1328,16 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $cssclass.= " unmovable"; } } - else $cssclass.= " movable"; + else{ + if ($user->rights->agenda->allactions->create || + (($event->authorid == $user->id || $event->userownerid == $user->id) && $user->rights->agenda->myactions->create)) + { + $cssclass.= " movable"; + }else{ + $cssclass.= " unmovable"; + } + + } $h=''; $nowrapontd=1; if ($action == 'show_day') { $h='height: 100%; '; $nowrapontd=0; } From fd6c4fd4d0704a74a47cdf893670b49b38d953d6 Mon Sep 17 00:00:00 2001 From: De Coninck Laurent Date: Thu, 16 Feb 2017 09:26:18 +0100 Subject: [PATCH 5/9] fix the enabling of a dependency module already ON If a depency module is already activated and we try to activate the parent, we got an error because the entry is already existing in the database. --- htdocs/core/lib/admin.lib.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 8b5bb4839a2..288082296f3 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -763,6 +763,11 @@ function activateModule($value,$withdeps=1) return $ret; } + $const_name = $objMod->const_name; + if(!empty($conf->global->$const_name)){ + return $ret; + } + $result=$objMod->init(); if ($result <= 0) { @@ -784,7 +789,13 @@ function activateModule($value,$withdeps=1) if (file_exists($dir.$objMod->depends[$i].".class.php")) { $resarray = activateModule($objMod->depends[$i]); - if (empty($resarray['errors'])) $activate = true; + if (empty($resarray['errors'])){ + $activate = true; + }else{ + foreach ($resarray['errors'] as $errorMessage){ + dol_syslog($errorMessage, LOG_ERR); + } + } break; } } From beaa56306c2a471d1d42f9adcb67d83d9fe41327 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Feb 2017 10:06:49 +0100 Subject: [PATCH 6/9] Add united arab emirates to states. --- htdocs/install/mysql/data/llx_00_c_country.sql | 2 +- htdocs/install/mysql/data/llx_10_c_regions.sql | 5 ++++- .../install/mysql/data/llx_20_c_departements.sql | 14 +++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql index fc4a7753175..45cf8622355 100644 --- a/htdocs/install/mysql/data/llx_00_c_country.sql +++ b/htdocs/install/mysql/data/llx_00_c_country.sql @@ -254,7 +254,7 @@ INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (22 INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (224,'TV','TUV','Tuvalu',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (225,'UG','UGA','Ouganda',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (226,'UA','UKR','Ukraine',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (227,'AE','ARE','Émirats arabes unis',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (227,'AE','ARE','United Arab Emirates',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (228,'UM','UMI','Iles mineures éloignées des États-Unis',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (229,'UY','URY','Uruguay',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (230,'UZ','UZB','Ouzbékistan',1,0); diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index 62b474533f4..f997971d26d 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -323,4 +323,7 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18126, '', 0, 'Ucayali', 1); -- Regions Panama (id country=178) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 178, 17801, '', 0, 'Panama', 1); \ No newline at end of file +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 178, 17801, '', 0, 'Panama', 1); + +-- Regions Panama (id country=227) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 227, 22701, '', 0, 'United Arab Emirates', 1); diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index 066bbb9fd6e..b0f90bd96d5 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -1491,4 +1491,16 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-7', 17801, '', 0, '', 'Los Santos', 1); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-8', 17801, '', 0, '', 'Panamá', 1); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-9', 17801, '', 0, '', 'Veraguas', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-13', 17801, '', 0, '', 'Panamá Oeste', 1); \ No newline at end of file +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-13', 17801, '', 0, '', 'Panamá Oeste', 1); + +-- Provinces United Arab Emirates (id country=227) +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-1', 22701, '', 0, '', 'Abu Dhabi', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-2', 22701, '', 0, '', 'Dubai', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-3', 22701, '', 0, '', 'Ajman', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-4', 22701, '', 0, '', 'Fujairah', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-5', 22701, '', 0, '', 'Ras al-Khaimah', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-6', 22701, '', 0, '', 'Sharjah', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-7', 22701, '', 0, '', 'Umm al-Quwain', 1); + + + From 2083d886095d1879edb801c19352395b0b5515a5 Mon Sep 17 00:00:00 2001 From: a-schild Date: Mon, 13 Feb 2017 09:33:01 +0100 Subject: [PATCH 7/9] Use correct numeric format for all soldes --- htdocs/accountancy/bookkeeping/balance.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 15345a99b72..bb7d049f08e 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -255,9 +255,9 @@ else { print '' . length_accountg($line->numero_compte) . ''; print '' . $description . ''; - print '' . number_format($line->debit, 2, ',', ' ') . ''; - print '' . number_format($line->credit, 2, ',', ' ') . ''; - print '' . number_format($line->credit - $line->debit, 2, ',', ' ') . ''; + print '' . price($line->debit, 2, ',', ' ') . ''; + print '' . price($line->credit, 2, ',', ' ') . ''; + print '' . price($line->credit - $line->debit, 2, ',', ' ') . ''; print '' . $link; print ''; print "\n"; From cea25ecb28f90817cde56da601fe688e4f9d27fd Mon Sep 17 00:00:00 2001 From: a-schild Date: Mon, 13 Feb 2017 09:34:35 +0100 Subject: [PATCH 8/9] Use correct numeric format for all soldes --- htdocs/accountancy/bookkeeping/balance.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index bb7d049f08e..53eaaba7c9c 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -255,9 +255,9 @@ else { print '' . length_accountg($line->numero_compte) . ''; print '' . $description . ''; - print '' . price($line->debit, 2, ',', ' ') . ''; - print '' . price($line->credit, 2, ',', ' ') . ''; - print '' . price($line->credit - $line->debit, 2, ',', ' ') . ''; + print '' . price($line->debit) . ''; + print '' . price($line->credit) . ''; + print '' . price($line->credit - $line->debit) . ''; print '' . $link; print ''; print "\n"; From a91d57037e13865d85bb6c6ab9513c25365b6714 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Feb 2017 13:09:28 +0100 Subject: [PATCH 9/9] FIX #6433 --- htdocs/core/class/html.formmail.class.php | 4 ++-- htdocs/langs/en_US/main.lang | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 013b34699d7..231ff16c6af 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -328,7 +328,7 @@ class FormMail extends Form $out.= $langs->trans('SelectMailModel').': '.$this->selectarray('modelmailselected', $modelmail_array, 0, 1); if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); $out.= '   '; - $out.= ''; + $out.= ''; $out.= '   '; $out.= ''; } @@ -342,7 +342,7 @@ class FormMail extends Form $out.= $langs->trans('SelectMailModel').': '; // Do not put disabled on option, it is already on select and it makes chrome crazy. if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); $out.= '   '; - $out.= ''; + $out.= ''; $out.= '   '; $out.= ''; } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 8f1a5d9bb75..acda41d2bb3 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -69,6 +69,7 @@ SetDate=Set date SelectDate=Select a date SeeAlso=See also %s SeeHere=See here +Apply=Apply BackgroundColorByDefault=Default background color FileRenamed=The file was successfully renamed FileUploaded=The file was successfully uploaded