dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31365
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15963: local/in RBF Maintainance work in progress
------------------------------------------------------------
revno: 15963
committer: Mithilesh Kumar Thakur <mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-07-04 10:38:52 +0100
message:
local/in RBF Maintainance work in progress
modified:
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/aggregation/action/AddAggregationQueryFormAction.java
local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/aggregation/action/ShowUpdateAggregationQueryFormAction.java
local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/SaveDataValueAction.java
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/loadDataEntryForm.vm
local/in/pom.xml
--
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/LoadBankDetailsAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/LoadBankDetailsAction.java 2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/action/LoadBankDetailsAction.java 2014-07-04 09:38:52 +0000
@@ -15,19 +15,20 @@
import com.opensymphony.xwork2.Action;
-public class LoadBankDetailsAction implements Action
+public class LoadBankDetailsAction
+ implements Action
{
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
-
+
private BankDetailsService bankDetailsService;
public void setBankDetailsService( BankDetailsService bankDetailsService )
{
this.bankDetailsService = bankDetailsService;
}
-
+
private OrganisationUnitService organisationUnitService;
public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
@@ -36,14 +37,14 @@
}
private LookupService lookupService;
-
+
public void setLookupService( LookupService lookupService )
{
this.lookupService = lookupService;
}
private DataSetService dataSetService;
-
+
public void setDataSetService( DataSetService dataSetService )
{
this.dataSetService = dataSetService;
@@ -59,23 +60,23 @@
{
this.orgUnitUid = orgUnitUid;
}
-
+
private List<DataSet> dataSets = new ArrayList<DataSet>();
-
+
public List<DataSet> getDataSets()
{
return dataSets;
- }
+ }
- private List<String> banks = new ArrayList<String>();
+ private List<String> banks = new ArrayList<String>();
public List<String> getBanks()
{
return banks;
}
-
+
private List<BankDetails> bankDetailsList = new ArrayList<BankDetails>();
-
+
public List<BankDetails> getBankDetailsList()
{
return bankDetailsList;
@@ -87,37 +88,46 @@
public String execute()
{
OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( orgUnitUid );
-
+
bankDetailsList.addAll( bankDetailsService.getBankDetails( organisationUnit ) );
+
dataSets.clear();
+
List<Lookup> lookups = new ArrayList<Lookup>( lookupService.getAllLookupsByType( Lookup.DS_PBF_TYPE ) );
List<DataSet> bankDetailDataSets = new ArrayList<DataSet>();
- for( Lookup lookup : lookups )
+ for ( Lookup lookup : lookups )
{
Integer dataSetId = Integer.parseInt( lookup.getValue() );
-
+
DataSet dataSet = dataSetService.getDataSet( dataSetId );
- dataSets.add(dataSet);
+
+ if( dataSet != null )
+ {
+ dataSets.add( dataSet );
+ }
+
}
- for(BankDetails bd : bankDetailsList)
+ for ( BankDetails bd : bankDetailsList )
{
- bankDetailDataSets.add( bd.getDataSet() );
+ bankDetailDataSets.add( bd.getDataSet() );
}
- //dataSets.removeAll(bankDetailDataSets);
-
+ // dataSets.removeAll(bankDetailDataSets);
+
lookups = new ArrayList<Lookup>( lookupService.getAllLookupsByType( Lookup.BANK ) );
- for( Lookup lookup : lookups )
+ for ( Lookup lookup : lookups )
{
banks.add( lookup.getValue() );
}
-
- Collections.sort(dataSets);
- /*for(DataSet ds : dataSets)
+
+ System.out.println( "Data Set Size :--" + dataSets.size() );
+
+ for ( DataSet ds : dataSets )
{
- System.out.println(ds.getName());
+ System.out.println( ds.getName() );
}
- System.out.println(dataSets.size());
- */
+
+ Collections.sort( dataSets );
+
return SUCCESS;
}
}
=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/aggregation/action/AddAggregationQueryFormAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/aggregation/action/AddAggregationQueryFormAction.java 2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/aggregation/action/AddAggregationQueryFormAction.java 2014-07-04 09:38:52 +0000
@@ -55,7 +55,7 @@
{
lookups = new ArrayList<Lookup>( lookupService.getAllLookupsByType( Lookup.PBF_AGG_TYPE ) );
- dataElementList = new ArrayList<DataElement>( dataElementService.getAllActiveDataElements() );
+ dataElementList = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
/* Lookup lookup = lookupService.getLookupByName( "IS_PBF_AGGREGATED_DE_ATTRIBUTE_ID" );
Iterator<DataElement> iterator = dataElementList.iterator();
=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/aggregation/action/ShowUpdateAggregationQueryFormAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/aggregation/action/ShowUpdateAggregationQueryFormAction.java 2014-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/aggregation/action/ShowUpdateAggregationQueryFormAction.java 2014-07-04 09:38:52 +0000
@@ -93,7 +93,7 @@
lookups = new ArrayList<Lookup>( lookupService.getAllLookupsByType( Lookup.PBF_AGG_TYPE ) );
Collections.sort( lookups, IdentifiableObjectNameComparator.INSTANCE );
- dataElementList = new ArrayList<DataElement>( dataElementService.getAllActiveDataElements() );
+ dataElementList = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
Collections.sort( dataElementList, IdentifiableObjectNameComparator.INSTANCE );
aggregation = aggregationConditionService.getCaseAggregationCondition( id );
=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/SaveDataValueAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/SaveDataValueAction.java 2014-06-02 11:30:23 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/quality/dataentry/SaveDataValueAction.java 2014-07-04 09:38:52 +0000
@@ -216,7 +216,8 @@
dataValue.setCategoryOptionCombo(optionCombo);
dataValue.setValue( value.trim() );
- dataValue.setTimestamp( now );
+ //dataValue.setTimestamp( now );
+ dataValue.setLastUpdated( now );
dataValue.setStoredBy( storedBy );
dataValueService.addDataValue( dataValue );
@@ -227,7 +228,8 @@
if( !(value.trim().equalsIgnoreCase( dataValue.getValue() ) ) )
{
dataValue.setValue( value.trim() );
- dataValue.setTimestamp( now );
+ //dataValue.setTimestamp( now );
+ dataValue.setLastUpdated( now );
dataValue.setStoredBy( storedBy );
dataValueService.updateDataValue( dataValue );
}
@@ -260,7 +262,9 @@
overAllScoreDataValue.setCategoryOptionCombo( optionCombo );
overAllScoreDataValue.setValue( overAllScoreValue.trim() );
- overAllScoreDataValue.setTimestamp( now );
+ //overAllScoreDataValue.setTimestamp( now );
+ overAllScoreDataValue.setLastUpdated( now );
+
overAllScoreDataValue.setStoredBy( storedBy );
dataValueService.addDataValue( overAllScoreDataValue );
@@ -271,7 +275,8 @@
if( !(overAllScoreValue.trim().equalsIgnoreCase( overAllScoreDataValue.getValue() ) ) )
{
overAllScoreDataValue.setValue( overAllScoreValue.trim() );
- overAllScoreDataValue.setTimestamp( now );
+ //overAllScoreDataValue.setTimestamp( now );
+ overAllScoreDataValue.setLastUpdated( now );
overAllScoreDataValue.setStoredBy( storedBy );
dataValueService.updateDataValue( overAllScoreDataValue );
}
=== 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-06-20 10:21:56 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/resources/struts.xml 2014-07-04 09:38:52 +0000
@@ -118,6 +118,12 @@
</action>
+ <!-- for PBF Admin DataEntry Role Quanitity External Verification-->
+ <action name="pbfAdminDataEntry" class="org.hisp.dhis.rbf.action.NoAction">
+ <result name="success" type="velocity">/content.vm</result>
+ <param name="page">/dhis-web-maintenance-rbf/loadDataEntryForm.vm</param>
+ <param name="requiredAuthorities">F_PBF_ADMIN_DATAENTRY</param>
+ </action>
<!-- Save Value -->
=== 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-04-26 11:27:06 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/getBankDetails.vm 2014-07-04 09:38:52 +0000
@@ -228,7 +228,7 @@
<th >Branch Name</th>
<th >Account Name</th>
<th >Account Number</th>
- #if( $auth.hasAccess("dhis-web-maintenance-pbf","deleteBankData"))
+ #if( $auth.hasAccess("dhis-web-maintenance-rbf","deleteBankData"))
<th >Operations</th>
#end
</tr>
@@ -247,7 +247,7 @@
<td >$!bankDetails.branchName</td>
<td >$!bankDetails.accountName</td>
<td >$!bankDetails.accountNumber</td>
- #if( $auth.hasAccess("dhis-web-maintenance-pbf","deleteBankData"))
+ #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"/>
=== 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-06-20 10:21:56 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm 2014-07-04 09:38:52 +0000
@@ -50,9 +50,15 @@
<th style="width:35%;">$i18n.getString( "dataelement" )</th>
<th style="text-align: center;width:15%;">$i18n.getString( "qty_reported" )</th>
- #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityValidated") )
+ #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityValidated") || $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") || $auth.hasAccess( "dhis-web-maintenance-rbf", "pbfAdminDataEntry" ) )
<th style="text-align: center;width:15%;">$i18n.getString( "qty_validated" )</th>
+ #end
+
+ #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") || $auth.hasAccess( "dhis-web-maintenance-rbf", "pbfAdminDataEntry" ) )
<th style="text-align: center;width:15%;">$i18n.getString( "qty_external_verification" )</th>
+ #end
+
+ #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityValidated") || $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") || $auth.hasAccess( "dhis-web-maintenance-rbf", "pbfAdminDataEntry" ) )
<th style="text-align: center;width:15%;">$i18n.getString( "tariff_amount" )</th>
<th style="text-align: center;width:15%;">$i18n.getString( "total" )</th>
#end
@@ -72,75 +78,138 @@
<td><label>$dataElement.getFormNameFallback()</label></td>
#set( $count = 0)
#set( $pbfDataValue = $!pbfDataValueMap.get( $dataElement ) )
+
+ #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "pbfAdminDataEntry" ) )
+ <td>
+ <input onblur="savePBFDataValue('$dataElement.id', 1 )" type="text" name="pbfdv_qty_reported_$dataElement.id" id="pbfdv_qty_reported_$dataElement.id"
+ value="$!pbfDataValue.quantityReported" tabindex="$tabIndex" style="text-align: center;"
+ #if($dataElement.type =='number') class="{validate:{number:true}}"
+ #elseif($dataElement.type =='int') class="{validate:{integer:true}}"
+ #elseif($dataElement.type =='positiveNumber') class="{validate:{positive_integer:true}}"
+ #elseif($dataElement.type =='negativeNumber') class="{validate:{negative_integer:true}}"
+ #end />
+ </td>
+ <td>
+ <input onblur="savePBFDataValue('$dataElement.id', 2 )" onkeyup="calTariffVal('$dataElement.id')" type="text" name="pbfdv_qty_validated_$dataElement.id" id="pbfdv_qty_validated_$dataElement.id"
+ value="$!pbfDataValue.quantityValidated" tabindex="$tabIndex" style="text-align: center;"
+ #if($dataElement.type =='number') class="{validate:{number:true}}"
+ #elseif($dataElement.type =='int') class="{validate:{integer:true}}"
+ #elseif($dataElement.type =='positiveNumber') class="{validate:{positive_integer:true}}"
+ #elseif($dataElement.type =='negativeNumber') class="{validate:{negative_integer:true}}"
+ #end class="quantity$count" />
+ </td>
+ <script>
+ function changeInt()
+ {
+ var tariff = 0.0;
+ if('$!pbfDataValue.tariffAmount' != '' )
+ {
+ tariff = parseFloat($pbfDataValue.tariffAmount);
+ $('#pbfdv_tariff_amt_'+$dataElement.id).val(tariff);
+ }
+
+ }
+ changeInt();
+ </script>
+
+ <td>
+ <input onblur="savePBFDataValue('$dataElement.id', 3 )" type="text" name="pbfdv_qty_external_verification_$dataElement.id" id="pbfdv_qty_external_verification_$dataElement.id"
+ value="$!pbfDataValue.getQuantityExternalVerification()" tabindex="$tabIndex" style="text-align: center;"
+ #if($dataElement.type =='number') class="{validate:{number:true}}"
+ #elseif($dataElement.type =='int') class="{validate:{integer:true}}"
+ #elseif($dataElement.type =='positiveNumber') class="{validate:{positive_integer:true}}"
+ #elseif($dataElement.type =='negativeNumber') class="{validate:{negative_integer:true}}"
+ #end />
+ </td>
+ <script>
+ function changeInt()
+ {
+ var tariff = 0.0;
+ if('$!pbfDataValue.tariffAmount' != '' )
+ {
+ tariff = parseFloat($pbfDataValue.tariffAmount);
+ $('#pbfdv_tariff_amt_'+$dataElement.id).val(tariff);
+ }
+
+ }
+ changeInt();
+ </script>
+ #else
+ <td>
+ <input onblur="savePBFDataValue('$dataElement.id', 1 )" type="text" name="pbfdv_qty_reported_$dataElement.id" id="pbfdv_qty_reported_$dataElement.id"
+ value="$!pbfDataValue.quantityReported" tabindex="$tabIndex" style="text-align: center;" #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") ) disabled="disabled" #end
+ #if($dataElement.type =='number') class="{validate:{number:true}}"
+ #elseif($dataElement.type =='int') class="{validate:{integer:true}}"
+ #elseif($dataElement.type =='positiveNumber') class="{validate:{positive_integer:true}}"
+ #elseif($dataElement.type =='negativeNumber') class="{validate:{negative_integer:true}}"
+ #end />
+ </td>
+
+ #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityValidated") || $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") )
+ <td>
+ <input onblur="savePBFDataValue('$dataElement.id', 2 )" onkeyup="calTariffVal('$dataElement.id')" type="text" name="pbfdv_qty_validated_$dataElement.id" id="pbfdv_qty_validated_$dataElement.id"
+ value="$!pbfDataValue.quantityValidated" tabindex="$tabIndex" style="text-align: center;" #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") ) disabled="disabled" #end
+ #if($dataElement.type =='number') class="{validate:{number:true}}"
+ #elseif($dataElement.type =='int') class="{validate:{integer:true}}"
+ #elseif($dataElement.type =='positiveNumber') class="{validate:{positive_integer:true}}"
+ #elseif($dataElement.type =='negativeNumber') class="{validate:{negative_integer:true}}"
+ #end class="quantity$count" />
+ </td>
+ <script>
+ function changeInt()
+ {
+ var tariff = 0.0;
+ if('$!pbfDataValue.tariffAmount' != '' )
+ {
+ tariff = parseFloat($pbfDataValue.tariffAmount);
+ $('#pbfdv_tariff_amt_'+$dataElement.id).val(tariff);
+ }
+
+ }
+ changeInt();
+ </script>
+ #end
+
+ #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") )
+ <td>
+ <input onblur="savePBFDataValue('$dataElement.id', 3 )" type="text" name="pbfdv_qty_external_verification_$dataElement.id" id="pbfdv_qty_external_verification_$dataElement.id"
+ value="$!pbfDataValue.getQuantityExternalVerification()" tabindex="$tabIndex" style="text-align: center;"
+ #if($dataElement.type =='number') class="{validate:{number:true}}"
+ #elseif($dataElement.type =='int') class="{validate:{integer:true}}"
+ #elseif($dataElement.type =='positiveNumber') class="{validate:{positive_integer:true}}"
+ #elseif($dataElement.type =='negativeNumber') class="{validate:{negative_integer:true}}"
+ #end />
+ </td>
+ <script>
+ function changeInt()
+ {
+ var tariff = 0.0;
+ if('$!pbfDataValue.tariffAmount' != '' )
+ {
+ tariff = parseFloat($pbfDataValue.tariffAmount);
+ $('#pbfdv_tariff_amt_'+$dataElement.id).val(tariff);
+ }
+
+ }
+ changeInt();
+ </script>
+ #end
+
+ #end
+
<td>
- <input onblur="savePBFDataValue('$dataElement.id', 1 )" type="text" name="pbfdv_qty_reported_$dataElement.id" id="pbfdv_qty_reported_$dataElement.id"
- value="$!pbfDataValue.quantityReported" tabindex="$tabIndex" style="text-align: center;" #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") ) disabled="disabled" #end
+ <input type="text" name="pbfdv_tariff_amt_$dataElement.id" id="pbfdv_tariff_amt_$dataElement.id"
+ value="$!pbfDataValue.tariffAmount" tabindex="$tabIndex" style="text-align: center;"
#if($dataElement.type =='number') class="{validate:{number:true}}"
#elseif($dataElement.type =='int') class="{validate:{integer:true}}"
#elseif($dataElement.type =='positiveNumber') class="{validate:{positive_integer:true}}"
#elseif($dataElement.type =='negativeNumber') class="{validate:{negative_integer:true}}"
- #end />
+ #end class="tariff$count" readonly/>
</td>
- #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityValidated") || $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") )
- <td>
- <input onblur="savePBFDataValue('$dataElement.id', 2 )" onkeyup="calTariffVal('$dataElement.id')" type="text" name="pbfdv_qty_validated_$dataElement.id" id="pbfdv_qty_validated_$dataElement.id"
- value="$!pbfDataValue.quantityValidated" tabindex="$tabIndex" style="text-align: center;" #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") ) disabled="disabled" #end
- #if($dataElement.type =='number') class="{validate:{number:true}}"
- #elseif($dataElement.type =='int') class="{validate:{integer:true}}"
- #elseif($dataElement.type =='positiveNumber') class="{validate:{positive_integer:true}}"
- #elseif($dataElement.type =='negativeNumber') class="{validate:{negative_integer:true}}"
- #end class="quantity$count" />
- </td>
- <script>
- function changeInt()
- {
- var tariff = 0.0;
- if('$!pbfDataValue.tariffAmount' != '' )
- {
- tariff = parseFloat($pbfDataValue.tariffAmount);
- $('#pbfdv_tariff_amt_'+$dataElement.id).val(tariff);
- }
-
- }
- changeInt();
- </script>
-
- <td>
- <input onblur="savePBFDataValue('$dataElement.id', 3 )" type="text" name="pbfdv_qty_external_verification_$dataElement.id" id="pbfdv_qty_external_verification_$dataElement.id"
- value="$!pbfDataValue.getQuantityExternalVerification()" tabindex="$tabIndex" style="text-align: center;"
- #if($dataElement.type =='number') class="{validate:{number:true}}"
- #elseif($dataElement.type =='int') class="{validate:{integer:true}}"
- #elseif($dataElement.type =='positiveNumber') class="{validate:{positive_integer:true}}"
- #elseif($dataElement.type =='negativeNumber') class="{validate:{negative_integer:true}}"
- #end />
- </td>
- <script>
- function changeInt()
- {
- var tariff = 0.0;
- if('$!pbfDataValue.tariffAmount' != '' )
- {
- tariff = parseFloat($pbfDataValue.tariffAmount);
- $('#pbfdv_tariff_amt_'+$dataElement.id).val(tariff);
- }
-
- }
- changeInt();
- </script>
-
- <td>
- <input type="text" name="pbfdv_tariff_amt_$dataElement.id" id="pbfdv_tariff_amt_$dataElement.id"
- value="$!pbfDataValue.tariffAmount" tabindex="$tabIndex" style="text-align: center;"
- #if($dataElement.type =='number') class="{validate:{number:true}}"
- #elseif($dataElement.type =='int') class="{validate:{integer:true}}"
- #elseif($dataElement.type =='positiveNumber') class="{validate:{positive_integer:true}}"
- #elseif($dataElement.type =='negativeNumber') class="{validate:{negative_integer:true}}"
- #end class="tariff$count" readonly/>
- </td>
- <td >
- <input type="text" id="total_$dataElement.id" style="text-align: center;" readonly/>
- </td>
- #end
+ <td >
+ <input type="text" id="total_$dataElement.id" style="text-align: center;" readonly />
+ </td>
+
<script >
function calVal( ) {
@@ -210,32 +279,34 @@
//alert( utilizationRate );
var tempUtilizationRateDataElements = document.getElementById("utilizationRateDataElementLB");
-
- for ( i=0; i < tempUtilizationRateDataElements.length; i++ )
- {
-
- var utilizationRateTariffMapValue = utilizationRateTariffMap[tempUtilizationRateDataElements.options[i].value];
-
- var startRange = parseFloat( utilizationRateTariffMapValue.split(":")[0] );
- var endRange = parseFloat( utilizationRateTariffMapValue.split(":")[1] );
- var tariffValue = parseFloat( utilizationRateTariffMapValue.split(":")[2] );
-
- //alert( startRange + "--" + endRange + "--" + tariffValue );
-
- if( utilizationRate >= startRange && utilizationRate < endRange )
+
+ if( utilizationRate != "" || utilizationRate != " " || utilizationRate != '' || utilizationRate != ' ' || utilizationRate.length != 0 )
+ {
+ for ( i=0; i < tempUtilizationRateDataElements.length; i++ )
{
- //alert( "2 Alert" + " : " + startRange + "--" + endRange + "--" + tariffValue );
- var dataElementId = tempUtilizationRateDataElements.options[i].value;
- //alert( '#pbfdv_tariff_amt_'+dataElementId );
- $('#pbfdv_tariff_amt_'+dataElementId).val( tariffValue );
-
- //alert( $('#pbfdv_tariff_amt_'+dataElementId).val( tariffValue ) );
+
+ var utilizationRateTariffMapValue = utilizationRateTariffMap[tempUtilizationRateDataElements.options[i].value];
+
+ var startRange = parseFloat( utilizationRateTariffMapValue.split(":")[0] );
+ var endRange = parseFloat( utilizationRateTariffMapValue.split(":")[1] );
+ var tariffValue = parseFloat( utilizationRateTariffMapValue.split(":")[2] );
+
+ //alert( startRange + "--" + endRange + "--" + tariffValue );
+
+ if( parseFloat( utilizationRate) >= parseFloat( startRange ) && parseFloat( utilizationRate ) < parseFloat( endRange ) )
+ {
+ //alert( "2 Alert" + " : " + startRange + "--" + endRange + "--" + tariffValue + "--" + utilizationRate );
+ var dataElementId = tempUtilizationRateDataElements.options[i].value;
+ //alert( '#pbfdv_tariff_amt_'+dataElementId );
+ $('#pbfdv_tariff_amt_'+dataElementId).val( tariffValue );
+
+ //alert( $('#pbfdv_tariff_amt_'+dataElementId).val( parseFloat( tariffValue ) ) );
+ }
}
- }
-
+ }
+
}
-
function calTariffVal( dataElementId ) {
var total = 0.0;
var quantity = 0.0;
=== modified file 'local/in/pom.xml'
--- local/in/pom.xml 2014-04-30 05:26:01 +0000
+++ local/in/pom.xml 2014-07-04 09:38:52 +0000
@@ -16,7 +16,11 @@
<module>dhis-web-maintenance-in</module>
<!--<module>dhis-web-maintenance-pbf</module>-->
+
<module>dhis-web-maintenance-rbf</module>
+
+ <module>dhis-web-birtreports</module>
+
<!--<module>dhis-web-maintenance-ccem</module>
<module>dhis-web-coldchain</module>
<module>dhis-web-dataentry-ccem</module> -->