← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16218: local/in RBF maintenance work in progress

 

------------------------------------------------------------
revno: 16218
committer: Mithilesh Kumar Thakur <mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-07-23 12:47:17 +0100
message:
  local/in RBF maintenance work in progress
added:
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/UpdateQualityScorePaymentAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/UpdateQualityScorePaymentFormAction.java
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/getBankDetails_old.vm
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/updateQualityScorePayment.js
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadBankData_old.vm
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/updateQualityScorePaymentForm.vm
modified:
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/AddBankDataAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/DeleteBankDataAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/LoadBankDetailsAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetails.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetailsService.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetailsStore.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/LoadDataEntryFormAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/PageInitAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/DefaultBankDetailsService.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateBankDetailsStore.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateQualityMaxValueStore.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/payment/action/LoadPaymentAdjustmentAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/LoadQualityMaxDetailsAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/LoadQualityScoreDetailsAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/QualityMaxInitAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/QualityScoreInitAction.java
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/GetQualityScorePaymentAction.java
  local/in/dhis-web-maintenance-rbf/src/main/resources/META-INF/dhis/beans.xml
  local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/hibernate/BankDetails.hbm.xml
  local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/i18n_module.properties
  local/in/dhis-web-maintenance-rbf/src/main/resources/struts.xml
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/getBankDetails.vm
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/qualityScoreDataEntry.js
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/qualityScorePayment.js
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadQualityMaxEntryForm.vm
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadQualityScoreEntryForm.vm
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/qualityScoreEntrySelection.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 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/AddBankDataAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/AddBankDataAction.java	2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/AddBankDataAction.java	2014-07-23 11:47:17 +0000
@@ -1,11 +1,12 @@
 package org.hisp.dhis.rbf.action;
 
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.rbf.api.BankDetails;
 import org.hisp.dhis.rbf.api.BankDetailsService;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.opensymphony.xwork2.Action;
 
@@ -30,13 +31,18 @@
         this.organisationUnitService = organisationUnitService;
     }
 
+    /*
     private DataSetService dataSetService;
 
     public void setDataSetService( DataSetService dataSetService )
     {
         this.dataSetService = dataSetService;
     }
-
+    */
+    
+    @Autowired
+    private OrganisationUnitGroupService orgUnitGroupService;
+    
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -48,14 +54,21 @@
         this.orgUnitUid = orgUnitUid;
     }
 
-    private String dataSetId;
-
+    private String orgUnitGroupId;
+    
+    public void setOrgUnitGroupId( String orgUnitGroupId )
+    {
+        this.orgUnitGroupId = orgUnitGroupId;
+    }
+    
+    /*
     public void setDataSetId( String dataSetId )
     {
         this.dataSetId = dataSetId;
 
     }
-
+    */
+    
     private String accountNumber;
 
     public void setAccountNumber( String accountNumber )
@@ -93,14 +106,18 @@
     {
         OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( orgUnitUid );
 
-        DataSet dataSet = dataSetService.getDataSet( Integer.parseInt( dataSetId ) );
-
-        BankDetails bankDetails = bankDetailsService.getBankDetails( organisationUnit, dataSet );
+        //DataSet dataSet = dataSetService.getDataSet( Integer.parseInt( dataSetId ) );
+        
+        OrganisationUnitGroup orgUnitGroup = orgUnitGroupService.getOrganisationUnitGroup( Integer.parseInt( orgUnitGroupId ) );
+        
+        //BankDetails bankDetails = bankDetailsService.getBankDetails( organisationUnit, dataSet );
+        BankDetails bankDetails = bankDetailsService.getBankDetails( organisationUnit, orgUnitGroup );
 
         if ( bankDetails == null )
         {
             bankDetails = new BankDetails();
-            bankDetails.setDataSet( dataSet );
+            //bankDetails.setDataSet( dataSet );
+            bankDetails.setOrganisationUnitGroup( orgUnitGroup );
             bankDetails.setOrganisationUnit( organisationUnit );
             bankDetails.setAccountName( accountName );
             bankDetails.setAccountNumber( accountNumber );

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/DeleteBankDataAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/DeleteBankDataAction.java	2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/DeleteBankDataAction.java	2014-07-23 11:47:17 +0000
@@ -1,11 +1,12 @@
 package org.hisp.dhis.rbf.action;
 
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.rbf.api.BankDetails;
 import org.hisp.dhis.rbf.api.BankDetailsService;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.opensymphony.xwork2.Action;
 
@@ -30,31 +31,46 @@
         this.organisationUnitService = organisationUnitService;
     }
 
+    /*
     private DataSetService dataSetService;
 
     public void setDataSetService( DataSetService dataSetService )
     {
         this.dataSetService = dataSetService;
     }
-
+    */
+    
+    @Autowired
+    private OrganisationUnitGroupService orgUnitGroupService;
+    
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
 
     private Integer organisationUnitId;
 
-    private Integer dataSetId;
-
     public void setOrganisationUnitId( Integer organisationUnitId )
     {
         this.organisationUnitId = organisationUnitId;
     }
-
+    
+    /*
+    private Integer dataSetId;
+    
     public void setDataSetId( Integer dataSetId )
     {
         this.dataSetId = dataSetId;
     }
-
+    */
+    
+    private String orgUnitGroupId;
+    
+    public void setOrgUnitGroupId( String orgUnitGroupId )
+    {
+        this.orgUnitGroupId = orgUnitGroupId;
+    }
+    
+    
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -62,10 +78,15 @@
     public String execute()
         throws Exception
     {
-        DataSet dataSet = dataSetService.getDataSet( dataSetId );
+        //DataSet dataSet = dataSetService.getDataSet( dataSetId );
+        
+        OrganisationUnitGroup orgUnitGroup = orgUnitGroupService.getOrganisationUnitGroup( Integer.parseInt( orgUnitGroupId ) );
+        
         OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
-
-        BankDetails bankDetail = bankDetailsService.getBankDetails( organisationUnit, dataSet );
+        
+        BankDetails bankDetail = bankDetailsService.getBankDetails( organisationUnit, orgUnitGroup );
+        
+        //BankDetails bankDetail = bankDetailsService.getBankDetails( organisationUnit, dataSet );
 
         bankDetailsService.deleteBankDetails( bankDetail );
 

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/LoadBankDetailsAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/LoadBankDetailsAction.java	2014-07-04 09:38:52 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/LoadBankDetailsAction.java	2014-07-23 11:47:17 +0000
@@ -4,20 +4,27 @@
 import java.util.Collections;
 import java.util.List;
 
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
+import org.hisp.dhis.constant.Constant;
+import org.hisp.dhis.constant.ConstantService;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.rbf.api.BankDetails;
 import org.hisp.dhis.rbf.api.BankDetailsService;
 import org.hisp.dhis.rbf.api.Lookup;
 import org.hisp.dhis.rbf.api.LookupService;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.opensymphony.xwork2.Action;
 
 public class LoadBankDetailsAction
     implements Action
 {
+    private final static String BANK_DETAILS_GROUPSET_ID = "BANK_DETAILS_GROUPSET_ID"; // 1618
+    
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -42,14 +49,26 @@
     {
         this.lookupService = lookupService;
     }
-
+    
+    /*
     private DataSetService dataSetService;
 
     public void setDataSetService( DataSetService dataSetService )
     {
         this.dataSetService = dataSetService;
     }
+    */
+    
+    private ConstantService constantService;
 
+    public void setConstantService( ConstantService constantService )
+    {
+        this.constantService = constantService;
+    }
+    
+    @Autowired
+    private OrganisationUnitGroupService orgUnitGroupService;
+    
     // -------------------------------------------------------------------------
     // Input / Output
     // -------------------------------------------------------------------------
@@ -60,13 +79,22 @@
     {
         this.orgUnitUid = orgUnitUid;
     }
-
+    
+    /*
     private List<DataSet> dataSets = new ArrayList<DataSet>();
 
     public List<DataSet> getDataSets()
     {
         return dataSets;
     }
+    */
+    
+    private List<OrganisationUnitGroup> organisationUnitGroups = new ArrayList<OrganisationUnitGroup>();
+    
+    public List<OrganisationUnitGroup> getOrganisationUnitGroups()
+    {
+        return organisationUnitGroups;
+    }
 
     private List<String> banks = new ArrayList<String>();
 
@@ -91,10 +119,26 @@
 
         bankDetailsList.addAll( bankDetailsService.getBankDetails( organisationUnit ) );
 
-        dataSets.clear();
-
+        //dataSets.clear();
+        organisationUnitGroups.clear();
+        
+        Constant bankDetailsGroupSetId = constantService.getConstantByName( BANK_DETAILS_GROUPSET_ID );
+        
+        OrganisationUnitGroupSet orgUnitGroupSet = orgUnitGroupService.getOrganisationUnitGroupSet( (int) bankDetailsGroupSetId.getValue() );
+        
+        
+        if( orgUnitGroupSet != null )
+        {
+            organisationUnitGroups = new ArrayList<OrganisationUnitGroup>( orgUnitGroupSet.getOrganisationUnitGroups() );            
+            
+        }    
+        
+        //List<DataSet> bankDetailDataSets = new ArrayList<DataSet>();
+        
+        List<OrganisationUnitGroup> bankDetailOrganisationUnitGroups = new ArrayList<OrganisationUnitGroup>();
+        
+        /*
         List<Lookup> lookups = new ArrayList<Lookup>( lookupService.getAllLookupsByType( Lookup.DS_PBF_TYPE ) );
-        List<DataSet> bankDetailDataSets = new ArrayList<DataSet>();
         for ( Lookup lookup : lookups )
         {
             Integer dataSetId = Integer.parseInt( lookup.getValue() );
@@ -107,27 +151,40 @@
             }
             
         }
+        */
+      
         for ( BankDetails bd : bankDetailsList )
         {
-            bankDetailDataSets.add( bd.getDataSet() );
+            //bankDetailDataSets.add( bd.getDataSet() );
+            bankDetailOrganisationUnitGroups.add( bd.getOrganisationUnitGroup() );
+            
         }
+        
+        
         // dataSets.removeAll(bankDetailDataSets);
 
-        lookups = new ArrayList<Lookup>( lookupService.getAllLookupsByType( Lookup.BANK ) );
+        //lookups = new ArrayList<Lookup>( lookupService.getAllLookupsByType( Lookup.BANK ) );
+        
+        List<Lookup> lookups = new ArrayList<Lookup>( lookupService.getAllLookupsByType( Lookup.BANK ) );
+        
         for ( Lookup lookup : lookups )
         {
             banks.add( lookup.getValue() );
         }
 
-        System.out.println( "Data Set Size :--" + dataSets.size() );
+        //System.out.println( "Data Set Size :--" + dataSets.size() );
+        System.out.println( "OrganisationUnitGroups Size :--" + organisationUnitGroups.size() );
 
-        for ( DataSet ds : dataSets )
+        for ( OrganisationUnitGroup ogGroup : organisationUnitGroups )
         {
-            System.out.println( ds.getName() );
+            System.out.println( ogGroup.getName() );
         }
 
-        Collections.sort( dataSets );
-
+        //Collections.sort( dataSets );
+        
+        Collections.sort( organisationUnitGroups, new IdentifiableObjectNameComparator() );
+        
+        
         return SUCCESS;
     }
 }

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetails.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetails.java	2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetails.java	2014-07-23 11:47:17 +0000
@@ -2,14 +2,21 @@
 
 import java.io.Serializable;
 
-import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 
 public class BankDetails implements Serializable
 {
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -4025438959939858532L;
+
     private OrganisationUnit organisationUnit;
     
-    private DataSet dataSet;
+    //private DataSet dataSet;
+    
+    private OrganisationUnitGroup organisationUnitGroup;
     
     private String bank;
     
@@ -26,7 +33,7 @@
     {
         
     }
-
+    /*
     public BankDetails( OrganisationUnit organisationUnit, DataSet dataSet, String bank, String branchName, String accountName, String accountNumber )
     {
         this.organisationUnit = organisationUnit;
@@ -36,6 +43,17 @@
         this.accountName = accountName;
         this.accountNumber = accountNumber;
     }
+    */
+    
+    public BankDetails( OrganisationUnit organisationUnit, OrganisationUnitGroup organisationUnitGroup, String bank, String branchName, String accountName, String accountNumber )
+    {
+        this.organisationUnit = organisationUnit;
+        this.organisationUnitGroup = organisationUnitGroup;
+        this.bank = bank;
+        this.branchName = branchName;
+        this.accountName = accountName;
+        this.accountNumber = accountNumber;
+    }
     
     // -------------------------------------------------------------------------
     // hashCode and equals
@@ -60,7 +78,8 @@
 
         final BankDetails other = (BankDetails) o;
 
-        return dataSet.equals( other.getDataSet() ) && organisationUnit.equals( other.getOrganisationUnit() );
+        //return dataSet.equals( other.getDataSet() ) && organisationUnit.equals( other.getOrganisationUnit() );
+        return organisationUnitGroup.equals( other.getOrganisationUnitGroup() ) && organisationUnit.equals( other.getOrganisationUnit() );
     }
 
     @Override
@@ -69,7 +88,8 @@
         final int prime = 31;
         int result = 1;
 
-        result = result * prime + dataSet.hashCode();
+        //result = result * prime + dataSet.hashCode();
+        result = result * prime + organisationUnitGroup.hashCode();
         result = result * prime + organisationUnit.hashCode();
 
         return result;
@@ -88,7 +108,18 @@
     {
         this.organisationUnit = organisationUnit;
     }
+    
+    public OrganisationUnitGroup getOrganisationUnitGroup()
+    {
+        return organisationUnitGroup;
+    }
 
+    public void setOrganisationUnitGroup( OrganisationUnitGroup organisationUnitGroup )
+    {
+        this.organisationUnitGroup = organisationUnitGroup;
+    }
+    
+    /*
     public DataSet getDataSet()
     {
         return dataSet;
@@ -98,7 +129,8 @@
     {
         this.dataSet = dataSet;
     }
-
+    */
+    
     public String getBank()
     {
         return bank;

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetailsService.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetailsService.java	2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetailsService.java	2014-07-23 11:47:17 +0000
@@ -2,8 +2,8 @@
 
 import java.util.Collection;
 
-import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 
 public interface BankDetailsService
 {
@@ -15,7 +15,8 @@
     
     void deleteBankDetails( BankDetails bankDetails );
         
-    BankDetails getBankDetails( OrganisationUnit organisationUnit, DataSet dataSet );
+    //BankDetails getBankDetails( OrganisationUnit organisationUnit, DataSet dataSet );
+    BankDetails getBankDetails( OrganisationUnit organisationUnit, OrganisationUnitGroup organisationUnitGroup );
     
     Collection<BankDetails> getAllBankDetails();
     

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetailsStore.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetailsStore.java	2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/BankDetailsStore.java	2014-07-23 11:47:17 +0000
@@ -2,8 +2,8 @@
 
 import java.util.Collection;
 
-import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 
 public interface BankDetailsStore
 {
@@ -15,7 +15,9 @@
     
     void deleteBankDetails( BankDetails bankDetails );
         
-    BankDetails getBankDetails( OrganisationUnit organisationUnit, DataSet dataSet );
+    //BankDetails getBankDetails( OrganisationUnit organisationUnit, DataSet dataSet );
+    
+    BankDetails getBankDetails( OrganisationUnit organisationUnit, OrganisationUnitGroup organisationUnitGroup );
     
     Collection<BankDetails> getAllBankDetails();
     

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/LoadDataEntryFormAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/LoadDataEntryFormAction.java	2014-07-17 13:15:11 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/LoadDataEntryFormAction.java	2014-07-23 11:47:17 +0000
@@ -130,6 +130,9 @@
     
     @Autowired
     private DataElementCategoryService categoryService;
+    
+    
+    
     // -------------------------------------------------------------------------
     // Comparator
     // -------------------------------------------------------------------------
@@ -283,6 +286,10 @@
 
         //Collections.sort( dataElements );
 
+        dataElements = new ArrayList<DataElement>();
+        dataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
+        
+        List<DataElement> dataElementList = new ArrayList<DataElement>();
         
         List<Section> sectionList = new ArrayList<Section>( dataSet.getSections() );
         List<DataElement> tempDEList = new ArrayList<DataElement>();
@@ -296,13 +303,16 @@
                tempDEList.addAll( section.getDataElements() );
             }
             
-            dataElements.addAll( tempDEList );
+            dataElementList.addAll( tempDEList );
         }
         else
         {
-            dataElements.addAll( dataSet.getDataElements() );
+            dataElementList.addAll( dataSet.getDataElements() );
         }
         
+        
+        dataElements.retainAll( dataElementList );
+        
         optionCombos = new ArrayList<DataElementCategoryOptionCombo>();
 
         Map<Integer, Double> tariffDataValueMap = new HashMap<Integer, Double>();
@@ -486,7 +496,6 @@
         {
             utilizationRate = dataValue.getValue();
         }        
-        
       
         return SUCCESS;
     }

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/PageInitAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/PageInitAction.java	2014-06-20 10:21:56 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/PageInitAction.java	2014-07-23 11:47:17 +0000
@@ -105,19 +105,23 @@
         if( organisationUnit == null )
         {
             System.out.println("Organisationunit is null");
+            
         }
+        
         else
         {
             System.out.println("Organisationunit is not null ---" + organisationUnit.getId() );
+            dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
         }
         
         if( organisationUnit == null && orgUnitId != null )
         {
             organisationUnit = organisationUnitService.getOrganisationUnit( orgUnitId );
+            dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
            
         }
         
-        dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
+        //dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
         
         List<Lookup> lookups = new ArrayList<Lookup>( lookupService.getAllLookupsByType( Lookup.DS_PBF_TYPE ) );
         
@@ -137,6 +141,7 @@
         
         dataSets.retainAll( pbfDataSets );
         Collections.sort(dataSets);
+        
         /*
         for( DataSet dataSet : dataSets )
         {

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/DefaultBankDetailsService.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/DefaultBankDetailsService.java	2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/DefaultBankDetailsService.java	2014-07-23 11:47:17 +0000
@@ -2,8 +2,8 @@
 
 import java.util.Collection;
 
-import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 import org.hisp.dhis.rbf.api.BankDetails;
 import org.hisp.dhis.rbf.api.BankDetailsService;
 import org.hisp.dhis.rbf.api.BankDetailsStore;
@@ -44,13 +44,20 @@
     {
         bankDetailsStore.deleteBankDetails( bankDetails );        
     }
-
+    /*
     @Override
     public BankDetails getBankDetails( OrganisationUnit organisationUnit, DataSet dataSet )
     {
         return bankDetailsStore.getBankDetails( organisationUnit, dataSet );
     }
-
+    */
+    
+    @Override
+    public BankDetails getBankDetails( OrganisationUnit organisationUnit, OrganisationUnitGroup organisationUnitGroup )
+    {
+        return bankDetailsStore.getBankDetails( organisationUnit, organisationUnitGroup );
+    }
+    
     @Override
     public Collection<BankDetails> getAllBankDetails()
     {

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateBankDetailsStore.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateBankDetailsStore.java	2014-06-20 10:21:56 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateBankDetailsStore.java	2014-07-23 11:47:17 +0000
@@ -6,8 +6,8 @@
 import org.hibernate.Session;
 import org.hibernate.SessionFactory;
 import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 import org.hisp.dhis.rbf.api.BankDetails;
 import org.hisp.dhis.rbf.api.BankDetailsStore;
 
@@ -52,7 +52,7 @@
 
         session.delete( bankDetails );
     }
-
+    /*
     @Override
     public BankDetails getBankDetails( OrganisationUnit organisationUnit, DataSet dataSet )
     {
@@ -64,6 +64,22 @@
 
         return (BankDetails) criteria.uniqueResult();
     }
+    */
+    
+    @Override
+    public BankDetails getBankDetails( OrganisationUnit organisationUnit, OrganisationUnitGroup organisationUnitGroup )
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        Criteria criteria = session.createCriteria( BankDetails.class );
+        criteria.add( Restrictions.eq( "organisationUnit", organisationUnit ) );
+        criteria.add( Restrictions.eq( "organisationUnitGroup", organisationUnitGroup ) );
+
+        return (BankDetails) criteria.uniqueResult();
+    }
+    
+    
+    
 
     @SuppressWarnings( "unchecked" )
     @Override

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateQualityMaxValueStore.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateQualityMaxValueStore.java	2014-06-20 10:21:56 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateQualityMaxValueStore.java	2014-07-23 11:47:17 +0000
@@ -195,14 +195,14 @@
                                                 " and td.datasetid=sag1.datasetid " +
                                                 " and td.organisationunitid in ("+ orgUnitBranchIds +") ";
             
-            //System.out.println("Query: " + query );
+            System.out.println("Query: " + query );
             SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
             while ( rs.next() )
             {
                 Integer dataElementId = rs.getInt( 1 );
                 Double value = rs.getDouble( 2 );
                 qualityMaxValueMap.put( dataElementId, value );
-                //System.out.println( dataElementId + " : " + value );
+                System.out.println( dataElementId + " : " + value );
             }
         }
         catch( Exception e )

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/payment/action/LoadPaymentAdjustmentAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/payment/action/LoadPaymentAdjustmentAction.java	2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/payment/action/LoadPaymentAdjustmentAction.java	2014-07-23 11:47:17 +0000
@@ -245,6 +245,7 @@
     public OrganisationUnit findParentOrgunitforTariff( OrganisationUnit organisationUnit, Integer tariffOULevel )
     {
         Integer ouLevel = organisationUnitService.getLevelOfOrganisationUnit( organisationUnit.getId() );
+        
         if ( tariffOULevel == ouLevel )
         {
             return organisationUnit;

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/LoadQualityMaxDetailsAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/LoadQualityMaxDetailsAction.java	2014-05-31 13:40:53 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/LoadQualityMaxDetailsAction.java	2014-07-23 11:47:17 +0000
@@ -14,6 +14,7 @@
 import org.hisp.dhis.constant.Constant;
 import org.hisp.dhis.constant.ConstantService;
 import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -75,6 +76,9 @@
     @Autowired
     private OrganisationUnitGroupService orgUnitGroupService;
     
+    @Autowired
+    private DataElementService dataElementService;
+
     // -------------------------------------------------------------------------
     // Input / Output
     // -------------------------------------------------------------------------
@@ -87,13 +91,13 @@
     }
 
     private String orgUnitGroupId;
-    
-    public void setOrgUnitGroupId(String orgUnitGroupId) 
+
+    public void setOrgUnitGroupId( String orgUnitGroupId )
     {
-		this.orgUnitGroupId = orgUnitGroupId;
-	}
+        this.orgUnitGroupId = orgUnitGroupId;
+    }
 
-	private String dataSetId;
+    private String dataSetId;
 
     public void setDataSetId( String dataSetId )
     {
@@ -147,15 +151,24 @@
         Date sDate = dateFormat.parse( startDate );
         Date eDate = dateFormat.parse( endDate );
         Constant qualityMaxDataElement = constantService.getConstantByName( QUALITY_MAX_DATAELEMENT );
-        
+
         OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( orgUnitId );
         DataSet dataSet = dataSetService.getDataSet( Integer.parseInt( dataSetId ) );
-        OrganisationUnitGroup orgUnitGroup = orgUnitGroupService.getOrganisationUnitGroup( Integer.parseInt( orgUnitGroupId ) );
-        
-        if( organisationUnit == null || dataSet == null || orgUnitGroup == null )
+        OrganisationUnitGroup orgUnitGroup = orgUnitGroupService.getOrganisationUnitGroup( Integer
+            .parseInt( orgUnitGroupId ) );
+
+        if ( organisationUnit == null || dataSet == null || orgUnitGroup == null )
         {
-        	return SUCCESS;
+            return SUCCESS;
         }
+
+        
+        dataElements = new ArrayList<DataElement>();
+        dataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
+        
+        List<DataElement> tempDataElementList = new ArrayList<DataElement>();
+        
+        
         
         List<DataElement> dataElementList = new ArrayList<DataElement>( dataSet.getDataElements() );
         for ( DataElement de : dataElementList )
@@ -165,21 +178,30 @@
             {
                 if ( attValue.getAttribute().getId() == qualityMaxDataElement.getValue() )
                 {
-                    dataElements.add( de );
+                    tempDataElementList.add( de );
                 }
             }
         }
+
+        dataElements.retainAll( tempDataElementList );
         
         for ( DataElement dataElement : dataElements )
         {
-            QualityMaxValue qualityMaxValue = qualityMaxValueService.getQualityMaxValue( orgUnitGroup, organisationUnit, dataElement, dataSet, sDate, eDate );
+            QualityMaxValue qualityMaxValue = qualityMaxValueService.getQualityMaxValue( orgUnitGroup,
+                organisationUnit, dataElement, dataSet, sDate, eDate );
             if ( qualityMaxValue != null )
             {
                 qualityMaxValueMap.put( dataElement.getId(), qualityMaxValue );
                 System.out.println( "In Quality Data Value" );
             }
         }
+        
+        
+        
+        
         Collections.sort( dataElements );
+        
+        
         return SUCCESS;
     }
 }
\ No newline at end of file

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/LoadQualityScoreDetailsAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/LoadQualityScoreDetailsAction.java	2014-07-17 13:15:11 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/LoadQualityScoreDetailsAction.java	2014-07-23 11:47:17 +0000
@@ -15,6 +15,7 @@
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
+import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.dataset.Section;
@@ -111,7 +112,9 @@
     @Autowired
     private QualityScorePaymentService qualityScorePaymentService;
 
-
+    @Autowired
+    private DataElementService dataElementService;
+    
     // -------------------------------------------------------------------------
     // Input / Output
     // -------------------------------------------------------------------------
@@ -233,9 +236,16 @@
 
         //List<DataElement> dataElementList = new ArrayList<DataElement>( dataSet.getDataElements() );
         
+        
+        
+        dataElements = new ArrayList<DataElement>();
+        dataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
+        
         List<DataElement> dataElementList = new ArrayList<DataElement>();
         
         
+        
+    
         List<Section> sectionList = new ArrayList<Section>( dataSet.getSections() );
         List<DataElement> tempDEList = new ArrayList<DataElement>();
         
@@ -255,6 +265,7 @@
             dataElementList.addAll( dataSet.getDataElements() );
         }
         
+        List<DataElement> tempDataElementList = new ArrayList<DataElement>();
         
         for ( DataElement de : dataElementList )
         {
@@ -263,11 +274,14 @@
             {
                 if ( attValue.getAttribute().getId() == qualityMaxDataElement.getValue() )
                 {
-                    dataElements.add( de );
+                    tempDataElementList.add( de );
                 }
             }
         }
         
+        
+        dataElements.retainAll( tempDataElementList );
+        
         for ( DataElement dataElement : dataElements )
         {
             DataValue dataValue = dataValueService.getDataValue( dataElement, period, organisationUnit, optionCombo );

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/QualityMaxInitAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/QualityMaxInitAction.java	2014-05-31 13:40:53 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/QualityMaxInitAction.java	2014-07-23 11:47:17 +0000
@@ -24,7 +24,7 @@
  */
 public class QualityMaxInitAction implements Action
 {
-	private final static String TARIFF_SETTING_AUTHORITY = "TARIFF_SETTING_AUTHORITY";
+	private final static String TARIFF_SETTING_AUTHORITY_GROUP_SET_ID = "TARIFF_SETTING_AUTHORITY_GROUP_SET_ID";
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -119,7 +119,7 @@
     public String execute() throws Exception
     {
         //selectionManager.clearSelectedOrganisationUnits();
-    	 Constant tariff_authority = constantService.getConstantByName( TARIFF_SETTING_AUTHORITY );
+    	 Constant tariff_authority = constantService.getConstantByName( TARIFF_SETTING_AUTHORITY_GROUP_SET_ID );
     		
          if ( tariff_authority == null )
          {
@@ -139,7 +139,8 @@
                  levelOrgUnitIds.add( "\"" + org.getUid() + "\"" );
              }
          }
-        organisationUnit = selectionManager.getSelectedOrganisationUnit();
+        
+         organisationUnit = selectionManager.getSelectedOrganisationUnit();
         
         if( organisationUnit == null )
         {

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/QualityScoreInitAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/QualityScoreInitAction.java	2014-05-15 06:51:53 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/QualityScoreInitAction.java	2014-07-23 11:47:17 +0000
@@ -113,16 +113,18 @@
         else
         {
             System.out.println("Organisationunit is not null ---" + organisationUnit.getId() );
+            dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
         }
         
         if( organisationUnit == null && orgUnitId != null )
         {
             organisationUnit = organisationUnitService.getOrganisationUnit( orgUnitId );
-           
+            dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
         }
-       // List<OrganisationUnit> organisationUnitList = new ArrayList<OrganisationUnit>( organisationUnitService.getLeafOrganisationUnits(organisationUnit.getId()) ) ;
+       
+        // List<OrganisationUnit> organisationUnitList = new ArrayList<OrganisationUnit>( organisationUnitService.getLeafOrganisationUnits(organisationUnit.getId()) ) ;
         
-        dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
+        //dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
         
         List<Lookup> lookups = new ArrayList<Lookup>( lookupService.getAllLookupsByType( Lookup.DS_QUALITY_TYPE ) );
         

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/GetQualityScorePaymentAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/GetQualityScorePaymentAction.java	2014-06-02 11:30:23 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/GetQualityScorePaymentAction.java	2014-07-23 11:47:17 +0000
@@ -1,7 +1,5 @@
 package org.hisp.dhis.rbf.qualityscorepayment.action;
 
-import org.hisp.dhis.rbf.api.Lookup;
-import org.hisp.dhis.rbf.api.LookupService;
 import org.hisp.dhis.rbf.api.QualityScorePayment;
 import org.hisp.dhis.rbf.api.QualityScorePaymentService;
 

=== added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/UpdateQualityScorePaymentAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/UpdateQualityScorePaymentAction.java	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/UpdateQualityScorePaymentAction.java	2014-07-23 11:47:17 +0000
@@ -0,0 +1,79 @@
+package org.hisp.dhis.rbf.qualityscorepayment.action;
+
+import org.hisp.dhis.rbf.api.QualityScorePayment;
+import org.hisp.dhis.rbf.api.QualityScorePaymentService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Mithilesh Kumar Thakur
+ */
+public class UpdateQualityScorePaymentAction implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private QualityScorePaymentService qualityScorePaymentService;
+    
+    public void setQualityScorePaymentService( QualityScorePaymentService qualityScorePaymentService )
+    {
+        this.qualityScorePaymentService = qualityScorePaymentService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input & output
+    // -------------------------------------------------------------------------
+    
+    private Integer id;
+    
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+    
+    private String startRange;
+    
+    public void setStartRange( String startRange )
+    {
+        this.startRange = startRange;
+    }
+
+    private String endRange;
+    
+    public void setEndRange( String endRange )
+    {
+        this.endRange = endRange;
+    }
+
+    private String addQualityPayment;
+    
+    public void setAddQualityPayment( String addQualityPayment )
+    {
+        this.addQualityPayment = addQualityPayment;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action
+    // -------------------------------------------------------------------------
+    
+    public String execute() throws Exception
+    {
+        
+        QualityScorePayment qualityScorePayment = qualityScorePaymentService.getQualityScorePayment( id );
+        
+        if( qualityScorePayment != null )
+        {
+            qualityScorePayment.setStartRange( Double.parseDouble( startRange ) );
+            qualityScorePayment.setEndRange(  Double.parseDouble( endRange )  );
+            qualityScorePayment.setAddQtyPayment( Double.parseDouble( addQualityPayment ) );
+           
+            qualityScorePaymentService.updateQualityScorePayment( qualityScorePayment );
+        }
+        
+    
+        return SUCCESS;
+    }
+
+}
+

=== added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/UpdateQualityScorePaymentFormAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/UpdateQualityScorePaymentFormAction.java	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/qualityscorepayment/action/UpdateQualityScorePaymentFormAction.java	2014-07-23 11:47:17 +0000
@@ -0,0 +1,67 @@
+package org.hisp.dhis.rbf.qualityscorepayment.action;
+
+import org.hisp.dhis.rbf.api.QualityScorePayment;
+import org.hisp.dhis.rbf.api.QualityScorePaymentService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Mithilesh Kumar Thakur
+ */
+public class UpdateQualityScorePaymentFormAction implements Action
+{
+
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private QualityScorePaymentService qualityScorePaymentService;
+    
+    public void setQualityScorePaymentService( QualityScorePaymentService qualityScorePaymentService )
+    {
+        this.qualityScorePaymentService = qualityScorePaymentService;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+    
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private QualityScorePayment qualityscorepayment; 
+    
+    public QualityScorePayment getQualityscorepayment()
+    {
+        return qualityscorepayment;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute() throws Exception
+    {
+    
+        qualityscorepayment = qualityScorePaymentService.getQualityScorePayment( id );
+        
+        /*
+        System.out.println( qualityscorepayment.getId() );
+        System.out.println( qualityscorepayment.getStartRange() );
+        System.out.println( qualityscorepayment.getEndRange() );
+        System.out.println( qualityscorepayment.getAddQtyPayment() );
+        */
+        
+        return SUCCESS;
+    }
+
+}
+

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-web-maintenance-rbf/src/main/resources/META-INF/dhis/beans.xml	2014-06-20 10:21:56 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/resources/META-INF/dhis/beans.xml	2014-07-23 11:47:17 +0000
@@ -132,22 +132,23 @@
     <bean id="org.hisp.dhis.rbf.action.LoadBankDetailsAction" class="org.hisp.dhis.rbf.action.LoadBankDetailsAction" scope="prototype">
         <property name="bankDetailsService" ref="org.hisp.dhis.rbf.api.BankDetailsService" />   
         <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-        <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+        <!--<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />-->
         <property name="lookupService" ref="org.hisp.dhis.rbf.api.LookupService" />
+        <property name="constantService" ref="org.hisp.dhis.constant.ConstantService" />
     </bean>
     
     <!-- Add Bank Detail -->
 	<bean id="org.hisp.dhis.rbf.action.AddBankDataAction" class="org.hisp.dhis.rbf.action.AddBankDataAction" scope="prototype">
 		<property name="bankDetailsService" ref="org.hisp.dhis.rbf.api.BankDetailsService" />		
 		<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />		
+		<!--<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />-->		
     </bean>
     
     <!-- Add Bank Detail -->
 	<bean id="org.hisp.dhis.rbf.action.DeleteBankDataAction" class="org.hisp.dhis.rbf.action.DeleteBankDataAction" scope="prototype">
 		<property name="bankDetailsService" ref="org.hisp.dhis.rbf.api.BankDetailsService" />		
 		<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />		
+		<!--<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />-->		
     </bean>
     
     
@@ -421,6 +422,22 @@
         <property name="qualityScorePaymentService" ref="org.hisp.dhis.rbf.api.QualityScorePaymentService" />      
     </bean>
 
+
+	<!-- Update Quality Score Payment Form -->
+	<bean id="org.hisp.dhis.rbf.qualityscorepayment.action.UpdateQualityScorePaymentFormAction"
+        class="org.hisp.dhis.rbf.qualityscorepayment.action.UpdateQualityScorePaymentFormAction"
+        scope="prototype">
+        <property name="qualityScorePaymentService" ref="org.hisp.dhis.rbf.api.QualityScorePaymentService" />      
+    </bean>
+
+	<!-- Update Quality Score Payment -->
+	<bean id="org.hisp.dhis.rbf.qualityscorepayment.action.UpdateQualityScorePaymentAction"
+        class="org.hisp.dhis.rbf.qualityscorepayment.action.UpdateQualityScorePaymentAction"
+        scope="prototype">
+        <property name="qualityScorePaymentService" ref="org.hisp.dhis.rbf.api.QualityScorePaymentService" />      
+    </bean>
+    
+    
 	<!-- Delete Quality Score Payment --> 
 	<bean id="org.hisp.dhis.rbf.qualityscorepayment.action.DeleteQualityScorePaymentAction"
         class="org.hisp.dhis.rbf.qualityscorepayment.action.DeleteQualityScorePaymentAction"

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/hibernate/BankDetails.hbm.xml'
--- local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/hibernate/BankDetails.hbm.xml	2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/hibernate/BankDetails.hbm.xml	2014-07-23 11:47:17 +0000
@@ -8,7 +8,8 @@
 
     <composite-id>
       <key-many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit" column="organisationunitid" foreign-key="fk_bankdetails_organisationunitid" />      
-      <key-many-to-one name="dataSet" class="org.hisp.dhis.dataset.DataSet" column="datasetid" foreign-key="fk_bankdetails_datasetid" />
+      <!--<key-many-to-one name="dataSet" class="org.hisp.dhis.dataset.DataSet" column="datasetid" foreign-key="fk_bankdetails_datasetid" />-->
+      <key-many-to-one name="organisationUnitGroup" class="org.hisp.dhis.organisationunit.OrganisationUnitGroup" column="organisationunitgroupid" foreign-key="fk_bankdetails_organisationunitgroupid" />
     </composite-id>
 
     <property name="bank" column="bank" length="100" />

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/i18n_module.properties'
--- local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/i18n_module.properties	2014-06-20 10:21:56 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/i18n_module.properties	2014-07-23 11:47:17 +0000
@@ -79,6 +79,9 @@
 
 add_quality_score_payment_details = Add Quality Score Payment Details
 quality_score_payment_details = Quality Score Payment Details
+update_quality_score_payment_details = Update Quality Score Payment Details
+
+
 
 pbf_report = PBF Report
 pbf_report_management = PBF Report Management

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/resources/struts.xml'
--- local/in/dhis-web-maintenance-rbf/src/main/resources/struts.xml	2014-07-04 09:38:52 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/resources/struts.xml	2014-07-23 11:47:17 +0000
@@ -316,6 +316,22 @@
       <param name="anyAuthorities">F_QUALITY_SCORE_PAYMENT_ADD</param>
     </action>
 
+
+   <!-- Update Quality Score Payment Form -->
+   <action name="editQualityScorePaymentForm" class="org.hisp.dhis.rbf.qualityscorepayment.action.UpdateQualityScorePaymentFormAction">
+      <result name="success" type="velocity">/main.vm</result>
+      <param name="page">/dhis-web-maintenance-rbf/updateQualityScorePaymentForm.vm</param>
+      <param name="javascripts">javascript/qualityScorePayment.js</param>
+      <param name="anyAuthorities">F_QUALITY_SCORE_PAYMENT_UPDATE</param>
+    </action>
+
+    <!-- Update Quality Score Payment -->
+    <action name="updateQualityScorePayment" class="org.hisp.dhis.rbf.qualityscorepayment.action.UpdateQualityScorePaymentAction">
+      <result name="success" type="redirect">qualityScorePaymentList.action?currentPage=${keyCurrentPage}&amp;key=${keyCurrentKey}</result>
+      <param name="anyAuthorities">F_QUALITY_SCORE_PAYMENT_ADD</param>
+    </action>
+
+
 	<!-- Delete Quality Score Payment --> 
     <action name="delQualityScorePayment" class="org.hisp.dhis.rbf.qualityscorepayment.action.DeleteQualityScorePaymentAction">
       <result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
@@ -332,6 +348,11 @@
 
 
 
+
+
+
+
+
 	
 
 	<!-- Lookup -->

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/getBankDetails.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/getBankDetails.vm	2014-07-04 09:38:52 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/getBankDetails.vm	2014-07-23 11:47:17 +0000
@@ -78,8 +78,8 @@
 			.click(function() {	
 			validateAddBank();
 			$( "#addBankDetail" ).dialog('option', 'title', 'Add Bank Detail');
-           	$('#dataSetId option[value=-1]').attr('selected','selected');
-			$("#dataSetId ").removeAttr('disabled');
+           	$('#orgUnitGroupId option[value=-1]').attr('selected','selected');
+			$("#orgUnitGroupId ").removeAttr('disabled');
 			$("#bank").val('');			
 			$("#branchName").val('');			
 			$("#accountName").val('');
@@ -99,7 +99,7 @@
          		id: "button-save",
          		click: function(){
               		var dataValue = {
-        		        			'dataSetId' : $("#dataSetId").val(),
+        		        			'orgUnitGroupId' : $("#orgUnitGroupId").val(),
         		        			'bank' : $("#bank").val(),
         		        			'branchName' : $("#branchName").val(),
         							'accountName' : $("#accountName").val(),
@@ -124,8 +124,8 @@
 		});
 		 function handleSuccess( json )
 	    {
-			$('#dataSetId option[value=-1]').attr('selected','selected');
-			$("#dataSetId ").removeAttr('disabled');
+			$('#orgUnitGroupId option[value=-1]').attr('selected','selected');
+			$("#orgUnitGroupId ").removeAttr('disabled');
 			$("#bank").val('');			
 			$("#branchName").val('');			
 			$("#accountName").val('');
@@ -136,8 +136,8 @@
 	    }
 	    function handleError( json )
 	    {
-			$('#dataSetId option[value=-1]').attr('selected','selected');
-			$("#dataSetId ").removeAttr('disabled');
+			$('#orgUnitGroupId option[value=-1]').attr('selected','selected');
+			$("#orgUnitGroupId ").removeAttr('disabled');
 			$("#bank").val('');			
 			$("#branchName").val('');			
 			$("#accountName").val('');
@@ -147,11 +147,11 @@
 	    }
 });
 
-	function deleteBankData( organisationUnitId, dataSetId)
+	function deleteBankData( organisationUnitId, orgUnitGroupId)
 	{
 		var dataValue = {
 		        		'organisationUnitId' : organisationUnitId ,														
-						'dataSetId' : dataSetId
+						'orgUnitGroupId' : orgUnitGroupId
 		    			};
 									
 		jQuery.ajax( {
@@ -171,12 +171,12 @@
 	    }
 	}
 
-	function editBankData( organisationUnitId, dataSetId, bank, branchName, accountName, accountNumber)
+	function editBankData( organisationUnitId, orgUnitGroupId, bank, branchName, accountName, accountNumber)
 	{
 		validateAddBank();
 		$( "#addBankDetail" ).dialog('option', 'title', 'Edit Bank Detail');
-		$('#dataSetId option[value='+dataSetId+']').attr('selected','selected');
-		$('#dataSetId').attr('disabled','disabled');
+		$('#orgUnitGroupId option[value='+orgUnitGroupId+']').attr('selected','selected');
+		$('#orgUnitGroupId').attr('disabled','disabled');
 		$('#bank').val(bank);
 		$('#branchName').val(branchName);		
 		$('#accountName').val(accountName);
@@ -205,7 +205,7 @@
 selection.setListenerFunction( organisationUnitSelected );
 function validateAddBank()
 	{
-		if($("#dataSetId").val() != '-1' && $("#bank").val() != '-1' && $("#branchName").val() != "" && $("#accountName").val() != "" && $("#accountNumber").val() != "")
+		if($("#orgUnitGroupId").val() != '-1' && $("#bank").val() != '-1' && $("#branchName").val() != "" && $("#accountName").val() != "" && $("#accountNumber").val() != "")
         {
         	$("#button-save").button( "option", "disabled", false ).removeClass("ui-state-disabled");
         }
@@ -242,17 +242,17 @@
 				#set( $mark = true )
 			#end
             <tr #if( $mark ) bgcolor = "#FFFFFF" #else bgcolor="#E0ECF8"  #end>
-				<td >$!bankDetails.dataSet.name</td>
+				<td >$!bankDetails.organisationUnitGroup.name</td>
 				<td >$!bankDetails.bank</td>
 				<td >$!bankDetails.branchName</td>
 				<td >$!bankDetails.accountName</td>
 				<td >$!bankDetails.accountNumber</td>
 			#if( $auth.hasAccess("dhis-web-maintenance-rbf","deleteBankData"))
 	            <td>
-					<a href="javascript:deleteBankData('$bankDetails.organisationUnit.id','$bankDetails.dataSet.id')">
+					<a href="javascript:deleteBankData('$bankDetails.organisationUnit.id','$bankDetails.organisationUnitGroup.id')">
 						<img src="images/delete.png" width="17px"/>
 					</a>
-					<a href="javascript:editBankData('$bankDetails.organisationUnit.uid','$bankDetails.dataSet.id','$bankDetails.bank','$bankDetails.branchName','$bankDetails.accountName','$bankDetails.accountNumber')">
+					<a href="javascript:editBankData('$bankDetails.organisationUnit.uid','$bankDetails.organisationUnitGroup.id','$bankDetails.bank','$bankDetails.branchName','$bankDetails.accountName','$bankDetails.accountNumber')">
 						<img src="../images/edit.png" alt="$i18n.getString( 'edit' )"/>
 					</a>				
 				</td>
@@ -267,10 +267,10 @@
 		<tr >
 			<td style="width:40%;">PBF Type <b class="mandatory">*</b></td>
 			<td style="width:60%;">
-				<select id="dataSetId" style="width:100%;" onchange="validateAddBank()">
+				<select id="orgUnitGroupId" style="width:100%;" onchange="validateAddBank()">
 					<option value="-1">Select PBF Type</option>
-					#foreach( $dataSet in $dataSets )
-						<option value="$!dataSet.id">$!dataSet.name</option>
+					#foreach( $organisationUnitGroup in $organisationUnitGroups )
+						<option value="$!organisationUnitGroup.id">$!organisationUnitGroup.name</option>
 					#end
                 </select>
 			</td>

=== added file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/getBankDetails_old.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/getBankDetails_old.vm	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/getBankDetails_old.vm	2014-07-23 11:47:17 +0000
@@ -0,0 +1,302 @@
+<style >
+	.mandatory
+	{
+		color:red;
+		font-size: 1.5em;
+	}
+</style>
+<script type="text/javascript" >
+	
+	Ext.Loader.setConfig({
+		enabled: true
+	});
+	Ext.Loader.setPath('Ext.ux.grid', 'javascript');
+	Ext.require([
+		'Ext.data.*',
+		'Ext.grid.*',
+		'Ext.toolbar.Paging',
+		'Ext.ux.grid.TransformGrid'
+	]);
+	
+</script>
+<script >
+$(function() {
+
+Ext.QuickTips.init();
+			
+			var grid = Ext.create('Ext.ux.grid.TransformGrid', "bankDetails", {				
+			sortableColumns: true,
+            enableColumnMove: true,
+            enableColumnResize: true,
+            sortOnLoad: true,
+			width: tableWidth,
+        	height: 360,			
+            sorters: {direction: 'ASC'},
+			autoCreateViewPort:false,
+			renderTo: Ext.Element.get('#bankDetailTable'),
+        	layout: {
+            	type: 'hbox',
+            	align: 'stretch'
+        	},
+			columns: [
+    		{
+                text     : 'PBF Type',
+    			width    : columnWidth,            
+                sortable : true
+            },
+			{
+                text     : 'Bank',
+    			width    : columnWidth,            
+                sortable : true
+            },
+			{
+                text     : 'Branch Name',
+    			width    : columnWidth,						
+                sortable : true
+            },
+			{
+                text     : 'Account Name',
+    			width    : columnWidth,						
+                sortable : true
+            },
+			{
+                text     : 'Account Number',
+    			width    : columnWidth,						
+                sortable : true
+            },			
+			{
+                text     : 'Operations',
+    			width    : columnWidth,						
+                sortable : false
+            }
+			]
+			});
+			
+			grid.render();
+
+$("#openAddBankDetail").button()
+			.click(function() {	
+			validateAddBank();
+			$( "#addBankDetail" ).dialog('option', 'title', 'Add Bank Detail');
+           	$('#dataSetId option[value=-1]').attr('selected','selected');
+			$("#dataSetId ").removeAttr('disabled');
+			$("#bank").val('');			
+			$("#branchName").val('');			
+			$("#accountName").val('');
+			$("#accountNumber").val('');
+			
+			$( "#addBankDetail" ).dialog( "open" );
+});
+			
+			
+$( "#addBankDetail" ).dialog({
+			width: 320,
+			autoOpen: false,			
+			modal: true,
+			buttons: {
+			"save" : {
+         		text: "Save",
+         		id: "button-save",
+         		click: function(){
+              		var dataValue = {
+        		        			'dataSetId' : $("#dataSetId").val(),
+        		        			'bank' : $("#bank").val(),
+        		        			'branchName' : $("#branchName").val(),
+        							'accountName' : $("#accountName").val(),
+									'orgUnitUid': $("#orgUnitUid").val(),
+									'accountNumber' : $("#accountNumber").val()
+        		    			};
+								jQuery.ajax( {
+                                url: 'addBankData.action', 
+								data: dataValue,
+                                dataType: 'json',
+                                success: handleSuccess,
+                                error: handleError
+                            } );
+         		}   
+      		},
+				Cancel: function() {
+					$( this ).dialog( "close" );
+				}
+			},
+			close: function() {				
+			}
+		});
+		 function handleSuccess( json )
+	    {
+			$('#dataSetId option[value=-1]').attr('selected','selected');
+			$("#dataSetId ").removeAttr('disabled');
+			$("#bank").val('');			
+			$("#branchName").val('');			
+			$("#accountName").val('');
+			$("#accountNumber").val('');
+			
+			loadBankDetails();
+			$( "#addBankDetail" ).dialog( "close" );
+	    }
+	    function handleError( json )
+	    {
+			$('#dataSetId option[value=-1]').attr('selected','selected');
+			$("#dataSetId ").removeAttr('disabled');
+			$("#bank").val('');			
+			$("#branchName").val('');			
+			$("#accountName").val('');
+			$("#accountNumber").val('');
+			loadBankDetails();
+			$( "#addBankDetail" ).dialog( "close" );
+	    }
+});
+
+	function deleteBankData( organisationUnitId, dataSetId)
+	{
+		var dataValue = {
+		        		'organisationUnitId' : organisationUnitId ,														
+						'dataSetId' : dataSetId
+		    			};
+									
+		jQuery.ajax( {
+	                url: 'deleteBankData.action', 
+					data: dataValue,
+	                dataType: 'json',
+					success: handleSuccess,
+	                error: handleError
+	              } );
+	    function handleSuccess( json )
+	    {
+			loadBankDetails();			
+	    }
+	    function handleError( json )
+	    {
+			loadBankDetails();			
+	    }
+	}
+
+	function editBankData( organisationUnitId, dataSetId, bank, branchName, accountName, accountNumber)
+	{
+		validateAddBank();
+		$( "#addBankDetail" ).dialog('option', 'title', 'Edit Bank Detail');
+		$('#dataSetId option[value='+dataSetId+']').attr('selected','selected');
+		$('#dataSetId').attr('disabled','disabled');
+		$('#bank').val(bank);
+		$('#branchName').val(branchName);		
+		$('#accountName').val(accountName);
+		$('#accountNumber').val(accountNumber);
+		
+		$( "#addBankDetail" ).dialog( "open" );
+	}
+	
+function organisationUnitSelected( orgUnits, orgUnitNames )
+{
+		setFieldValue("orgUnit", orgUnitNames[0]);
+		setFieldValue("orgUnitUid", orgUnits[0]);
+		loadBankDetails();
+}
+
+function loadBankDetails()
+{
+	$('#loadBankDetails').load("loadbankDetails.action", 
+            				{
+            					dataElementName : $('#dataElementName').val(),
+								orgUnitUid : $("#orgUnitUid").val()
+            				}
+            				, function( ){            										
+        				});  	
+}
+selection.setListenerFunction( organisationUnitSelected );
+function validateAddBank()
+	{
+		if($("#dataSetId").val() != '-1' && $("#bank").val() != '-1' && $("#branchName").val() != "" && $("#accountName").val() != "" && $("#accountNumber").val() != "")
+        {
+        	$("#button-save").button( "option", "disabled", false ).removeClass("ui-state-disabled");
+        }
+        else
+        {
+			$("#button-save").button( "option", "disabled", true ).addClass("ui-state-disabled");       	
+        }
+	}
+</script>
+<div style="width:100%">
+<input type="button" value="Add New Bank Detail" style="float:right;" id="openAddBankDetail" />
+</div>
+<br/><br/>
+<div style="width:100%;" id="bankDetailTable">
+<table id="bankDetails" cellspacing="0">
+	<thead >
+		<tr >
+			<th >PBF Type</th>
+			<th >Bank</th>
+			<th >Branch Name</th>
+			<th >Account Name</th>
+			<th >Account Number</th>
+			#if( $auth.hasAccess("dhis-web-maintenance-rbf","deleteBankData"))
+				<th >Operations</th>
+			#end
+        </tr>
+	</thead>
+	<tbody >
+		#set( $mark = false )
+		#foreach( $bankDetails in $bankDetailsList )
+			#if( $mark )
+                #set( $mark = false )
+			#else
+				#set( $mark = true )
+			#end
+            <tr #if( $mark ) bgcolor = "#FFFFFF" #else bgcolor="#E0ECF8"  #end>
+				<td >$!bankDetails.dataSet.name</td>
+				<td >$!bankDetails.bank</td>
+				<td >$!bankDetails.branchName</td>
+				<td >$!bankDetails.accountName</td>
+				<td >$!bankDetails.accountNumber</td>
+			#if( $auth.hasAccess("dhis-web-maintenance-rbf","deleteBankData"))
+	            <td>
+					<a href="javascript:deleteBankData('$bankDetails.organisationUnit.id','$bankDetails.dataSet.id')">
+						<img src="images/delete.png" width="17px"/>
+					</a>
+					<a href="javascript:editBankData('$bankDetails.organisationUnit.uid','$bankDetails.dataSet.id','$bankDetails.bank','$bankDetails.branchName','$bankDetails.accountName','$bankDetails.accountNumber')">
+						<img src="../images/edit.png" alt="$i18n.getString( 'edit' )"/>
+					</a>				
+				</td>
+			#end
+        </tr>
+		#end
+    </tbody>
+</table>
+</div>
+<div id="addBankDetail" title="Add New Bank Detail">
+	<table style="width:100%;table-layout:fixed;">
+		<tr >
+			<td style="width:40%;">PBF Type <b class="mandatory">*</b></td>
+			<td style="width:60%;">
+				<select id="dataSetId" style="width:100%;" onchange="validateAddBank()">
+					<option value="-1">Select PBF Type</option>
+					#foreach( $dataSet in $dataSets )
+						<option value="$!dataSet.id">$!dataSet.name</option>
+					#end
+                </select>
+			</td>
+        </tr>
+		<tr >
+			<td style="width:40%;">Bank <b class="mandatory">*</b></td>
+            <td style="width:60%;">
+                <select id="bank" style="width:100%;" onchange="validateAddBank()">
+                    <option value="-1">Select Bank</option>
+                    #foreach( $bank in $banks )
+                        <option value="$bank">$bank</option>
+                    #end
+                </select>
+            </td>
+        </tr>
+		<tr >
+			<td style="width:40%;">Branch Name <b class="mandatory">*</b></td>
+			<td style="width:60%;"><input type="text" id="branchName" style="width:100%;" onblur="validateAddBank()"/></td>
+        </tr>
+		<tr >
+			<td style="width:40%;">Account Name <b class="mandatory">*</b></td>
+			<td style="width:60%;"><input type="text" id="accountName" style="width:100%;" onblur="validateAddBank()"/></td>
+        </tr>
+        <tr >
+            <td style="width:40%;">Account Number <b class="mandatory">*</b></td>
+            <td style="width:60%;"><input type="text" id="accountNumber" style="width:100%;" onblur="validateAddBank()"/></td>
+        </tr>
+    </table>
+</div>
\ No newline at end of file

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/qualityScoreDataEntry.js'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/qualityScoreDataEntry.js	2014-06-02 11:30:23 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/qualityScoreDataEntry.js	2014-07-23 11:47:17 +0000
@@ -133,6 +133,7 @@
 	function handleSuccess( json )
 	{
 	    var code = json.c;
+	    //alert(code);
 	    if ( code == '0' || code == 0) // Value successfully saved on server
 	    {
 	    	 markValue( fieldId, COLOR_GREEN );
@@ -207,7 +208,7 @@
 	{
 	    var code = json.c;
 
-	    alert(code)
+	    //alert(code)
 	    if ( code == '0' || code == 0) // Value successfully saved on server
 	    {
 	    	 markValue( fieldId, COLOR_GREEN );

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/qualityScorePayment.js'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/qualityScorePayment.js	2014-05-09 05:53:05 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/qualityScorePayment.js	2014-07-23 11:47:17 +0000
@@ -5,7 +5,7 @@
 
 function editQualityScorePaymentForm(context) 
 {
-	location.href = 'editQualityScorePaymentForm.action?scoreId=' + context.id;
+	location.href = 'editQualityScorePaymentForm.action?id=' + context.id;
 }
 
 //-----------------------------------------------------------------------------

=== added file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/updateQualityScorePayment.js'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/updateQualityScorePayment.js	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/updateQualityScorePayment.js	2014-07-23 11:47:17 +0000
@@ -0,0 +1,12 @@
+jQuery(document).ready(function() {
+	validation2('updateQualityScorePaymentForm', function(form) {
+		form.submit();
+	},
+	function(){
+		
+		isSubmit = true;
+	
+	});
+
+
+});

=== added file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadBankData_old.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadBankData_old.vm	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadBankData_old.vm	2014-07-23 11:47:17 +0000
@@ -0,0 +1,32 @@
+<script >
+	var windowWidth = $(window).width();
+	var windowHeight = $(window).height();
+	var tableWidth = (parseInt( windowWidth ) * 72) / 100 ;	
+	var columnWidth = (parseInt( windowWidth ) * 12) / 100 ;
+function organisationUnitSelected( orgUnits, orgUnitNames )
+{
+		setFieldValue("orgUnit", orgUnitNames[0]);
+		setFieldValue("orgUnitUid", orgUnits[0]);
+		loadBankDetails();
+}
+
+function loadBankDetails()
+{
+	$('#loadBankDetails').load("loadbankDetails.action", 
+            				{
+            					dataElementName : $('#dataElementName').val(),
+								orgUnitUid : $("#orgUnitUid").val()
+            				}
+            				, function( ){            										
+        				});  	
+}
+selection.setListenerFunction( organisationUnitSelected );
+</script>
+<input type="hidden" name="orgUnitUid" id="orgUnitUid">
+<h3>Bank Detail Management</h3>
+<div style="width:100%">
+	Orgainsation Unit: &nbsp; <input type="text" id="orgUnit" name="orgUnit" readonly size="40"/>
+</div>
+<br/><br/>
+<div id="loadBankDetails" style="width:92%;margin:auto;">
+</div>
\ No newline at end of file

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm	2014-07-04 09:38:52 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm	2014-07-23 11:47:17 +0000
@@ -75,7 +75,7 @@
           #set( $mark1 = true )
         #end
 		<tr #if( $mark1 ) bgcolor = "#FFFFFF" #else bgcolor="#E0ECF8" #end>
-			<td><label>$dataElement.getFormNameFallback()</label></td>
+			<td><label>$dataElement.getDisplayName()</label></td>
 			#set( $count = 0)
 				#set( $pbfDataValue = $!pbfDataValueMap.get( $dataElement ) )
 				

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadQualityMaxEntryForm.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadQualityMaxEntryForm.vm	2014-05-31 13:40:53 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadQualityMaxEntryForm.vm	2014-07-23 11:47:17 +0000
@@ -35,7 +35,7 @@
           #set( $mark1 = true )
         #end
 		<tr #if( $mark1 ) bgcolor = "#FFFFFF" #else bgcolor="#E0ECF8" #end>
-			<td><label>$dataElement.getFormNameFallback()</label></td>
+			<td><label>$dataElement.getDisplayName()</label></td>
 
             #set( $qualityDataValue = "" )			
 			#set( $qualityDataValue = $!qualityMaxValueMap.get( $dataElement.id ) )

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadQualityScoreEntryForm.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadQualityScoreEntryForm.vm	2014-05-31 13:40:53 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadQualityScoreEntryForm.vm	2014-07-23 11:47:17 +0000
@@ -51,7 +51,7 @@
           #set( $mark1 = true )
         #end
 		<tr #if( $mark1 ) bgcolor = "#FFFFFF" #else bgcolor="#E0ECF8" #end>
-			<td><label>$dataElement.getFormNameFallback()</label></td>
+			<td><label>$dataElement.getDisplayName()</label></td>
 			
 			#set( $qualityMaxValue = "" )
 			#set( $qualityMaxValue = $!qualityMaxValueMap.get( $dataElement.id ) )
@@ -97,7 +97,7 @@
 					changeInt();
 			</script>
 			<td>
-				<input type="text" class="max" name="max_$dataElement.id" id="max_$dataElement.id" value="$!qualityMaxValue" tabindex="$tabIndex" style="text-align: center;" readonly/>
+				<input type="text" class="max" name="max_$dataElement.id" id="max_$dataElement.id" value="$qualityMaxValue" tabindex="$tabIndex" style="text-align: center;" readonly/>
 			</td>
 			<td >
 				<input type="text" id="percentage_$dataElement.id" style="text-align: center;" readonly />

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/qualityScoreEntrySelection.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/qualityScoreEntrySelection.vm	2014-06-02 11:30:23 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/qualityScoreEntrySelection.vm	2014-07-23 11:47:17 +0000
@@ -72,7 +72,7 @@
 <script type="text/javascript">
 
 var i18n_select_dataset = '$encoder.jsEscape( $i18n.getString( "select_dataSet" ) , "'")';
-
+var i18n_saving_value_failed_status_code = ''$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';'
 
 jQuery( document ).ready( function()
 {

=== added file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/updateQualityScorePaymentForm.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/updateQualityScorePaymentForm.vm	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/updateQualityScorePaymentForm.vm	2014-07-23 11:47:17 +0000
@@ -0,0 +1,62 @@
+<script type="text/javascript" src="javascript/updateQualityScorePayment.js"></script>
+<script>
+    
+    jQuery(document).ready( function(){
+
+        currentDiv = 'updateQualityScorePaymentForm';
+        isSubmit = true;
+        
+        jQuery("#updateQualityScorePaymentForm").validate({
+                 meta:"validate"
+                ,errorElement:"span"
+                ,submitHandler: function(form)
+                    {
+                        if( isSubmit ) 
+                        {
+							
+                        }
+                    }
+            });
+    }); 
+    
+</script>
+
+<h3>$i18n.getString( "update_quality_score_payment_details" )</h3>
+
+<form id="updateQualityScorePaymentForm" name="updateQualityScorePaymentForm" action="updateQualityScorePayment.action" method="post" class="inputForm">
+<input type="hidden" id="id" name="id" value="$!qualityscorepayment.getId()" />  
+  
+  <table style="width: 600px">
+    <col style="width: 400px">
+    <col>
+    <thead>
+      <tr>
+        <th colspan="2">$i18n.getString( "quality_score_payment_details" )</th>
+      </tr>
+    </thead>
+    <tbody>
+      <tr>
+        <td><label>$i18n.getString( "stare_range" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+        <td><input type="text" id="startRange" name="startRange" value="$!qualityscorepayment.getStartRange()" class="{validate:{required:true}}"></td>
+      </tr>
+      
+      <tr>
+        <td><label>$i18n.getString( "end_range" )</label></td>
+        <td><input type="text" id="endRange" name="endRange" value="$!qualityscorepayment.getEndRange()" class="{validate:{required:true}}"></td>
+      </tr>
+      
+      <tr>
+        <td><label>$i18n.getString( "additional_quality_payment" )</label></td>
+		<td><input type="text" id="addQualityPayment" name="addQualityPayment" value="$!qualityscorepayment.getAddQtyPayment()" ></td>
+      </tr>
+
+	  <tr>
+        <td colspan="3">
+          <input type="submit" value="$i18n.getString( 'save' )" style="width:120px" />
+          <input type="button" onclick="dhis2.commons.redirectCurrentPage( 'qualityScorePaymentList.action' )" value="$i18n.getString( 'cancel' )" style="width:120px" />
+        </td>
+      </tr>
+	  
+    </tbody>
+  </table>
+</form>