[Vtigercrm-commits] [vtiger-commits] r10401 - in /vtigercrm/branches/5.0.3/modules: CustomView/CustomView.php Reports/Reports.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Mar 9 04:14:30 EST 2007
Author: saraj
Date: Fri Mar 9 02:14:22 2007
New Revision: 10401
Log:
fix for Current FQ. Fixes #3116 --Minnie
Modified:
vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php
vtigercrm/branches/5.0.3/modules/Reports/Reports.php
Modified: vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php (original)
+++ vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php Fri Mar 9 02:14:22 2007
@@ -486,33 +486,43 @@
$nextFY0 = date("Y-m-d",mktime(0, 0, 0, "01", "01", date("Y")+1));
$nextFY1 = date("Y-m-t", mktime(0, 0, 0, "12", date("d"), date("Y")+1));
- if(date("m") <= 4)
+ if(date("m") <= 3)
{
$cFq = date("Y-m-d",mktime(0, 0, 0, "01","01",date("Y")));
- $cFq1 = date("Y-m-d",mktime(0, 0, 0, "04","30",date("Y")));
- $nFq = date("Y-m-d",mktime(0, 0, 0, "05","01",date("Y")));
- $nFq1 = date("Y-m-d",mktime(0, 0, 0, "08","31",date("Y")));
- $pFq = date("Y-m-d",mktime(0, 0, 0, "09","01",date("Y")-1));
+ $cFq1 = date("Y-m-d",mktime(0, 0, 0, "03","31",date("Y")));
+ $nFq = date("Y-m-d",mktime(0, 0, 0, "04","01",date("Y")));
+ $nFq1 = date("Y-m-d",mktime(0, 0, 0, "06","30",date("Y")));
+ $pFq = date("Y-m-d",mktime(0, 0, 0, "10","01",date("Y")-1));
$pFq1 = date("Y-m-d",mktime(0, 0, 0, "12","31",date("Y")-1));
- }else if(date("m") > 4 and date("m") <= 8)
- {
+ }else if(date("m") > 3 and date("m") <= 6)
+ {
$pFq = date("Y-m-d",mktime(0, 0, 0, "01","01",date("Y")));
- $pFq1 = date("Y-m-d",mktime(0, 0, 0, "04","30",date("Y")));
- $cFq = date("Y-m-d",mktime(0, 0, 0, "05","01",date("Y")));
- $cFq1 = date("Y-m-d",mktime(0, 0, 0, "08","31",date("Y")));
- $nFq = date("Y-m-d",mktime(0, 0, 0, "09","01",date("Y")));
- $nFq1 = date("Y-m-d",mktime(0, 0, 0, "12","31",date("Y")));
-
- }else
- {
- $nFq = date("Y-m-d",mktime(0, 0, 0, "01","01",date("Y")+1));
- $nFq1 = date("Y-m-d",mktime(0, 0, 0, "04","30",date("Y")+1));
- $pFq = date("Y-m-d",mktime(0, 0, 0, "05","01",date("Y")));
- $pFq1 = date("Y-m-d",mktime(0, 0, 0, "08","31",date("Y")));
- $cFq = date("Y-m-d",mktime(0, 0, 0, "09","01",date("Y")));
- $cFq1 = date("Y-m-d",mktime(0, 0, 0, "12","31",date("Y")));
- }
-
+ $pFq1 = date("Y-m-d",mktime(0, 0, 0, "03","31",date("Y")));
+ $cFq = date("Y-m-d",mktime(0, 0, 0, "04","01",date("Y")));
+ $cFq1 = date("Y-m-d",mktime(0, 0, 0, "06","30",date("Y")));
+ $nFq = date("Y-m-d",mktime(0, 0, 0, "07","01",date("Y")));
+ $nFq1 = date("Y-m-d",mktime(0, 0, 0, "09","30",date("Y")));
+
+ }else if(date("m") > 6 and date("m") <= 9)
+ {
+ $nFq = date("Y-m-d",mktime(0, 0, 0, "10","01",date("Y")));
+ $nFq1 = date("Y-m-d",mktime(0, 0, 0, "12","31",date("Y")));
+ $pFq = date("Y-m-d",mktime(0, 0, 0, "04","01",date("Y")));
+ $pFq1 = date("Y-m-d",mktime(0, 0, 0, "06","30",date("Y")));
+ $cFq = date("Y-m-d",mktime(0, 0, 0, "07","01",date("Y")));
+ $cFq1 = date("Y-m-d",mktime(0, 0, 0, "09","30",date("Y")));
+ }
+ else if(date("m") > 9 and date("m") <= 12)
+ {
+ $nFq = date("Y-m-d",mktime(0, 0, 0, "01","01",date("Y")+1));
+ $nFq1 = date("Y-m-d",mktime(0, 0, 0, "03","31",date("Y")+1));
+ $pFq = date("Y-m-d",mktime(0, 0, 0, "07","01",date("Y")));
+ $pFq1 = date("Y-m-d",mktime(0, 0, 0, "09","30",date("Y")));
+ $cFq = date("Y-m-d",mktime(0, 0, 0, "10","01",date("Y")));
+ $cFq1 = date("Y-m-d",mktime(0, 0, 0, "12","31",date("Y")));
+
+ }
+
$sjsStr = '<script language="JavaScript" type="text/javaScript">
function showDateRange( type )
{
Modified: vtigercrm/branches/5.0.3/modules/Reports/Reports.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Reports/Reports.php (original)
+++ vtigercrm/branches/5.0.3/modules/Reports/Reports.php Fri Mar 9 02:14:22 2007
@@ -562,6 +562,42 @@
$nextFY0 = date("Y-m-d",mktime(0, 0, 0, "01", "01", date("Y")+1));
$nextFY1 = date("Y-m-t", mktime(0, 0, 0, "12", date("d"), date("Y")+1));
+ if(date("m") <= 3)
+ {
+ $cFq = date("Y-m-d",mktime(0, 0, 0, "01","01",date("Y")));
+ $cFq1 = date("Y-m-d",mktime(0, 0, 0, "03","31",date("Y")));
+ $nFq = date("Y-m-d",mktime(0, 0, 0, "04","01",date("Y")));
+ $nFq1 = date("Y-m-d",mktime(0, 0, 0, "06","30",date("Y")));
+ $pFq = date("Y-m-d",mktime(0, 0, 0, "10","01",date("Y")-1));
+ $pFq1 = date("Y-m-d",mktime(0, 0, 0, "12","31",date("Y")-1));
+ }else if(date("m") > 3 and date("m") <= 6)
+ {
+ $pFq = date("Y-m-d",mktime(0, 0, 0, "01","01",date("Y")));
+ $pFq1 = date("Y-m-d",mktime(0, 0, 0, "03","31",date("Y")));
+ $cFq = date("Y-m-d",mktime(0, 0, 0, "04","01",date("Y")));
+ $cFq1 = date("Y-m-d",mktime(0, 0, 0, "06","30",date("Y")));
+ $nFq = date("Y-m-d",mktime(0, 0, 0, "07","01",date("Y")));
+ $nFq1 = date("Y-m-d",mktime(0, 0, 0, "09","30",date("Y")));
+
+ }else if(date("m") > 6 and date("m") <= 9)
+ {
+ $nFq = date("Y-m-d",mktime(0, 0, 0, "10","01",date("Y")));
+ $nFq1 = date("Y-m-d",mktime(0, 0, 0, "12","31",date("Y")));
+ $pFq = date("Y-m-d",mktime(0, 0, 0, "04","01",date("Y")));
+ $pFq1 = date("Y-m-d",mktime(0, 0, 0, "06","30",date("Y")));
+ $cFq = date("Y-m-d",mktime(0, 0, 0, "07","01",date("Y")));
+ $cFq1 = date("Y-m-d",mktime(0, 0, 0, "09","30",date("Y")));
+ }
+ else if(date("m") > 9 and date("m") <= 12)
+ {
+ $nFq = date("Y-m-d",mktime(0, 0, 0, "01","01",date("Y")+1));
+ $nFq1 = date("Y-m-d",mktime(0, 0, 0, "03","31",date("Y")+1));
+ $pFq = date("Y-m-d",mktime(0, 0, 0, "07","01",date("Y")));
+ $pFq1 = date("Y-m-d",mktime(0, 0, 0, "09","30",date("Y")));
+ $cFq = date("Y-m-d",mktime(0, 0, 0, "10","01",date("Y")));
+ $cFq1 = date("Y-m-d",mktime(0, 0, 0, "12","31",date("Y")));
+
+ }
$sjsStr = '<script language="JavaScript" type="text/javaScript">
function showDateRange( type )
@@ -717,19 +753,19 @@
else if( type == "nextfq" )
{
- document.NewReport.startdate.value = "2005-07-01";
- document.NewReport.enddate.value = "2005-09-30";
+ document.NewReport.startdate.value = "'.$nFq.'";
+ document.NewReport.enddate.value = "'.$nFq1.'";
}
else if( type == "prevfq" )
{
- document.NewReport.startdate.value = "2005-01-01";
- document.NewReport.enddate.value = "2005-03-31";
+ document.NewReport.startdate.value = "'.$pFq.'";
+ document.NewReport.enddate.value = "'.$pFq1.'";
}
else if( type == "thisfq" )
{
- document.NewReport.startdate.value = "2005-04-01";
- document.NewReport.enddate.value = "2005-06-30";
+ document.NewReport.startdate.value = "'.$cFq.'";
+ document.NewReport.enddate.value = "'.$cFq1.'";
}
else
{
More information about the vtigercrm-commits
mailing list