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
Connection conn=null;
ConnDriver ConnDriver = new ConnDriver();
PreparedStatement pstmt=null;
String errString="",sql="",loginSite="",wfStatus="",itemCode="",regulatedPrice="";
String errString="",sql="",loginSite="",wfStatus="",itemCode="",regulatedPrice="",itemActive="";
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;
int updCnt=0,lineNo=0;
......@@ -157,6 +157,17 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
lotSl=rs.getString(8)== null ? "" : rs.getString(8);
System.out.println("lotNo :"+lotNo+"------->> invRate : "+invRate+" invQty : "+invQty+" PODrate : "+PODrate+ " PODqty : "+PODqty);
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
if(isRegulatePriceNull(conn,tranId))
......@@ -633,15 +644,22 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
allowPercentage=allowPercentage==null ? "0.0" :allowPercentage;
allowPercentageD=Double.parseDouble(allowPercentage);
invoiceAmt= rateInvoice * qtyInvoice;//10 *100
/*invoiceAmt= rateInvoice * qtyInvoice;//10 *100
percentageAmtInv= invoiceAmt * allowPercentageD/100; //1000 * 10/100
actualAllowAmt= invoiceAmt + percentageAmtInv; //1100
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)
debitNoteCaclAmount= stockistAmt - actualAllowAmt; //1200 -1100 =100
debitNoteCaclAmount= stockistAmt - actualAllowAmt; //720 - 660=60
else
debitNoteCaclAmount=0.0;
......
......@@ -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 = ? ";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, "R");
pstmt.setString(2, loginCode);
pstmt.setString(2, loginCode);//E10808 loginCode
pstmt.setString(3, tranId);
updCnt=pstmt.executeUpdate();
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