Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Default Bank Account
09-30-2015, 07:25 AM,
Default Bank Account
Hi All
I would like to make a default bank account be listed in the Bank Account drop down for Payments.php I have tried to change the line 793 without much success.
Any help would be greatly appreciated.
09-30-2015, 10:55 AM, (This post was last modified: 09-30-2015, 10:59 AM by TurboPT.)
RE: Default Bank Account
What version do you have? For me, line 793 is located in an if block that would be printed if you have not yet setup any bank accounts.

However, in the else block, just before the blank option echo, you could add this:

PHP Code:
if( !array_key_exists('BankAccount'$_POST) ) {
$_POST['BankAccount'] = 'your bank code here'

So that the option matching that code will be set to 'selected' within the loop that creates all the options.
09-30-2015, 12:32 PM,
RE: Default Bank Account
It is version 4.11.3
Here is the current code
/*list the bank account names */
if (isset($_POST['BankAccount']) AND $_POST['BankAccount']==$myrow['accountcode']){
echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>';
} else {
echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>';
09-30-2015, 07:30 PM,
RE: Default Bank Account
It would be nice to have a default bank account per user that the payments/receipts scripts pointed to. This could either be part of www_users table or the bankaccountusers table.

09-30-2015, 11:05 PM, (This post was last modified: 09-30-2015, 11:05 PM by TurboPT.)
RE: Default Bank Account
@Tim: yes, that would be a good idea.

@Dave: Understood, but the idea is still the same. Place the suggested block of code before the first blank option. The blank option output should be just above the loop, and the code would go before that line.
10-01-2015, 10:09 AM,
RE: Default Bank Account
Thanks for the help works great.

Forum Jump:

Users browsing this thread: 1 Guest(s)