Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
This commit is contained in:
commit
7117ec5a7c
3 changed files with 6 additions and 4 deletions
|
|
@ -95,7 +95,9 @@ if ($action == 'add' && !empty($permissiontoadd)) {
|
|||
} 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') {
|
||||
|
|
|
|||
|
|
@ -5938,9 +5938,9 @@ class Form
|
|||
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 ' (' . price($rate, 1, $langs, 1, 0) . ' ' . $currency . ' = 1 ' . $conf->currency . ')';
|
||||
print ' (' . price($rate, 1, $langs, 0, 0) . ' ' . $currency . ' = 1 ' . $conf->currency . ')';
|
||||
}
|
||||
} else {
|
||||
print 1;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue