Commit 48eeeae2 authored by cpatil's avatar cpatil

for checking bill no repeate for same cust code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98414 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0fc8b2f4
...@@ -1043,13 +1043,15 @@ public class ProofOfDelivery extends ValidatorEJB implements ...@@ -1043,13 +1043,15 @@ public class ProofOfDelivery extends ValidatorEJB implements
sql = " select count(1) from spl_sales_por_hdr h, spl_sales_por_det d " sql = " select count(1) from spl_sales_por_hdr h, spl_sales_por_det d "
+ " where h.tran_id = d.tran_id and d.bill_no = ? " + " where h.tran_id = d.tran_id and d.bill_no = ? "
+ " and d.bil_date BETWEEN ? AND ? " + " and d.bil_date BETWEEN ? AND ? "
+ " and d.tran_id <> ? and h.wf_status <> 'R' "; + " and d.tran_id <> ? and h.wf_status <> 'R' "
+ " and h.cust_code = ? "; //added by cpatil on 30/07/15 for checking bill no repeate for same cust code
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, billNoL); pstmt.setString(1, billNoL);
pstmt.setTimestamp(2, frDate); pstmt.setTimestamp(2, frDate);
pstmt.setTimestamp(3, toDate); pstmt.setTimestamp(3, toDate);
pstmt.setString(4, currTranIdL); pstmt.setString(4, currTranIdL);
pstmt.setString(5, currCustCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) { if (rs.next()) {
cnt = rs.getInt(1); cnt = rs.getInt(1);
......
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