Commit d5a8c967 authored by pdas's avatar pdas

REQUEST ID - D15ISUN002

CHANGES MADE FOR CONSIDERING NOT CURRENT PO VALUE


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99421 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d3fc1b38
......@@ -549,7 +549,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
/*Request ID -D15ISUN003 Start Changed By Priyanka Das */
double totAmtnotcurr = 0.0;
sql = "select pord_type from porder where purc_order = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
......@@ -621,6 +621,28 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
rs2 = null;
pstmt2.close();
pstmt2 = null;
sql2 ="select sum(a.tot_amt) from porddet a,porder b " +
"where (a.purc_order = b.purc_order) and" +
" b.confirmed = 'Y' and a.proj_code = ? and b.purc_order = ? and " +
" a.line_no NOT IN (select line_no__ord from poamd_det where amd_no = ? and proj_code = ?) ";
pstmt2 = conn.prepareStatement(sql2);
pstmt2.setString(1,projCode);
pstmt2.setString(2,purcOrder);
pstmt2.setString(3, amdNo);
pstmt2.setString(4,projCode);
System.out.println("Project code is for poamdvalidation....."+ projCode);
rs2 = pstmt2.executeQuery();
if(rs2.next())
{
totAmtnotcurr = rs2.getDouble(1) ;
}
System.out.println("totAmtnotcurr>>>>"+totAmtnotcurr);
rs2.close();
rs2 = null;
pstmt2.close();
pstmt2 = null;
sql1 = "select sum( a.tot_amt ) from porddet a, porder b"
+ " where ( a.purc_order = b.purc_order ) and b.confirmed = 'Y'"
+ " and a.proj_code = ? and a.purc_order! = ? and b.status! = 'X'";
......@@ -640,10 +662,11 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
pstmt1.close();
pstmt1 = null;
System.out.println("totAmtDet for Porder outside loop>>>>>>>> "+ totAmtDetpordertot);
totAmtPoamd = totAmtDetpordertot + totAmtpoamdtemp;
totAmtPoamd = totAmtnotcurr + totAmtDetpordertot + totAmtpoamdtemp;
System.out.println("totamtpoamd>>>>.."+totAmtPoamd);
System.out.println("totamtpordertot"+totAmtDetpordertot);
System.out.println("totamtpoamdtemp"+totAmtpoamdtemp);
System.out.println("totAmtnotcurr>>>>"+totAmtnotcurr);
if(approxCost < totAmtPoamd)
{
System.out.println("In approxcost validation>>");
......
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