Commit bf774270 authored by ngadkari's avatar ngadkari

despatch discount calculation and changes in validation

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@195368 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 051b6362
......@@ -125,7 +125,7 @@ public class DespatchConfirm extends ActionHandlerEJB implements DespatchConfirm
{
conn.rollback();
return retString;
//return retString;
}
else
{
......@@ -143,8 +143,11 @@ public class DespatchConfirm extends ActionHandlerEJB implements DespatchConfirm
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
throw new ITMException(e);
}
System.out.println("Exception in [Despatch Confirmation] confirm " + exception.getMessage());
exception.printStackTrace();
throw new ITMException(exception);
}
finally
......
......@@ -3036,6 +3036,10 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
{
isUpdated = true;
}
else
{
lc_Qty1=0;
}
}
if ( childNode != null && childNode.getFirstChild() != null
......
......@@ -1961,7 +1961,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
tax_class=checknull(rs.getString("tax_class"));
tax_chap=checknull(rs.getString("tax_chap"));
tax_env=checknull(rs.getString("tax_env"));
discount=checknull(rs.getString("discount"));
discount=checkDoubleNull(rs.getString("discount"));
// Manoharan as instructed by manoj in case of scheme unit__rate is going wrong
if (!item_code__ord.trim().equals(item_code.trim()) )
{
......@@ -3337,6 +3337,13 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
}
return inputStr;
}
private String checkDoubleNull(String input) {
if (input == null || input.trim().length() == 0 )
{
input = "0";
}
return input;
}
private double geRndamt(double netAmt, String round, double roundTo)
......
......@@ -6432,7 +6432,7 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D
taxcl = rs.getString("tax_class");
taxch = rs.getString("tax_chap");
taxen = rs.getString("tax_env");
mdiscount = rs.getString("discount");
mdiscount = checkDoubleNull(rs.getString("discount"));
rateStd = rs.getDouble("rate__stduom");
rateClg = rs.getDouble("rate__clg");
custItemCodeRef = rs.getString("cust_item__ref");
......@@ -8616,6 +8616,13 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D
return discPerc;
}
private String checkDoubleNull(String input) {
if (input == null || input.trim().length() == 0 )
{
input = "0";
}
return input;
}
}
\ No newline at end of file
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