Skip to content

Commit

Permalink
Merge branch '18.0' of [email protected]:Dolibarr/dolibarr.git into 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 19, 2024
2 parents ab5d5a3 + 832284e commit 7117ec5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion htdocs/core/actions_addupdatedelete.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@
} elseif ($object->fields[$key]['type'] == 'datetime') {
$value = dol_mktime(GETPOST($key.'hour', 'int'), GETPOST($key.'min', 'int'), GETPOST($key.'sec', 'int'), GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int'), 'tzuserrel');
} elseif ($object->fields[$key]['type'] == 'duration') {
$value = 60 * 60 * GETPOST($key.'hour', 'int') + 60 * GETPOST($key.'min', 'int');
$hour = intval(GETPOST($key.'hour', 'int'));
$min = intval(GETPOST($key.'min', 'int'));
$value = 60 * 60 * $hour + 60 * $min;
} elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) {
$value = price2num(GETPOST($key, 'alphanohtml')); // To fix decimal separator according to lang setup
} elseif ($object->fields[$key]['type'] == 'boolean') {
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/class/html.form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -5938,9 +5938,9 @@ public function form_multicurrency_rate($page, $rate = '', $htmlname = 'multicur
print '</form>';
} else {
if (!empty($rate)) {
print price($rate, 1, $langs, 1, 0);
print price($rate, 1, $langs, 0, 0);
if ($currency && $rate != 1) {
print ' &nbsp; (' . price($rate, 1, $langs, 1, 0) . ' ' . $currency . ' = 1 ' . $conf->currency . ')';
print ' &nbsp; (' . price($rate, 1, $langs, 0, 0) . ' ' . $currency . ' = 1 ' . $conf->currency . ')';
}
} else {
print 1;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/company.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function societe_prepare_head(Societe $object)
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= " WHERE p.fk_soc = ".((int) $object->id);
$sql .= " AND entity IN (".getEntity($object->element).")";
$sql .= " AND p.entity IN (".getEntity($object->element).")";
// Add where from hooks
$parameters = array('contacttab' => true);
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
Expand Down

0 comments on commit 7117ec5

Please sign in to comment.