diff --git a/AnalysisHorizontalIncome.php b/AnalysisHorizontalIncome.php index 5a46c1506..5ee2f8aa6 100644 --- a/AnalysisHorizontalIncome.php +++ b/AnalysisHorizontalIncome.php @@ -26,6 +26,11 @@ function RelativeChange($selected_period, $previous_period) { $_POST['SelectADifferentPeriod']='Select A Different Period'; } +if ($_POST['Period'] != '') { + $_POST['FromPeriod'] = ReportPeriod($_POST['Period'], 'From'); + $_POST['ToPeriod'] = ReportPeriod($_POST['Period'], 'To'); +} + include('includes/header.php'); if((!isset($_POST['FromPeriod']) AND !isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod'])) { echo '

diff --git a/GLCashFlowsIndirect.php b/GLCashFlowsIndirect.php index 479d1e010..50040fb12 100644 --- a/GLCashFlowsIndirect.php +++ b/GLCashFlowsIndirect.php @@ -68,6 +68,11 @@ function colDebitCredit($Amount) { prnMsg(_('The period should be 12 months or less in duration. Please select an alternative period range.'), 'error'); } +if ($_POST['Period'] != '') { + $_POST['PeriodFrom'] = ReportPeriod($_POST['Period'], 'From'); + $_POST['PeriodTo'] = ReportPeriod($_POST['Period'], 'To'); +} + // Main code: if(isset($_POST['PeriodFrom']) AND isset($_POST['PeriodTo']) AND $_POST['Action']!='New') {// If all parameters are set and valid, generates the report: echo '

', _('Show the budget for the period'), ' ', // "Checked" if ShowBudget is set AND it is TRUE. (!isset($_SESSION['ShowFieldHelp']) || $_SESSION['ShowFieldHelp'] ? _('Check this box to show the budget for the period') : ''), // If it is not set the $_SESSION['ShowFieldHelp'] parameter OR it is TRUE, shows the page help text. diff --git a/GLProfit_Loss.php b/GLProfit_Loss.php index 4a2346fd2..b26bf9177 100644 --- a/GLProfit_Loss.php +++ b/GLProfit_Loss.php @@ -14,6 +14,11 @@ $_POST['SelectADifferentPeriod']='Select A Different Period'; } +if ($_POST['Period'] != '') { + $_POST['FromPeriod'] = ReportPeriod($_POST['Period'], 'From'); + $_POST['ToPeriod'] = ReportPeriod($_POST['Period'], 'To'); +} + if ((!isset($_POST['FromPeriod']) AND !isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod'])){ @@ -102,6 +107,21 @@ } echo ''; + echo ' + +

', _('OR'), '

+ + '; + + if (!isset($_POST['Period'])) { + $_POST['Period'] = ''; + } + + echo ' + ', _('Select Period'), ': + ', ReportPeriodList($_POST['Period'], array('l', 't')), ' + '; + echo ' ' . _('Detail Or Summary').': '; + + echo ' + +

', _('OR'), '

+ + '; + + if (!isset($_POST['Period'])) { + $_POST['Period'] = ''; + } + + echo ' + ', _('Select Period'), ': + ', ReportPeriodList($_POST['Period'], array('l', 't')), ' + '; + //Select the tag echo ' ' . _('Select tag') . ' diff --git a/GLTrialBalance.php b/GLTrialBalance.php index e431a7716..ea4d69ed3 100644 --- a/GLTrialBalance.php +++ b/GLTrialBalance.php @@ -23,6 +23,11 @@ $_POST['SelectADifferentPeriod']=_('Select A Different Period'); } +if ($_POST['Period'] != '') { + $_POST['FromPeriod'] = ReportPeriod($_POST['Period'], 'From'); + $_POST['ToPeriod'] = ReportPeriod($_POST['Period'], 'To'); +} + if ((! isset($_POST['FromPeriod']) AND ! isset($_POST['ToPeriod'])) OR isset($_POST['SelectADifferentPeriod'])){ @@ -107,6 +112,11 @@ echo ' + + +

', _('OR'), '

+ + ' . _('Select Period') . ': ' . ReportPeriodList( $_POST['Period'] ) . ' @@ -133,11 +143,6 @@ $FontSize = 10; $line_height = 12; - if ($_POST['Period'] != '') { - $_POST['FromPeriod'] = ReportPeriod($_POST['Period'], 'From'); - $_POST['ToPeriod'] = ReportPeriod($_POST['Period'], 'To'); - } - $NumberOfMonths = $_POST['ToPeriod'] - $_POST['FromPeriod'] + 1; $sql = "SELECT lastdate_in_period diff --git a/SalesGraph.php b/SalesGraph.php index ecafa1bc8..787bf2421 100644 --- a/SalesGraph.php +++ b/SalesGraph.php @@ -89,6 +89,21 @@ } echo ''; + echo ' + +

', _('OR'), '

+ + '; + + if (!isset($_POST['Period'])) { + $_POST['Period'] = ''; + } + + echo ' + ', _('Select Period'), ': + ', ReportPeriodList($_POST['Period'], array('l', 't')), ' + '; + $AreasResult = DB_query("SELECT areacode, areadescription FROM areas ORDER BY areadescription"); if (!isset($_POST['SalesArea'])){ @@ -217,6 +232,11 @@ $SelectClause = 'qty'; } + if ($_POST['Period'] != '') { + $_POST['FromPeriod'] = ReportPeriod($_POST['Period'], 'From'); + $_POST['ToPeriod'] = ReportPeriod($_POST['Period'], 'To'); + } + $SQL = "SELECT YEAR(`lastdate_in_period`) AS year, MONTHNAME(`lastdate_in_period`) AS month FROM `periods` WHERE `periodno`='" . $_POST['FromPeriod'] . "' OR periodno='" . $_POST['ToPeriod'] . "'";