Merge pull request #15051 from laudeco/feature/11878_select_bank_account
11878 - select the only bank account
This commit is contained in:
commit
6fa174d13f
@ -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', 0, '', 2);
|
||||
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, '', 2); // 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", 2); // Affiche liste des comptes courant
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</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, '', 2); // 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, '', 2);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -3901,7 +3901,7 @@ class Form
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
if ($selected == $obj->rowid)
|
||||
if ($selected == $obj->rowid || ($useempty == 2 && $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, '', 2); // 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", 0, '', 2); // Show open bank account list
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user