Commit 7f817ff3 authored by cshah's avatar cshah

added condition for noArticles made 1 if it is 0


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91387 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b3c0a571
...@@ -6009,6 +6009,13 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D ...@@ -6009,6 +6009,13 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D
if(sNoArticle != null && sNoArticle.trim().length() > 0) if(sNoArticle != null && sNoArticle.trim().length() > 0)
{ {
noArticle = Double.parseDouble(sNoArticle); noArticle = Double.parseDouble(sNoArticle);
// 20-01-11 - chandni shah
if (noArticle == 0)
{
noArticle = 1;
}
if(noArticle > 0)
{
packQty = mNum3 / noArticle; packQty = mNum3 / noArticle;
//19-1-11 - Chandni Shah //19-1-11 - Chandni Shah
packQty = df.parse(df.format(packQty)).doubleValue(); packQty = df.parse(df.format(packQty)).doubleValue();
...@@ -6016,6 +6023,7 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D ...@@ -6016,6 +6023,7 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D
valueXmlString.append("<pack_qty isSrvCallOnChg='0'>").append("<![CDATA[").append(packQty).append("]]>").append("</pack_qty>\r\n"); valueXmlString.append("<pack_qty isSrvCallOnChg='0'>").append("<![CDATA[").append(packQty).append("]]>").append("</pack_qty>\r\n");
setNodeValue( dom, "pack_qty", packQty ); setNodeValue( dom, "pack_qty", packQty );
} }
}
sql = "select distinct list_type from pricelist " sql = "select distinct list_type from pricelist "
+"where price_list = (select price_list from sorder where sale_order = ?)"; +"where price_list = (select price_list from sorder where sale_order = ?)";
...@@ -6348,9 +6356,17 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D ...@@ -6348,9 +6356,17 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D
{ {
sNoArticle = "1"; sNoArticle = "1";
}*/ }*/
if(sNoArticle != null && sNoArticle.trim().length() > 0) if(sNoArticle != null && sNoArticle.trim().length() > 0)
{ {
noArticle = Double.parseDouble(sNoArticle); noArticle = Double.parseDouble(sNoArticle);
// 20-01-11 - Chandni Shah
if (noArticle == 0)
{
noArticle = 1;
}
if(noArticle > 0)
{
packQty = mNum3 / noArticle; packQty = mNum3 / noArticle;
// 19-1-11 - chandni Shah // 19-1-11 - chandni Shah
packQty = df.parse(df.format(packQty)).doubleValue(); packQty = df.parse(df.format(packQty)).doubleValue();
...@@ -6358,7 +6374,7 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D ...@@ -6358,7 +6374,7 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D
valueXmlString.append("<pack_qty isSrvCallOnChg='0'>").append("<![CDATA[").append(packQty).append("]]>").append("</pack_qty>\r\n"); valueXmlString.append("<pack_qty isSrvCallOnChg='0'>").append("<![CDATA[").append(packQty).append("]]>").append("</pack_qty>\r\n");
setNodeValue( dom, "pack_qty",packQty ); setNodeValue( dom, "pack_qty",packQty );
} }
}
sql = "Select sum(case when qty_desp is null then 0 else qty_desp end), " sql = "Select sum(case when qty_desp is null then 0 else qty_desp end), "
+"sum(case when quantity is null then 0 else quantity end) from sorditem " +"sum(case when quantity is null then 0 else quantity end) from sorditem "
+" where sale_order = ? and line_no = ? and exp_lev = ? and line_type != 'B'"; +" where sale_order = ? and line_no = ? and exp_lev = ? and line_type != 'B'";
......
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