diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 15345a99b72a3178e95456feef862d1aaa084488..53eaaba7c9c899b6483827e2aea683c1cfd73d76 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -255,9 +255,9 @@ else { print '<td>' . length_accountg($line->numero_compte) . '</td>'; print '<td>' . $description . '</td>'; - print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>'; - print '<td align="right">' . number_format($line->credit, 2, ',', ' ') . '</td>'; - print '<td align="right">' . number_format($line->credit - $line->debit, 2, ',', ' ') . '</td>'; + print '<td align="right">' . price($line->debit) . '</td>'; + print '<td align="right">' . price($line->credit) . '</td>'; + print '<td align="right">' . price($line->credit - $line->debit) . '</td>'; print '<td align="center">' . $link; print '</td>'; print "</tr>\n"; diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 3a9dde2811b0cfc9ec1d5d306333befcff352d5d..54772ebf1a4ec97f3357de0767f8f8e582f6d606 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 "<br>\n"; print "<br>\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, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").'-'.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>'); print "<br>\n"; print "<br>\n"; } -/* if (! empty($conf->don->enabled)) { $step++; diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index f280b7c17352393ad377d1e5e6304345d9af572e..5b86bcdc1c3cb7171e2d1613fcc82865f544d287 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'); } } @@ -376,4 +376,4 @@ print ' llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index f63bbd7ab79dd60de7d65f47ba5d1d22b0384c40..f8b50fb588a93f2e42cffe9eded1cf70c7ef71f4 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; } diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index a85b8157732047fb02ecc5ca1b31ef311dce162b..fafbfaa197dce5e86940ec3b8b4c0e0c84855739 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -329,7 +329,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.= '<input class="button" type="submit" value="'.$langs->trans('Use').'" name="modelselected" id="modelselected">'; + $out.= '<input class="button" type="submit" value="'.$langs->trans('Apply').'" name="modelselected" id="modelselected">'; $out.= ' '; $out.= '</div>'; } @@ -343,7 +343,7 @@ class FormMail extends Form $out.= $langs->trans('SelectMailModel').': <select name="modelmailselected" disabled="disabled"><option value="none">'.$langs->trans("NoTemplateDefined").'</option></select>'; // 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.= '<input class="button" type="submit" value="'.$langs->trans('Use').'" name="modelselected" disabled="disabled" id="modelselected">'; + $out.= '<input class="button" type="submit" value="'.$langs->trans('Apply').'" name="modelselected" disabled="disabled" id="modelselected">'; $out.= ' '; $out.= '</div>'; } diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 8b5bb4839a2da40c7b6d24ccadd03553e27d7e23..288082296f3e7e1b8eb4f7e02b23bea30d7a01b2 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; } } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index e16e66019405484ac322d58ceb71581d6d3d67f4..f07ca770180d936a0919ca7876174cb6a338236b 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -958,11 +958,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); diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql index fc4a7753175f9f5c770011b42a83091f8c79c3c9..45cf86223555158ebf709e051cd862075936ffbd 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 62b474533f49c877fb420f3adaffb65f696d6e13..f997971d26d4e60e72a46951c978aace77bf879a 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 066bbb9fd6e5df1883354e4d49adf6966e5bf902..b0f90bd96d5a33a2fe88ba85b1bc6dd9df006d7f 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); + + + diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 106b0a9f2401d62cc444b7d4d5181bcc07a59b76..338f9fca3dcd392a98de3aa50605946f6f0de57a 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 diff --git a/htdocs/langs/en_US/multicurrency.lang b/htdocs/langs/en_US/multicurrency.lang index 805356a2e46d87ac2e56e0a11e8219a5ecacd296..222583c55161bcad441ddf25ef254e8233c135c5 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<br />Get your <b>API key</b><br />If you use a free account you can't change the <b>currency source</b> (USD by default)<br />But if your main currency isn't USD you can use the <b>alternate currency source</b> to force you main currency<br /><br />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