Skip to content

Commit

Permalink
Merge branch '20.0' of [email protected]:Dolibarr/dolibarr.git into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 6, 2024
2 parents ed207cf + 4207048 commit 875a8dc
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
23 changes: 17 additions & 6 deletions htdocs/compta/facture/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand All @@ -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) {
Expand Down Expand Up @@ -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');
Expand All @@ -2035,6 +2036,7 @@
// Special properties of replacement invoice

$object->situation_counter += 1;

$id = $object->createFromCurrent($user);
if ($id <= 0) {
$mesg = $object->error;
Expand All @@ -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++;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/bookmarks_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@

print "\n";
print "<!-- Begin Bookmarks list -->\n";
print '<div class="center"><div class="center" style="padding: 6px;">';
print '<div class="center"><div class="center" style="padding: 30px;">';
print '<style>.menu_titre { padding-top: 7px; }</style>';
print '<div id="blockvmenusearch" class="tagtable center searchpage">'."\n";
print $bookmarkList;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/search_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
// Show all forms
print "\n";
print "<!-- Begin SearchForm -->\n";
print '<div class="center"><div class="center" style="padding: 6px;">';
print '<div class="center"><div class="center" style="padding: 30px;">';
print '<style>.menu_titre { padding-top: 7px; }</style>';
print '<div id="blockvmenusearch" class="tagtable center searchpage">'."\n";
print $searchform;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/theme/eldy/dropdown.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions htdocs/theme/eldy/global.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 875a8dc

Please sign in to comment.