Commit 63ab00a8 authored by dpawar's avatar dpawar

Added source code as new requirement


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93553 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0dd85b98
...@@ -52,7 +52,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -52,7 +52,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
Connection conn=null; Connection conn=null;
ConnDriver ConnDriver = new ConnDriver(); ConnDriver ConnDriver = new ConnDriver();
PreparedStatement pstmt=null; PreparedStatement pstmt=null;
String errString="",sql="",loginSite="",wfStatus="",itemCode="",regulatedPrice=""; String errString="",sql="",loginSite="",wfStatus="",itemCode="",regulatedPrice="",itemActive="";
String itmCodeDt2="",lotNo="",lotSl="", detail2xmlString=""; String itmCodeDt2="",lotNo="",lotSl="", detail2xmlString="";
double invRate=0.0,invQty=0.0,PODrate=0.0,PODqty=0.0,allowedAmt=0.0,stockistAmt=0.0,debitNoteAmtAct=0.0; double invRate=0.0,invQty=0.0,PODrate=0.0,PODqty=0.0,allowedAmt=0.0,stockistAmt=0.0,debitNoteAmtAct=0.0;
int updCnt=0,lineNo=0; int updCnt=0,lineNo=0;
...@@ -157,6 +157,17 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -157,6 +157,17 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
lotSl=rs.getString(8)== null ? "" : rs.getString(8); lotSl=rs.getString(8)== null ? "" : rs.getString(8);
System.out.println("lotNo :"+lotNo+"------->> invRate : "+invRate+" invQty : "+invQty+" PODrate : "+PODrate+ " PODqty : "+PODqty); System.out.println("lotNo :"+lotNo+"------->> invRate : "+invRate+" invQty : "+invQty+" PODrate : "+PODrate+ " PODqty : "+PODqty);
regulatedPrice=getColumnDescr(conn,"regulated_price","item","item_code",itemCode); regulatedPrice=getColumnDescr(conn,"regulated_price","item","item_code",itemCode);
itemActive=getColumnDescr(conn,"active","item","item_code",itemCode);
itemActive =itemActive==null ? "N" : itemActive.trim();
System.out.println("item active -------->>["+itemActive+"]");
//if item code is not active in item master then show error message
if(itemActive.equalsIgnoreCase("N"))
{
errString = itmdbAccess.getErrorString("", "VTITMCNAC", "", "", conn);
System.out.println("---------Error : item code["+itemCode+"] is not active in item master (Transaction Rollback)----------");
conn.rollback();
return errString;
}
//regulatedPrice if null then //regulatedPrice if null then
if(isRegulatePriceNull(conn,tranId)) if(isRegulatePriceNull(conn,tranId))
...@@ -633,15 +644,22 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -633,15 +644,22 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
allowPercentage=allowPercentage==null ? "0.0" :allowPercentage; allowPercentage=allowPercentage==null ? "0.0" :allowPercentage;
allowPercentageD=Double.parseDouble(allowPercentage); allowPercentageD=Double.parseDouble(allowPercentage);
invoiceAmt= rateInvoice * qtyInvoice;//10 *100 /*invoiceAmt= rateInvoice * qtyInvoice;//10 *100
percentageAmtInv= invoiceAmt * allowPercentageD/100; //1000 * 10/100 percentageAmtInv= invoiceAmt * allowPercentageD/100; //1000 * 10/100
actualAllowAmt= invoiceAmt + percentageAmtInv; //1100 actualAllowAmt= invoiceAmt + percentageAmtInv; //1100
System.out.println("getDebitNoteAmount -->> actualAllowAmt---------->> "+actualAllowAmt); System.out.println("getDebitNoteAmount -->> actualAllowAmt---------->> "+actualAllowAmt);
stockistAmt= podRate * podQty; //12 * 100 = 1200 stockistAmt= podRate * podQty; //12 * 100 = 1200 */
invoiceAmt= rateInvoice * podQty;//10 * 60 = 600
percentageAmtInv= invoiceAmt * allowPercentageD/100; //600 * 10/100=60
actualAllowAmt= invoiceAmt + percentageAmtInv; //660
System.out.println("getDebitNoteAmount -->> actualAllowAmt---------->> "+actualAllowAmt);
stockistAmt= podRate * podQty; //12 * 60 = 720
if(stockistAmt > actualAllowAmt) if(stockistAmt > actualAllowAmt)
debitNoteCaclAmount= stockistAmt - actualAllowAmt; //1200 -1100 =100 debitNoteCaclAmount= stockistAmt - actualAllowAmt; //720 - 660=60
else else
debitNoteCaclAmount=0.0; debitNoteCaclAmount=0.0;
......
...@@ -87,7 +87,7 @@ public class ProofOfDeliveryReject extends ActionHandlerEJB implements ProofOfDe ...@@ -87,7 +87,7 @@ public class ProofOfDeliveryReject extends ActionHandlerEJB implements ProofOfDe
sql="update spl_sales_por_hdr set wf_status = ?, emp_code__aprv = ? where tran_id = ? "; sql="update spl_sales_por_hdr set wf_status = ?, emp_code__aprv = ? where tran_id = ? ";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1, "R"); pstmt.setString(1, "R");
pstmt.setString(2, loginCode); pstmt.setString(2, loginCode);//E10808 loginCode
pstmt.setString(3, tranId); pstmt.setString(3, tranId);
updCnt=pstmt.executeUpdate(); updCnt=pstmt.executeUpdate();
if (updCnt > 0) if (updCnt > 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