From: <rc...@us...> - 2015-08-13 18:41:51
|
Revision: 7337 http://sourceforge.net/p/web-erp/reponame/7337 Author: rchacon Date: 2015-08-13 18:41:48 +0000 (Thu, 13 Aug 2015) Log Message: ----------- Add new script AnalysisHorizontalIncome.php to generate an horizontal analysis of the statement of comprehensive income. In AnalysisHorizontalPosition.php, adjust signs and add report footnote. Modified Paths: -------------- trunk/AnalysisHorizontalPosition.php trunk/GLProfit_Loss.php trunk/doc/Change.log trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.12.3-4.13.sql Added Paths: ----------- trunk/AnalysisHorizontalIncome.php Added: trunk/AnalysisHorizontalIncome.php =================================================================== --- trunk/AnalysisHorizontalIncome.php (rev 0) +++ trunk/AnalysisHorizontalIncome.php 2015-08-13 18:41:48 UTC (rev 7337) @@ -0,0 +1,532 @@ +<?php +/* $Id: AnalysisHorizontalIncome.php 7332 2015-08-04 03:27:51Z rchacon $*/ +/* Shows the horizontal analysis of the statement of comprehensive income. */ + +function RelativeVariation($SelectedPeriod, $PreviousPeriod) { + // Calculates the relative variation between selected and previous periods. Uses percent in locale number format. + if($PreviousPeriod<>0) { + return locale_number_format(($SelectedPeriod-$PreviousPeriod)*100/$PreviousPeriod,$_SESSION['CompanyRecord']['decimalplaces']) . '%'; + } else { + return _('N/A'); + } +} + +include ('includes/session.inc'); +$Title = _('Horizontal Analysis of Statement of Comprehensive Income');// Screen identification. +$ViewTopic= 'GeneralLedger';// Filename's id in ManualContents.php's TOC. +$BookMark = 'AnalysisHorizontalIncome';// Anchor's id in the manual's html document. +include('includes/SQL_CommonFunctions.inc'); +include('includes/AccountSectionsDef.inc'); // This loads the $Sections variable + +if(isset($_POST['FromPeriod']) and ($_POST['FromPeriod'] > $_POST['ToPeriod'])) { + prnMsg(_('The selected period from is actually after the period to') . '! ' . _('Please reselect the reporting period'),'error'); + $_POST['SelectADifferentPeriod']='Select A Different Period'; +} + +if((!isset($_POST['FromPeriod']) AND !isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod'])) { + + include('includes/header.inc'); + echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/printer.png" title="', // Icon image. + _('Print Horizontal Analysis of Statement of Comprehensive Income'), '" /> ', // Icon title. + _('Horizontal Analysis of Statement of Comprehensive Income'), '</p>';// Page title. + + echo '<div class="page_help_text">', + _('Horizontal analysis (also known as trend analysis) is a financial statement analysis technique that shows changes in the amounts of corresponding financial statement items over a period of time. It is a useful tool to evaluate trend situations.'), '<br />', + _('The statements for two periods are used in horizontal analysis. The earliest period is used as the base period. The items on the later statement are compared with items on the statement of the base period. The changes are shown both in currency (absolute variation) and percentage (relative variation).'), '<br />', + _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.'), '</div>', + // Show a form to allow input of criteria for the report to show: + '<form method="post" action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '">', + '<input type="hidden" name="FormID" value="', $_SESSION['FormID'], '" />', + '<br />', + '<table class="selection"> + <tr> + <td>', _('Select period from'), ':</td> + <td><select name="FromPeriod">'; + + if(Date('m') > $_SESSION['YearEnd']) { + /*Dates in SQL format */ + $DefaultFromDate = Date ('Y-m-d', Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y'))); + $FromDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y'))); + } else { + $DefaultFromDate = Date ('Y-m-d', Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); + $FromDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); + } + $period=GetPeriod($FromDate, $db); + + $sql = "SELECT periodno, lastdate_in_period + FROM periods + ORDER BY periodno DESC"; + $Periods = DB_query($sql); + + while($myrow=DB_fetch_array($Periods)) { + if(isset($_POST['FromPeriod']) AND $_POST['FromPeriod']!='') { + if( $_POST['FromPeriod']== $myrow['periodno']) { + echo '<option selected="selected" value="' . $myrow['periodno'] . '">' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + } else { + echo '<option value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + } + } else { + if($myrow['lastdate_in_period']==$DefaultFromDate) { + echo '<option selected="selected" value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + } else { + echo '<option value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + } + } + } + + echo '</select></td> + </tr> + <tr> + <td>', _('Select period to'), ':</td> + <td><select required="required" name="ToPeriod">'; + + if(!isset($_POST['ToPeriod']) OR $_POST['ToPeriod']=='') { + $LastDate = date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))); + $sql = "SELECT periodno FROM periods where lastdate_in_period = '" . $LastDate . "'"; + $MaxPrd = DB_query($sql); + $MaxPrdrow = DB_fetch_row($MaxPrd); + $DefaultToPeriod = (int) ($MaxPrdrow[0]); + } else { + $DefaultToPeriod = $_POST['ToPeriod']; + } + + $RetResult = DB_data_seek($Periods,0); + + while($myrow=DB_fetch_array($Periods)) { + echo '<option'; + if($myrow['periodno']==$DefaultToPeriod) { + echo ' selected="selected"'; + } + echo ' value="', $myrow['periodno'], '">', MonthAndYearFromSQLDate($myrow['lastdate_in_period']), '</option>'; + } + + echo '</select></td> + </tr> + <tr> + <td>', _('Detail or summary'), ':</td> + <td><select name="Detail" required="required" title="', _('Selecting Summary will show on the totals at the account group level'), '" > + <option value="Summary">', _('Summary'), '</option> + <option selected="selected" value="Detailed">', _('All Accounts'), '</option> + </select></td> + </tr> + <tr> + <td>', _('Show all accounts including zero balances'), '</td> + <td><input name="ShowZeroBalances" title="', _('Check this box to display all accounts including those accounts with no balance'), '" type="checkbox" /></td> + </tr> + </table> + <br />', // Form buttons: + '<div class="centre noprint">', + '<button name="ShowPL" type="submit" value="', _('Show on Screen (HTML)'), '"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/gl.png" /> ', _('Show on Screen (HTML)'), '</button> ', // "Show on Screen (HTML)" button. + '<button formaction="index.php?Application=GL" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/previous.png" /> ', _('Return'), '</button>', // "Return" button. + '</div>'; + + // Now do the posting while the user is thinking about the period to select: + include ('includes/GLPostings.inc'); + +} else { + include('includes/header.inc'); + + $NumberOfMonths = $_POST['ToPeriod'] - $_POST['FromPeriod'] + 1; + + if($NumberOfMonths >12) { + echo '<br />'; + prnMsg(_('A period up to 12 months in duration can be specified') . ' - ' . _('the system automatically shows a comparative for the same period from the previous year') . ' - ' . _('it cannot do this if a period of more than 12 months is specified') . '. ' . _('Please select an alternative period range'),'error'); + include('includes/footer.inc'); + exit; + } + + $sql = "SELECT lastdate_in_period FROM periods WHERE periodno='" . $_POST['ToPeriod'] . "'"; + $PrdResult = DB_query($sql); + $myrow = DB_fetch_row($PrdResult); + $PeriodToDate = MonthAndYearFromSQLDate($myrow[0]); + + // Page title as IAS 1, numerals 10 and 51: + include_once('includes/CurrenciesArray.php');// Array to retrieve currency name. + echo '<div id="Report">';// Division to identify the report block. + echo '<div id="Report">', // Division to identify the report block. + '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/gl.png" title="', // Icon image. + _('Horizontal Analysis of Statement of Comprehensive Income'), '" /> ', // Icon title. + _('Horizontal Analysis of 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. + _('All amounts stated in'), ': ', _($CurrencyName[$_SESSION['CompanyRecord']['currencydefault']]), '</p>';// Page title, reporting presentation currency and level of rounding used. + echo '<table class="scrollable"> + <thead> + <tr>'; + if($_POST['Detail']=='Detailed') {// Detailed report: + echo '<th class="text">', _('Account'), '</th> + <th class="text">', _('Account Name'), '</th>'; + } else {// Summary report: + echo '<th class="text" colspan="2">', _('Summary'), '</th>'; + } + echo '<th class="number">', ' - ', $myrow[0], '</th> + <th class="number">', _('Last Year'), '</th> + <th class="number">', _('Absolute variation'), '</th> + <th class="number">', _('Relative variation'), '</th> + </tr> + </thead> + <tfoot> + <tr> + <td class="text" colspan="6">',// Prints an explanation of signs in absolute and relative variations: + '<br /><b>', _('Notes'), ':</b><br />', + _('Absolute variation signs: a positive number indicates a variation that increases the net profit; a negative number indicates a variation that decreases the net profit.'), '<br />', + _('Relative variation signs: a positive number indicates an increase in the amount of that account; a negative number indicates a decrease in the amount of that account.'), '<br />', + '</td> + </tr> + </tfoot> + <tbody>';// thead and tfoot used in conjunction with tbody enable scrolling of the table body independently of the header and footer. Also, when printing a large table that spans multiple pages, these elements can enable the table header to be printed at the top of each page. + + $SQL = "SELECT accountgroups.sectioninaccounts, + accountgroups.parentgroupname, + accountgroups.groupname, + chartdetails.accountcode, + chartmaster.accountname, + SUM(CASE WHEN chartdetails.period='" . $_POST['FromPeriod'] . "' THEN chartdetails.bfwd ELSE 0 END) AS firstprdbfwd, + SUM(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lastprdcfwd, + SUM(CASE WHEN chartdetails.period='" . ($_POST['FromPeriod'] - 12) . "' THEN chartdetails.bfwd ELSE 0 END) AS firstprdbfwdly, + SUM(CASE WHEN chartdetails.period='" . ($_POST['ToPeriod']-12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lastprdcfwdly + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails + ON chartmaster.accountcode= chartdetails.accountcode + WHERE accountgroups.pandl=1 + GROUP BY accountgroups.sectioninaccounts, + accountgroups.parentgroupname, + accountgroups.groupname, + chartdetails.accountcode, + chartmaster.accountname + ORDER BY accountgroups.sectioninaccounts, + accountgroups.sequenceintb, + accountgroups.groupname, + chartdetails.accountcode"; + $AccountsResult = DB_query($SQL,_('No general ledger accounts were returned by the SQL because'),_('The SQL that failed was')); + + $PeriodTotal=0; + $PeriodTotalLY=0; + + $Section=''; + $SectionTotal=0; + $SectionTotalLY=0; + + $ActGrp=''; + $GrpTotal=array(0); + $GrpTotalLY=array(0); + $Level=0; + $ParentGroups=array(); + $ParentGroups[$Level]=''; + + $k=0;// Row colour counter. + $DrawTotalLine = '<tr> + <td colspan="2"> </td> + <td><hr /></td> + <td><hr /></td> + <td><hr /></td> + <td><hr /></td> + </tr>'; + + while($myrow=DB_fetch_array($AccountsResult)) { + if($myrow['groupname']!= $ActGrp) { + if($myrow['parentgroupname']!=$ActGrp AND $ActGrp!='') { + while($myrow['groupname']!=$ParentGroups[$Level] AND $Level>0) { + if($_POST['Detail']=='Detailed') { + echo $DrawTotalLine; + $ActGrpLabel = str_repeat('___',$Level) . $ParentGroups[$Level] . ' *' . _('total'); + } else { + $ActGrpLabel = str_repeat('___',$Level) . $ParentGroups[$Level]; + } + echo '<tr> + <td class="text" colspan="2">', $ActGrpLabel, '</td> + <td class="number">', locale_number_format(-$GrpTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotal[$Level]+$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$GrpTotal[$Level],-$GrpTotalLY[$Level]), '</td> + </tr>'; + $GrpTotal[$Level]=0; + $GrpTotalLY[$Level]=0; + $ParentGroups[$Level]=''; + $Level--; + }// End while. + + //still need to print out the old group totals + + if($_POST['Detail']=='Detailed') { + echo $DrawTotalLine; + $ActGrpLabel = str_repeat('___',$Level) . $ParentGroups[$Level] . ' ' . _('total'); + } else { + $ActGrpLabel = str_repeat('___',$Level) . $ParentGroups[$Level]; + } + +// ---> + if($Section ==1) {// Income + echo '<tr> + <td class="text" colspan="2">', $ActGrpLabel, '</td> + <td class="number">', locale_number_format(-$GrpTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotal[$Level]+$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$GrpTotal[$Level],-$GrpTotalLY[$Level]), '</td> + </tr>'; + } else {// Costs +// <--- + echo '<tr> + <td class="text" colspan="2">', $ActGrpLabel, '</td> + <td class="number">', locale_number_format(-$GrpTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotal[$Level]+$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$GrpTotal[$Level],-$GrpTotalLY[$Level]), '</td> + </tr>'; +// ---> + } +// <--- + $GrpTotalLY[$Level]=0; + $GrpTotal[$Level]=0; + $ParentGroups[$Level]=''; + } + } + + if($myrow['sectioninaccounts']!= $Section) { + + if($SectionTotal+$SectionTotalLY !=0) { + + if($Section==1) {// Income. + echo $DrawTotalLine; + echo '<tr> + <td class="text" colspan="2"><h2>', $Sections[$Section], '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotal+$SectionTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-$SectionTotal,-$SectionTotalLY), '</h2></td> + </tr>'; + $GPIncome = $SectionTotal; + $GPIncomeLY = $SectionTotalLY; + } else { + echo '<tr> + <td class="text" colspan="2"><h2>', $Sections[$Section], '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotal+$SectionTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-$SectionTotal,-$SectionTotalLY), '</h2></td> + </tr>'; + } + + if($Section==2) {// Cost of Sales - need sub total for Gross Profit. + echo $DrawTotalLine; + echo '<tr> + <td class="text" colspan="2"><h2>', _('Gross Profit'), '</h2></td> + <td class="number"><h2>', locale_number_format(-($GPIncome+$SectionTotal),$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-($GPIncomeLY+$SectionTotalLY),$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-($GPIncome+$SectionTotal)+($GPIncomeLY+$SectionTotalLY),$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-($GPIncome+$SectionTotal),-($GPIncomeLY+$SectionTotalLY)), '</h2></td> + </tr>'; + } + + if(($Section!=1) AND ($Section!=2)) { + echo $DrawTotalLine; + echo '<tr> + <td class="text" colspan="2"><h2>', _('Earnings after'), ' ', $Sections[$Section], '</h2></td> + <td class="number"><h2>', locale_number_format(-$PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$PeriodTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$PeriodTotal+$PeriodTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-$PeriodTotal,-$PeriodTotalLY), '</h2></td> + </tr>'; + echo $DrawTotalLine; + } + } + + $Section = $myrow['sectioninaccounts']; + $SectionTotal=0; + $SectionTotalLY=0; + + if($_POST['Detail']=='Detailed') { + echo '<tr> + <td colspan="6"><h2>', $Sections[$myrow['sectioninaccounts']], '</h2></td> + </tr>'; + } + } + + if($myrow['groupname']!= $ActGrp) { + if($myrow['parentgroupname']==$ActGrp AND $ActGrp !='') {// Adding another level of nesting + $Level++; + } + $ActGrp = $myrow['groupname']; + $ParentGroups[$Level] = $myrow['groupname']; + if($_POST['Detail']=='Detailed') { + echo '<tr> + <td colspan="6"><h2>', $myrow['groupname'], '</h2></td> + </tr>'; + } + } + + // Set totals for account, groups, section and period: + $AccountTotal = $myrow['lastprdcfwd'] - $myrow['firstprdbfwd']; + $AccountTotalLY = $myrow['lastprdcfwdly'] - $myrow['firstprdbfwdly']; + for ($i=0;$i<=$Level;$i++) { + if(!isset($GrpTotalLY[$i])) {$GrpTotalLY[$i]=0;} + $GrpTotalLY[$i] += $AccountTotalLY; + if(!isset($GrpTotal[$i])) {$GrpTotal[$i]=0;} + $GrpTotal[$i] += $AccountTotal; + } + $SectionTotal += $AccountTotal; + $SectionTotalLY += $AccountTotalLY; + $PeriodTotal += $AccountTotal; + $PeriodTotalLY += $AccountTotalLY; + + if($_POST['Detail']=='Detailed') { + if(isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountTotal <> 0 OR $AccountTotalLY <> 0))) { + if($k==1) { + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + echo '<td class="text"><a href="', $RootPath, '/GLAccountInquiry.php?Period=', $_POST['ToPeriod'], '&Account=', $myrow['accountcode'], '&Show=Yes">', $myrow['accountcode'], '</a></td>'; +// ---> + if($Section ==1) { + echo ' <td class="text">', htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), '</td> + <td class="number">', locale_number_format(-$AccountTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$AccountTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$AccountTotal+$AccountTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$AccountTotal,-$AccountTotalLY), '</td> + </tr>'; + } else { +// <--- + echo ' <td class="text">', htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), '</td> + <td class="number">', locale_number_format(-$AccountTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$AccountTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$AccountTotal+$AccountTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$AccountTotal,-$AccountTotalLY), '</td> + </tr>'; + } + } + } + }// End of loop. + + if($myrow['groupname']!= $ActGrp) { + if($myrow['parentgroupname']!=$ActGrp AND $ActGrp!='') { + while($myrow['groupname']!=$ParentGroups[$Level] AND $Level>0) { + if($_POST['Detail']=='Detailed') { + echo $DrawTotalLine; + $ActGrpLabel = str_repeat('___',$Level) . $ParentGroups[$Level] . ' ' . _('total'); + } else { + $ActGrpLabel = str_repeat('___',$Level) . $ParentGroups[$Level]; + } +// ---> + if($Section ==1) {// Income. + echo '<tr> + <td colspan="2"><h3>', $ActGrpLabel, '</h3></td> + <td class="number">', locale_number_format(-$GrpTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotal[$Level]+$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$GrpTotal[$Level],-$GrpTotalLY[$Level]), '</td> + </tr>'; + } else {// Costs. +// <--- + echo '<tr> + <td colspan="2"><h3>', $ActGrpLabel, '</h3></td> + <td class="number">', locale_number_format(-$GrpTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotal[$Level]+$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$GrpTotal[$Level],-$GrpTotalLY[$Level]), '</td> + </tr>'; + } + $GrpTotal[$Level]=0; + $GrpTotalLY[$Level]=0; + $ParentGroups[$Level]=''; + $Level--; + }// End while. + //still need to print out the old group totals + if($_POST['Detail']=='Detailed') { + echo $DrawTotalLine; + $ActGrpLabel = str_repeat('___',$Level) . $ParentGroups[$Level] . ' ' . _('total'); + } else { + $ActGrpLabel = str_repeat('___',$Level) . $ParentGroups[$Level]; + } + echo '<tr> + <td colspan="2"><h3>', $ActGrpLabel, '</h3></td> + <td class="number">', locale_number_format(-$GrpTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format(-$GrpTotal[$Level]+$GrpTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$GrpTotal[$Level],-$GrpTotalLY[$Level]), '</td> + </tr>'; + $GrpTotal[$Level]=0; + $GrpTotalLY[$Level]=0; + $ParentGroups[$Level]=''; + } + } + + if($myrow['sectioninaccounts']!= $Section) { + + if($Section==1) {// Income. + echo $DrawTotalLine, + '<tr> + <td colspan="2"><h2>', $Sections[$Section], '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotal+$SectionTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-$SectionTotal,-$SectionTotalLY), '</h2></td> + </tr>'; + $GPIncome = $SectionTotal; + $GPIncomeLY = $SectionTotalLY; + } else { + echo $DrawTotalLine, + '<tr> + <td colspan="2"><h2>', $Sections[$Section], '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionTotal+$SectionTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-$SectionTotal,-$SectionTotalLY), '</h2></td> + </tr>'; + } + if($Section==2) {// Cost of Sales - need sub total for Gross Profit. + echo $DrawTotalLine, + '<tr> + <td colspan="2"><h2>', _('Gross Profit'), '</h2></td> + <td class="number"><h2>', locale_number_format(-($GPIncome+$SectionTotal),$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-($GPIncomeLY+$SectionTotalLY),$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-($GPIncome+$SectionTotal)+($GPIncomeLY+$SectionTotalLY),$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-($GPIncome+$SectionTotal),-($GPIncomeLY+$SectionTotalLY)), '</h2></td> + </tr>'; + } + $Section = $myrow['sectioninaccounts']; + $SectionTotal=0; + $SectionTotalLY=0; + + if($_POST['Detail']=='Detailed' and isset($Sections[$myrow['sectioninaccounts']])) { + echo '<tr> + <td colspan="6"><h2>', $Sections[$myrow['sectioninaccounts']], '</h2></td> + </tr>'; + } + } + + echo $DrawTotalLine; + echo '<tr> + <td colspan="2"><h2>', _('Net Profit'), '</h2></td> + <td class="number"><h2>', locale_number_format(-$PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$PeriodTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', locale_number_format(-$PeriodTotal+$PeriodTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-$PeriodTotal,-$PeriodTotalLY), '</h2></td> + </tr>'; + echo $DrawTotalLine; + echo '</tbody>', // See comment at the begin of the table. + '</table> + </div>'; // Close div id="Report". + echo '<br />', + '<form method="post" action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '">', + '<input type="hidden" name="FormID" value="', $_SESSION['FormID'], '" />', + '<input type="hidden" name="FromPeriod" value="', $_POST['FromPeriod'], '" />', + '<input type="hidden" name="ToPeriod" value="', $_POST['ToPeriod'], '" />', // Form buttons: + '<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?Application=GL" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/previous.png" /> ', _('Return'), '</button>', // "Return" button. + '</div>'; +} +echo '</form>'; +include('includes/footer.inc'); +?> Modified: trunk/AnalysisHorizontalPosition.php =================================================================== --- trunk/AnalysisHorizontalPosition.php 2015-08-10 01:43:46 UTC (rev 7336) +++ trunk/AnalysisHorizontalPosition.php 2015-08-13 18:41:48 UTC (rev 7337) @@ -2,10 +2,10 @@ /* $Id: AnalysisHorizontalPosition.php 7268 2015-04-19 14:57:47Z rchacon $*/ /* Shows the horizontal analysis of the statement of financial position. */ -function RelativeVariation($CurrentPeriod, $PreviousPeriod) { - // Calculates the relative variation between current and previous periods. Uses percent in locale number format. +function RelativeVariation($SelectedPeriod, $PreviousPeriod) { + // Calculates the relative variation between selected and previous periods. Uses percent in locale number format. if($PreviousPeriod<>0) { - return locale_number_format(($CurrentPeriod-$PreviousPeriod)*100/$PreviousPeriod,$_SESSION['CompanyRecord']['decimalplaces']) . '%'; + return locale_number_format(($SelectedPeriod-$PreviousPeriod)*100/$PreviousPeriod,$_SESSION['CompanyRecord']['decimalplaces']) . '%'; } else { return _('N/A'); } @@ -82,12 +82,11 @@ </table> <br />', // Form buttons: '<div class="centre noprint">', - '<button name="ShowBalanceSheet" type="submit" value="', _('Show on Screen (HTML)'), '"><img alt="" src="', $RootPath, '/css/', $Theme, + '<button name="ShowPL" type="submit" value="', _('Show on Screen (HTML)'), '"><img alt="" src="', $RootPath, '/css/', $Theme, '/images/gl.png" /> ', _('Show on Screen (HTML)'), '</button> ', // "Show on Screen (HTML)" button. '<button formaction="index.php?Application=GL" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, '/images/previous.png" /> ', _('Return'), '</button>', // "Return" button. - '</div>', - '</form>'; + '</div>'; // Now do the posting while the user is thinking about the period to select: include ('includes/GLPostings.inc'); @@ -127,7 +126,16 @@ <th class="number">', _('Relative variation'), '</th> </tr> </thead> - <tbody>';// thead used in conjunction with tbody enable scrolling of the table body independently of the header and footer. Also, when printing a large table that spans multiple pages, these elements can enable the table header to be printed at the top of each page. + <tfoot> + <tr> + <td class="text" colspan="6">',// Prints an explanation of signs in absolute and relative variations: + '<br /><b>', _('Notes'), ':</b><br />', + _('Absolute variation signs: a positive number indicates a source of funds; a negative number indicates an application of funds.'), '<br />', + _('Relative variation signs: a positive number indicates an increase in the amount of that account; a negative number indicates a decrease in the amount of that account.'), '<br />', + '</td> + </tr> + </tfoot> + <tbody>';// thead and tfoot used in conjunction with tbody enable scrolling of the table body independently of the header and footer. Also, when printing a large table that spans multiple pages, these elements can enable the table header to be printed at the top of each page. // Calculate B/Fwd retained earnings: $SQL = "SELECT Sum(CASE WHEN chartdetails.period='" . $_POST['BalancePeriodEnd'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS accumprofitbfwd, @@ -179,7 +187,6 @@ $GroupTotal = array(0); $GroupTotalLY = array(0); - $j=0;// Row counter. $k=0;// Row colour counter. while($myrow=DB_fetch_array($AccountsResult)) { @@ -204,17 +211,16 @@ </tr>'; } echo '<tr> - <td colspan="2">', $ParentGroups[$Level], '</i></td> + <td colspan="2">', $ParentGroups[$Level], '</td> <td class="number">', locale_number_format($GroupTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> <td class="number">', locale_number_format($GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> - <td class="number">', locale_number_format($GroupTotal[$Level]-$GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> - <td class="number">', RelativeVariation($GroupTotal[$Level],$GroupTotalLY[$Level]), '</td> + <td class="number">', locale_number_format(-$GroupTotal[$Level]+$GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$GroupTotal[$Level],-$GroupTotalLY[$Level]), '</td> </tr>'; $GroupTotal[$Level]=0; $GroupTotalLY[$Level]=0; $ParentGroups[$Level]=''; $Level--; - $j++; } if($_POST['Detail']=='Detailed') { echo '<tr> @@ -229,13 +235,12 @@ <td class="text" colspan="2">', $ParentGroups[$Level], '</td> <td class="number">', locale_number_format($GroupTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> <td class="number">', locale_number_format($GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> - <td class="number">', locale_number_format($GroupTotal[$Level]-$GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> - <td class="number">', RelativeVariation($GroupTotal[$Level],$GroupTotalLY[$Level]), '</td> + <td class="number">', locale_number_format(-$GroupTotal[$Level]+$GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$GroupTotal[$Level],-$GroupTotalLY[$Level]), '</td> </tr>'; $GroupTotal[$Level]=0; $GroupTotalLY[$Level]=0; $ParentGroups[$Level]=''; - $j++; } } if($myrow['sectioninaccounts'] != $Section ) { @@ -261,10 +266,9 @@ <td class="text" colspan="2"><h2>', $Sections[$Section], '</h2></td> <td class="number"><h2>', locale_number_format($SectionBalance,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> <td class="number"><h2>', locale_number_format($SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> - <td class="number"><h2>', locale_number_format($SectionBalance-$SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> - <td class="number"><h2>', RelativeVariation($SectionBalance,$SectionBalanceLY), '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionBalance+$SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-$SectionBalance,-$SectionBalanceLY), '</h2></td> </tr>'; - $j++; } $SectionBalance=0; $SectionBalanceLY=0; @@ -292,7 +296,6 @@ $GroupTotalLY[$Level]=0; $ActGrp = $myrow['groupname']; $ParentGroups[$Level] = $myrow['groupname']; - $j++; } $SectionBalance += $AccountBalance; $SectionBalanceLY += $AccountBalanceLY; @@ -317,14 +320,12 @@ <td class="text">', htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), '</td> <td class="number">', locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']), '</td> <td class="number">', locale_number_format($AccountBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']), '</td> - <td class="number">', locale_number_format($AccountBalance-$AccountBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']), '</td> - <td class="number">', RelativeVariation($AccountBalance,$AccountBalanceLY), '</td> + <td class="number">', locale_number_format(-$AccountBalance+$AccountBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$AccountBalance,-$AccountBalanceLY), '</td> </tr>'; - $j++; } } - } - //end of loop + }// End of loop. while($myrow['groupname']!=$ParentGroups[$Level] AND $Level>0) { if($_POST['Detail']=='Detailed') { @@ -337,11 +338,11 @@ </tr>'; } echo '<tr> - <td colspan="2">', $ParentGroups[$Level], '</i></td> + <td colspan="2">', $ParentGroups[$Level], '</td> <td class="number">', locale_number_format($GroupTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> <td class="number">', locale_number_format($GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> - <td class="number">', locale_number_format($GroupTotal[$Level]-$GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> - <td class="number">', RelativeVariation($GroupTotal[$Level],$GroupTotalLY[$Level]), '</td> + <td class="number">', locale_number_format(-$GroupTotal[$Level]+$GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$GroupTotal[$Level],-$GroupTotalLY[$Level]), '</td> </tr>'; $Level--; } @@ -358,10 +359,9 @@ <td colspan="2">', $ParentGroups[$Level], '</td> <td class="number">', locale_number_format($GroupTotal[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> <td class="number">', locale_number_format($GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> - <td class="number">', locale_number_format($GroupTotal[$Level]-$GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> - <td class="number">', RelativeVariation($GroupTotal[$Level],$GroupTotalLY[$Level]), '</td> + <td class="number">', locale_number_format(-$GroupTotal[$Level]+$GroupTotalLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', RelativeVariation(-$GroupTotal[$Level],-$GroupTotalLY[$Level]), '</td> </tr>'; - echo '<tr> <td colspan="2"> </td> <td><hr /></td> @@ -369,13 +369,12 @@ <td><hr /></td> <td><hr /></td> </tr>'; - echo '<tr> <td colspan="2"><h2>', $Sections[$Section], '</h2></td> <td class="number"><h2>', locale_number_format($SectionBalance,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> <td class="number"><h2>', locale_number_format($SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> - <td class="number"><h2>', locale_number_format($SectionBalance-$SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> - <td class="number"><h2>', RelativeVariation($SectionBalance,$SectionBalanceLY), '</h2></td> + <td class="number"><h2>', locale_number_format(-$SectionBalance+$SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-$SectionBalance,-$SectionBalanceLY), '</h2></td> </tr>'; $Section = $myrow['sectioninaccounts']; @@ -392,15 +391,13 @@ <td><hr /></td> <td><hr /></td> </tr>'; - echo'<tr> <td colspan="2"><h2>', _('Check Total'), '</h2></td> <td class="number"><h2>', locale_number_format($CheckTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> <td class="number"><h2>', locale_number_format($CheckTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> - <td class="number"><h2>', locale_number_format($CheckTotal-$CheckTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> - <td class="number"><h2>', RelativeVariation($CheckTotal,$CheckTotalLY), '</h2></td> + <td class="number"><h2>', locale_number_format(-$CheckTotal+$CheckTotalLY,$_SESSION['CompanyRecord']['decimalplaces']), '</h2></td> + <td class="number"><h2>', RelativeVariation(-$CheckTotal,-$CheckTotalLY), '</h2></td> </tr>'; - echo '<tr> <td colspan="2"> </td> <td><hr /></td> @@ -408,15 +405,14 @@ <td><hr /></td> <td><hr /></td> </tr>'; - echo '</tbody>', // See comment at the begin of the table. '</table> - </div>', // Close div id="Report". - '<br />'; - - echo '<form method="post" action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '">', + </div>'; // Close div id="Report". + echo '<br />', + '<form method="post" action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '">', '<input type="hidden" name="FormID" value="', $_SESSION['FormID'], '" />', - '<input type="hidden" name="BalancePeriodEnd" value="', $_POST['BalancePeriodEnd'], '" />', // Form buttons: + '<input type="hidden" name="FromPeriod" value="', $_POST['FromPeriod'], '" />', + '<input type="hidden" name="ToPeriod" value="', $_POST['ToPeriod'], '" />', // Form buttons: '<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. @@ -424,9 +420,8 @@ '/images/gl.png" /> ', _('Select A Different Period'), '</button> ', // "Select A Different Period" button. '<button formaction="index.php?Application=GL" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, '/images/previous.png" /> ', _('Return'), '</button>', // "Return" button. - '</div>', - '</form>'; + '</div>'; } - +echo '</form>'; include('includes/footer.inc'); ?> Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2015-08-10 01:43:46 UTC (rev 7336) +++ trunk/GLProfit_Loss.php 2015-08-13 18:41:48 UTC (rev 7337) @@ -1305,18 +1305,17 @@ /* echo '</tbody>';// See comment at the begin of the table.*/ echo '</table>'; echo '</div>';// div id="Report". - 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?Application=GL" type="submit"><img alt="" src="'.$RootPath.'/css/'.$Theme. - '/images/previous.png" /> ' . _('Return') . '</button>'.// "Return" button. + echo '<br />', // Form buttons: + '<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?Application=GL" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/previous.png" /> ', _('Return'), '</button>', // "Return" button. '</div>'; } echo '</div>';// div class=? echo '</form>'; include('includes/footer.inc'); - -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-08-10 01:43:46 UTC (rev 7336) +++ trunk/doc/Change.log 2015-08-13 18:41:48 UTC (rev 7337) @@ -1,5 +1,6 @@ webERP Change Log +13/08/15 RChacon: Add new script AnalysisHorizontalIncome.php to generate an horizontal analysis of the statement of comprehensive income. In AnalysisHorizontalPosition.php, adjust signs and add report footnote. 05/08/15 RChacon: In AnalysisHorizontalPosition.php, modify DB_fetch_array() function because it requires only one parameter (thanks Tim). Other improvements. 04/08/15 RChacon: Add new script AnalysisHorizontalPosition.php to generate an horizontal analysis of the statement of financial position. 02/08/15 RChacon: In CustomerReceipt.php, move currency tags near currency ratesand other minor changes. Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2015-08-10 01:43:46 UTC (rev 7336) +++ trunk/includes/MainMenuLinksArray.php 2015-08-13 18:41:48 UTC (rev 7337) @@ -371,6 +371,8 @@ _('Daily Bank Transactions'), _('Profit and Loss Statement'), _('Balance Sheet'), + _('Horizontal Analysis of Statement of Comprehensive Income'), + _('Horizontal Analysis of Statement of Financial Position'), _('Tag Reports'), _('Tax Reports')); @@ -384,6 +386,8 @@ '/DailyBankTransactions.php', '/GLProfit_Loss.php', '/GLBalanceSheet.php', + '/AnalysisHorizontalIncome.php', + '/AnalysisHorizontalPosition.php', '/GLTagProfit_Loss.php', '/Tax.php'); Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-08-10 01:43:46 UTC (rev 7336) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-08-13 18:41:48 UTC (rev 7337) @@ -7,9 +7,10 @@ ALTER TABLE `loctransfercancellations` ADD INDEX `Index1` (`reference`, `stockid`) COMMENT ''; ALTER TABLE `loctransfercancellations` ADD INDEX `Index2` (`canceldate`, `reference`, `stockid`) COMMENT ''; --- Add new script: +-- Add new scripts: INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES - ('AnalysisHorizontalPosition.php', '8', 'Horizontal analysis of statement of financial position'); + ('AnalysisHorizontalIncome.php', '8', 'Shows the horizontal analysis of the statement of comprehensive income'), + ('AnalysisHorizontalPosition.php', '8', 'Shows the horizontal analysis of the statement of financial position'); -- Update version number: |