Thread: [Weberp-svn] SF.net SVN: weberp:[5763] trunk/GLTrialBalance.php
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-07-11 16:43:34
|
Revision: 5763 http://weberp.svn.sourceforge.net/weberp/?rev=5763&view=rev Author: tim_schofield Date: 2011-07-11 16:43:28 +0000 (Mon, 11 Jul 2011) Log Message: ----------- Remove old references to $PageSecurity Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-07-11 16:43:16 UTC (rev 5762) +++ trunk/GLTrialBalance.php 2011-07-11 16:43:28 UTC (rev 5763) @@ -7,9 +7,6 @@ and shows the balance sheets as at the end of the period selected - so first off need to show the input of criteria screen while the user is selecting the criteria the system is posting any unposted transactions */ - -//$PageSecurity = 8; - include ('includes/session.inc'); $title = _('Trial Balance'); include('includes/SQL_CommonFunctions.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-12 13:25:05
|
Revision: 5941 http://weberp.svn.sourceforge.net/weberp/?rev=5941&view=rev Author: tim_schofield Date: 2011-07-12 13:24:59 +0000 (Tue, 12 Jul 2011) Log Message: ----------- Remove unnecessary use of SID Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-07-12 13:24:48 UTC (rev 5940) +++ trunk/GLTrialBalance.php 2011-07-12 13:24:59 UTC (rev 5941) @@ -23,7 +23,7 @@ include ('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; + echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (Date('m') > $_SESSION['YearEnd']){ @@ -38,7 +38,7 @@ /*Show a form to allow input of criteria for TB to show */ echo '<table class=selection><tr><td>' . _('Select Period From:') . '</td><td><select Name="FromPeriod">'; - $nextYear = date("Y-m-d",strtotime("+1 Year")); + $nextYear = date('Y-m-d',strtotime('+1 Year')); $sql = "SELECT periodno, lastdate_in_period FROM periods @@ -148,7 +148,7 @@ $title = _('Trial Balance') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu'). '</a>'; if ($debug==1){ echo '<br />'. $SQL; } @@ -160,7 +160,7 @@ include('includes/header.inc'); echo '<br />'; prnMsg( _('There were no entries to print out for the selections specified') ); - echo '<br /><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="'. $rootpath.'/index.php">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } @@ -380,7 +380,7 @@ } else { include('includes/header.inc'); - echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; + echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type=hidden name="FromPeriod" value="' . $_POST['FromPeriod'] . '"><input type=hidden name="ToPeriod" value="' . $_POST['ToPeriod'] . '">'; @@ -599,7 +599,7 @@ $CheckPeriodActual += $AccountPeriodActual; $CheckPeriodBudget += $AccountPeriodBudget; - $ActEnquiryURL = '<a href="'. $rootpath . '/GLAccountInquiry.php?' . SID . 'Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '<a>'; + $ActEnquiryURL = '<a href="'. $rootpath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '<a>'; printf('<td>%s</td> <td>%s</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-14 15:56:48
|
Revision: 6172 http://weberp.svn.sourceforge.net/weberp/?rev=6172&view=rev Author: tim_schofield Date: 2011-07-14 15:56:42 +0000 (Thu, 14 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-07-14 15:56:31 UTC (rev 6171) +++ trunk/GLTrialBalance.php 2011-07-14 15:56:42 UTC (rev 6172) @@ -37,7 +37,7 @@ $period=GetPeriod($FromDate, $db); /*Show a form to allow input of criteria for TB to show */ - echo '<table class=selection><tr><td>' . _('Select Period From:') . '</td><td><select Name="FromPeriod">'; + echo '<table class="selection"><tr><td>' . _('Select Period From:') . '</td><td><select Name="FromPeriod">'; $nextYear = date('Y-m-d',strtotime('+1 Year')); $sql = "SELECT periodno, lastdate_in_period @@ -431,7 +431,7 @@ /*show a table of the accounts info returned by the SQL Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ - echo '<table cellpadding=2 class=selection>'; + echo '<table cellpadding=2 class="selection">'; echo '<tr><th colspan=6><font size=3 color=blue><b>'. _('Trial Balance for the month of ') . $PeriodToDate . _(' and for the ') . $NumberOfMonths . _(' months to ') . $PeriodToDate .'</b></font></th></tr>'; $TableHeader = '<tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-15 15:04:00
|
Revision: 6315 http://weberp.svn.sourceforge.net/weberp/?rev=6315&view=rev Author: tim_schofield Date: 2011-07-15 15:03:54 +0000 (Fri, 15 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-07-15 15:03:43 UTC (rev 6314) +++ trunk/GLTrialBalance.php 2011-07-15 15:03:54 UTC (rev 6315) @@ -479,10 +479,10 @@ } elseif ($ParentGroups[$Level]==$myrow['parentgroupname']) { printf('<tr> <td colspan=2><font size=2><I>%s ' . _('Total') . ' </I></font></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> </tr>', $ParentGroups[$Level], number_format($GrpActual[$Level],2), @@ -499,10 +499,10 @@ do { printf('<tr> <td colspan=2><font size=2><I>%s ' . _('Total') . ' </I></font></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> </tr>', $ParentGroups[$Level], number_format($GrpActual[$Level],2), @@ -523,10 +523,10 @@ if ($Level>0){ printf('<tr> <td colspan=2><font size=2><I>%s ' . _('Total') . ' </I></font></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> </tr>', $ParentGroups[$Level], number_format($GrpActual[$Level],2), @@ -603,10 +603,10 @@ printf('<td>%s</td> <td>%s</td> - <td class=number>%s</td> - <td class=number>%s</td> - <td class=number>%s</td> - <td class=number>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> </tr>', $ActEnquiryURL, $myrow['accountname'], @@ -627,10 +627,10 @@ } elseif ($ParentGroups[$Level]==$myrow['parentgroupname']) { printf('<tr> <td colspan=2><font size=2><I>%s ' . _('Total') . ' </I></font></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> </tr>', $ParentGroups[$Level], number_format($GrpActual[$Level],2), @@ -647,10 +647,10 @@ do { printf('<tr> <td colspan=2><font size=2><I>%s ' . _('Total') . ' </I></font></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> </tr>', $ParentGroups[$Level], number_format($GrpActual[$Level],2), @@ -671,10 +671,10 @@ if ($Level >0){ printf('<tr> <td colspan=2><font size=2><I>%s ' . _('Total') . ' </I></font></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> - <td class=number><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> + <td class="number"><I>%s</I></td> </tr>', $ParentGroups[$Level], number_format($GrpActual[$Level],2), @@ -697,10 +697,10 @@ printf('<tr bgcolor="#ffffff"> <td colspan=2><font color=BLUE><b>' . _('Check Totals') . '</b></font></td> - <td class=number>%s</td> - <td class=number>%s</td> - <td class=number>%s</td> - <td class=number>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> </tr>', number_format($CheckMonth,2), number_format($CheckBudgetMonth,2), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-16 09:52:10
|
Revision: 6500 http://weberp.svn.sourceforge.net/weberp/?rev=6500&view=rev Author: tim_schofield Date: 2011-07-16 09:52:04 +0000 (Sat, 16 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-07-16 09:51:53 UTC (rev 6499) +++ trunk/GLTrialBalance.php 2011-07-16 09:52:04 UTC (rev 6500) @@ -382,7 +382,7 @@ include('includes/header.inc'); echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<input type=hidden name="FromPeriod" value="' . $_POST['FromPeriod'] . '"><input type=hidden name="ToPeriod" value="' . $_POST['ToPeriod'] . '">'; + echo '<input type="hidden" name="FromPeriod" value="' . $_POST['FromPeriod'] . '"><input type="hidden" name="ToPeriod" value="' . $_POST['ToPeriod'] . '" />'; $NumberOfMonths = $_POST['ToPeriod'] - $_POST['FromPeriod'] + 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-07-16 18:13:47
|
Revision: 6676 http://weberp.svn.sourceforge.net/weberp/?rev=6676&view=rev Author: tim_schofield Date: 2011-07-16 18:13:42 +0000 (Sat, 16 Jul 2011) Log Message: ----------- XHTML quoting corrections Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-07-16 18:13:30 UTC (rev 6675) +++ trunk/GLTrialBalance.php 2011-07-16 18:13:42 UTC (rev 6676) @@ -91,8 +91,8 @@ } echo '</select></td></tr></table><br />'; - echo '<div class="centre"><input type=submit Name="ShowTB" Value="' . _('Show Trial Balance') .'">'; - echo '<input type=submit Name="PrintPDF" Value="'._('PrintPDF').'"></div>'; + echo '<div class="centre"><input type="submit" Name="ShowTB" Value="' . _('Show Trial Balance') .'">'; + echo '<input type="submit" Name="PrintPDF" Value="'._('PrintPDF').'"></div>'; /*Now do the posting while the user is thinking about the period to select */ @@ -708,7 +708,7 @@ number_format($CheckPeriodBudget,2)); echo '</table><br />'; - echo '<div class="centre"><input type=submit Name="SelectADifferentPeriod" Value="' . _('Select A Different Period') . '"></div>'; + echo '<div class="centre"><input type="submit" name="SelectADifferentPeriod" value="' . _('Select A Different Period') . '" /></div>'; } echo '</form>'; include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-08-07 16:29:04
|
Revision: 7615 http://weberp.svn.sourceforge.net/weberp/?rev=7615&view=rev Author: tim_schofield Date: 2011-08-07 16:28:58 +0000 (Sun, 07 Aug 2011) Log Message: ----------- XHTML corrections to code Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-08-07 16:28:47 UTC (rev 7614) +++ trunk/GLTrialBalance.php 2011-08-07 16:28:58 UTC (rev 7615) @@ -21,8 +21,7 @@ if ((! isset($_POST['FromPeriod']) AND ! isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod'])){ include ('includes/header.inc'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . - _('Trial Balance') . '" alt="" />' . ' ' . $title . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -426,8 +425,7 @@ _('No general ledger accounts were returned by the SQL because'), _('The SQL that failed was:')); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . - _('Trial Balance') . '" alt="" />' . ' ' . _('Trial Balance Report') . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . _('Trial Balance Report') . '</p>'; /*show a table of the accounts info returned by the SQL Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-06-15 10:36:30
|
Revision: 9005 http://weberp.svn.sourceforge.net/weberp/?rev=9005&view=rev Author: tim_schofield Date: 2012-06-15 10:36:19 +0000 (Fri, 15 Jun 2012) Log Message: ----------- Corrections for sub totals Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2012-06-15 08:57:00 UTC (rev 9004) +++ trunk/GLTrialBalance.php 2012-06-15 10:36:19 UTC (rev 9005) @@ -463,12 +463,11 @@ $CheckPeriodBudget = 0; while ($myrow=DB_fetch_array($AccountsResult)) { - if ($myrow['groupname']!= $ActGrp ){ if ($ActGrp !=''){ //so its not the first account group of the first account displayed if ($myrow['parentgroupname']==$ActGrp){ $Level++; - $ParentGroups[$Level]=$myrow['groupname']; + $ParentGroups[$Level]=$myrow['parentgroupname']; $GrpActual[$Level] =0; $GrpBudget[$Level] =0; $GrpPrdActual[$Level] =0; @@ -502,7 +501,7 @@ <td class="number"><i>%s</i></td> <td class="number"><i>%s</i></td> </tr>', - $ParentGroups[$Level], + $ActGrp, locale_money_format($GrpActual[$Level],$_SESSION['CompanyRecord']['currencydefault']), locale_money_format($GrpBudget[$Level],$_SESSION['CompanyRecord']['currencydefault']), locale_money_format($GrpPrdActual[$Level],$_SESSION['CompanyRecord']['currencydefault']), @@ -517,30 +516,30 @@ $j++; } while ($Level>0 and $myrow['groupname']!=$ParentGroups[$Level]); + } + if ($Level>0){ + printf('<tr> + <td colspan="2"><font size="2"><i>%s ' . _('Total') . ' </i></font></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + <td class="number"><i>%s</i></td> + </tr>', + $ActGrp, + locale_money_format($GrpActual[$Level-1],$_SESSION['CompanyRecord']['currencydefault']), + locale_money_format($GrpBudget[$Level-1],$_SESSION['CompanyRecord']['currencydefault']), + locale_money_format($GrpPrdActual[$Level-1],$_SESSION['CompanyRecord']['currencydefault']), + locale_money_format($GrpPrdBudget[$Level-1],$_SESSION['CompanyRecord']['currencydefault'])); - if ($Level>0){ - printf('<tr> - <td colspan="2"><font size="2"><i>%s ' . _('Total') . ' </i></font></td> - <td class="number"><i>%s</i></td> - <td class="number"><i>%s</i></td> - <td class="number"><i>%s</i></td> - <td class="number"><i>%s</i></td> - </tr>', - $ParentGroups[$Level], - locale_money_format($GrpActual[$Level],$_SESSION['CompanyRecord']['currencydefault']), - locale_money_format($GrpBudget[$Level],$_SESSION['CompanyRecord']['currencydefault']), - locale_money_format($GrpPrdActual[$Level],$_SESSION['CompanyRecord']['currencydefault']), - locale_money_format($GrpPrdBudget[$Level],$_SESSION['CompanyRecord']['currencydefault'])); - - $GrpActual[$Level] =0; - $GrpBudget[$Level] =0; - $GrpPrdActual[$Level] =0; - $GrpPrdBudget[$Level] =0; - $ParentGroups[$Level]=''; - } else { - $Level=1; - } + $GrpActual[$Level] =0; + $GrpBudget[$Level] =0; + $GrpPrdActual[$Level] =0; + $GrpPrdBudget[$Level] =0; + $ParentGroups[$Level]=''; + } else { + $Level=1; } + } $ParentGroups[$Level]=$myrow['groupname']; $ActGrp = $myrow['groupname']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-06-29 21:35:51
|
Revision: 9275 http://weberp.svn.sourceforge.net/weberp/?rev=9275&view=rev Author: tim_schofield Date: 2012-06-29 21:35:45 +0000 (Fri, 29 Jun 2012) Log Message: ----------- Provide event handler for new Ajax functionality Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2012-06-29 21:35:36 UTC (rev 9274) +++ trunk/GLTrialBalance.php 2012-06-29 21:35:45 UTC (rev 9275) @@ -22,7 +22,7 @@ include ('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (Date('m') > $_SESSION['YearEnd']){ @@ -379,7 +379,7 @@ } else { include('includes/header.inc'); - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form onsubmit="return SubmitForm(this)" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="FromPeriod" value="' . $_POST['FromPeriod'] . '" /> <input type="hidden" name="ToPeriod" value="' . $_POST['ToPeriod'] . '" />'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-09-06 09:17:43
|
Revision: 9588 http://weberp.svn.sourceforge.net/weberp/?rev=9588&view=rev Author: tim_schofield Date: 2012-09-06 09:17:32 +0000 (Thu, 06 Sep 2012) Log Message: ----------- GLTrialBalance.php-Make some changes for new layout structure Modified Paths: -------------- trunk/GLTrialBalance.php Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2012-09-06 09:17:23 UTC (rev 9587) +++ trunk/GLTrialBalance.php 2012-09-06 09:17:32 UTC (rev 9588) @@ -18,10 +18,9 @@ $_POST['SelectADifferentPeriod']=_('Select A Different Period'); } -if ((! isset($_POST['FromPeriod']) AND ! isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod'])){ +if ((! isset($_POST['FromPeriod']) AND ! isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod']) or (isset($_POST['PrintPDF']) and $_POST['PrintPDF']=='PrintPDF')){ include ('includes/header.inc'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -36,7 +35,12 @@ $period=GetPeriod($FromDate, $db); /*Show a form to allow input of criteria for TB to show */ - echo '<table class="selection"><tr><td>' . _('Select Period From:') . '</td><td><select name="FromPeriod">'; + echo '<table class="selection">'; + echo '<tr> + <th class="header" colspan="2"><img src="'.$rootpath.'/css/'.$theme.'/images/balance.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . $title . '</th> + </tr> + <tr> + <td>' . _('Select Period From:') . '</td><td><select name="FromPeriod">'; $nextYear = date('Y-m-d',strtotime('+1 Year')); $sql = "SELECT periodno, lastdate_in_period @@ -88,17 +92,19 @@ echo '<option value ="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } - echo '</select></td></tr></table><br />'; + echo '</select></td></tr></table>'; - echo '<div class="centre"><button type="submit" name="ShowTB">' . _('Show Trial Balance') .'</button>'; - echo '<button type="submit" name="PrintPDF">'._('PrintPDF').'</button></div><br />'; + echo '<div class="centre"><button type="submit" name="ShowTB" onclick="ChangeButtonValue(this, this.name)">' . _('Show Trial Balance') .'</button>'; + echo '<button type="submit" name="PrintPDF" onclick="ChangeButtonValue(this, this.name)">'._('PrintPDF').'</button></div>'; /*Now do the posting while the user is thinking about the period to select*/ include ('includes/GLPostings.inc'); -} else if (isset($_POST['PrintPDF'])) { +} +if (isset($_POST['PrintPDF']) and $_POST['PrintPDF']=='PrintPDF') { + include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Trial Balance') ); @@ -376,7 +382,7 @@ $pdf->OutputF($_SESSION['DatabaseName'] . '_GL_Trial_Balance_' . Date('Y-m-d_h-m-s') . '.pdf'); $pdf->__destruct(); exit; -} else { +} else if (isset($_POST['ShowTB']) and $_POST['ShowTB']=='ShowTB'){ include('includes/header.inc'); echo '<form onsubmit="return SubmitForm(this, \'\')" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; @@ -425,13 +431,20 @@ _('No general ledger accounts were returned by the SQL because'), _('The SQL that failed was:')); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Trial Balance') . '" alt="" />' . ' ' . _('Trial Balance Report') . '</p>'; - /*show a table of the accounts info returned by the SQL Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ echo '<table cellpadding="2" class="selection">'; - echo '<tr><th colspan="6" class="header">'. _('Trial Balance for the month of ') . $PeriodToDate . _(' and for the ') . $NumberOfMonths . _(' months to ') . $PeriodToDate .'</th></tr>'; + echo '<tr> + <th colspan="6" class="header"> + <img src="'.$rootpath.'/css/'.$theme.'/images/balance.png" title="" alt="" />'. + _('Trial Balance for the month of ') . $PeriodToDate . _(' and for the ') . $NumberOfMonths . _(' months to ') . $PeriodToDate .' + <a onClick="PrintTable(this)" class="tooltip"> + <img class="PrinterIcon" src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="" alt="" /> + <span class="custom info"><em>' . _('Information') . '</em>' . _('Click here to make a pdf of this table. A copy will be held in your spool queue.') . '</span> + </a> + </th> + </tr>'; $TableHeader = '<tr> <th>' . _('Account') . '</th> <th>' . _('Account Name') . '</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |