select by default, remove the show empty everywhere the field is required
This commit is contained in:
parent
cea7fd6894
commit
d2e2cad028
@ -927,7 +927,7 @@ if ($rowid > 0) {
|
||||
|
||||
// Bank account
|
||||
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("FinancialAccount").'</td><td>';
|
||||
$form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 1);
|
||||
$form->select_comptes(GETPOST('accountid'), 'accountid');
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Payment mode
|
||||
|
||||
@ -370,7 +370,7 @@ if ($action == 'create')
|
||||
{
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
$form->select_comptes($accountid, "accountid", 0, '', 1); // Affiche liste des comptes courant
|
||||
$form->select_comptes($accountid, "accountid", 0, ''); // Affiche liste des comptes courant
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -178,7 +178,7 @@ if ($action == 'create')
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
|
||||
$form->select_comptes($_POST["accountid"], "accountid", 0, "courant=1", 1); // Affiche liste des comptes courant
|
||||
$form->select_comptes($_POST["accountid"], "accountid", 0, "courant=1"); // Affiche liste des comptes courant
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
|
||||
|
||||
@ -496,7 +496,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
if ($facture->type != 2) print '<td><span class="fieldrequired">'.$langs->trans('AccountToCredit').'</span></td>';
|
||||
if ($facture->type == 2) print '<td><span class="fieldrequired">'.$langs->trans('AccountToDebit').'</span></td>';
|
||||
print '<td>';
|
||||
$form->select_comptes($accountid, 'accountid', 0, '', 2);
|
||||
$form->select_comptes($accountid, 'accountid', 0, '');
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td> </td>';
|
||||
|
||||
@ -236,7 +236,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
|
||||
print '<td>';
|
||||
$form->select_comptes(isset($_POST["accountid"]) ? $_POST["accountid"] : $charge->accountid, "accountid", 0, '', 1); // Show opend bank account list
|
||||
$form->select_comptes(isset($_POST["accountid"]) ? $_POST["accountid"] : $charge->accountid, "accountid", 0, ''); // Show opend bank account list
|
||||
print '</td></tr>';
|
||||
|
||||
// Number
|
||||
|
||||
@ -370,7 +370,7 @@ if ($action == 'create')
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
|
||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
|
||||
$form->select_comptes($fk_account, 'fk_account', 0, '');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -271,7 +271,7 @@ if ($action == 'create')
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("BankAccount").'</td><td>';
|
||||
$form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 2); // List of bank account available
|
||||
$form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1"); // List of bank account available
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -291,7 +291,7 @@ if (!empty($arrayfields['transaction']['checked'])) {
|
||||
// Filter: Bank account
|
||||
if (!empty($arrayfields['ba.label']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
$form->select_comptes($search_account, 'search_account', 0, '');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -3880,7 +3880,7 @@ class Form
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
if ($selected == $obj->rowid || ($num === 1 && empty($selected)))
|
||||
if ($selected == $obj->rowid || (empty($useempty) && $num === 1 && empty($selected)))
|
||||
{
|
||||
print '<option value="'.$obj->rowid.'" selected>';
|
||||
} else {
|
||||
|
||||
@ -215,7 +215,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans('AccountToCredit').'</td>';
|
||||
print '<td colspan="2">';
|
||||
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid") : $object->accountid, "accountid", 0, '', 1); // Show open bank account list
|
||||
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid") : $object->accountid, "accountid", 0, ''); // Show open bank account list
|
||||
print '</td></tr>';
|
||||
|
||||
// Number
|
||||
|
||||
@ -262,7 +262,7 @@ if ($action == 'create' || empty($action))
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
|
||||
print '<td colspan="2">';
|
||||
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", "int") : $expensereport->accountid, "accountid", 0, '', 1); // Show open bank account list
|
||||
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", "int") : $expensereport->accountid, "accountid"); // Show open bank account list
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user