Commit 11c3bc74 authored by ngadkari's avatar ngadkari

line no invoice trace added in point base scheme type

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@213581 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6b374ae8
......@@ -4961,7 +4961,7 @@ public class PostOrderActivity {
String sordNoschm = "",lotNoschm = "" , priceListschm ="",itemCodeschm ="" ,rtlSchmRateBase="",mrpPriceList = "" , errString = ""; // Added By PriyankaC2018
String stateCodeDlv="",schemeCodePur="",schemeCodeOffer="",itemCodeOrd="",sordNoDet="",schemeCode1="";//added by nandkumar gadkari on 31/05/19
double offerPoints=0,totalpoints=0,freePoints=0,reqPoints=0,totalusedpoints=0,quantityStduom=0,balFreeValue=0;//added by nandkumar gadkari on 31/05/19
double schUseFreeVal=0,schBalFreeVal=0;
try
{
GenericUtility genericUtility = GenericUtility.getInstance();
......@@ -5363,6 +5363,25 @@ public class PostOrderActivity {
if(cnt1 > 0)
{
// added by nandkumar gadkari on 16/12/19---------------start----------
sql = "SELECT BALANCE_FREE_VALUE,USED_FREE_VALUE FROM SCHEME_BALANCE WHERE CUST_CODE = ? AND ITEM_CODE= ? and ? >= EFF_FROM and ? <= VALID_UPTO ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
pstmt.setString(2, "X");
pstmt.setTimestamp(3, orderDate);
pstmt.setTimestamp(4, orderDate);
rs = pstmt.executeQuery();
if (rs.next())
{
schBalFreeVal = rs.getDouble(1);
schUseFreeVal = rs.getDouble(2);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
// added by nandkumar gadkari on 16/12/19---------------end----------
if("C".equalsIgnoreCase(nature) )
{
......@@ -5388,8 +5407,10 @@ public class PostOrderActivity {
pstmt90.setString(1,tranId);
pstmt90.setDouble(2,0);
pstmt90.setDouble(3,0);
pstmt90.setDouble(4,(quantityStduom * offerPoints));
pstmt90.setDouble(5,totalpoints);
//pstmt90.setDouble(4,(quantityStduom * offerPoints));
//pstmt90.setDouble(5,totalpoints);
pstmt90.setDouble(4,schBalFreeVal);
pstmt90.setDouble(5,schBalFreeVal + totalpoints);
pstmt90.setString(6,sordNoDet);
pstmt90.setString(7,invoiceId);
pstmt90.setString(8,"");
......@@ -5428,8 +5449,10 @@ public class PostOrderActivity {
pstmt90.setString(1,tranId);
pstmt90.setDouble(2,0);
pstmt90.setDouble(3,0);
pstmt90.setDouble(4, integralPartQty(quantityStduom * reqPoints));
pstmt90.setDouble(5,totalusedpoints);
//pstmt90.setDouble(4, integralPartQty(quantityStduom * reqPoints));
//pstmt90.setDouble(5,totalusedpoints);
pstmt90.setDouble(4, schUseFreeVal);
pstmt90.setDouble(5, schUseFreeVal + totalusedpoints);
pstmt90.setString(6,sordNoDet);
pstmt90.setString(7,invoiceId);
pstmt90.setString(8,"");
......
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