← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6879: Improved relative periods. Implemented support for financial year in data mart and scheduled tasks.

 

------------------------------------------------------------
revno: 6879
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-05-08 17:55:59 +0200
message:
  Improved relative periods. Implemented support for financial year in data mart and scheduled tasks.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/RelativePeriodTest.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java
  dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/scheduling/TaskTest.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/scheduling.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/viewScheduledTasks.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataMartForm.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2012-05-07 17:32:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2012-05-08 15:55:59 +0000
@@ -49,6 +49,8 @@
      */
     private static final long serialVersionUID = 2949655296199662273L;
 
+    private static final List<Period> NO = new ArrayList<Period>();
+    
     public static final String REPORTING_MONTH = "reporting_month";
     public static final String REPORTING_BIMONTH = "reporting_bimonth";
     public static final String REPORTING_QUARTER = "reporting_quarter";
@@ -323,7 +325,7 @@
      */
     public List<Period> getRelativePeriods()
     {
-        return getRelativePeriods( getDate( 1, new Date() ), null, false );
+        return getRelativePeriods( null, null, false );
     }
 
     /**
@@ -335,19 +337,23 @@
      */
     public List<Period> getRelativePeriods( I18nFormat format, boolean dynamicNames )
     {
-        return getRelativePeriods( getDate( 1, new Date() ), format, dynamicNames );
+        return getRelativePeriods( null, format, dynamicNames );
     }
 
     /**
      * Gets a list of Periods based on the given input and the state of this
      * RelativePeriods.
      *
-     * @param date   the date representing now.
+     * @param date the date representing now. If null the current date will be
+     *        used and an interval based on the period type will be subtracted 
+     *        from the date.
      * @param format the i18n format.
      * @return a list of relative Periods.
      */
     public List<Period> getRelativePeriods( Date date, I18nFormat format, boolean dynamicNames )
     {
+        date = date == null ? getDate( 1, new Date() ) : date;
+        
         List<Period> periods = new ArrayList<Period>();
 
         if ( isReportingMonth() )
@@ -444,7 +450,51 @@
         
         return periods;
     }
-
+    
+    /**
+     * Returns periods for the last 6 months based on the given period types.
+     * 
+     * @param periodTypes a set of period type represented as names.
+     * @return a list of periods.
+     */
+    public List<Period> getLast6Months( Set<String> periodTypes )
+    {
+        List<Period> periods = new ArrayList<Period>();
+        
+        Date date = getDate( 1, new Date() );
+
+        periods.addAll( periodTypes.contains( MonthlyPeriodType.NAME ) ? new MonthlyPeriodType().generateRollingPeriods( date ).subList( 6, 12 ) : NO );
+        periods.addAll( periodTypes.contains( BiMonthlyPeriodType.NAME ) ? new BiMonthlyPeriodType().generateRollingPeriods( date ).subList( 3, 6 ) : NO );
+        periods.addAll( periodTypes.contains( QuarterlyPeriodType.NAME ) ? new QuarterlyPeriodType().generateRollingPeriods( date ).subList( 2, 4 ) : NO );
+        periods.addAll( periodTypes.contains( SixMonthlyPeriodType.NAME ) ? new SixMonthlyPeriodType().generateRollingPeriods( date ).subList( 1, 2 ) : NO );        
+        periods.addAll( periodTypes.contains( YearlyPeriodType.NAME ) ? new YearlyPeriodType().generateRollingPeriods( date ).subList( 4, 5 ) : NO );
+        periods.addAll( periodTypes.contains( FinancialJulyPeriodType.NAME ) ? new FinancialJulyPeriodType().generateRollingPeriods( date ).subList( 4, 5 ) : NO );
+        
+        return periods;
+    }
+
+    /**
+     * Returns periods for the last 6 to 12 months based on the given period types.
+     * 
+     * @param periodTypes a set of period type represented as names.
+     * @return a list of periods.
+     */
+    public List<Period> getLast6To12Months( Set<String> periodTypes )
+    {
+        List<Period> periods = new ArrayList<Period>();
+
+        Date date = getDate( 1, new Date() );
+
+        periods.addAll( periodTypes.contains( MonthlyPeriodType.NAME ) ? new MonthlyPeriodType().generateRollingPeriods( date ).subList( 0, 6 ) : NO );
+        periods.addAll( periodTypes.contains( BiMonthlyPeriodType.NAME ) ? new BiMonthlyPeriodType().generateRollingPeriods( date ).subList( 0, 3 ) : NO );
+        periods.addAll( periodTypes.contains( QuarterlyPeriodType.NAME ) ? new QuarterlyPeriodType().generateRollingPeriods( date ).subList( 0, 2 ) : NO );
+        periods.addAll( periodTypes.contains( SixMonthlyPeriodType.NAME ) ? new SixMonthlyPeriodType().generateRollingPeriods( date ).subList( 0, 1 ) : NO );        
+        periods.addAll( periodTypes.contains( YearlyPeriodType.NAME ) ? new YearlyPeriodType().generateRollingPeriods( date ).subList( 3, 4 ) : NO );
+        periods.addAll( periodTypes.contains( FinancialJulyPeriodType.NAME ) ? new FinancialJulyPeriodType().generateRollingPeriods( date ).subList( 3, 4 ) : NO );
+        
+        return periods;
+    }
+    
     /**
      * Returns a list of relative periods. The name will be dynamic depending on
      * the dynamicNames argument. The short name will always be dynamic.
@@ -554,6 +604,7 @@
      *
      * @return a RelativePeriods instance.
      */
+    /*
     public RelativePeriods getRelativePeriods( Set<String> periodTypes )
     {
         RelativePeriods relatives = new RelativePeriods();
@@ -571,10 +622,11 @@
             relatives.setLast4Quarters( periodTypes.contains( QuarterlyPeriodType.NAME ) );
             relatives.setLast2SixMonths( periodTypes.contains( SixMonthlyPeriodType.NAME ) );
             relatives.setThisYear( periodTypes.contains( YearlyPeriodType.NAME ) );
+            relatives.setThisFinancialYear( periodTypes.contains( FinancialJulyPeriodType.NAME ) );
         }
 
         return relatives;
-    }
+    }*/
 
     // -------------------------------------------------------------------------
     // Getters & setters

=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/RelativePeriodTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/RelativePeriodTest.java	2012-05-08 10:41:10 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/RelativePeriodTest.java	2012-05-08 15:55:59 +0000
@@ -28,7 +28,6 @@
  */
 
 import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
 import static junit.framework.Assert.assertTrue;
 
 import java.util.Calendar;
@@ -219,18 +218,32 @@
     @Test
     public void testGetRelativePeriods()
     {
+        List<Period> relatives = new RelativePeriods().setLast12Months( true ).getRelativePeriods();
+        
+        assertEquals( 12, relatives.size() );
+        
+        relatives = new RelativePeriods().setLast4Quarters( true ).getRelativePeriods( i18nFormat, true );
+
+        assertEquals( 4, relatives.size() );
+    }
+    
+    @Test
+    public void testGetRelativePeriodsFromPeriodTypes()
+    {
         Set<String> periodTypes = new HashSet<String>();
         periodTypes.add( MonthlyPeriodType.NAME );
         periodTypes.add( BiMonthlyPeriodType.NAME );
+        periodTypes.add( QuarterlyPeriodType.NAME );
         periodTypes.add( SixMonthlyPeriodType.NAME );
-        
-        RelativePeriods relatives = new RelativePeriods().getRelativePeriods( periodTypes );
-        
-        assertTrue( relatives.isLast12Months() );
-        assertTrue( relatives.isLast6BiMonths() );
-        assertTrue( relatives.isLast2SixMonths() );
-        
-        assertFalse( relatives.isLast4Quarters() );
-        assertFalse( relatives.isLastYear() );        
+        periodTypes.add( YearlyPeriodType.NAME );
+        periodTypes.add( FinancialJulyPeriodType.NAME );
+        
+        List<Period> periods = new RelativePeriods().getLast6Months( periodTypes );
+
+        assertEquals( 14, periods.size() );
+        
+        periods = new RelativePeriods().getLast6To12Months( periodTypes );
+
+        assertEquals( 14, periods.size() );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2013-01-01 01:19:11 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-05-08 15:55:59 +0000
@@ -263,7 +263,7 @@
     </property>
   </bean>
 
-  <bean id="dataMartLast12MonthsTask" class="org.hisp.dhis.system.scheduling.DataMartTask" scope="prototype">
+  <bean id="abstractDataMartTask" class="org.hisp.dhis.system.scheduling.DataMartTask" scope="prototype">
     <constructor-arg ref="org.hisp.dhis.datamart.DataMartEngine" />
     <constructor-arg ref="org.hisp.dhis.completeness.DataSetCompletenessEngine" />
     <constructor-arg ref="org.hisp.dhis.dataelement.DataElementService" />
@@ -274,13 +274,18 @@
     <constructor-arg ref="org.hisp.dhis.dataset.DataSetService" />
 	<constructor-arg ref="org.hisp.dhis.setting.SystemSettingManager" />
   </bean>
+  
+  <bean id="dataMartLast12MonthsTask" class="org.hisp.dhis.system.scheduling.DataMartTask" parent="abstractDataMartTask">
+	<property name="last6Months" value="true"/>
+	<property name="last6To12Months" value="true"/>
+  </bean>
     
-  <bean id="dataMartLast6MonthsTask" class="org.hisp.dhis.system.scheduling.DataMartTask" parent="dataMartLast12MonthsTask">
+  <bean id="dataMartLast6MonthsTask" class="org.hisp.dhis.system.scheduling.DataMartTask" parent="abstractDataMartTask">
 	<property name="last6Months" value="true"/>
   </bean>
   
-  <bean id="dataMartFrom6To12MonthsTask" class="org.hisp.dhis.system.scheduling.DataMartTask" parent="dataMartLast12MonthsTask">
-	<property name="from6To12Months" value="true"/>
+  <bean id="dataMartFrom6To12MonthsTask" class="org.hisp.dhis.system.scheduling.DataMartTask" parent="abstractDataMartTask">
+	<property name="last6To12Months" value="true"/>
   </bean>  
 
   <!-- DeletionHandler -->

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java	2012-05-04 12:57:46 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java	2012-05-08 15:55:59 +0000
@@ -30,9 +30,8 @@
 import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_SCHEDULED_PERIOD_TYPES;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_SCHEDULED_PERIOD_TYPES;
 
-import java.util.Calendar;
+import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Date;
 import java.util.List;
 import java.util.Set;
 
@@ -50,16 +49,12 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.period.Cal;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.RelativePeriods;
-import org.hisp.dhis.period.YearlyPeriodType;
 import org.hisp.dhis.scheduling.TaskId;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.util.ConversionUtils;
-import org.hisp.dhis.system.util.Filter;
-import org.hisp.dhis.system.util.FilterUtils;
 
 /**
  * @author Lars Helge Overland
@@ -104,7 +99,7 @@
     {
         this.periods = periods;
     }
-
+    
     private boolean last6Months;
 
     public void setLast6Months( boolean last6Months )
@@ -112,11 +107,11 @@
         this.last6Months = last6Months;
     }
 
-    private boolean from6To12Months;
-    
-    public void setFrom6To12Months( boolean from6To12Months )
+    private boolean last6To12Months;
+
+    public void setLast6To12Months( boolean last6To12Months )
     {
-        this.from6To12Months = from6To12Months;
+        this.last6To12Months = last6To12Months;
     }
 
     // -------------------------------------------------------------------------
@@ -173,12 +168,6 @@
     // Supportive methods
     // -------------------------------------------------------------------------
 
-    /**
-     * Generates periods based on parameters and period types argument. Returns
-     * the list of periods with class scope if it has been set and has one or
-     * more periods. Returns a list of relative periods based on the given set
-     * of period types otherwise.
-     */
     public List<Period> getPeriods( Set<String> periodTypes )
     {
         if ( periods != null && periods.size() > 0 )
@@ -186,36 +175,18 @@
             return periods;
         }
         
-        List<Period> relativePeriods = new RelativePeriods().getRelativePeriods( periodTypes ).getRelativePeriods();
-        
-        if ( periodTypes.contains( YearlyPeriodType.NAME ) ) // Add last year
-        {
-            relativePeriods.addAll( new RelativePeriods().setLastYear( true ).getRelativePeriods() );
-        }
-        
-        final Date date = new Cal().now().subtract( Calendar.MONTH, 7 ).time();
-        
-        if ( last6Months )
-        {
-            FilterUtils.filter( relativePeriods, new Filter<Period>()
-            {
-                public boolean retain( Period period )
-                {
-                    return period != null && period.getStartDate().compareTo( date ) > 0;
-                }                
-            } );
-        }
-        else if ( from6To12Months )
-        {
-            FilterUtils.filter( relativePeriods, new Filter<Period>()
-            {
-                public boolean retain( Period period )
-                {
-                    return period != null && period.getStartDate().compareTo( date ) <= 0;
-                }
-            } );
-        }
-        
-        return relativePeriods;
+        List<Period> relatives =  new ArrayList<Period>();
+        
+        if  ( last6Months )
+        {
+            relatives.addAll( new RelativePeriods().getLast6Months( periodTypes ) );
+        }
+        
+        if ( last6To12Months )
+        {
+            relatives.addAll( new RelativePeriods().getLast6To12Months( periodTypes ) );
+        }
+        
+        return relatives;
     }
 }

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/scheduling/TaskTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/scheduling/TaskTest.java	2012-02-11 13:10:26 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/scheduling/TaskTest.java	2012-05-08 15:55:59 +0000
@@ -31,6 +31,8 @@
 import java.util.List;
 import java.util.Set;
 
+import org.hisp.dhis.period.BiMonthlyPeriodType;
+import org.hisp.dhis.period.FinancialJulyPeriodType;
 import org.hisp.dhis.period.MonthlyPeriodType;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.QuarterlyPeriodType;
@@ -50,31 +52,36 @@
     {
         Set<String> periodTypes = new HashSet<String>();
         periodTypes.add( MonthlyPeriodType.NAME );
+        periodTypes.add( BiMonthlyPeriodType.NAME );
         periodTypes.add( QuarterlyPeriodType.NAME );
         periodTypes.add( SixMonthlyPeriodType.NAME );
         periodTypes.add( YearlyPeriodType.NAME );
+        periodTypes.add( FinancialJulyPeriodType.NAME );
         
         DataMartTask dataMartTask = new DataMartTask();
-        
+
+        dataMartTask.setLast6Months( true );
+        dataMartTask.setLast6To12Months( true );
+
         List<Period> periods = dataMartTask.getPeriods( periodTypes );
         
         assertNotNull( periods );
-        assertEquals( 20, periods.size() ); // 2 Y, 2 S, 4 Q, 12 M
+        assertEquals( 28, periods.size() ); // 12 + 6 + 4 + 2 + 1 + 1 
         
         dataMartTask.setLast6Months( true );
-        dataMartTask.setFrom6To12Months( false );
+        dataMartTask.setLast6To12Months( false );
         
         periods = dataMartTask.getPeriods( periodTypes );
 
         assertNotNull( periods );
-        assertEquals( 10, periods.size() ); // 1 Y, 1 S, 2 Q, 6 M
+        assertEquals( 14, periods.size() ); // 6 + 3 + 2 + 1 + 1 + 1
         
         dataMartTask.setLast6Months( false );
-        dataMartTask.setFrom6To12Months( true );
+        dataMartTask.setLast6To12Months( true );
 
         periods = dataMartTask.getPeriods( periodTypes );
-
+        System.out.println( periods );
         assertNotNull( periods );
-        assertEquals( 10, periods.size() ); // 1 Y, 1 S, 2 Q, 6 M        
+        assertEquals( 14, periods.size() ); // 6 + 3 + 2 + 1 + 1 + 1
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties	2012-05-03 17:38:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties	2012-05-08 15:55:59 +0000
@@ -299,4 +299,5 @@
 error_at=Error at
 not_started=not started
 aggregated_data_set_completeness=Aggregated data set completeness
-show_sql_view=Show SQL view
\ No newline at end of file
+show_sql_view=Show SQL view
+financial_yearly=Financial Yearly
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/scheduling.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/scheduling.js	2012-01-23 04:28:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/scheduling.js	2012-05-08 15:55:59 +0000
@@ -4,10 +4,12 @@
 	if ( $( '#isRunning' ).val() == 'true' )
 	{
 		$( '.scheduling' ).attr( 'disabled', 'disabled' );
+		$( '#executeButton' ).removeAttr( 'disabled' );
 	}
 	else
 	{
 		$( '.scheduling' ).removeAttr( 'disabled' );
+		$( '#executeButton' ).attr( 'disabled', 'disabled' );
 	}
 } );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/viewScheduledTasks.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/viewScheduledTasks.vm	2012-04-16 12:26:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/viewScheduledTasks.vm	2012-05-08 15:55:59 +0000
@@ -18,7 +18,8 @@
 		<label for="biMonthly">$i18n.getString( "BiMonthly" )</label><input type="checkbox" id="biMonthly" class="scheduling" name="scheduledPeriodTypes" value="BiMonthly"#if( $scheduledPeriodTypes.contains( "BiMonthly" ) ) checked="checked"#end>&nbsp;
 		<label for="quarterly">$i18n.getString( "Quarterly" )</label><input type="checkbox" id="quarterly" class="scheduling" name="scheduledPeriodTypes" value="Quarterly"#if( $scheduledPeriodTypes.contains( "Quarterly" ) ) checked="checked"#end><br><br>
 		<label for="sixMonthly">$i18n.getString( "SixMonthly" )</label><input type="checkbox" id="sixMonthly" class="scheduling" name="scheduledPeriodTypes" value="SixMonthly"#if( $scheduledPeriodTypes.contains( "SixMonthly" ) ) checked="checked"#end>&nbsp;
-		<label for="yearly">$i18n.getString( "Yearly" )</label><input type="checkbox" id="yearly" class="scheduling" name="scheduledPeriodTypes" class="scheduler" value="Yearly"#if( $scheduledPeriodTypes.contains( "Yearly" ) ) checked="checked"#end>			
+		<label for="yearly">$i18n.getString( "Yearly" )</label><input type="checkbox" id="yearly" class="scheduling" name="scheduledPeriodTypes" value="Yearly"#if( $scheduledPeriodTypes.contains( "Yearly" ) ) checked="checked"#end>&nbsp;
+		<label for="financialYearly">$i18n.getString( "financial_yearly" )</label><input type="checkbox" id="financialYearly" class="scheduling" name="scheduledPeriodTypes" value="FinancialJuly"#if( $scheduledPeriodTypes.contains( "FinancialJuly" ) ) checked="checked"#end>			
 	</td>
 </tr>
 <tr>
@@ -64,7 +65,7 @@
 		value="$i18n.getString( 'start' )"
 		#end
 		/>
-		<input type="button" style="width:140px" onclick="executeTasks()" value="$i18n.getString( 'execute_now' )" />
+		<input type="button" id="executeButton" style="width:140px" onclick="executeTasks()" value="$i18n.getString( 'execute_now' )" />
 	</td>
 </tr>
 </table>

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2012-04-20 07:38:56 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2012-05-08 15:55:59 +0000
@@ -211,4 +211,5 @@
 view_resource=View resource
 this_financial_year=This financial year
 last_financial_year=Last financial year
-last_5_financial_years=Last 5 financial years
\ No newline at end of file
+last_5_financial_years=Last 5 financial years
+financial_yearly=Financial Yearly 
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataMartForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataMartForm.vm	2012-04-16 14:54:22 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataMartForm.vm	2012-05-08 15:55:59 +0000
@@ -1,16 +1,17 @@
 <h3>$i18n.getString( "data_mart_management" ) #openHelp( "data_mart" )</h3>
 
-<div id="critiera" class="inputCriteria" style="width:380px;height:170px;">
+<div id="critiera" class="inputCriteria" style="width:420px;height:170px;">
 <table>
-<col width="120">
-<col width="240">
+<col width="100">
+<col width="270">
 <tr>
 	<td>$i18n.getString( "period_types" )</td>
 	<td><label for="monthly">$i18n.getString( "Monthly" )</label><input type="checkbox" id="monthly" name="periodType" value="Monthly" checked="checked">&nbsp;
-		<label for="biMonthly">$i18n.getString( "BiMonthly" )</label><input type="checkbox" id="biMonthly" name="periodType" value="BiMonthly" checked="checked">&nbsp;
+		<label for="biMonthly">$i18n.getString( "BiMonthly" )</label><input type="checkbox" id="biMonthly" name="periodType" value="BiMonthly">&nbsp;
 		<label for="quarterly">$i18n.getString( "Quarterly" )</label><input type="checkbox" id="quarterly" name="periodType" value="Quarterly" checked="checked"><br>
 		<label for="sixMonthly">$i18n.getString( "SixMonthly" )</label><input type="checkbox" id="sixMonthly" name="periodType" value="SixMonthly" checked="checked">&nbsp;
-		<label for="yearly">$i18n.getString( "Yearly" )</label><input type="checkbox" id="yearly" name="periodType" value="Yearly" checked="checked"><br><br>
+		<label for="yearly">$i18n.getString( "Yearly" )</label><input type="checkbox" id="yearly" name="periodType" value="Yearly" checked="checked">&nbsp;
+		<label for="financialYearly">$i18n.getString( "financial_yearly" )</label><input type="checkbox" id="financialYearly" name="periodType" value="FinancialJuly"><br><br>
 	</td>
 </tr>
 <tr>