Commit 11d3b25c authored by dpawar's avatar dpawar

validation of duplicate entry (Invoice_Id)


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93418 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 96cee21e
......@@ -113,16 +113,23 @@ public class ProofOfDelivery extends ValidatorEJB implements ProofOfDeliveryLoca
else
{
cnt= getDBRowCount(conn,"invoice","invoice_id",invoiceID);
int cnt1= getDBRowCount(conn,"spl_sales_por_hdr","invoice_id",invoiceID);
invoiceConf=getNameOrDescrForCode(conn, "invoice", "confirmed", "invoice_id", invoiceID);
System.out.println("invoiceConf--------->> 12121: "+invoiceConf);
if(invoiceConf.trim().equalsIgnoreCase("N"))
{
//Invoice Id not confirmed then show error
System.out.println("INSIDE--------------------");
//If invoice Id not confirmed in invoice master then show error
errCode = "VTINVNCON";
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
if(cnt1 > 0)
{
//If POD for invoiceID already exist in spl_sales_por_hdr then show error
errCode = "VTINVIDAC";
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
if(cnt == 0)
{
errCode = "VTINVIDNE";
......@@ -666,7 +673,7 @@ public class ProofOfDelivery extends ValidatorEJB implements ProofOfDeliveryLoca
percentageAmtInv= invoiceAmt * allowPercentageD/100; //1000 * 10/100
actualAllowAmt= invoiceAmt + percentageAmtInv; //1100
System.out.println("percentageAmtInv------>>"+percentageAmtInv);
System.out.println("getDebitNoteAmount -->> actualAllowAmt---------->> "+actualAllowAmt);
System.out.println("getDebitNoteAmount -->> actualAllowAmt---------->>"+actualAllowAmt);
stockistAmt= podRate * podQty; //12 * 100 = 1200
if(stockistAmt > actualAllowAmt)
......
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