Commit 82d4a748 authored by ngadkari's avatar ngadkari

added validation on rate__stduom column

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204650 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 44aecbbf
...@@ -123,6 +123,8 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -123,6 +123,8 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
double lc_batch_size=0,lc_batqty=0,lc_qtyper=0,lc_app_min_qty=0,lc_app_max_qty=0,lc_app_min_value=0,lc_app_max_value=0,lc_batvalue=0,lc_valueper=0,lc_minvalue=0,lc_prv_charge_value=0,lc_charge_value=0; double lc_batch_size=0,lc_batqty=0,lc_qtyper=0,lc_app_min_qty=0,lc_app_max_qty=0,lc_app_min_value=0,lc_app_max_value=0,lc_batvalue=0,lc_valueper=0,lc_minvalue=0,lc_prv_charge_value=0,lc_charge_value=0;
String ls_round = "",ls_site_mfg="",ls_cust_item="",ls_line_type="",ldt_order_date_str=""; String ls_round = "",ls_site_mfg="",ls_cust_item="",ls_line_type="",ldt_order_date_str="";
double lc_free_qty=0,lc_prv_free_value=0,ld_roundto=0,lc_mbatch_size=0,lc_qty_real=0,lc_desp_qty=0,lc_rate_clg=0; double lc_free_qty=0,lc_prv_free_value=0,ld_roundto=0,lc_mbatch_size=0,lc_qty_real=0,lc_desp_qty=0,lc_rate_clg=0;
String priceListDisc="",priceList="",lineType="",priceListType="";//added by nandkumar gadkari on 05/08/19
double rate=0;//added by nandkumar gadkari on 05/08/19
try { try {
...@@ -2806,8 +2808,39 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -2806,8 +2808,39 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
} }
} }
// validation added for not allow zero rate by nandkumar gadkari on 05/09/19---------------start--------------------------
if (childNodeName.equalsIgnoreCase("rate__stduom"))
{
rate = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("rate__stduom", dom)));
lineType = checkNull(genericUtility.getColumnValue("line_type", dom));
lineType= lineType == null || lenTrim(lineType) == 0 ? "C" : lineType;
msaleord = checkNull(genericUtility.getColumnValue("sord_no", dom));
sql = " select price_list,price_list__disc from sorder where sale_order = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, msaleord);
rs = pstmt.executeQuery();
if (rs.next())
{
priceList = checkNull(rs.getString("price_list"));
priceListDisc = checkNull(rs.getString("price_list__disc"));
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
priceListType= distCommon.getPriceListType(priceList, conn);
if(priceListDisc==null||priceListDisc.trim().length()==0)
{
if( rate <= 0 && ( "C".equalsIgnoreCase(lineType) || "I".equalsIgnoreCase(lineType)) && "B".equalsIgnoreCase(priceListType))
{
errCode = "VTRATE1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
// validation added by nandkumar gadkari on 05/09/19---------------end--------------------------
} // end for } // end for
break; // case 2 end break; // case 2 end
......
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