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