diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 15345a99b72..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 '' . number_format($line->debit, 2, ',', ' ') . ''; - print '' . number_format($line->credit, 2, ',', ' ') . ''; - print '' . number_format($line->credit - $line->debit, 2, ',', ' ') . ''; + print '' . price($line->debit) . ''; + print '' . price($line->credit) . ''; + print '' . price($line->credit - $line->debit) . ''; print '' . $link; print ''; print "\n"; 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++; diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index f280b7c1735..5b86bcdc1c3 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 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; } diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index a85b8157732..fafbfaa197d 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.= ''; + $out.= ''; $out.= '   '; $out.= ''; } @@ -343,7 +343,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/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; } } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index e16e6601940..f07ca770180 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 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); + + + diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 106b0a9f240..338f9fca3dc 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 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