From: <rc...@us...> - 2017-03-19 12:46:10
|
Revision: 7739 http://sourceforge.net/p/web-erp/reponame/7739 Author: rchacon Date: 2017-03-19 12:46:08 +0000 (Sun, 19 Mar 2017) Log Message: ----------- Rename AccountSectionsDef.inc to AccountSectionsDef.php Modified Paths: -------------- trunk/AnalysisHorizontalIncome.php trunk/AnalysisHorizontalPosition.php trunk/GLBalanceSheet.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTrialBalance.php trunk/includes/AccountSectionsDef.inc Added Paths: ----------- trunk/includes/AccountSectionsDef.php Modified: trunk/AnalysisHorizontalIncome.php =================================================================== --- trunk/AnalysisHorizontalIncome.php 2017-03-11 01:52:17 UTC (rev 7738) +++ trunk/AnalysisHorizontalIncome.php 2017-03-19 12:46:08 UTC (rev 7739) @@ -16,7 +16,7 @@ $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 +include('includes/AccountSectionsDef.php');// 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'); Modified: trunk/AnalysisHorizontalPosition.php =================================================================== --- trunk/AnalysisHorizontalPosition.php 2017-03-11 01:52:17 UTC (rev 7738) +++ trunk/AnalysisHorizontalPosition.php 2017-03-19 12:46:08 UTC (rev 7739) @@ -16,7 +16,7 @@ $ViewTopic = 'GeneralLedger';// Filename's id in ManualContents.php's TOC. $BookMark = 'AnalysisHorizontalPosition';// Anchor's id in the manual's html document. include('includes/SQL_CommonFunctions.inc'); -include('includes/AccountSectionsDef.inc'); // This loads the $Sections variable +include('includes/AccountSectionsDef.php'); // This loads the $Sections variable if(! isset($_POST['BalancePeriodEnd']) or isset($_POST['SelectADifferentPeriod'])) { Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2017-03-11 01:52:17 UTC (rev 7738) +++ trunk/GLBalanceSheet.php 2017-03-19 12:46:08 UTC (rev 7739) @@ -10,7 +10,7 @@ $ViewTopic = 'GeneralLedger';// Filename's id in ManualContents.php's TOC. $BookMark = 'BalanceSheet';// Anchor's id in the manual's html document. include('includes/SQL_CommonFunctions.inc'); -include('includes/AccountSectionsDef.inc'); // This loads the $Sections variable +include('includes/AccountSectionsDef.php'); // This loads the $Sections variable if (! isset($_POST['BalancePeriodEnd']) or isset($_POST['SelectADifferentPeriod'])){ Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2017-03-11 01:52:17 UTC (rev 7738) +++ trunk/GLProfit_Loss.php 2017-03-19 12:46:08 UTC (rev 7739) @@ -7,7 +7,7 @@ $ViewTopic= 'GeneralLedger';// Filename's id in ManualContents.php's TOC. $BookMark = 'ProfitAndLoss';// Anchor's id in the manual's html document. include('includes/SQL_CommonFunctions.inc'); -include('includes/AccountSectionsDef.inc'); // This loads the $Sections variable +include('includes/AccountSectionsDef.php'); // This loads the $Sections variable if (isset($_POST['FromPeriod']) and ($_POST['FromPeriod'] > $_POST['ToPeriod'])){ Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2017-03-11 01:52:17 UTC (rev 7738) +++ trunk/GLTagProfit_Loss.php 2017-03-19 12:46:08 UTC (rev 7739) @@ -5,7 +5,7 @@ include ('includes/session.inc'); $Title = _('Income and Expenditure by Tag'); include('includes/SQL_CommonFunctions.inc'); -include('includes/AccountSectionsDef.inc'); // This loads the $Sections variable +include('includes/AccountSectionsDef.php'); // This loads the $Sections variable $ViewTopic= 'GeneralLedger'; $BookMark = 'TagReports'; @@ -943,4 +943,4 @@ echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2017-03-11 01:52:17 UTC (rev 7738) +++ trunk/GLTrialBalance.php 2017-03-19 12:46:08 UTC (rev 7739) @@ -13,7 +13,7 @@ $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 +include('includes/AccountSectionsDef.php'); //this reads in the Accounts Sections array if (isset($_POST['FromPeriod']) Modified: trunk/includes/AccountSectionsDef.inc =================================================================== --- trunk/includes/AccountSectionsDef.inc 2017-03-11 01:52:17 UTC (rev 7738) +++ trunk/includes/AccountSectionsDef.inc 2017-03-19 12:46:08 UTC (rev 7739) @@ -7,4 +7,4 @@ $Sections[$secrow['sectionid']] = $secrow['sectionname']; } DB_free_result($SectionResult); // no longer needed -?> \ No newline at end of file +?> Added: trunk/includes/AccountSectionsDef.php =================================================================== --- trunk/includes/AccountSectionsDef.php (rev 0) +++ trunk/includes/AccountSectionsDef.php 2017-03-19 12:46:08 UTC (rev 7739) @@ -0,0 +1,10 @@ +<?php +/* $Id: AccountSectionsDef.php 6941 2014-10-26 23:18:08Z daintree $*/ +$Sections = array(); +$sql = 'SELECT sectionid, sectionname FROM accountsection ORDER by sectionid'; +$SectionResult = DB_query($sql); +while( $secrow = DB_fetch_array($SectionResult) ) { + $Sections[$secrow['sectionid']] = $secrow['sectionname']; +} +DB_free_result($SectionResult); // no longer needed +?> |