Commit b52ef4b2 authored by caluka's avatar caluka

STOCK TRANSFER detail no record inserted then system will not insert header also


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98119 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 58ecc7da
...@@ -803,7 +803,7 @@ public class NearExpirySchedule implements Schedule ...@@ -803,7 +803,7 @@ public class NearExpirySchedule implements Schedule
//java.sql.Timestamp currDate = new java.sql.Timestamp( System.currentTimeMillis() ); //java.sql.Timestamp currDate = new java.sql.Timestamp( System.currentTimeMillis() );
java.util.Date currDate = new java.util.Date(); java.util.Date currDate = new java.util.Date();
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
int lineCtr=0;
java.sql.Timestamp expDateCalc = null; java.sql.Timestamp expDateCalc = null;
java.sql.Timestamp expDateStock = null; java.sql.Timestamp expDateStock = null;
Set setItem = siteCodeNeExpeMap.entrySet(); Set setItem = siteCodeNeExpeMap.entrySet();
...@@ -820,6 +820,7 @@ public class NearExpirySchedule implements Schedule ...@@ -820,6 +820,7 @@ public class NearExpirySchedule implements Schedule
itemSer = checkNull(siteCodeItemser.split("@")[1]); itemSer = checkNull(siteCodeItemser.split("@")[1]);
} }
lineCtr=0;
xmlBuff = null; xmlBuff = null;
xmlBuff = new StringBuffer(); xmlBuff = new StringBuffer();
xmlBuff.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n"); xmlBuff.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n");
...@@ -892,6 +893,7 @@ public class NearExpirySchedule implements Schedule ...@@ -892,6 +893,7 @@ public class NearExpirySchedule implements Schedule
if((quantity - allocQty)>0) if((quantity - allocQty)>0)
{ {
lineNo++; lineNo++;
lineCtr++;
xmlBuff.append("<Detail2 dbID='' domID=\"1\" objName=\"stock_transfer\" objContext=\"2\">"); xmlBuff.append("<Detail2 dbID='' domID=\"1\" objName=\"stock_transfer\" objContext=\"2\">");
xmlBuff.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />"); xmlBuff.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />");
xmlBuff.append("<tran_id/>"); xmlBuff.append("<tran_id/>");
...@@ -962,7 +964,7 @@ public class NearExpirySchedule implements Schedule ...@@ -962,7 +964,7 @@ public class NearExpirySchedule implements Schedule
xmlBuff.append("</DocumentRoot>"); xmlBuff.append("</DocumentRoot>");
xmlString = xmlBuff.toString(); xmlString = xmlBuff.toString();
if(stockQCList.size() > 0) if(lineCtr > 0)
{ {
retString = saveData(siteCode, xmlString, conn); retString = saveData(siteCode, xmlString, conn);
System.out.println("retString>>>>>>" + retString); System.out.println("retString>>>>>>" + retString);
......
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