From: <rc...@us...> - 2015-02-22 17:16:44
|
Revision: 7170 http://sourceforge.net/p/web-erp/reponame/7170 Author: rchacon Date: 2015-02-22 17:16:36 +0000 (Sun, 22 Feb 2015) Log Message: ----------- Adjust page_title and add "Print This" and "Return" buttons with icon to Statement of Comprehensive Income and Trial Balance scripts. Add code documentation and removes redundant $ViewTopic and $BookMark in GLTrialBalance.php. Modified Paths: -------------- trunk/GLProfit_Loss.php trunk/GLTrialBalance.php trunk/doc/Change.log Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2015-02-22 04:57:51 UTC (rev 7169) +++ trunk/GLProfit_Loss.php 2015-02-22 17:16:36 UTC (rev 7170) @@ -1,6 +1,6 @@ <?php /* $Id$*/ -/* This script shows the profit and loss of the company for the range of periods entered. */ +/* Shows the profit and loss of the company for the range of periods entered. */ include ('includes/session.inc'); $Title = _('Profit and Loss');// Screen identification. @@ -22,8 +22,9 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img alt="" class="noprint" src="'.$RootPath.'/css/'.$Theme. '/images/printer.png" title="' .// Icon image. - _('Print') . '" /> ' .// Icon title. + _('Print Statement of Comprehensive Income') . '" /> ' .// Icon title. _('Print Profit and Loss Report') . '</p>';// Page title. +// _('Print Statement of Comprehensive Income') . '</p>';// Page title. echo '<div class="page_help_text">' . _('Profit and loss statement (P&L), also called an Income Statement, or Statement of Operations, this is the statement that indicates how the revenue (money received from the sale of products and services before expenses are taken out, also known as the "top line") is transformed into the net income (the result after all revenues and expenses have been accounted for, also known as the "bottom line").') . '<br />' @@ -407,7 +408,7 @@ $SectionPrdBudget +=$AccountPeriodBudget; if ($_POST['Detail'] == 'Detailed') { - + if (isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountPeriodActual <> 0 OR $AccountPeriodBudget <> 0 OR $AccountPeriodLY <> 0))){ //condition for pdf $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,$myrow['accountcode']); $LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,190,$FontSize,$myrow['accountname']); @@ -609,10 +610,17 @@ $AccountsResult = DB_query($SQL,_('No general ledger accounts were returned by the SQL because'),_('The SQL that failed was')); + // Page title as IAS1 numerals 10 and 51: + include_once('includes/CurrenciesArray.php');// Array to retrieve currency name. echo '<p class="page_title_text"><img alt="" class="noprint" src="'.$RootPath.'/css/'.$Theme. - '/images/transactions.png" title="' .// Icon image. - _('General Ledger Profit Loss Inquiry') . '" /> ' .// Icon title. - _('Statement of Profit and Loss for the') . ' ' . $NumberOfMonths . ' ' . _('months to') . ' and including ' . $PeriodToDate . '</p>';// Page title. + '/images/gl.png" title="' .// Icon image. + _('Statement of Comprehensive Income') . '" /> ' .// Icon title. + _('Profit and Loss Statement') . '<br />' .// Page title, reporting statement. +// _('Statement of Comprehensive Income') . '<br />' .// Page title, reporting statement. + stripslashes($_SESSION['CompanyRecord']['coyname']) . '<br />' .// Page title, reporting entity. + _('For') . ' ' . $NumberOfMonths . ' ' . _('months to') . ' ' . $PeriodToDate . '<br />' .// Page title, reporting period. +// _('From') . ' ' . $PeriodFromDate? . ' ' . _('to') . ' ' . $PeriodToDate . '<br />' .// Page title, reporting period. ?????????? + _('All amounts stated in').': '. _($CurrencyName[$_SESSION['CompanyRecord']['currencydefault']]).'</p>';// Page title, reporting presentation currency and level of rounding used. /*show a table of the accounts info returned by the SQL Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ @@ -1294,7 +1302,15 @@ <td colspan="6"><hr /></td> </tr>'; echo '</table>'; - echo '<br /><div class="centre noprint"><input type="submit" name="SelectADifferentPeriod" value="' . _('Select A Different Period') . '" /></div>'; + echo '<br /> + <div class="centre noprint">'. + '<button onclick="javascript:window.print()" type="button"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/printer.png" /> ' . _('Print This') . '</button>'.// "Print This" button. + '<button name="SelectADifferentPeriod" type="submit" value="'. _('Select A Different Period') .'"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/gl.png" /> ' . _('Select A Different Period') . '</button>'.// "Select A Different Period" button. + '<button formaction="index.php" type="submit"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/previous.png" /> ' . ('Return') . '</button>'.// "Return" button. + '</div>'; } echo '</div>'; echo '</form>'; Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2015-02-22 04:57:51 UTC (rev 7169) +++ trunk/GLTrialBalance.php 2015-02-22 17:16:36 UTC (rev 7170) @@ -1,14 +1,17 @@ <?php - /* $Id$*/ +/* Shows the trial balance for the month and the for the period selected together with the budgeted trial balances. */ -/*Through deviousness AND cunning, this system allows trial balances for any date range that recalcuates the p & l balances +/*Through deviousness AND cunning, this system allows trial balances for any date range that recalculates the P&L balances 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 */ include ('includes/session.inc'); -$Title = _('Trial Balance'); +$Title = _('Trial Balance');// Screen identification. +$ViewTopic= 'GeneralLedger';// Filename's id in ManualContents.php's TOC. +$BookMark = 'TrialBalance';// Anchor's id in the manual's html document. + include('includes/SQL_CommonFunctions.inc'); include('includes/AccountSectionsDef.inc'); //this reads in the Accounts Sections array @@ -25,13 +28,12 @@ AND ! isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod'])){ - $ViewTopic = 'GeneralLedger'; - $BookMark = 'TrialBalance'; + include ('includes/header.inc'); + echo '<p class="page_title_text"><img alt="" class="noprint" src="'.$RootPath.'/css/'.$Theme. + '/images/printer.png" title="' .// Icon image. + _('Print Trial Balance') . '" /> ' .// Icon title. + _('Trial Balance') . '</p>';// Page title. - 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 '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -161,8 +163,6 @@ $AccountsResult = DB_query($SQL); if (DB_error_no() !=0) { $Title = _('Trial Balance') . ' - ' . _('Problem Report') . '....'; - $ViewTopic = 'GeneralLedger'; - $BookMark = 'TrialBalance'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg() ); echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>'; @@ -174,8 +174,6 @@ } if (DB_num_rows($AccountsResult)==0){ $Title = _('Print Trial Balance Error'); - $ViewTopic = 'GeneralLedger'; - $BookMark = 'TrialBalance'; include('includes/header.inc'); echo '<p>'; prnMsg( _('There were no entries to print out for the selections specified') ); @@ -435,16 +433,17 @@ $AccountsResult = DB_query($SQL, _('No general ledger accounts were returned by the SQL because'), _('The SQL that failed was:')); - echo '<p class="page_title_text noprint"><img src="'.$RootPath.'/css/'.$Theme.'/images/magnifier.png" title="' . - _('Trial Balance') . '" alt="" />' . ' ' . _('Trial Balance Report') . '</p>'; + echo '<p class="page_title_text"><img alt="" class="noprint" src="'.$RootPath.'/css/'.$Theme. + '/images/gl.png" title="' .// Icon image. + _('Trial Balance') . '" /> ' .// Icon title. + _('Trial Balance for the month of ') . $PeriodToDate . '<br />' . + _(' AND for the ') . $NumberOfMonths . ' ' . _('months to') . ' ' . $PeriodToDate;// Page title. /*show a table of the accounts info returned by the SQL - Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ + Account Code, Account Name, Month Actual, Month Budget, Period Actual, Period Budget */ echo '<table cellpadding="2" class="selection">'; - echo '<tr> - <th colspan="6"><b>' . _('Trial Balance for the month of ') . $PeriodToDate . _(' AND for the ') . $NumberOfMonths . _(' months to ') . $PeriodToDate . '</b></th> - </tr>'; + $TableHeader = '<tr> <th>' . _('Account') . '</th> <th>' . _('Account Name') . '</th> @@ -727,12 +726,18 @@ locale_number_format($CheckPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces'])); echo '</table><br />'; - echo '<div class="centre noprint"> - <input type="submit" name="SelectADifferentPeriod" value="' . _('Select A Different Period') . '" /> - </div>'; + + echo '<div class="centre noprint">'. + '<button onclick="javascript:window.print()" type="button"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/printer.png" /> ' . _('Print This') . '</button>'.// "Print This" button. + '<button name="SelectADifferentPeriod" type="submit" value="'. _('Select A Different Period') .'"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/gl.png" /> ' . _('Select A Different Period') . '</button>'.// "Select A Different Period" button. + '<button formaction="index.php" type="submit"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/previous.png" /> ' . ('Return') . '</button>'.// "Return" button. + '</div>'; } echo '</div> </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-02-22 04:57:51 UTC (rev 7169) +++ trunk/doc/Change.log 2015-02-22 17:16:36 UTC (rev 7170) @@ -1,5 +1,6 @@ webERP Change Log +22/2/15 RChacon: Adjust page_title and add "Print This" and "Return" buttons with icon to Statement of Comprehensive Income and Trial Balance scripts. Add code documentation and removes redundant $ViewTopic and $BookMark in GLTrialBalance.php. 22/2/15 RChacon: Add missing preview.png and new previous.png icons. Add "Print This" and "Return" buttons with icon in GLBalanceSheet.php. 22/2/15 Simon Rhodes: added global $db; statements to functions in ConnectDB_mysql.inc that had been missed for the transaction functions 21/2/15 RChacon: Add headings, page-title and centre-align styles to print.css. Improve page title to use with print.css and add code documentation in GLBalanceSheet.php. |