From: <tim...@us...> - 2010-07-22 15:32:01
|
Revision: 3658 http://web-erp.svn.sourceforge.net/web-erp/?rev=3658&view=rev Author: tim_schofield Date: 2010-07-22 15:31:55 +0000 (Thu, 22 Jul 2010) Log Message: ----------- Add in running balance. Cumulative for BS account, and period for PL accounts. Modified Paths: -------------- trunk/GLAccountInquiry.php trunk/doc/Change.log.html Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2010-07-22 12:15:25 UTC (rev 3657) +++ trunk/GLAccountInquiry.php 2010-07-22 15:31:55 UTC (rev 3658) @@ -146,7 +146,7 @@ echo '<br><table class=selection>'; - echo '<tr><th colspan=7><b>' ._('Transactions for account').' '.$SelectedAccount. ' - '. $SelectedAccountName.'</b></th></tr>'; + echo '<tr><th colspan=8><b>' ._('Transactions for account').' '.$SelectedAccount. ' - '. $SelectedAccountName.'</b></th></tr>'; $TableHeader = "<tr> <th>" . _('Type') . "</th> <th>" . _('Number') . "</th> @@ -154,6 +154,7 @@ <th>" . _('Debit') . "</th> <th>" . _('Credit') . "</th> <th>" . _('Narrative') . "</th> + <th>" . _('Balance') . "</th> <th>" . _('Tag') . "</th> </tr>"; @@ -162,7 +163,7 @@ if ($PandLAccount==True) { $RunningTotal = 0; } else { - // added to fix bug with Brought Forward Balance always being zero + // added to fix bug with Brought Forward Balance always being zero $sql = "SELECT bfwd, actual, period @@ -198,7 +199,6 @@ $k=0; //row colour counter $IntegrityReport=''; while ($myrow=DB_fetch_array($TransResult)) { - if ($myrow['periodno']!=$PeriodNo){ if ($PeriodNo!=-9999){ //ie its not the first time around /*Get the ChartDetails balance b/fwd and the actual movement in the account for the period as recorded in the chart details - need to ensure integrity of transactions to the chart detail movements. Also, for a balance sheet account it is the balance carried forward that is important, not just the transactions*/ @@ -217,11 +217,17 @@ echo "<tr bgcolor='#FDFEEF'> <td colspan=3><b>" . _('Total for period') . ' ' . $PeriodNo . '</b></td>'; if ($PeriodTotal < 0 ){ //its a credit balance b/fwd + if ($PandLAccount==True) { + $RunningTotal = 0; + } echo '<td></td> <td class=number><b>' . number_format(-$PeriodTotal,2) . '</b></td> <td></td> </tr>'; } else { //its a debit balance b/fwd + if ($PandLAccount==True) { + $RunningTotal = 0; + } echo '<td class=number><b>' . number_format($PeriodTotal,2) . '</b></td> <td colspan=2></td> </tr>'; @@ -268,6 +274,7 @@ <td class=number>%s</td> <td class=number>%s</td> <td>%s</td> + <td class=number><b>%s</b></td> <td>%s</td> </tr>", $myrow['typename'], @@ -277,6 +284,7 @@ $DebitAmount, $CreditAmount, $myrow['narrative'], + number_format($RunningTotal,2), $tagrow['tagdescription']); } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-07-22 12:15:25 UTC (rev 3657) +++ trunk/doc/Change.log.html 2010-07-22 15:31:55 UTC (rev 3658) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>22/07/10 Tim: GLAccountInquiry.php - Add in running balance. Cumulative for BS account, and period for PL accounts.</p> <p>22/07/10 Simon Peter Otandeka: FixedAssetList.php - New script that provides a simple list of assets and their properties.</p> <p>22/07/10 Tim: FixedAssetJournal.php - Corrections to depreciation calculation layout changes, and sql quoting</p> <p>22/07/10 Tim: SalesGraph.php - Update to latest phplot, add in choice of graph types layout changes, and sql quoting</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |