Commit cd6d90bb authored by smanohar's avatar smanohar

In case of sales return not to update rate

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@200807 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 28f79388
......@@ -1550,7 +1550,57 @@ public class StockUpdate
//rs.close();Changed by wasim on 17-03-2016 to comment as it is already closed
}
else
{
// 15-may-2019 manoharan not to update rate in case of sales return
if ((this.tranSer.equalsIgnoreCase("S-RET")) && (this.tranType.equalsIgnoreCase("R")) )
{
sql ="update stock set quantity = quantity + ? ,"
+"ltran_date = ?,"
+"last_rcp_date = ? ,"
+"chg_user = ?,"
+"chg_term = ?,"
+"chg_date = ?,"
+"gross_weight = gross_weight + ?,"
+"net_weight = net_weight + ?,"
+"tare_weight = tare_weight + ?,"
+"retest_date = ?,"
+"no_art = no_art + ?,"
+"dimension = ?,"
+"last_phyc_date = ?,"
+"supp_code__mfg = ?,"
+"batch_no = ? ,"
//Added by saurabh as hold_qty is not get updated if the value is null[25/10/16|Start]
+"hold_qty=(case when hold_qty is null then 0 else hold_qty end) + ? "
//Added by saurabh as hold_qty is not get updated if the value is null[25/10/16|End]
+"where item_code = '"+this.itemCode+"'"
+"and site_code = '"+this.siteCode+"'"
+"and loc_code = '"+this.locationCode+"'"
+"and lot_no = '"+this.lotNo+"'"
+"and lot_sl = '"+this.lotSl+"'";
System.out.println("Query :::- ["+sql+"]");
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1,this.qtyStduom);
pstmt.setTimestamp(2,this.tranDate);
pstmt.setTimestamp(3,this.tranDate);
pstmt.setString(4,userId);
pstmt.setString(5,termId);
pstmt.setTimestamp(6,new java.sql.Timestamp(System.currentTimeMillis()));
pstmt.setDouble(7,this.grossWeight);
pstmt.setDouble(8,this.netWeight);
pstmt.setDouble(9,this.tareWeight);
pstmt.setTimestamp(10,this.retestDate);
pstmt.setDouble(11,this.noArt);
pstmt.setString(12,this.dimension);
pstmt.setTimestamp(13,this.lastPhycDate);
pstmt.setString(14,this.suppCodeMfg);
pstmt.setString(15,this.batchNo);
pstmt.setDouble(16,this.holdQty);//added by priyanka
pstmt.executeUpdate();
pstmt.close();
}
else
{
sql ="update stock set quantity = quantity + ? ,"
+"ltran_date = ?,"
+"last_rcp_date = ? ,"
......@@ -1598,6 +1648,8 @@ public class StockUpdate
pstmt.setDouble(18,this.holdQty);//added by priyanka
pstmt.executeUpdate();
pstmt.close();
}
// end 15-may-2019 manoharan not to update rate in case of sales return
//rs.close();Changed by wasim on 17-03-2016 to comment as it is already closed
}
}//end of count
......
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