diff --git a/README.md b/README.md index ac8f1d06382..139bdc00b6a 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ You can freely use, study, modify or distribute it according to its licence. You can use it as a standalone application or as a web application to access it from the Internet or a LAN. -Dolibarr has a large community ready to help you, free forums and [oficially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org) +Dolibarr has a large community ready to help you, free forums and [officially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org) ![ScreenShot](https://www.dolibarr.org/medias/dolibarr_screenshot1_1920x1080.jpg) @@ -45,7 +45,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr. #### Generic install steps: -- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Versions). +- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases). - Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later): @@ -90,6 +90,7 @@ Dolibarr supports upgrading usually wihtout the need for any (commercial) suppor See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file. + ## FEATURES ### Main application/modules (all optional) @@ -162,8 +163,8 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) ### System Environment / Requirements -- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite)) -- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. +- Works with PHP 5.6+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite)) +- Compatible with all Cloud solutions that match PHP & MySQL or PostgreSQL prerequisites. ### Extending diff --git a/dev/resources/iso-normes/company_ids.txt b/dev/resources/iso-normes/company_ids.txt new file mode 100644 index 00000000000..69c2af1d665 --- /dev/null +++ b/dev/resources/iso-normes/company_ids.txt @@ -0,0 +1,2 @@ +Spain https://incwell.eu/en/company-formation-spain/ +France https://www.economie.gouv.fr/entreprises/numeros-identification-entreprise diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index b4f90f19675..e2142f4fee8 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -255,7 +255,7 @@ if ($action == 'create') { print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; @@ -317,7 +317,7 @@ if ($action == 'create') { print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index aa10c0101c1..7f2038b57de 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -190,7 +190,7 @@ if ($action == 'create') print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; @@ -241,7 +241,7 @@ if ($action == 'create') print ''; print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index e09f6ec14cf..2f92cd5842e 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -405,7 +405,7 @@ if ($result) $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - $buttonsave = ''; + $buttonsave = ''; //print '
'.$buttonsave.'
'; $texte = $langs->trans("ListOfProductsServices"); diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index ebf397c2dfd..af8d26bb374 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -460,7 +460,7 @@ class AccountingAccount extends CommonObject $result = ''; - $url = ''; + $url = ''; $labelurl = ''; if (empty($option) || $option == 'ledger') { $url = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode($this->account_number).'&search_accountancy_code_end='.urlencode($this->account_number); $labelurl = $langs->trans("ShowAccountingAccountInLedger"); @@ -617,16 +617,13 @@ class AccountingAccount extends CommonObject // phpcs:enable $this->db->begin(); - if ($mode == 0) - { - $fieldtouse = 'active'; - } elseif ($mode == 1) - { + $fieldtouse = 'active'; + if ($mode == 1) { $fieldtouse = 'reconcilable'; } - $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_account "; - $sql .= "SET ".$fieldtouse." = '1'"; + $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_account"; + $sql .= " SET ".$fieldtouse." = '1'"; $sql .= " WHERE rowid = ".$this->db->escape($id); dol_syslog(get_class($this)."::account_activate ".$fieldtouse." sql=".$sql, LOG_DEBUG); diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 90f3d4c04ef..a14203916f9 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -140,7 +140,7 @@ if (!empty($id)) { print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index 67c790a9c36..4ccb2617dd6 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -149,7 +149,7 @@ if (!empty($id)) { print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index cf13302d866..12e0c7796c4 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -144,7 +144,7 @@ if (!empty($id)) { print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php index 92a4fbddd38..b3c7f59e67e 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php @@ -134,7 +134,7 @@ echo $this->control->tpl['ajax_selectcountry']; - ">  + ">  "> diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index fe6f27ef8b6..9a122ee6c09 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1235,7 +1235,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index c97c502abaf..09c9d3c752c 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -236,7 +236,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') { print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '       '; print ''; print '
'; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index fc1d7ecb1d9..6607d952dd0 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -765,7 +765,7 @@ if ($rowid > 0) { print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php index 3aafef6f216..c425fefdb4a 100644 --- a/htdocs/adherents/type_translation.php +++ b/htdocs/adherents/type_translation.php @@ -218,7 +218,7 @@ if ($action == 'edit') { print '
'; print '
'; - print ''; + print ''; print '     '; print ''; print '
'; @@ -275,7 +275,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) { print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index cbf9fdbaa50..38d4eff2d3e 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -170,7 +170,7 @@ print ''; print ''; print '
'; -print ''; +print ''; //print '     '; //print ''; print '
'; diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index 1f4236df666..b1cc1d7619b 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -200,7 +200,7 @@ print ''; print dol_get_fiche_end(); print '
'; -print ''; +print ''; print "
"; print "\n"; diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 3cf0d49b960..7fbd139072d 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -227,7 +227,7 @@ print ''; print dol_get_fiche_end(); print '
'; -print ''; +print ''; print '
'; print "\n"; diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index c390796a55b..2ffbf15d7ce 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -378,7 +378,7 @@ print ''; print dol_get_fiche_end(); -print '
'; +print '
'; print ''; diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index e34536e648a..9da8f89310a 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -25,6 +25,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; +require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php'; if (!$user->admin) accessforbidden(); @@ -179,59 +180,75 @@ print ' '."\n"; print ''.$langs->trans("Value").''."\n"; print ''."\n"; +// AGENDA REMINDER BROWSER +print ''."\n"; +print ''.$langs->trans('AGENDA_REMINDER_BROWSER').''."\n"; +print ' '."\n"; +print ''."\n"; + +if (empty($conf->global->AGENDA_REMINDER_BROWSER)) { + print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; + print ''."\n"; +} else { + print ''.img_picto($langs->trans('Enabled'), 'switch_on').''; + print ''."\n"; + + print ''."\n"; + print ''.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').''."\n"; + print ' '."\n"; + print ''."\n"; + + if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) { + print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; + } else { + print ''.img_picto($langs->trans('Enabled'), 'switch_on').''; + } + + print ''."\n"; +} + +$job = new Cronjob($db); +$job->fetch(0, 'ActionComm', 'sendEmailsReminder'); // AGENDA REMINDER EMAIL -if ($conf->global->MAIN_FEATURES_LEVEL == 2) -{ - print ''."\n"; - print ''.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).''."\n"; - print ' '."\n"; - print ''."\n"; +print ''."\n"; +print ''.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")); +if (!empty($conf->cron->enabled)) { + if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) { + if ($job->id > 0) { + if ($job->status == $job::STATUS_ENABLED) { + print '
'.$langs->trans("AGENDA_REMINDER_EMAIL_NOTE", $langs->transnoentitiesnoconv("sendEmailsReminder")).''; + } + } + } +} +print ''."\n"; +print ' '."\n"; +print ''."\n"; +if (empty($conf->cron->enabled)) { + print ''.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module2300Name")).''; +} else { if (empty($conf->global->AGENDA_REMINDER_EMAIL)) { print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; - print ''."\n"; } else { - print ''.img_picto($langs->trans('Enabled'), 'switch_on').''; - print ''."\n"; - } -} - -// AGENDA REMINDER BROWSER -if ($conf->global->MAIN_FEATURES_LEVEL == 2) -{ - print ''."\n"; - print ''.$langs->trans('AGENDA_REMINDER_BROWSER').''."\n"; - print ' '."\n"; - print ''."\n"; - - if (empty($conf->global->AGENDA_REMINDER_BROWSER)) { - print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; - print ''."\n"; - } else { - print ''.img_picto($langs->trans('Enabled'), 'switch_on').''; - print ''."\n"; - - print ''."\n"; - print ''.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').''."\n"; - print ' '."\n"; - print ''."\n"; - - if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) { - print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; - } else { - print ''.img_picto($langs->trans('Enabled'), 'switch_on').''; + // Get the max frequency of reminder + if ($job->id > 0) { + if ($job->status != $job::STATUS_ENABLED) { + print ''.$langs->trans("JobXMustBeEnabled", $langs->transnoentitiesnoconv("sendEmailsReminder")).''; + } else { + print ''.img_picto($langs->trans('Enabled'), 'switch_on').''; + } } - - print ''."\n"; } } +print ''."\n"; print ''; print dol_get_fiche_end(); -//print '
'; +//print '
'; print ''; diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index 61116a0f18f..6d77b9f4416 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -138,7 +138,7 @@ print ''; print dol_get_fiche_end(); print '
'; -print "trans("Save")."\">"; +print ''; print "
"; print "\n"; diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index c8157a40d81..88babe27385 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -498,7 +498,7 @@ print ''; print dol_get_fiche_end(); print '
'; -print ''; +print ''; print '
'; print "\n"; diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 0e7a23ae679..6ff8a988899 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -282,7 +282,7 @@ print "\n"; if (empty($conf->use_javascript_ajax)) { - print '
'; + print '
'; print ''; } diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 31723888e44..19450905c23 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -474,7 +474,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL == 2 || !empty($conf->global->MAIN_ACTIVA print ''; print '
'; -print '
'; +print '
'; print '
'; print ''; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 2705ede5540..8b900f552c8 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -834,7 +834,7 @@ print ""; print '
'; -print ''; +print ''; print '
'; print ''; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index d70a9740232..bfdff79cc1f 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -483,7 +483,7 @@ print ''; print ''; print '
'; -print ''; +print ''; print '
'; print ''; diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index c47306f975b..8f005c0f0d7 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -108,7 +108,7 @@ if ($action == 'edit') print ''; print '
'; - print ''; + print ''; print '
'; print ''; @@ -151,7 +151,7 @@ if ($action == 'edit') print dol_get_fiche_end(); /*print '
'; -print "trans("Save")."\">"; +print ''; print "
"; */ print "\n"; diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 673cc16a02e..5ff7f022ba4 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -432,7 +432,7 @@ if ($conf->global->MAIN_DISABLE_METEO != 1) { if ($action == 'edit') { - print '
'; + print '
'; print '
'; } else { print '
'; diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index f0544e1e914..35c24a15dac 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -297,7 +297,7 @@ if (($id || $ref) && $action == 'edit') print dol_get_fiche_end(); - print '
'; + print '
'; print '   '; print '
'; @@ -614,7 +614,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea { print '
'; print '
'; - print ' '; + print ''; + print ''; } else { print $ruleaction['actionparam']; } diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index 7af8d547a0c..66099eb3a30 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -128,7 +128,7 @@ print ''; print dol_get_fiche_end(); print '
'; -print "trans("Save")."\">"; +print ''; print '
'; print "\n"; diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 3de7ff55c5f..f572226c379 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -475,7 +475,7 @@ print ''."\n"; print ''; print '
'; -print ''; +print ''; print '
'; print ''; diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php index 31966cdb585..364297712e7 100644 --- a/htdocs/admin/facture_situation.php +++ b/htdocs/admin/facture_situation.php @@ -155,7 +155,7 @@ function _updateBtn() { global $langs; print '
'; - print ''; + print ''; print '
'; } diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 8f4ea7ec9c4..bc6b0dc33ac 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -211,7 +211,7 @@ if (empty($conf->use_javascript_ajax)) print $conf->global->FCKEDITOR_TEST; print '
'; } - print '
'."\n"; + print '
'."\n"; print '
'; print ''."\n"; diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index 44b7034064b..be09a062703 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -494,7 +494,7 @@ print '
'; print '
'; -print ''; +print ''; print '
'; print ''; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 4fd8963344d..42da694b2e6 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -249,7 +249,7 @@ print ''; // Default language print ''.$langs->trans("DefaultLanguage").''; print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2); -print ''; +print ''; print ''; print ' '; print ''; @@ -443,7 +443,7 @@ print ''; print '
'; print '
'; -print ''; +print ''; print '
'; print ''; diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index ce918583d96..43c4cc84776 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -165,7 +165,7 @@ if ($action == 'edit') print '
'; print '
'; - print ''; + print ''; print '
'; print '
'; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 9292f387673..524d7249963 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -509,7 +509,7 @@ if ($action == 'edit') print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 6a42e14bff6..353ce632e91 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -387,7 +387,7 @@ if ($action == 'edit') print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index d9540d30995..ccaf48f3227 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -381,7 +381,7 @@ if ($action != 'create') { print ''; print '
'; print '
'; - print ''; + print ''; print '   '; print ''; print '
'; @@ -414,7 +414,7 @@ if ($action != 'create') { print ''; print '
'; print '
'; - print ''; + print ''; print '   '; print ''; print '
'; diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index dda9d0c01a8..b24bfa2c565 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -364,7 +364,7 @@ if ($action == 'edit') print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 9bdc497c776..707cc776c6d 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -209,7 +209,7 @@ print ''; print dol_get_fiche_end(); print '
'; -print ''; +print ''; print '
'; print ''; diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index 70d2f4bcda6..42130485594 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -401,7 +401,7 @@ if ($action == 'create') print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; @@ -511,7 +511,7 @@ if ($action == 'create') // Bouton print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 13b1b4b3e55..bb13aa9d37a 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -203,7 +203,7 @@ print ''; print ''; print ''; -print '
'; +print '
'; print ''; @@ -292,7 +292,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { print ''; } -print '
'; +print '
'; print ''; @@ -389,7 +389,7 @@ print ''; print '
'; -print '
'; +print '
'; print ''; diff --git a/htdocs/admin/openinghours.php b/htdocs/admin/openinghours.php index 7cd803d5e69..c3cbcb3d0ae 100644 --- a/htdocs/admin/openinghours.php +++ b/htdocs/admin/openinghours.php @@ -130,7 +130,7 @@ if (empty($action) || $action == 'edit' || $action == 'updateedit') print ''; print '
'; - print ''; + print ''; print '
'; print '
'; diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index 6a419d39e53..0ea8db95aec 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -192,7 +192,7 @@ print ''; print ''; print '
'; -print '
'; +print '
'; print ''; diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 4008fad141d..44f0672a832 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -336,7 +336,7 @@ print ''; print ''; print '
'; -print ''; +print ''; print '
'; print ''; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index c16b5c30c47..97a45c77a42 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -199,7 +199,7 @@ print ''; print ''; print '
'; -print '
'; +print '
'; print ''; diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 3f66d04ca01..73db1bfa040 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -327,7 +327,7 @@ if ($mode == 'config' && $user->admin) { print ''.$printer->profileresprint.''; print ''; print ''; - print '
'; + print '
'; print ''; print ''; } else { @@ -456,7 +456,7 @@ if ($mode == 'template' && $user->admin) { print ''; print '
'; } else { - print '
'; + print '
'; } print ''; diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index d9eae8f064e..fc479522a8b 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -323,7 +323,7 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso") { print '
'; print '
'; - print ''.$langs->trans("Save").''; + print ''.$langs->trans("Save").''; print '
'; print '

'; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index e34d2ab9b7a..09faea88772 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -196,7 +196,7 @@ if ($action == 'edit') print ''; print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 6bae9666ee9..a9726bd7baf 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -225,7 +225,7 @@ print ''.$langs->trans("CurrentTimeZone").''; / $a = getServerTimeZoneInt('now'); $b = getServerTimeZoneInt('winter'); $c = getServerTimeZoneInt('summer'); -$daylight = (is_numeric($c) && is_numeric($b)) ?round($c - $b) : 'unknown'; +$daylight = round($c - $b); //print $a." ".$b." ".$c." ".$daylight; $val = ($a >= 0 ? '+' : '').$a; $val .= ' ('.($a == 'unknown' ? 'unknown' : ($a >= 0 ? '+' : '').($a * 3600)).')'; diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index e8da4a8d736..0614df0dd61 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -410,7 +410,7 @@ print ''; print ''; print '
'; -print ''; +print ''; print '
'; print ''; diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php index 121ded4f578..80f458a2b5c 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -280,7 +280,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) } if (!$conf->use_javascript_ajax) { - print ''; + print ''; print ''; } @@ -410,7 +410,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) print ''; print ''; - print '
'; + print '
'; print ''; } diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index edd5ca95026..b94d5b940c7 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -344,7 +344,7 @@ if ($mode == 'overwrite') if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) { print ''; - print ''; + print ''; print '   '; print ''; } else { diff --git a/htdocs/admin/website_options.php b/htdocs/admin/website_options.php index 738fd5bc998..8c803defb37 100644 --- a/htdocs/admin/website_options.php +++ b/htdocs/admin/website_options.php @@ -116,7 +116,7 @@ if ($action == 'edit') print ''; print '
'; - print ''; + print ''; print '
'; print ''; diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index 18cbff2ca61..b4ebb6cb30e 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -129,7 +129,7 @@ print ' '.$langs->trans("Example").': '.$langs->trans("IPListExample"); print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index 6fec16ef0a0..42a5888c537 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -82,7 +82,7 @@ if ($action == 'edit') print ''; print '
'; - print ''; + print ''; print '
'; print ''; diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 0fa78edf9ce..f4bc63f730d 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -220,7 +220,7 @@ if (($id || $ref) && $action == 'edit') print dol_get_fiche_end(); - print '
'; + print '
'; print '   '; print '
'; diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 28f2ce59df0..90fcefd5626 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -597,7 +597,7 @@ if ($rowid > 0) print dol_get_fiche_end(); - print '
'; + print '
'; print '   '; print '
'; diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 7970911d84d..d8f96ce7f6e 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -313,7 +313,7 @@ if (($id || $ref) && $action == 'edit') print dol_get_fiche_end(); - print '
'; + print '
'; print '   '; print '
'; diff --git a/htdocs/bom/tpl/objectline_edit.tpl.php b/htdocs/bom/tpl/objectline_edit.tpl.php index bcb00aed5a2..89c4d98729f 100644 --- a/htdocs/bom/tpl/objectline_edit.tpl.php +++ b/htdocs/bom/tpl/objectline_edit.tpl.php @@ -135,7 +135,7 @@ print ''; $coldisplay += $colspan; print ''; $coldisplay += $colspan; -print ''; +print ''; print '
'; print ''; print ''; diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 5f7687a3d26..f67f32fb599 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -299,7 +299,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) if ($action == 'edit') { - print '
   
'; + print '
   
'; print ''; } diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 93d287ac501..5f0e9baddf5 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -184,7 +184,7 @@ if (!empty($conf->receiptprinter->enabled)) print ''; print '
'; -print '
'; +print '
'; print "\n"; diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 660dbf9317d..cef04e7915e 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -285,7 +285,7 @@ if ($action == 'edit') print '
'; print '
'; - print ''; + print ''; print '     '; print ''; print '
'; @@ -346,7 +346,7 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service print ''; print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 0b1eba637d4..bc0a514dadb 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -117,8 +117,8 @@ $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); $TRemindTypes = array(); -if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = $langs->trans('EMail'); -if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = $langs->trans('BrowserPush'); +if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = array('label'=>$langs->trans('BrowserPush'), 'disabled'=>(empty($conf->global->AGENDA_REMINDER_BROWSER) ? 1 : 0)); +if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = array('label'=>$langs->trans('EMail'), 'disabled'=>(empty($conf->global->AGENDA_REMINDER_EMAIL) ? 1 : 0)); $TDurationTypes = array('y'=>$langs->trans('Years'), 'm'=>$langs->trans('Month'), 'w'=>$langs->trans('Weeks'), 'd'=>$langs->trans('Days'), 'h'=>$langs->trans('Hours'), 'i'=>$langs->trans('Minutes')); @@ -503,7 +503,6 @@ if (empty($reshook) && $action == 'update') $object->note_private = trim(GETPOST("note", "restricthtml")); $object->fk_element = GETPOST("fk_element", "int"); $object->elementtype = GETPOST("elementtype", "alphanohtml"); - if (!$datef && $percentage == 100) { $error++; $donotclearsession = 1; @@ -1247,12 +1246,7 @@ if ($action == 'create') //Reminder print ''.$langs->trans("ReminderTime").''; - print ''; - print ''; - - //Time Type - print ''.$langs->trans("TimeType").''; - print $form->selectTypeDuration('offsetunit', 'i'); + print ' '.$form->selectTypeDuration('offsetunit', 'i'); print ''; //Reminder Type @@ -1731,20 +1725,13 @@ if ($id > 0) print ''; - //Reminder + // Reminder print ''; - //Time Type - print ''; - - //Reminder Type + // Reminder Type $TRemindTypes = array(); - if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = $langs->trans('EMail'); - if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = $langs->trans('BrowserPush'); print ''; @@ -1752,7 +1739,7 @@ if ($id > 0) $hide = ''; if ($actionCommReminder->typeremind == 'browser') $hide = 'style="display:none;"'; - //Mail Model + // Mail Model print ''; @@ -1785,7 +1772,7 @@ if ($id > 0) print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 59d5a6b6691..aa5711a69ce 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1000,7 +1000,7 @@ class ActionComm extends CommonObject // Clean parameters $this->label = trim($this->label); - $this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private)); + $this->note_private = dol_htmlcleanlastbr(trim(!isset($this->note_private) ? $this->note : $this->note_private)); if (empty($this->percentage)) $this->percentage = 0; if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0; if (empty($this->transparency)) $this->transparency = 0; @@ -1206,16 +1206,17 @@ class ActionComm extends CommonObject * Load indicators for dashboard (this->nbtodo and this->nbtodolate) * * @param User $user Objet user - * @param int $load_state_board Charge indicateurs this->nb de tableau de bord - * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK + * @param int $load_state_board Load indicator array this->nb + * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ public function load_board($user, $load_state_board = 0) { // phpcs:enable global $conf, $langs; - if (empty($load_state_board)) $sql = "SELECT a.id, a.datep as dp"; - else { + if (empty($load_state_board)) { + $sql = "SELECT a.id, a.datep as dp"; + } else { $this->nb = array(); $sql = "SELECT count(a.id) as nb"; } @@ -1243,13 +1244,14 @@ class ActionComm extends CommonObject $response->img = img_object('', "action", 'class="inline-block valigntextmiddle"'); } // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { if (empty($load_state_board)) { $response->nbtodo++; $agenda_static->datep = $this->db->jdate($obj->dp); if ($agenda_static->hasDelay()) $response->nbtodolate++; - } else $this->nb["actionscomm"] = $obj->nb; + } else { + $this->nb["actionscomm"] = $obj->nb; + } } $this->db->free($resql); @@ -2085,6 +2087,7 @@ class ActionComm extends CommonObject if ($res > 0) { // PREPARE EMAIL + $errormesg = ''; // Make substitution in email content $substitutionarray = getCommonSubstitutionArray($langs, 0, '', $this); @@ -2100,43 +2103,65 @@ class ActionComm extends CommonObject // Recipient $recipient = new User($this->db); $res = $recipient->fetch($actionCommReminder->fk_user); - if ($res > 0 && !empty($recipient->email)) $to = $recipient->email; - else { - $errorsMsg[] = "Failed to load recipient"; + if ($res > 0) { + if (!empty($recipient->email)) { + $to = $recipient->email; + } else { + $errormesg = "Failed to send remind to user id=".$actionCommReminder->fk_user.". No email defined for user."; + $error++; + } + } else { + $errormesg = "Failed to load recipient with user id=".$actionCommReminder->fk_user; $error++; } // Sender $from = $conf->global->MAIN_MAIL_EMAIL_FROM; if (empty($from)) { - $errorsMsg[] = "Failed to load recipient"; + $errormesg = "Failed to get sender into global setup MAIN_MAIL_EMAIL_FROM"; $error++; } - // Errors Recipient - $errors_to = $conf->global->MAIN_MAIL_ERRORS_TO; + if (!$error) { + // Errors Recipient + $errors_to = $conf->global->MAIN_MAIL_ERRORS_TO; - // Mail Creation - $cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, array(), array(), array(), '', "", 0, 1, $errors_to, '', '', '', '', ''); + // Mail Creation + $cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, array(), array(), array(), '', "", 0, 1, $errors_to, '', '', '', '', ''); - // Sending Mail - if ($cMailFile->sendfile()) - { + // Sending Mail + if ($cMailFile->sendfile()) { + $nbMailSend++; + } else { + $errormesg = $cMailFile->error.' : '.$to; + $error++; + } + } + + if (!$error) { $actionCommReminder->status = $actionCommReminder::STATUS_DONE; + $res = $actionCommReminder->update($user); - if ($res < 0) - { - $errorsMsg[] = "Failed to update status of ActionComm Reminder"; + if ($res < 0) { + $errorsMsg[] = "Failed to update status to done of ActionComm Reminder"; + $error++; + break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first. + } + } else { + $actionCommReminder->status = $actionCommReminder::STATUS_ERROR; + $actionCommReminder->lasterror = dol_trunc($errormesg, 128, 'right', 'UTF-8', 1); + + $res = $actionCommReminder->update($user); + if ($res < 0) { + $errorsMsg[] = "Failed to update status to error of ActionComm Reminder"; $error++; break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first. } else { - $nbMailSend++; + $errorsMsg[] = $errormesg; } - } else { - $errorsMsg[] = $cMailFile->error.' : '.$to; - $error++; } } else { + $errorsMsg[] = 'Failed to fetch record actioncomm with ID = '.$actionCommReminder->fk_actioncomm; $error++; } } @@ -2150,6 +2175,7 @@ class ActionComm extends CommonObject // Delete also very old past events (we do not keep more than 1 month record in past) $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder"; $sql .= " WHERE dateremind < '".$this->db->idate($now - (3600 * 24 * 32))."'"; + $sql .= " AND status = ".$actionCommReminder::STATUS_DONE; $resql = $this->db->query($sql); if (!$resql) { @@ -2164,7 +2190,7 @@ class ActionComm extends CommonObject return 0; } else { - $this->db->rollback(); + $this->db->commit(); // We commit also on error, to have the error message recorded. $this->error = 'Nb of emails sent : '.$nbMailSend.', '.(!empty($errorsMsg)) ? join(', ', $errorsMsg) : $error; return $error; } diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index 09c9a25ca1a..0f43dae13f8 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -52,6 +52,7 @@ class ActionCommReminder extends CommonObject const STATUS_TODO = 0; const STATUS_DONE = 1; + const STATUS_ERROR = -1; /** @@ -84,8 +85,9 @@ class ActionCommReminder extends CommonObject 'offsetvalue' => array('type'=>'integer', 'label'=>'OffsetValue', 'visible'=>1, 'enabled'=>1, 'position'=>56, 'notnull'=>1,), 'offsetunit' => array('type'=>'varchar(1)', 'label'=>'OffsetUnit', 'visible'=>1, 'enabled'=>1, 'position'=>57, 'notnull'=>1, 'comment'=>"y, m, d, w, h, i",), 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>58, 'notnull'=>1, 'default'=>0, 'index'=>0, 'arrayofkeyval'=>array('0'=>'ToDo', '1'=>'Done')), - 'fk_actioncomm' => array('type'=>'integer', 'label'=>'Project', 'visible'=>1, 'enabled'=>1, 'position'=>59, 'notnull'=>1, 'index'=>1,), - 'fk_email_template' => array('type'=>'integer', 'label'=>'EmailTemplate', 'visible'=>1, 'enabled'=>1, 'position'=>60, 'notnull'=>0), + 'lasterror' => array('type'=>'varchar(128)', 'label'=>'LastError', 'visible'=>-1, 'enabled'=>1, 'position'=>59, 'index'=>0), + 'fk_actioncomm' => array('type'=>'integer', 'label'=>'Project', 'visible'=>1, 'enabled'=>1, 'position'=>70, 'notnull'=>1, 'index'=>1,), + 'fk_email_template' => array('type'=>'integer', 'label'=>'EmailTemplate', 'visible'=>1, 'enabled'=>1, 'position'=>80, 'notnull'=>0), ); /** @@ -114,6 +116,11 @@ class ActionCommReminder extends CommonObject */ public $status; + /** + * @var string Last error message + */ + public $lasterror; + /** * @var int Project */ @@ -217,31 +224,19 @@ class ActionCommReminder extends CommonObject // phpcs:enable global $langs; - if ($mode == 0 || $mode == 1) - { - if ($status == 1) return $langs->trans('Done'); - elseif ($status == 0) return $langs->trans('ToDo'); - } elseif ($mode == 2) - { - if ($status == 1) return img_picto($langs->trans('Done'), 'statut4').' '.$langs->trans('Done'); - elseif ($status == 0) return img_picto($langs->trans('ToDo'), 'statut5').' '.$langs->trans('ToDo'); - } elseif ($mode == 3) - { - if ($status == 1) return img_picto($langs->trans('Done'), 'statut4'); - elseif ($status == 0) return img_picto($langs->trans('ToDo'), 'statut5'); - } elseif ($mode == 4) - { - if ($status == 1) return img_picto($langs->trans('Done'), 'statut4').' '.$langs->trans('Done'); - elseif ($status == 0) return img_picto($langs->trans('ToDo'), 'statut5').' '.$langs->trans('ToDo'); - } elseif ($mode == 5) - { - if ($status == 1) return $langs->trans('Done').' '.img_picto($langs->trans('Done'), 'statut4'); - elseif ($status == 0) return $langs->trans('ToDo').' '.img_picto($langs->trans('ToDo'), 'statut5'); - } elseif ($mode == 6) - { - if ($status == 1) return $langs->trans('Done').' '.img_picto($langs->trans('Done'), 'statut4'); - elseif ($status == 0) return $langs->trans('ToDo').' '.img_picto($langs->trans('ToDo'), 'statut5'); - } + $labelStatus = $langs->trans('ToDo'); + if ($status == 1) $labelStatus = $langs->trans('Done'); + elseif ($status == -1) $labelStatus = $langs->trans('Error'); + + $labelStatusShort = $langs->trans('ToDo'); + if ($status == 1) $labelStatus = $langs->trans('Done'); + elseif ($status == -1) $labelStatus = $langs->trans('Error'); + + $statusType = 'status5'; + if ($status == 1) $statusType = 'status4'; + elseif ($status == -1) $statusType = 'status8'; + + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } /** diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 8697d9dffb2..97e072fcdd6 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -1292,7 +1292,7 @@ if ($action == 'create') print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index bd4c16f89ca..c8a674773a2 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -107,7 +107,7 @@ if ($_socid > 0) print dol_get_fiche_end(); - print '
'; + print '
'; print ""; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 71ff0ef147a..0828971eaa5 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -59,10 +59,10 @@ $search_datecloture_start = GETPOST('search_datecloture_start', 'int'); if (empty($search_datecloture_start)) $search_datecloture_start = dol_mktime(0, 0, 0, GETPOST('search_datecloture_startmonth', 'int'), GETPOST('search_datecloture_startday', 'int'), GETPOST('search_datecloture_startyear', 'int')); $search_datecloture_end = GETPOST('search_datecloture_end', 'int'); if (empty($search_datecloture_end)) $search_datecloture_end = dol_mktime(23, 59, 59, GETPOST('search_datecloture_endmonth', 'int'), GETPOST('search_datecloture_endday', 'int'), GETPOST('search_datecloture_endyear', 'int')); -$search_dateorder_start = dol_mktime(0, 0, 0, GETPOST('search_dateorder_startmonth', 'int'), GETPOST('search_dateorder_startday', 'int'), GETPOST('search_dateorder_startyear', 'int')); -$search_dateorder_end = dol_mktime(23, 59, 59, GETPOST('search_dateorder_endmonth', 'int'), GETPOST('search_dateorder_endday', 'int'), GETPOST('search_dateorder_endyear', 'int')); -$search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_startmonth', 'int'), GETPOST('search_datedelivery_startday', 'int'), GETPOST('search_datedelivery_startyear', 'int')); -$search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_endmonth', 'int'), GETPOST('search_datedelivery_endday', 'int'), GETPOST('search_datedelivery_endyear', 'int')); +$search_dateorder_start = dol_mktime(0, 0, 0, GETPOST('search_dateorder_start_month', 'int'), GETPOST('search_dateorder_start_day', 'int'), GETPOST('search_dateorder_start_year', 'int')); +$search_dateorder_end = dol_mktime(23, 59, 59, GETPOST('search_dateorder_end_month', 'int'), GETPOST('search_dateorder_end_day', 'int'), GETPOST('search_dateorder_end_year', 'int')); +$search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_start_month', 'int'), GETPOST('search_datedelivery_start_day', 'int'), GETPOST('search_datedelivery_start_year', 'int')); +$search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_end_month', 'int'), GETPOST('search_datedelivery_end_day', 'int'), GETPOST('search_datedelivery_end_year', 'int')); $search_product_category = GETPOST('search_product_category', 'int'); $search_ref = GETPOST('search_ref', 'alpha') != '' ?GETPOST('search_ref', 'alpha') : GETPOST('sref', 'alpha'); $search_ref_customer = GETPOST('search_ref_customer', 'alpha'); @@ -448,10 +448,10 @@ if ($resql) if ($search_status != '') $param .= '&search_status='.urlencode($search_status); if ($search_datecloture_start) $param .= '&search_datecloture_start='.urlencode($search_datecloture_start); if ($search_datecloture_end) $param .= '&search_datecloture_end='.urlencode($search_datecloture_end); - if ($search_dateorder_start) $param .= '&search_dateorder_start='.urlencode($search_dateorder_start); - if ($search_dateorder_end) $param .= '&search_dateorder_end='.urlencode($search_dateorder_end); - if ($search_datedelivery_start) $param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start); - if ($search_datedelivery_end) $param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end); + if ($search_dateorder_start) $param .= '&search_dateorder_start_day=' . dol_print_date($search_dateorder_start, '%d') . '&search_dateorder_start_month=' . dol_print_date($search_dateorder_start, '%m') . '&search_dateorder_start_year=' . dol_print_date($search_dateorder_start, '%Y'); + if ($search_dateorder_end) $param .= '&search_dateorder_end_day=' . dol_print_date($search_dateorder_end, '%d') . '&search_dateorder_end_month=' . dol_print_date($search_dateorder_end, '%m') . '&search_dateorder_end_year=' . dol_print_date($search_dateorder_end, '%Y'); + if ($search_datedelivery_start) $param .= '&search_datedelivery_start_day=' . dol_print_date($search_datedelivery_start, '%d') . '&search_datedelivery_start_month=' . dol_print_date($search_datedelivery_start, '%m') . '&search_datedelivery_start_year=' . dol_print_date($search_datedelivery_start, '%Y'); + if ($search_datedelivery_end) $param .= '&search_datedelivery_end_day=' . dol_print_date($search_datedelivery_end, '%d') . '&search_datedelivery_end_month=' . dol_print_date($search_datedelivery_end, '%m') . '&search_datedelivery_end_year=' . dol_print_date($search_datedelivery_end, '%Y'); if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); if ($search_company) $param .= '&search_company='.urlencode($search_company); if ($search_ref_customer) $param .= '&search_ref_customer='.urlencode($search_ref_customer); @@ -708,10 +708,10 @@ if ($resql) { print ''; } @@ -719,10 +719,10 @@ if ($resql) { print ''; } diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index c1b5b1a06b0..62d94dd4aa6 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -463,7 +463,7 @@ if ($action == 'create') print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '   '; print ''; print '
'; diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 546805e3aaa..c396765f07a 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -568,7 +568,7 @@ if ($action == "create" || $action == "start" || $action == 'close') // Save print ''; print ''; @@ -854,7 +854,7 @@ if (empty($action) || $action == "view" || $action == "close") // Save print ''; print ''; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 00b5c3dc025..29c22be11a2 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -278,7 +278,7 @@ if ($action == 'create') print '
'.$langs->trans("ReminderTime").''; - print ''; + print ' '.$form->selectTypeDuration('offsetunit', $actionCommReminder->offsetunit); print '
'.$langs->trans("TimeType").''; - print $form->selectTypeDuration('offsetunit', $actionCommReminder->offsetunit); - print '
'.$langs->trans("ReminderType").''; print $form->selectarray('selectremindertype', $TRemindTypes, $actionCommReminder->typeremind); print '
'.$langs->trans("EMailTemplates").''; print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1); print '
'; print '
'; - print $form->selectDate($search_dateorder_start ? $search_dateorder_start : -1, 'search_dateorder_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print $form->selectDate($search_dateorder_start ? $search_dateorder_start : -1, 'search_dateorder_start_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print '
'; print '
'; - print $form->selectDate($search_dateorder_end ? $search_dateorder_end : -1, 'search_dateorder_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print $form->selectDate($search_dateorder_end ? $search_dateorder_end : -1, 'search_dateorder_end_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
'; print '
'; print '
'; - print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print '
'; print '
'; - print $form->selectDate($search_datedelivery_end ? $search_datedelivery_end : -1, 'search_datedelivery_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print $form->selectDate($search_datedelivery_end ? $search_datedelivery_end : -1, 'search_datedelivery_end_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
'; print '
'; print ''; - if ($action == 'start') print ''; + if ($action == 'start') print ''; elseif ($action == 'close') print ''; print '
'; print ''; - if ($action == 'start') print ''; + if ($action == 'start') print ''; elseif ($action == 'close') print ''; print '
'; print '
'; - print ''; + print ''; print '     '; print ''; print '
'; @@ -374,7 +374,7 @@ if ($action == 'create') print ''; print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 078625ca1a1..8c0b388b456 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -201,7 +201,7 @@ if ($action == 'create') print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index a4c27855a30..49189ce2067 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -681,7 +681,7 @@ if ($id > 0) if ($action == 'edit') { print '
'; - print ''; + print ''; print '   '; print ''; print '
'; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 52543e9953d..ee96d32af1e 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -296,7 +296,7 @@ if ($action == 'create') print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php index eba58a52f02..4823b801f26 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php @@ -152,7 +152,7 @@ if (!empty($this->control->tpl['contact_element'])) { - ">  + ">  "> diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index ad646af15b0..7a649ca2596 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -1239,7 +1239,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index d8d7b709736..579edd9adfc 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -207,7 +207,7 @@ if ($action == 'edit') print dol_get_fiche_end(); print '
'; - print ''; + print ''; print '     '; print ''; print '
'; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 7c3b368ae14..55ab524daec 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7907,7 +7907,7 @@ abstract class CommonObject }*/ } - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(',', $tmp).' WHERE rowid='.$this->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(', ', $tmp).' WHERE rowid='.$this->id; $this->db->begin(); if (!$error) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0173e03730e..15cfa9e5771 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6259,7 +6259,7 @@ class Form * Note: Do not apply langs->trans function on returned content, content may be entity encoded twice. * * @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect - * @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>...)) + * @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...)) * @param string|string[] $id Preselected key or preselected keys for multiselect * @param int|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (key is -1 and value is '' or ' ' if 1, key is -1 and value is text if string), <0 to add an empty value with key that is this value. * @param int $key_in_label 1 to show key into label with format "[key] value" @@ -6331,10 +6331,14 @@ class Form foreach ($array as $key => $tmpvalue) { - if (is_array($tmpvalue)) $value = $tmpvalue['label']; - else $value = $tmpvalue; - - $disabled = ''; $style = ''; + if (is_array($tmpvalue)) { + $value = $tmpvalue['label']; + $disabled = empty($tmpvalue['disabled']) ? '' : ' disabled'; + $style = empty($tmpvalue['css']) ? ' class="'.$tmpvalue['css'].'"' : ''; + } else { + $value = $tmpvalue; + $disabled = ''; $style = ''; + } if (!empty($disablebademail)) { if (($disablebademail == 1 && !preg_match('/<.+@.+>/', $value)) @@ -7489,10 +7493,11 @@ class Form * @param string $imagesize 'mini', 'small' or '' (original) * @param int $addlinktofullsize Add link to fullsize image * @param int $cache 1=Accept to use image in cache - * @param string $forcecapture Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if empty. + * @param string $forcecapture '', 'user' or 'environment'. Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if ''. + * @param int $noexternsourceoverwrite No overwrite image with extern source (like 'gravatar' or other module) * @return string HTML code to output photo */ - public static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '') + public static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '', $noexternsourceoverwrite = 0) { global $conf, $langs; @@ -7569,18 +7574,15 @@ class Form { if ($file && file_exists($dir."/".$file)) { - if ($addlinktofullsize) - { + if ($addlinktofullsize) { $urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 0, '&entity='.$entity); if ($urladvanced) $ret .= ''; else $ret .= ''; } $ret .= 'Photo'; if ($addlinktofullsize) $ret .= ''; - } elseif ($altfile && file_exists($dir."/".$altfile)) - { - if ($addlinktofullsize) - { + } elseif ($altfile && file_exists($dir."/".$altfile)) { + if ($addlinktofullsize) { $urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 0, '&entity='.$entity); if ($urladvanced) $ret .= ''; else $ret .= ''; @@ -7589,8 +7591,7 @@ class Form if ($addlinktofullsize) $ret .= ''; } else { $nophoto = '/public/theme/common/nophoto.png'; - if (in_array($modulepart, array('userphoto', 'contact', 'memberphoto'))) // For module that are "physical" users - { + if (in_array($modulepart, array('userphoto', 'contact', 'memberphoto'))) { // For module that are "physical" users if ($modulepart == 'memberphoto' && strpos($object->morphy, 'mor') !== false) { $nophoto = '/public/theme/common/company.png'; } else { @@ -7600,11 +7601,8 @@ class Form } } - if (!empty($conf->gravatar->enabled) && $email) - { - /** - * @see https://gravatar.com/site/implement/images/php/ - */ + if (!empty($conf->gravatar->enabled) && $email && empty($noexternsourceoverwrite)) { + // see https://gravatar.com/site/implement/images/php/ global $dolibarr_main_url_root; $ret .= ''; //$defaultimg=urlencode(dol_buildpath($nophoto,3)); diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 380b7a1ad17..f7a24c56c8e 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1362,7 +1362,7 @@ class FormFile } else { print ''; print ''; - print ''; + print ''; print ''; print ''; if (empty($disablemove)) print ''; diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index 0e3f04fa0f5..9c03475453f 100644 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -85,10 +85,19 @@ function dol_quoted_printable_encode($input, $line_max = 76) */ class vCard { + /** + * @var array array of properties + */ public $properties; + + /** + * @var string filename + */ public $filename; - //var $encoding="UTF-8"; + /** + * @var string encoding + */ public $encoding = "ISO-8859-1;ENCODING=QUOTED-PRINTABLE"; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 599ee983296..8241b415726 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -356,13 +356,10 @@ function agenda_prepare_head() $head[$h][2] = 'autoactions'; $h++; - if ($conf->global->MAIN_FEATURES_LEVEL > 0) - { - $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php"; - $head[$h][1] = $langs->trans("Reminders"); - $head[$h][2] = 'reminders'; - $h++; - } + $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php"; + $head[$h][1] = $langs->trans("Reminders"); + $head[$h][2] = 'reminders'; + $h++; $head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php"; $head[$h][1] = $langs->trans("ExportCal"); diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php index 084b781d3b4..fda122be7bf 100644 --- a/htdocs/core/lib/cron.lib.php +++ b/htdocs/core/lib/cron.lib.php @@ -39,6 +39,11 @@ function cronadmin_prepare_head() $head[$h][2] = 'setup'; $h++; + $head[$h][0] = dol_buildpath('/cron/list.php?mode=modulesetup', 1); + $head[$h][1] = $langs->trans("Module2300Name"); + $head[$h][2] = 'jobs'; + $h++; + complete_head_from_modules($conf, $langs, null, $head, $h, 'cronadmin'); complete_head_from_modules($conf, $langs, null, $head, $h, 'cronadmin', 'remove'); diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index cbfaa883da7..1e7f9b299c6 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -78,7 +78,7 @@ function getServerTimeZoneString() * Return server timezone int. * * @param string $refgmtdate Reference period for timezone (timezone differs on winter and summer. May be 'now', 'winter' or 'summer') - * @return int An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer) + * @return float An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer). Note some countries use half and even quarter hours. */ function getServerTimeZoneInt($refgmtdate = 'now') { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 74f77c28558..3be41789535 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1668,13 +1668,11 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi $phototoshow .= '
'; } } - } elseif (!$phototoshow) - { + } elseif (!$phototoshow) { $phototoshow .= $form->showphoto($modulepart, $object, 0, 0, 0, 'photoref', 'small', 1, 0, $maxvisiblephotos); } - if ($phototoshow) - { + if ($phototoshow) { $morehtmlleft .= '
'; $morehtmlleft .= $phototoshow; $morehtmlleft .= '
'; @@ -3096,7 +3094,7 @@ function dol_substr($string, $start, $length, $stringencoding = '', $trunconbyte * * @param string $string String to truncate * @param int $size Max string size visible (excluding ...). 0 for no limit. WARNING: Final string size can have 3 more chars (if we added ..., or if size was max+1 or max+2 or max+3 so it does not worse to replace with ...) - * @param string $trunc Where to trunc: right, left, middle (size must be a 2 power), wrap + * @param string $trunc Where to trunc: 'right', 'left', 'middle' (size must be a 2 power), 'wrap' * @param string $stringencoding Tell what is source string encoding * @param int $nodot Truncation do not add ... after truncation. So it's an exact truncation. * @param int $display Trunc is used to display data and can be changed for small screen. TODO Remove this param (must be dealt with CSS) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 5e7ddbd38fc..f61ae5b7976 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1625,7 +1625,7 @@ function pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails = 0) { if (empty($hidedetails) || $hidedetails > 1) { - $subprice = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_subprice : $object->lines[$i]->subprice); + $subprice = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_subprice : $object->lines[$i]->subprice); $result .= price($sign * $subprice, 0, $outputlangs); } } @@ -1966,7 +1966,7 @@ function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0) } elseif (empty($hidedetails) || $hidedetails > 1) { - $total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht); + $total_ht = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht); if ($object->lines[$i]->situation_percent > 0) { // TODO Remove this. The total should be saved correctly in database instead of being modified here. @@ -2023,7 +2023,7 @@ function pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails = 0) } elseif (empty($hidedetails) || $hidedetails > 1) { - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ttc : $object->lines[$i]->total_ttc); + $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ttc : $object->lines[$i]->total_ttc); if ($object->lines[$i]->situation_percent > 0) { // TODO Remove this. The total should be saved correctly in database instead of being modified here. diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 0f0b2474d51..fe9ae98ec61 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -678,10 +678,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print $hookmanager->resPrint; // Tick to drag and drop - if ($addordertick) - { - print ' '; - } + print ''; print "\n"; @@ -796,7 +793,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t { print ''; } - if ($addordertick) print ''; + print ''; print ''; } diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 0712adc59fb..559260a77c2 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -113,7 +113,7 @@ class modAgenda extends DolibarrModules //------------ $datestart = dol_now(); $this->cronjobs = array( - 0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>10, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'$conf->agenda->enabled', 'datestart'=>$datestart), + 0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>5, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'$conf->agenda->enabled', 'datestart'=>$datestart), ); // Permissions diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 367faa630ba..a4533681b16 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -213,7 +213,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
Contact:con -
">      +
">      ">
diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 8f92861d089..d50a00f63aa 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -303,7 +303,7 @@ if (in_array($type, array_keys($typewecanchangeinto))) -
">      +
">      ">
diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index dea5ce60d6e..25d5f6f3526 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -44,7 +44,8 @@ $forcereloadpage = empty($conf->global->MAIN_FORCE_RELOAD_PAGE) ? 0 : 1; $tagidfortablednd = (empty($tagidfortablednd) ? 'tablelines' : $tagidfortablednd); $filepath = (empty($filepath) ? '' : $filepath); -if (GETPOST('action', 'aZ09') != 'editline' && $nboflines > 1) { ?> + +if (GETPOST('action', 'aZ09') != 'editline' && $nboflines > 1 && $conf->browser->layout != 'phone') { ?>