From abb6b41f91bb2d309fd8e9697ff23266554329fa Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Wed, 7 Nov 2018 11:25:13 +0100 Subject: [PATCH 1/6] Fix screen size fall --- htdocs/comm/remx.php | 8 ++++---- htdocs/theme/eldy/style.css.php | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 3eec109e6b3..7e849279b95 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -407,7 +407,7 @@ if ($socid > 0) if($isCustomer) { if($isSupplier) { print '
'; - print '
'; + print '
'; print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); } @@ -540,7 +540,7 @@ if ($socid > 0) if($isSupplier) { if($isCustomer) { print '
'; // class="fichehalfleft" - print '
'; + print '
'; print '
'; print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); } @@ -691,7 +691,7 @@ if ($socid > 0) if($isCustomer) { if($isSupplier) { print '
'; - print '
'; + print '
'; print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); } @@ -842,7 +842,7 @@ if ($socid > 0) if($isSupplier) { if($isCustomer) { print '
'; // class="fichehalfleft" - print '
'; + print '
'; print '
'; print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index e2b87857c95..63e23ac3fe2 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1357,6 +1357,23 @@ div.secondcolumn div.box { } } +/* Force values on one colum for small screen */ +@media only screen and (max-width: 1599px) +{ + div.fichehalfleft-lg { + float: none; + width: auto; + } + div.fichehalfright-lg { + float: none; + width: auto; + } + + .fichehalfright-lg .ficheaddleft{ + padding-left:0; + } +} + /* For table into table into card */ div.ficheaddleft tr.liste_titre:first-child td table.nobordernopadding td { padding: 0 0 0 0; From c422904b990cb329276a72e430c471a658c782aa Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Sat, 1 Dec 2018 16:51:40 +0100 Subject: [PATCH 2/6] fix #9964 --- htdocs/commande/list.php | 4 ++-- htdocs/core/class/extrafields.class.php | 5 ++++- .../core/tpl/extrafields_list_search_sql.tpl.php | 16 ++++++++++------ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 4841e9be410..bbdf59a295c 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -468,8 +468,8 @@ if ($resql) print ''; print ''; print ''; - - + + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); $topicmail="SendOrderRef"; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 1840f62ca5d..ee87426ddcb 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1927,7 +1927,10 @@ class ExtraFields // Get extra fields foreach ($extralabels as $key => $value) { - $key_type = $this->attributes[$object->table_element]['type'][$key]; + $key_type=$this->attribute_type[$key]; + if (! empty($object->table_element)) { + $key_type=$this->attributes[$extrafieldsobjectkey]['type'][$key]; + } if (in_array($key_type,array('date','datetime'))) { diff --git a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php index a8e43d6429f..8492160c185 100644 --- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php @@ -17,13 +17,17 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_ $crit=$val; $tmpkey=preg_replace('/search_options_/','',$key); $typ=$extrafields->attributes[$extrafieldsobjectkey]['type'][$tmpkey]; - - $mode_search=0; - if (in_array($typ, array('int','double','real'))) $mode_search=1; // Search on a numeric - if (in_array($typ, array('sellist','link')) && $crit != '0' && $crit != '-1') $mode_search=2; // Search on a foreign key int - if (in_array($typ, array('chkbxlst','checkbox'))) $mode_search=4; // Search on a multiselect field with sql type = text - if ($crit != '' && (! in_array($typ, array('select','sellist')) || $crit != '0') && (! in_array($typ, array('link')) || $crit != '-1')) + if ($crit != '' && in_array($typ, array('date', 'datetime', 'timestamp'))) { + $sql .= " AND ef.".$tmpkey." = '".$db->idate($crit)."'"; + } + elseif ($crit != '' && (! in_array($typ, array('select','sellist')) || $crit != '0') && (! in_array($typ, array('link')) || $crit != '-1')) + { + $mode_search=0; + if (in_array($typ, array('int','double','real'))) $mode_search=1; // Search on a numeric + if (in_array($typ, array('sellist','link')) && $crit != '0' && $crit != '-1') $mode_search=2; // Search on a foreign key int + if (in_array($typ, array('chkbxlst','checkbox'))) $mode_search=4; // Search on a multiselect field with sql type = text + $sql .= natural_search('ef.'.$tmpkey, $crit, $mode_search); } } From e2727f6d91a1c110bf613a3cefdc102f25a648f5 Mon Sep 17 00:00:00 2001 From: fappels Date: Thu, 6 Dec 2018 21:43:10 +0100 Subject: [PATCH 3/6] Fix issue #10186 no display of stock per batch series. --- htdocs/expedition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index cc54f7bed5b..d6b9c53b168 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1376,7 +1376,7 @@ if ($action == 'create') $detail.= $langs->trans("Batch").': '.$dbatch->batch; $detail.= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby,"day"); $detail.= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby,"day"); - $detail.= ' - '.$langs->trans("Qty").': '.$dbatch->dluo_qty; + $detail.= ' - '.$langs->trans("Qty").': '.$dbatch->qty; $detail.= '
'; print $detail; From 550df138a652b612a1fbf238a0ea6da833162085 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 7 Dec 2018 12:19:50 +0100 Subject: [PATCH 4/6] Fix unexistant fields --- htdocs/core/modules/modSociete.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 4a814954072..34f4dca8510 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -477,14 +477,11 @@ class modSociete extends DolibarrModules $this->import_tables_array[$r]=array('sr'=>MAIN_DB_PREFIX.'societe_rib'); $this->import_fields_array[$r]=array('sr.fk_soc'=>"ThirdPartyName*",'sr.bank'=>"Bank", 'sr.code_banque'=>"BankCode",'sr.code_guichet'=>"DeskCode",'sr.number'=>"BankAccountNumber*", - 'sr.cle_rib'=>"BankAccountNumberKey",'sr.bic'=>"BIC",'sr.iban_prefix'=>"IBAN", 'sr.domiciliation'=>"BankAccountDomiciliation",'sr.proprio' => "BankAccountOwner", 'sr.owner_address' => "BankAccountOwnerAddress", 'sr.default_rib' => 'Default', - 'sr.fk_departement'=>"StateId",'sr.fk_pays'=>"CountryCode" + 'sr.cle_rib'=>"BankAccountNumberKey",'sr.bic'=>"BIC",'sr.iban_prefix'=>"IBAN", 'sr.domiciliation'=>"BankAccountDomiciliation",'sr.proprio' => "BankAccountOwner", 'sr.owner_address' => "BankAccountOwnerAddress", 'sr.default_rib' => 'Default' ); $this->import_convertvalue_array[$r]=array( - 'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'), - 'sr.fk_departement'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/cstate.class.php','class'=>'Cstate','method'=>'fetch','dict'=>'DictionaryState'), - 'sr.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ccountry.class.php','class'=>'Ccountry','method'=>'fetch','dict'=>'DictionaryCountry'), + 'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty') ); $this->import_examplevalues_array[$r]=array('sr.fk_soc'=>"MyBigCompany",'sr.bank'=>"ING", 'sr.code_banque'=>"0000", 'sr.code_guichet'=>"1111",'sr.number'=>"3333333333", From 2e57a8be51625f80e8240f1aa0b288abc760834f Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 13 Dec 2018 12:37:40 +0100 Subject: [PATCH 5/6] better fix --- htdocs/core/class/extrafields.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index ee87426ddcb..8ecae833805 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1928,8 +1928,8 @@ class ExtraFields foreach ($extralabels as $key => $value) { $key_type=$this->attribute_type[$key]; - if (! empty($object->table_element)) { - $key_type=$this->attributes[$extrafieldsobjectkey]['type'][$key]; + if (! empty($object->table_element) && is_array($this->attributes) && array_key_exists($object->table_element, $this->attributes)) { + $key_type=$this->attributes[$object->table_element]['type'][$key]; } if (in_array($key_type,array('date','datetime'))) From e069da69ba2777639898ae641a265183de77933f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 15 Dec 2018 12:35:37 +0100 Subject: [PATCH 6/6] Revert "Fix screen size fall" This reverts commit abb6b41f91bb2d309fd8e9697ff23266554329fa. --- htdocs/comm/remx.php | 8 ++++---- htdocs/theme/eldy/style.css.php | 17 ----------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 9c5f4bc53d8..a66e8e66500 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -407,7 +407,7 @@ if ($socid > 0) if($isCustomer) { if($isSupplier) { print '
'; - print '
'; + print '
'; print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); } @@ -542,7 +542,7 @@ if ($socid > 0) if($isSupplier) { if($isCustomer) { print '
'; // class="fichehalfleft" - print '
'; + print '
'; print '
'; print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); } @@ -695,7 +695,7 @@ if ($socid > 0) if($isCustomer) { if($isSupplier) { print '
'; - print '
'; + print '
'; print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); } @@ -848,7 +848,7 @@ if ($socid > 0) if($isSupplier) { if($isCustomer) { print '
'; // class="fichehalfleft" - print '
'; + print '
'; print '
'; print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 39278ffe367..0097eb4715c 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1357,23 +1357,6 @@ div.secondcolumn div.box { } } -/* Force values on one colum for small screen */ -@media only screen and (max-width: 1599px) -{ - div.fichehalfleft-lg { - float: none; - width: auto; - } - div.fichehalfright-lg { - float: none; - width: auto; - } - - .fichehalfright-lg .ficheaddleft{ - padding-left:0; - } -} - /* For table into table into card */ div.ficheaddleft tr.liste_titre:first-child td table.nobordernopadding td { padding: 0 0 0 0;