From c707c899c1db7bd0109f2a6ac3eb5db8bd259448 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 13:22:05 +0200 Subject: [PATCH 1/5] Fix remove warning --- htdocs/core/lib/company.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index c979f734b5e..14af958ff51 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -94,7 +94,7 @@ function societe_prepare_head(Societe $object) }*/ // Tab to link resources - if ($conf->resource->enabled && ! empty($conf->global->RESOURCE_ON_THIRDPARTIES)) + if (! empty($conf->resource->enabled) && ! empty($conf->global->RESOURCE_ON_THIRDPARTIES)) { $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=societe&element_id='.$object->id; $head[$h][1] = $langs->trans("Resources"); From dd88a799fb0c18d966571fc3f5fae8ee2b7e4bd8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 13:49:36 +0200 Subject: [PATCH 2/5] FIX Event from ical stream should not be movable into calendar view --- htdocs/comm/action/index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index f445c7f3596..5366720bfc6 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1210,7 +1210,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color; } - else if ($event->type_code == 'ICALEVENT') + else if ($event->type_code == 'ICALEVENT') // Event come from external ical file { $numical++; if (! empty($event->icalname)) { @@ -1220,7 +1220,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $numicals[dol_string_nospecial($event->icalname)]++; } $color=$event->icalcolor; - $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unmovable'); + $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); } else if ($event->type_code == 'BIRTHDAY') { @@ -1266,6 +1266,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa { $cssclass.= " unmovable"; } + else if ($event->type_code == 'ICALEVENT') + { + $cssclass.= " unmovable"; + } else if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar)) { $tmpyearend = date('Y',$event->date_end_in_calendar); From 9ecc8e5e6bcef48691fd82ec7a63331f9f88e58c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 14:11:39 +0200 Subject: [PATCH 3/5] FIX Regression on bad use of fk_account showing the bad bank account on PDF. --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 5 +++-- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 3 ++- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index cc1e6aeedca..d91f2418400 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -771,9 +771,10 @@ class pdf_einstein extends ModelePDFCommandes // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) + if (! empty($object->fk_account) || ! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) { - $bankid=(empty($object->fk_bank)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_bank); + $bankid=(empty($object->fk_account)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_account); + if (! empty($object->fk_bank)) $bankid=$object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank $account = new Account($this->db); $account->fetch($bankid); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 48be2c907c8..ecedfd2092a 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -958,9 +958,10 @@ class pdf_crabe extends ModelePDFFactures // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (! empty($object->fk_account) || ! empty($conf->global->FACTURE_RIB_NUMBER)) + if (! empty($object->fk_account) || ! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) { $bankid=(empty($object->fk_account)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_account); + if (! empty($object->fk_bank)) $bankid=$object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank $account = new Account($this->db); $account->fetch($bankid); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index d54b175750c..7fb02fe0514 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -917,9 +917,10 @@ class pdf_azur extends ModelePDFPropales // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) + if (! empty($object->fk_account) || ! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) { - $bankid=(empty($object->fk_bank)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_bank); + $bankid=(empty($object->fk_account)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_account); + if (! empty($object->fk_bank)) $bankid=$object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank $account = new Account($this->db); $account->fetch($bankid); From 6aa13d418902031f181921d785c4e9c504357172 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 16:34:43 +0200 Subject: [PATCH 4/5] Fix the $colorbackvmenu2 was removed with 3.8 --- htdocs/theme/eldy/style.css.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 7ecf63b1000..90f4c6a6109 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1135,7 +1135,7 @@ div.blockvmenusearch padding-top: 3px; padding-bottom: 3px; margin: 1px 0px 8px 2px; - background: rgb(); + background: rgb(); border-left: 1px solid #AAA; border-right: 1px solid #CCC; From e1b969cb909f736d29a10c99a41bb6a871df4dfb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 16:51:51 +0200 Subject: [PATCH 5/5] FIX Init into bad var --- htdocs/core/class/conf.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 01e092c842e..63b07830f40 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -387,8 +387,8 @@ class Conf // conf->global->ACCOUNTING_MODE = Option des modules Comptabilites (simple ou expert). Defini le mode de calcul des etats comptables (CA,...) if (empty($this->global->ACCOUNTING_MODE)) $this->global->ACCOUNTING_MODE='RECETTES-DEPENSES'; // By default. Can be 'RECETTES-DEPENSES' ou 'CREANCES-DETTES' - // By default, suppliers ojbects can be linked to all projects - $conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS = 1; + // By default, suppliers objects can be linked to all projects + $this->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS = 1; // conf->liste_limit = constante de taille maximale des listes if (empty($this->global->MAIN_SIZE_LISTE_LIMIT)) $this->global->MAIN_SIZE_LISTE_LIMIT=25;