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>';
|
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>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
||||||
@ -1951,7 +1954,13 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
}
|
}
|
||||||
else
|
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='';
|
$classtd=''; $class='';
|
||||||
if ($fieldlist[$field]=='code') $classtd='width100';
|
if ($fieldlist[$field]=='code') $classtd='width100';
|
||||||
@ -1972,7 +1981,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
}
|
}
|
||||||
if ($tabname == MAIN_DB_PREFIX.'c_payment_term') {
|
if ($tabname == MAIN_DB_PREFIX.'c_payment_term') {
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$transkey="PaymentCondition".strtoupper($obj->code);
|
$transkey="PaymentConditionShort".strtoupper($obj->code);
|
||||||
}
|
}
|
||||||
if ($transkey && $langs->trans($transkey) != $transkey)
|
if ($transkey && $langs->trans($transkey) != $transkey)
|
||||||
{
|
{
|
||||||
@ -1982,8 +1991,11 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
}
|
}
|
||||||
if (! $transfound)
|
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>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5558,7 +5558,8 @@ class Form
|
|||||||
if ($prefixforautocompletemode == 'societe') $prefixforautocompletemode='company';
|
if ($prefixforautocompletemode == 'societe') $prefixforautocompletemode='company';
|
||||||
$confkeyforautocompletemode=strtoupper($prefixforautocompletemode).'_USE_SEARCH_TO_SELECT'; // For example COMPANY_USE_SEARCH_TO_SELECT
|
$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, ...)
|
if (! empty($objecttmp->fields)) // For object that declare it, it is better to use declared fields ( like societe, contact, ...)
|
||||||
{
|
{
|
||||||
$tmpfieldstoshow='';
|
$tmpfieldstoshow='';
|
||||||
|
|||||||
@ -245,12 +245,12 @@ if ($action == 'set')
|
|||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'other')
|
//if ($action == 'other')
|
||||||
{
|
//{
|
||||||
$value = GETPOST('activate_units', 'alpha');
|
// $value = GETPOST('activate_units', 'alpha');
|
||||||
$res = dolibarr_set_const($db, "PRODUCT_USE_UNITS", $value, 'chaine', 0, '', $conf->entity);
|
// $res = dolibarr_set_const($db, "PRODUCT_USE_UNITS", $value, 'chaine', 0, '', $conf->entity);
|
||||||
if (! $res > 0) $error++;
|
// if (! $res > 0) $error++;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if ($action)
|
if ($action)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user