From: <vv...@us...> - 2015-04-03 15:41:25
|
Revision: 7258 http://sourceforge.net/p/web-erp/reponame/7258 Author: vvs2012 Date: 2015-04-03 15:41:23 +0000 (Fri, 03 Apr 2015) Log Message: ----------- Show bank reconciliation balance for the current period. Modified Paths: -------------- trunk/BankReconciliation.php Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2015-04-01 11:25:51 UTC (rev 7257) +++ trunk/BankReconciliation.php 2015-04-03 15:41:23 UTC (rev 7258) @@ -149,16 +149,11 @@ /*Get the balance of the bank account concerned */ - $sql = "SELECT MAX(period) - FROM chartdetails - WHERE accountcode='" . $_POST['BankAccount']."'"; - $PrdResult = DB_query($sql); - $myrow = DB_fetch_row($PrdResult); - $LastPeriod = $myrow[0]; + $PeriodNo = GetPeriod(date($_SESSION['DefaultDateFormat']), $db); $SQL = "SELECT bfwd+actual AS balance FROM chartdetails - WHERE period='" . $LastPeriod . "' + WHERE period='" . $PeriodNo . "' AND accountcode='" . $_POST['BankAccount']."'"; $ErrMsg = _('The bank account balance could not be returned by the SQL because'); |