Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
This commit is contained in:
commit
8b0b824471
@ -1889,6 +1889,9 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
{
|
||||
print '<textarea cols="30" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'</textarea>';
|
||||
}
|
||||
else{
|
||||
print '<input type="hidden" name="'.$fieldlist[$field].'" value="'.$transkey.'">';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
||||
@ -1951,7 +1954,13 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($fieldlist[$field]=='sortorder') $fieldlist[$field]='position';
|
||||
|
||||
$fieldValue = isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'';
|
||||
|
||||
if ($fieldlist[$field]=='sortorder')
|
||||
{
|
||||
$fieldlist[$field]='position';
|
||||
}
|
||||
|
||||
$classtd=''; $class='';
|
||||
if ($fieldlist[$field]=='code') $classtd='width100';
|
||||
@ -1972,7 +1981,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
}
|
||||
if ($tabname == MAIN_DB_PREFIX.'c_payment_term') {
|
||||
$langs->load("bills");
|
||||
$transkey="PaymentCondition".strtoupper($obj->code);
|
||||
$transkey="PaymentConditionShort".strtoupper($obj->code);
|
||||
}
|
||||
if ($transkey && $langs->trans($transkey) != $transkey)
|
||||
{
|
||||
@ -1982,8 +1991,11 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
}
|
||||
if (! $transfound)
|
||||
{
|
||||
print '<input type="text" class="flat'.($class?' '.$class:'').'" value="'.dol_escape_htmltag(isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'">';
|
||||
print '<input type="text" class="flat'.($class?' '.$class:'').'" value="'.dol_escape_htmltag($fieldValue).'" name="'.$fieldlist[$field].'">';
|
||||
}
|
||||
else{
|
||||
print '<input type="hidden" name="'.$fieldlist[$field].'" value="'.$transkey.'">';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -5558,7 +5558,8 @@ class Form
|
||||
if ($prefixforautocompletemode == 'societe') $prefixforautocompletemode='company';
|
||||
$confkeyforautocompletemode=strtoupper($prefixforautocompletemode).'_USE_SEARCH_TO_SELECT'; // For example COMPANY_USE_SEARCH_TO_SELECT
|
||||
|
||||
$fieldstoshow='t.ref';
|
||||
if (((float) DOL_VERSION) < 10 && $objecttmp->element == 'facture') $fieldstoshow = 't.facnumber';
|
||||
else $fieldstoshow='t.ref';
|
||||
if (! empty($objecttmp->fields)) // For object that declare it, it is better to use declared fields ( like societe, contact, ...)
|
||||
{
|
||||
$tmpfieldstoshow='';
|
||||
|
||||
@ -245,12 +245,12 @@ if ($action == 'set')
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
|
||||
if ($action == 'other')
|
||||
{
|
||||
$value = GETPOST('activate_units', 'alpha');
|
||||
$res = dolibarr_set_const($db, "PRODUCT_USE_UNITS", $value, 'chaine', 0, '', $conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
//if ($action == 'other')
|
||||
//{
|
||||
// $value = GETPOST('activate_units', 'alpha');
|
||||
// $res = dolibarr_set_const($db, "PRODUCT_USE_UNITS", $value, 'chaine', 0, '', $conf->entity);
|
||||
// if (! $res > 0) $error++;
|
||||
//}
|
||||
|
||||
if ($action)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user