Commit 56a4617d authored by cpatil's avatar cpatil

modify for amount update on hdr when detail delete


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101495 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2accc1e9
...@@ -121,7 +121,7 @@ public class POrderAmdPostSave extends ValidatorEJB implements ...@@ -121,7 +121,7 @@ public class POrderAmdPostSave extends ValidatorEJB implements
rs.close(); rs.close();
rs = null; rs = null;
} }
//if (count > 0) //commented by cpatil for delete all line from detail then zero value updated on hdr if (count > 0) //commented by cpatil for delete all line from detail then zero value updated on hdr
{ {
sql = "update poamd_hdr set tax_amt = ?,tot_amt = ?,ord_amt = ? where amd_no = ? "; sql = "update poamd_hdr set tax_amt = ?,tot_amt = ?,ord_amt = ? where amd_no = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -141,6 +141,20 @@ public class POrderAmdPostSave extends ValidatorEJB implements ...@@ -141,6 +141,20 @@ public class POrderAmdPostSave extends ValidatorEJB implements
conn.commit(); conn.commit();
}*/ }*/
} }
else
{
sql = "update poamd_hdr set tax_amt = TAX_AMT__O,tot_amt = TOT_AMT__O,ord_amt = ORD_AMT__O where amd_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranid);
count = pstmt.executeUpdate();
System.out.println("post count---->>[" + count + "]");
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
/*else /*else
{ {
......
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