Commit 89bbbd8f authored by msharma's avatar msharma

set site_code__mfg,mfg_datre,exp_date,pack_code from item_lot_info table, if...

set site_code__mfg,mfg_datre,exp_date,pack_code from item_lot_info table, if no record found then system will set from stock table


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105347 ce508802-f39f-4f6c-b175-0d175dae99d5
parent bae2816d
...@@ -394,6 +394,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -394,6 +394,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
HashMap infoMap = null; HashMap infoMap = null;
String valStr = null; String valStr = null;
String siteCode3 = null; String siteCode3 = null;
int cntItemLotInfo=0;
try try
{ {
ITMDBAccessEJB dbEjb = new ITMDBAccessEJB(); ITMDBAccessEJB dbEjb = new ITMDBAccessEJB();
...@@ -3543,7 +3544,32 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -3543,7 +3544,32 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
{ {
lotSl = " "; lotSl = " ";
} }
//Changed by Manoj dtd 14/04/2017 to set values from item_lot_info
sql = "select site_code__mfg, mfg_date, exp_date, pack_code "
+ " from item_lot_info "
+ " where item_code = ? "
+ " and lot_no = ? ";
pstmt= conn.prepareStatement( sql );
pstmt.setString( 1, itemCode);
pstmt.setString( 2, lotNo);
rs = pstmt.executeQuery();
if( rs.next() )
{
cntItemLotInfo++;
siteCodeMfg = rs.getString(1);
mfgDate = rs.getTimestamp(2);
expDate = rs.getTimestamp(3);
packCode = rs.getString(4);
}
rs.close();
pstmt.close();
pstmt = null;
rs = null;
if(cntItemLotInfo==0)
{
sql = "select a.site_code__mfg, a.mfg_date, a.exp_date, a.pack_code " sql = "select a.site_code__mfg, a.mfg_date, a.exp_date, a.pack_code "
+ " from stock a " + " from stock a "
+ " where a.item_code = ? " + " where a.item_code = ? "
...@@ -3568,6 +3594,8 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -3568,6 +3594,8 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
rs = null; rs = null;
}
cntItemLotInfo=0;
if (siteCodeMfg == null || siteCodeMfg.equals("null") || siteCodeMfg.trim().length() == 0) if (siteCodeMfg == null || siteCodeMfg.equals("null") || siteCodeMfg.trim().length() == 0)
{ {
......
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