diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 72238eab75e63..e82b155a7d3db 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1530,11 +1530,12 @@ $element = $subelement = 'expedition'; } - $object->origin = $origin; + $object->origin = $origin; // deprecated + $object->origin_type = $origin; $object->origin_id = $originid; // Possibility to add external linked objects with hooks - $object->linked_objects[$object->origin] = $object->origin_id; + $object->linked_objects[$object->origin_type] = $object->origin_id; // link with order if it is a shipping invoice if ($object->origin == 'shipping') { require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; @@ -1903,7 +1904,7 @@ }*/ // Hooks - $parameters = array('objFrom' => $srcobject); + $parameters = array('origin_type' => $object->origin_type, 'origin_id' => $object->origin_id, 'objFrom' => $srcobject); $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook if ($reshook < 0) { @@ -1959,7 +1960,8 @@ if (!empty($origin) && !empty($originid)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - $object->origin = $origin; + $object->origin = $origin; // deprecated + $object->origin_type = $origin; $object->origin_id = $originid; // retained warranty @@ -1981,8 +1983,6 @@ } foreach ($object->lines as $i => &$line) { - $line->origin = $object->origin; - $line->origin_id = $line->id; $line->fk_prev_id = $line->id; $line->fetch_optionals(); if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) { @@ -2023,6 +2023,7 @@ $object->note = trim(GETPOST('note', 'restricthtml')); $object->note_private = trim(GETPOST('note', 'restricthtml')); $object->ref_client = GETPOST('ref_client', 'alpha'); + $object->ref_customer = GETPOST('ref_client', 'alpha'); $object->model_pdf = GETPOST('model', 'alpha'); $object->fk_project = GETPOSTINT('projectid'); $object->cond_reglement_id = GETPOSTINT('cond_reglement_id'); @@ -2035,6 +2036,7 @@ // Special properties of replacement invoice $object->situation_counter += 1; + $id = $object->createFromCurrent($user); if ($id <= 0) { $mesg = $object->error; @@ -2048,6 +2050,15 @@ if ($ret > 0) { $nextSituationInvoice->insertExtraFields(); } + + // Hooks + $parameters = array('origin_type' => $object->origin_type, 'origin_id' => $object->origin_id); + $reshook = $hookmanager->executeHooks('createFrom', $parameters, $nextSituationInvoice, $action); // Note that $action and $object may have been + // modified by hook + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + $error++; + } } } } diff --git a/htdocs/core/bookmarks_page.php b/htdocs/core/bookmarks_page.php index a24918273d833..06b855459ff88 100644 --- a/htdocs/core/bookmarks_page.php +++ b/htdocs/core/bookmarks_page.php @@ -146,7 +146,7 @@ print "\n"; print "\n"; -print '
'; +print '
'; print ''; print '
'."\n"; print $bookmarkList; diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index 0f91b78b9edcb..777466527718b 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -192,7 +192,7 @@ // Show all forms print "\n"; print "\n"; -print '
'; +print '
'; print ''; print '
'."\n"; print $searchform; diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 65a47cceadfb4..b59787308ed04 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -578,13 +578,13 @@ } .tmenu .dropdown-menu, .login_block .dropdown-menu, .topnav .dropdown-menu { - margin-left: 5px; + margin-left: 8px; right: 0; } #topmenu-quickadd-dropdown .dropdown-menu { min-width: 220px; - max-width: 235px; + max-width: 270px; } #topmenu-bookmark-dropdown .dropdown-menu { min-width: 220px; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 27909332c4f0c..d71d08d0765a0 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -8302,15 +8302,15 @@ height: 50px; z-index: 202; - min-width: 200px; /* must be width of menu + padding + padding of sidenav */ - max-width: 200px; /* must be width of menu + padding + padding of sidenav */ - width: 200px; /* must be width of menu + padding + padding of sidenav */ + min-width: 245px; /* must be width of menu + padding + padding of sidenav */ + max-width: 245px; /* must be width of menu + padding + padding of sidenav */ + width: 245px; /* must be width of menu + padding + padding of sidenav */ } .loginbuttonexternal { width: 260px; } .side-nav-vert .user-menu .dropdown-menu { - width: 234px !important; + width: 278px !important; /* must be width of menu + padding + padding of sidenav */ } div.login_block_other { margin-right: unset;