Value "None" To unbind is more visible.

This commit is contained in:
Laurent Destailleur 2019-12-16 11:50:25 +01:00
parent 28bcb49957
commit 646587a9cf
7 changed files with 18 additions and 10 deletions

View File

@ -119,7 +119,7 @@ if (!empty($id)) {
print '<input type="hidden" name="action" value="ventil">'; print '<input type="hidden" name="action" value="ventil">';
print '<input type="hidden" name="backtopage" value="'.dol_escape_htmltag($backtopage).'">'; print '<input type="hidden" name="backtopage" value="'.dol_escape_htmltag($backtopage).'">';
print load_fiche_titre($langs->trans('CustomersVentilation'), '', 'title_setup'); print load_fiche_titre($langs->trans('CustomersVentilation'), '', 'title_accountancy');
dol_fiche_head(); dol_fiche_head();

View File

@ -37,6 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("bills", "compta", "accountancy", "productbatch")); $langs->loadLangs(array("bills", "compta", "accountancy", "productbatch"));
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$account_parent = GETPOST('account_parent'); $account_parent = GETPOST('account_parent');
$changeaccount = GETPOST('changeaccount'); $changeaccount = GETPOST('changeaccount');
// Search Getpost // Search Getpost
@ -389,7 +391,7 @@ if ($result) {
print '<td>'.$objp->tva_intra.'</td>'; print '<td>'.$objp->tva_intra.'</td>';
print '<td class="center">'; print '<td class="center">';
print $codecompta.' <a href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">'; print $codecompta.' <a class="editfielda" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
print img_edit(); print img_edit();
print '</a>'; print '</a>';
print '</td>'; print '</td>';

View File

@ -121,7 +121,7 @@ if (!empty($id)) {
print '<input type="hidden" name="action" value="ventil">'; print '<input type="hidden" name="action" value="ventil">';
print '<input type="hidden" name="backtopage" value="'.dol_escape_htmltag($backtopage).'">'; print '<input type="hidden" name="backtopage" value="'.dol_escape_htmltag($backtopage).'">';
print load_fiche_titre($langs->trans('ExpenseReportsVentilation'), '', 'title_setup'); print load_fiche_titre($langs->trans('ExpenseReportsVentilation'), '', 'title_accountancy');
dol_fiche_head(); dol_fiche_head();

View File

@ -36,6 +36,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("compta","bills","other","accountancy","trips","productbatch")); $langs->loadLangs(array("compta","bills","other","accountancy","trips","productbatch"));
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$account_parent = GETPOST('account_parent', 'int'); $account_parent = GETPOST('account_parent', 'int');
$changeaccount = GETPOST('changeaccount'); $changeaccount = GETPOST('changeaccount');
// Search Getpost // Search Getpost

View File

@ -121,7 +121,7 @@ if (!empty($id)) {
print '<input type="hidden" name="action" value="ventil">'; print '<input type="hidden" name="action" value="ventil">';
print '<input type="hidden" name="backtopage" value="'.dol_escape_htmltag($backtopage).'">'; print '<input type="hidden" name="backtopage" value="'.dol_escape_htmltag($backtopage).'">';
print load_fiche_titre($langs->trans('SuppliersVentilation'), '', 'title_setup'); print load_fiche_titre($langs->trans('SuppliersVentilation'), '', 'title_accountancy');
dol_fiche_head(); dol_fiche_head();

View File

@ -39,6 +39,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("compta", "bills", "other", "accountancy", "productbatch")); $langs->loadLangs(array("compta", "bills", "other", "accountancy", "productbatch"));
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$account_parent = GETPOST('account_parent'); $account_parent = GETPOST('account_parent');
$changeaccount = GETPOST('changeaccount'); $changeaccount = GETPOST('changeaccount');
// Search Getpost // Search Getpost

View File

@ -277,9 +277,15 @@ class FormAccounting extends Form
$out = ''; $out = '';
$options = array(); $options = array();
if ($showempty == 2)
{
$options['0'] = '--- '.$langs->trans("None").' ---';
}
if ($usecache && ! empty($this->options_cache[$usecache])) if ($usecache && ! empty($this->options_cache[$usecache]))
{ {
$options = $this->options_cache[$usecache]; $options = array_merge($options, $this->options_cache[$usecache]);
$selected=$selectid; $selected=$selectid;
} }
else else
@ -333,14 +339,10 @@ class FormAccounting extends Form
if ($usecache) if ($usecache)
{ {
$this->options_cache[$usecache] = $options; $this->options_cache[$usecache] = $options;
unset($this->options_cache[$usecache]['0']);
} }
} }
if ($showempty == 2)
{
$options['0'] = $langs->trans("None");
}
$out .= Form::selectarray($htmlname, $options, $selected, ($showempty > 0 ? 1 : 0), 0, 0, '', 0, 0, 0, '', $morecss, 1); $out .= Form::selectarray($htmlname, $options, $selected, ($showempty > 0 ? 1 : 0), 0, 0, '', 0, 0, 0, '', $morecss, 1);
return $out; return $out;