Commit f3a411e8 authored by dpawar's avatar dpawar

added code for partial process


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94322 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5e553c01
......@@ -32,7 +32,8 @@ public class ProofOfDelivery extends ValidatorEJB implements ProofOfDeliveryLoca
{
String str,confirmedInv="";
boolean isError=false;
double partialQty=0;
double partialQty=0,actaulInvQty=0,remainQty=0;
int lineNoTrace=0;
GenericUtility genericUtility = GenericUtility.getInstance();
public static ProofOfDelivery getInstance()
{
......@@ -1329,11 +1330,11 @@ public class ProofOfDelivery extends ValidatorEJB implements ProofOfDeliveryLoca
PreparedStatement pstmt2 = null,pstmt1=null ;
ResultSet rs2 = null,rs1=null;
String sql1="",tranID="",confirmed="";
int lineNo=0,count=1;
int lineNoTraceL=0,count=1;
double qtyInv=0.0,podQty=0.0,totalPodQty=0.0;
sql1="select tran_id,confirmed from spl_sales_por_hdr where invoice_id = ? and wf_status <> ? order by confirmed";
sql1="select tran_id,confirmed from spl_sales_por_hdr where invoice_id = ? and wf_status <> ?";
try
{
pstmt2=conn.prepareStatement(sql1);
......@@ -1353,21 +1354,29 @@ public class ProofOfDelivery extends ValidatorEJB implements ProofOfDeliveryLoca
{
count++;
sql1="";
sql1="select line_no,item_code,quantity__inv,quantity__resale from spl_sales_por_det where tran_id = ?";
sql1="select line_no__trace,item_code,quantity__inv,quantity__resale from spl_sales_por_det where tran_id = ?";
pstmt1=conn.prepareStatement(sql1);
pstmt1.setString(1, tranID);
rs1=pstmt1.executeQuery();
while(rs1.next())
{
lineNo=rs1.getInt(1);
lineNoTraceL=rs1.getInt(1);
qtyInv=rs1.getDouble(3);
podQty=rs1.getDouble(4);
System.out.println("Line no ---->"+lineNo+ " qtyInv-->>"+qtyInv+" podQty->>"+podQty);
System.out.println("Line no ---->"+lineNoTraceL+ " qtyInv-->>"+qtyInv+" podQty->>"+podQty);
totalPodQty=totalPodQty + podQty;
if( podQty < qtyInv)
{
partialQty= podQty;
actaulInvQty=qtyInv;
lineNoTrace=lineNoTraceL;
remainQty=actaulInvQty-partialQty;
System.out.println("partialQty--->>["+partialQty+"]");
System.out.println("actaulInvQty--->>["+actaulInvQty+"]");
System.out.println("remainQty--->>["+remainQty+"]");
System.out.println("lineNoTrace--->>["+lineNoTrace+"]");
return true;
}
}
......@@ -1635,7 +1644,7 @@ public class ProofOfDelivery extends ValidatorEJB implements ProofOfDeliveryLoca
}
private String getSalesReturnTranID(Connection conn, String table_name, String tranID,String whrCondCol, String whrCondVal)
protected String getSalesReturnTranID(Connection conn, String table_name, String tranID,String whrCondCol, String whrCondVal)
{
String descr = null;
......@@ -1643,6 +1652,7 @@ public class ProofOfDelivery extends ValidatorEJB implements ProofOfDeliveryLoca
ResultSet rs=null;
PreparedStatement pstmt = null;
//getSalesReturnTranID(conn, "sreturn", "tran_id", "invoice_id", str);
String sql="SELECT "+tranID+" FROM "+table_name+" WHERE "+whrCondCol+" = ? and confirmed = ?";
//select tran_id from sreturn where invoice_id = '10DS086300' and confirmed ='Y';
......
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