dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29336
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14794: PBF: minor fixes to payment adjustment
------------------------------------------------------------
revno: 14794
committer: Bharath <chbharathk@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-04-11 09:58:44 +0100
message:
PBF: minor fixes to payment adjustment
modified:
local/in/dhis-in-api/src/main/java/org/hisp/dhis/lookup/Lookup.java
local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/PBFInvoiceReportForm.vm
local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/loadPaymentAdjustment.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-in-api/src/main/java/org/hisp/dhis/lookup/Lookup.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/lookup/Lookup.java 2014-01-12 16:56:05 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/lookup/Lookup.java 2014-04-11 08:58:44 +0000
@@ -4,6 +4,10 @@
public class Lookup extends BaseNameableObject
{
+ public final static String PAYMENT_ADJUSTMENT_AMOUNT_DE = "PAYMENT_ADJUSTMENT_AMOUNT_DE";
+
+ public final static String TARIFF_SETTING_AUTHORITY = "TARIFF_SETTING_AUTHORITY";
+
public static final String DS_PBF_TYPE = "DS_PBF_TYPE";
public static final String BANK = "BANK";
=== modified file 'local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/PBFInvoiceReportForm.vm'
--- local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/PBFInvoiceReportForm.vm 2014-04-05 12:21:33 +0000
+++ local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/PBFInvoiceReportForm.vm 2014-04-11 08:58:44 +0000
@@ -34,24 +34,34 @@
var reportFormat = $('#selectedReportFormat').val();
var orgunit = $('#treeSelectedId').val();
+ var startPeriod = "";
+ var endPeriod = "";
if(quater=='Q1')
{
period = year+"-01-01";
+ startPeriod = year+"-01-01";
+ endPeriod = year+"-03-31";
}
else if(quater=='Q2')
{
period = year+"-04-01";
+ startPeriod = year+"-04-01";
+ endPeriod = year+"-06-30";
}
else if(quater=='Q3')
{
period = year+"-07-01";
+ startPeriod = year+"-07-01";
+ endPeriod = year+"-09-30";
}
else if(quater=='Q4')
{
period = year+"-10-01";
+ startPeriod = year+"-10-01";
+ endPeriod = year+"-12-31";
}
- window.location.href = "http://192.168.0.21:8095/birt_punjab_213/run?__report=/home/hisp/tomcat_punjab_213/webapps/birt_punjab_213/report/District%20Level%20Reports/JSY%20District%20Report.rptdesign&__format="+reportFormat+"&Date="+period+"&District="+orgunit;
+ window.location.href = "http://192.168.0.21:8098/birt_pbf/run?__report=/home/ccem/tomcat_pbf/webapps/birt_pbf/report/PBF_Payment_Voucher.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&District="+orgunit;
return false;
}
=== modified file 'local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/loadPaymentAdjustment.vm'
--- local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/loadPaymentAdjustment.vm 2014-04-10 10:30:33 +0000
+++ local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/loadPaymentAdjustment.vm 2014-04-11 08:58:44 +0000
@@ -2,7 +2,7 @@
<script type="text/javascript" >
jQuery(document).ready( function(){
-
+ dataElementIdArray = new Array();
#foreach( $dataElement in $dataElements )
dataElementIdArray.push( $dataElement.id )
#end
@@ -29,20 +29,20 @@
{
var tariffAmount = document.getElementById("pbfTariff_"+dataElementIdArray[i]).value;
var totalCalculatedValue = ( parseFloat( tariffAmount ) * parseFloat (adjustmentPer) ) / 100;
- document.getElementById( "adjusted_"+dataElementIdArray[i] ).value = Math.round(totalCalculatedValue*100)/100;
+ document.getElementById( "adjusted_"+dataElementIdArray[i] ).value = Math.round(totalCalculatedValue);
var pbfAmount = document.getElementById("pbfQty_"+dataElementIdArray[i]).value;
var adjustedAmount = parseFloat(totalCalculatedValue) * parseFloat (pbfAmount);
- document.getElementById( "adjustedAmt_"+dataElementIdArray[i] ).value = Math.round(adjustedAmount*100)/100;
+ document.getElementById( "adjustedAmt_"+dataElementIdArray[i] ).value = Math.round(adjustedAmount);
var adjAmtIncQS = ( parseFloat( adjustedAmount ) * parseFloat ( qualityScore ) ) / 100;
- document.getElementById( "adjAmtIncQS_"+dataElementIdArray[i] ).value = Math.round(adjAmtIncQS*100)/100;
+ document.getElementById( "adjAmtIncQS_"+dataElementIdArray[i] ).value = Math.round(adjAmtIncQS);
totalAmtToPay += parseFloat( adjAmtIncQS );
}
- document.getElementById( "total_amt_to_pay" ).value = Math.round(totalAmtToPay*100)/100;
+ document.getElementById( "total_amt_to_pay" ).value = Math.round(totalAmtToPay);
}
</script>
@@ -82,26 +82,26 @@
<tr #if( $mark ) bgcolor = "#FFFFFF" #else bgcolor="#E0ECF8" #end>
<td>$!dataElement.name</td>
- <td align="center"><input type="text" name="pbfQty_$dataElement.id" id="pbfQty_$dataElement.id" size="10" value="$!mathTool.round( $!pbfQtyMap.get( $dataElement.id ) )" readonly="readonly"/></td>
- <td align="center"><input type="text" name="pbfTariff_$dataElement.id" id="pbfTariff_$dataElement.id" size="10" value="$!mathTool.roundTo(1, $!pbfTariffMap.get( $dataElement.id ) )" readonly="readonly"/></td>
+ <td align="center"><input type="text" name="pbfQty_$dataElement.id" id="pbfQty_$dataElement.id" style="text-align:center;" size="10" value="$!mathTool.round( $!pbfQtyMap.get( $dataElement.id ) )" readonly="readonly"/></td>
+ <td align="center"><input type="text" name="pbfTariff_$dataElement.id" id="pbfTariff_$dataElement.id" style="text-align:center;" size="10" value="$!mathTool.round( $!pbfTariffMap.get( $dataElement.id ) )" readonly="readonly"/></td>
#set( $tariffVal = $!pbfQtyMap.get( $dataElement.id ) * $!pbfTariffMap.get( $dataElement.id ) )
- <td id="pbfAmt_$dataElement.id" align="center">$!mathTool.roundTo(2, $tariffVal )</td>
+ <td id="pbfAmt_$dataElement.id" align="center">$!mathTool.round( $tariffVal )</td>
#set( $pbfAmtIncQS = ( $!tariffVal * $!overAllQualityScore )/100 )
- <td id="pbfAmtIncQS_$dataElement.id" align="center">$!mathTool.roundTo(2, $!pbfAmtIncQS )</td>
+ <td id="pbfAmtIncQS_$dataElement.id" align="center">$!mathTool.round( $!pbfAmtIncQS )</td>
#set( $pbfTotalUnadjustedAmount = $!pbfTotalUnadjustedAmount + $!pbfAmtIncQS )
- <td><input type="text" name="adjusted_$dataElement.id" id="adjusted_$dataElement.id" size="10" /></td>
- <td align="center"><input type="text" name="adjustedAmt_$dataElement.id" id="adjustedAmt_$dataElement.id" size="15" /></td>
- <td align="center"><input type="text" name="adjAmtIncQS_$dataElement.id" id="adjAmtIncQS_$dataElement.id" size="15" /></td>
+ <td><input type="text" name="adjusted_$dataElement.id" id="adjusted_$dataElement.id" style="text-align:center;" size="10" /></td>
+ <td align="center"><input type="text" name="adjustedAmt_$dataElement.id" id="adjustedAmt_$dataElement.id" style="text-align:center;" size="15" /></td>
+ <td align="center"><input type="text" name="adjAmtIncQS_$dataElement.id" id="adjAmtIncQS_$dataElement.id" style="text-align:center;" size="15" /></td>
</tr>
#end
<tr>
- <td>$i18n.getString( "quality_score" ) : <input type="text" name="quality_score" id="quality_score" size="10" value="$!mathTool.roundTo(2, $!overAllQualityScore )" readonly /></td>
+ <td>$i18n.getString( "quality_score" ) : <input type="text" name="quality_score" id="quality_score" style="text-align:center;" size="10" value="$!mathTool.roundTo( 2, $!overAllQualityScore )" readonly /></td>
<td colspan="2" align="right">$i18n.getString( "total_unadjusted_amount" )</td>
- <td><input type="text" name="total" id="total" size="20" value="$!mathTool.roundTo(2, $pbfTotalUnadjustedAmount )" readonly /></td>
+ <td><input type="text" name="total" id="total" style="text-align:center;" size="20" value="$!mathTool.round( $pbfTotalUnadjustedAmount )" readonly /></td>
<td> </td>
<td colspan="2" align="right">$i18n.getString("total_amt_to_pay")</td>
- <td><input type="text" name="total_amt_to_pay" id="total_amt_to_pay" size="20" readonly /></td>
+ <td><input type="text" name="total_amt_to_pay" id="total_amt_to_pay" style="text-align:center;" size="20" readonly /></td>
</tr>
</tbody>
</table>
=== modified file 'local/in/pom.xml'
--- local/in/pom.xml 2014-01-10 07:08:30 +0000
+++ local/in/pom.xml 2014-04-11 08:58:44 +0000
@@ -16,9 +16,10 @@
<module>dhis-web-maintenance-in</module>
<module>dhis-web-maintenance-pbf</module>
- <module>dhis-web-maintenance-ccem</module>
+
+ <!--<module>dhis-web-maintenance-ccem</module>
<module>dhis-web-coldchain</module>
- <module>dhis-web-dataentry-ccem</module>
+ <module>dhis-web-dataentry-ccem</module> -->
<!--<module>dhis-web-dashboard</module>