Skip to content

Commit

Permalink
add service duration
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Jan 11, 2024
1 parent 796ce65 commit 7d073b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions class/actions_easytooltip.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function getTooltipContent($parameters, &$object, &$action, $hookmanager)
$dur = ["i" => $langs->trans("Minute"), "h" => $langs->trans("Hour"), "d" => $langs->trans("Day"), "w" => $langs->trans("Week"), "m" => $langs->trans("Month"), "y" => $langs->trans("Year")];
}
$tooltip .= (!empty($object->duration_unit) && isset($dur[$object->duration_unit]) ? " " . $langs->trans($dur[$object->duration_unit]) : '');
self::array_splice_assoc($parameters['tooltipcontentarray'], 4, 0, ['duration' => $tooltip]);
self::arraySpliceAssoc($parameters['tooltipcontentarray'], 4, 0, ['duration' => $tooltip]);
}
// ADDING LAST CUSTOMER ORDER
if ($object->type == Product::TYPE_PRODUCT || ($object->type == Product::TYPE_SERVICE && getDolGlobalString('STOCK_SUPPORTS_SERVICES'))) {
Expand Down Expand Up @@ -287,15 +287,15 @@ public function getTooltipContent($parameters, &$object, &$action, $hookmanager)
}

/**
* array_splice_assoc
* arraySpliceAssoc
*
* @param mixed $input
* @param mixed $offset
* @param mixed $length
* @param mixed $replacement
* @return void
*/
private function array_splice_assoc(&$input, $offset, $length, $replacement)
private function arraySpliceAssoc(&$input, $offset, $length, $replacement)
{
$replacement = (array) $replacement;
$key_indices = array_flip(array_keys($input));
Expand Down

0 comments on commit 7d073b4

Please sign in to comment.