Commit ace0bc84 authored by arawankar's avatar arawankar

Update source files of payroll voucher hold and release.Reviewed by Ahmed sir.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@187191 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ece882c0
......@@ -94,7 +94,7 @@ public class PayrVoucherHld extends ActionHandlerEJB implements PayrVoucherHldLo
}
//Modified by Anjali R. on [27/06/2018][Added condition for cancelled voucher,not allow to put the voucher on hold.][End]
if (confirm.equals("Y"))
if (confirm != null && confirm.equals("Y"))
{
sql = "SELECT TOT_AMT, ADJ_AMT, HOLD_AMT FROM MISC_PAYABLES "
+"WHERE TRAN_SER = 'P-VOUC' AND REF_NO = '"+tranId+"'";
......@@ -123,7 +123,7 @@ public class PayrVoucherHld extends ActionHandlerEJB implements PayrVoucherHldLo
{
errCode = "VTBAL2"; // partly paid off
}
else if (hold.equals("N") || hold.equals(""))
else if (hold == null || hold.equals("N") || hold.equals(""))
{
updSql = "UPDATE MISC_PAYABLES SET HOLD_AMT = TOT_AMT "
+"WHERE TRAN_SER = ? AND REF_NO = ? ";
......
......@@ -90,11 +90,11 @@ public class PayrVoucherRls extends ActionHandlerEJB implements PayrVoucherRlsLo
}
//Modified by Anjali R.on[27/06/2018][Added condition for cancelled voucher,to not allow the release the voucher.][End]
if (hold.equals(""))
if (hold == null || hold.equals(""))
{
errCode = "VTHLDNLL";
}
if (confirm.equals("Y"))
if (confirm != null && confirm.equals("Y"))
{
sql = "SELECT TOT_AMT, ADJ_AMT, HOLD_AMT FROM MISC_PAYABLES "
+"WHERE TRAN_SER = 'P-VOUC' AND REF_NO = '"+tranId+"'";
......@@ -119,7 +119,7 @@ public class PayrVoucherRls extends ActionHandlerEJB implements PayrVoucherRlsLo
{
errCode = "VTBAL2"; // partly paid off
}
else if (hold.equals("Y"))
else if (hold == null || hold.equals("Y"))
{
updSql = "UPDATE MISC_PAYABLES SET HOLD_AMT = 0 WHERE TRAN_SER = ? AND REF_NO = ?";
System.out.println("updSql ::"+updSql);
......@@ -147,7 +147,7 @@ public class PayrVoucherRls extends ActionHandlerEJB implements PayrVoucherRlsLo
}//end confirm if
else
{
if (hold.equals("Y"))
if (hold == null || hold.equals("Y"))
{
updSql = "UPDATE PAYR_VOUCHER SET HOLD = 'N' WHERE TRAN_ID = ? ";
System.out.println("updSql ::"+updSql);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment