diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 6777c37b374..961cfd5733c 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -547,15 +547,12 @@ class Menubase $tmpcond=$menu['enabled']; if ($leftmenu == 'all') $tmpcond=preg_replace('/\$leftmenu\s*==\s*["\'a-zA-Z_]+/','1==1',$tmpcond); // Force part of condition to true $enabled = verifCond($tmpcond); - if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) && preg_match('/^\$leftmenu/',$menu['enabled'])) $enabled=1; - //print "verifCond rowid=".$menu['rowid']." ".$tmpcond.":".$enabled."
\n"; + //if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) && empty($conf->dol_use_jmobile) && preg_match('/^\$leftmenu/',$menu['enabled'])) $enabled=1; } // Define $title if ($enabled) { -//$tmp3=dol_microtime_float(); -//print '>>> 2 '.($tmp3 - $tmp1).'
'; $title = $langs->trans($menu['titre']); if ($title == $menu['titre']) // Translation not found { diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 3f859199654..63edea555e6 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -621,6 +621,37 @@ class pdf_einstein extends ModelePDFCommandes $posy=$pdf->GetY()+1; }*/ + // Show shipping date + if ($object->date_livraison) + { + $outputlangs->load("sendings"); + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->SetXY($this->marge_gauche, $posy); + $titre = $outputlangs->transnoentities("DateDeliveryPlanned").':'; + $pdf->MultiCell(80, 4, $titre, 0, 'L'); + $pdf->SetFont('','', $default_font_size - 2); + $pdf->SetXY($posxval, $posy); + $dlp=dol_print_date($object->date_livraison,"daytext",false,$outputlangs,true); + $pdf->MultiCell(80, 4, $dlp, 0, 'L'); + + $posy=$pdf->GetY()+1; + } + elseif ($object->availability_code || $object->availability) // Show availability conditions + { + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->SetXY($this->marge_gauche, $posy); + $titre = $outputlangs->transnoentities("AvailabilityPeriod").':'; + $pdf->MultiCell(80, 4, $titre, 0, 'L'); + $pdf->SetTextColor(0,0,0); + $pdf->SetFont('','', $default_font_size - 2); + $pdf->SetXY($posxval, $posy); + $lib_availability=$outputlangs->transnoentities("AvailabilityType".$object->availability_code)!=('AvailabilityType'.$object->availability_code)?$outputlangs->transnoentities("AvailabilityType".$object->availability_code):$outputlangs->convToOutputCharset($object->availability); + $lib_availability=str_replace('\n',"\n",$lib_availability); + $pdf->MultiCell(80, 4, $lib_availability, 0, 'L'); + + $posy=$pdf->GetY()+1; + } + // Show payment mode if ($object->mode_reglement_code && $object->mode_reglement_code != 'CHQ' diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 8da53a67477..93897eefadc 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -180,7 +180,9 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer) $error = 0; // Set if we used free entry or predefined product - if (GETPOST('addline_libre')) + if (GETPOST('addline_libre') + || (GETPOST('dp_desc') && ! GETPOST('addline_libre') && ! GETPOST('idprod', 'int')>0) // we push enter onto qty field + ) { $predef=''; $idprod=0; @@ -188,7 +190,9 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer) $price_ht = GETPOST('price_ht'); $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); } - if (GETPOST('addline_predefined')) + if (GETPOST('addline_predefined') + || (! GETPOST('dp_desc') && ! GETPOST('addline_predefined') && GETPOST('idprod', 'int')>0) // we push enter onto qty field + ) { $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); $idprod=GETPOST('idprod', 'int'); diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index c6aab783018..11d53c10e58 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -523,7 +523,9 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) $error=0; // Set if we used free entry or predefined product - if (GETPOST('addline_libre')) + if (GETPOST('addline_libre') + || (GETPOST('dp_desc') && ! GETPOST('addline_libre') && ! GETPOST('idprod', 'int')>0) // we push enter onto qty field + ) { $predef=''; $idprod=0; @@ -531,7 +533,9 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) $price_ht = GETPOST('price_ht'); $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); } - if (GETPOST('addline_predefined')) + if (GETPOST('addline_predefined') + || (! GETPOST('dp_desc') && ! GETPOST('addline_predefined') && GETPOST('idprod', 'int')>0) // we push enter onto qty field + ) { $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); $idprod=GETPOST('idprod', 'int'); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 074d6115fce..419730c5bb1 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -261,7 +261,7 @@ if (! empty($conf->file->main_force_https)) } -// Loading of additional presentation includes +// Loading of additional presentation includes if (! defined('NOREQUIREHTML')) require_once DOL_DOCUMENT_ROOT .'/core/class/html.form.class.php'; // Need 660ko memory (800ko in 2.2) if (! defined('NOREQUIREAJAX') && $conf->use_javascript_ajax) require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; // Need 22ko memory @@ -1084,7 +1084,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; print ''."\n"; // jQuery Layout - if (! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT')) + if (empty($conf->dol_use_jmobile) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT')) { print ''."\n"; } @@ -1293,7 +1293,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a if ($conf->use_javascript_ajax) { - if (! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) + if (empty($conf->dol_use_jmobile) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print ''; } - if (! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION)) + /* This make menu bugged + if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) && empty($conf->dol_use_jmobile)) { print "\n".''; - } + } */ // Wrapper to show tooltips print "\n".'