Commit ab0b80c2 authored by pdas's avatar pdas

Added count and checked the condition of PRET!=tranSer


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97507 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 22c18163
......@@ -73,6 +73,7 @@ public class CreatePoRcpVoucher
String errCode = "", errString = "", winName = "", roundString = "",roundOff = "", confFinVar = "N", autoConfirm = "N";
double diffTotal = 0, advTotal = 0, amount = 0, discount = 0, taxAmt = 0, exchRate = 0, suppBillAmount = 0, rcpTaxNP = 0;
int roundTo = 0, lineCount = 0, count = 0, ctr = 0;
String vouchType="";
String tranType = "", purcOrder = "", suppCode = "", tranCode = "", currCode = "", tranSer = "", taxClass = "", taxEnv = "", taxChap = "";
String remarks = "", siteCode = "", invoiceNo = "", DcNo = "", retOpt = "", postType = "", itemSer = "";
......@@ -597,11 +598,15 @@ public class CreatePoRcpVoucher
//Added by Nilesh to check for duplicate bill no - 04/04/03.
//***************************************************************************************
//from bill_no ltrim is removed by Tushar 20/03/09
if("P-RET"!=tranSer)
{
sql = "SELECT COUNT(1) FROM VOUCHER "
+ " WHERE SUPP_CODE = ? "
+ " AND BILL_NO = ? "
+ " AND BILL_DATE = ? "
+ " AND TRAN_ID <> ? ";
+ " AND TRAN_ID <> ? "
+ "AND VOUCH_TYPE <> 'A'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, suppCode);
......@@ -617,6 +622,7 @@ public class CreatePoRcpVoucher
rs = null;
pstmt.close();
pstmt = null;
}
//added by rajesh FI89SUN001 -23/04/2008
if (count == 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