Skip to content

Commit

Permalink
Merge pull request #129 from rafa62/master
Browse files Browse the repository at this point in the history
Order by bankaccountname
  • Loading branch information
rafa62 authored Dec 14, 2018
2 parents 3a8ae12 + ad28d25 commit eb5bd54
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
36 changes: 18 additions & 18 deletions DailyBankTransactions.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php
/* Allows you to view all bank transactions for a selected date range, and the inquiry can be filtered by matched or unmatched transactions, or all transactions can be chosen. */
// DailyBankTransactions.php
// Allows you to view all bank transactions for a selected date range, and the inquiry can be filtered by matched or unmatched transactions, or all transactions can be chosen.

include ('includes/session.php');
$Title = _('Bank Transactions Inquiry');
$ViewTopic = 'GeneralLedger';
$BookMark = 'DailyBankTransactions';

include ('includes/header.php');

if (isset($_GET['BankAccount'])) {
Expand All @@ -23,16 +25,17 @@

if (!isset($_POST['Show'])) {

$SQL = "SELECT bankaccountname,
bankaccounts.accountcode,
bankaccounts.currcode
FROM bankaccounts
INNER JOIN chartmaster
ON bankaccounts.accountcode=chartmaster.accountcode
INNER JOIN bankaccountusers
ON bankaccounts.accountcode=bankaccountusers.accountcode
WHERE bankaccountusers.userid = '" . $_SESSION['UserID'] . "'";

$SQL = "SELECT
bankaccountname,
bankaccounts.accountcode,
bankaccounts.currcode
FROM bankaccounts
INNER JOIN chartmaster
ON bankaccounts.accountcode=chartmaster.accountcode
INNER JOIN bankaccountusers
ON bankaccounts.accountcode=bankaccountusers.accountcode
WHERE bankaccountusers.userid = '" . $_SESSION['UserID'] . "'
ORDER BY bankaccountname";
$ErrMsg = _('The bank accounts could not be retrieved because');
$DbgMsg = _('The SQL used to retrieve the bank accounts was');
$AccountsResults = DB_query($SQL, $ErrMsg, $DbgMsg);
Expand All @@ -58,15 +61,13 @@
exit;
} else {
while ($MyRow = DB_fetch_array($AccountsResults)) {
/*list the bank account names */
// List bank accounts by name:
if (!isset($_POST['BankAccount']) and $MyRow['currcode'] == $_SESSION['CompanyRecord']['currencydefault']) {
$_POST['BankAccount'] = $MyRow['accountcode'];
}
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>';
}
echo '<option',
( (isset($_POST['BankAccount']) and $_POST['BankAccount'] == $MyRow['accountcode']) ? ' selected="selected"' : '' ),
' value="', $MyRow['accountcode'], '">', $MyRow['bankaccountname'], ' - ', $MyRow['currcode'], '</option>';
}
echo '</select>
</td>
Expand Down Expand Up @@ -245,5 +246,4 @@
echo '</form>';
}
include ('includes/footer.php');

?>
3 changes: 3 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ For changelogs earlier than v4.14.1, please refer to [CHANGELOG_ARCHIVE.md].

| Description | Type | Author | Date | Details | Ref |
|:-----------:|:----:|:------:|:----:|:-------:|:---:|
| Order by bankaccountname | Changed | Rafael Chacón | 2018-12-14 | In DailyBankTransactions.php, in input form, sorts bank accounts by name in bank account selection. | |
| Add option to print the BOM from the entry screen | Changed | Tim Schofield | 2018-12-08 | [View](https://github.com/webERP-team/webERP/commit/cb5754b1228b93a3ae34d993b2f9e3d484aeaf0f) | |
| Add option to import po items | Changed | express achiever | 2018-12-06 | [View](https://github.com/webERP-team/webERP/commit/c24c5217369d9c2299b16c680d06d9bed0354a3d) | |
| Change field_help_text code (part 1) | Changed | Rafael Chacón | 2018-12-06 | [View](https://github.com/webERP-team/webERP/commit/5b660abb2f2360cfea500ea9cbb5dcfdd4e217be) | |
| Add page_info_text class | Added | Rafael Chacón | 2018-12-05 | [View](https://github.com/webERP-team/webERP/commit/06151046399d29d04e37f37c88aa63cc7b235d3f) | |
| Delete unneeded images | Removed | Rafael Chacón | 2018-12-05 | [View](https://github.com/webERP-team/webERP/commit/f40435a7891c72e46b77af6fa2b5441a29ce16a3) | |
Expand Down

0 comments on commit eb5bd54

Please sign in to comment.