[ 1723106 ] DunningEntry Amt not updated correctly
http://sourceforge.net/tracker/index.php?func=detail&aid=1723106&group_id=176962&atid=879332 NOTE: got sql exception when deleting the last dunning run line
This commit is contained in:
parent
a9b3f4929b
commit
98b7b3791a
|
@ -326,9 +326,9 @@ public class MDunningRunLine extends X_C_DunningRunLine
|
||||||
{
|
{
|
||||||
// we do not count the fee line as an item, but it sum it up.
|
// we do not count the fee line as an item, but it sum it up.
|
||||||
String sql = "UPDATE C_DunningRunEntry e "
|
String sql = "UPDATE C_DunningRunEntry e "
|
||||||
+ "SET Amt=(SELECT SUM(ConvertedAmt)+SUM(FeeAmt)+SUM(InterestAmt)"
|
+ "SET Amt=NVL((SELECT SUM(ConvertedAmt)+SUM(FeeAmt)+SUM(InterestAmt)"
|
||||||
+ " FROM C_DunningRunLine l "
|
+ " FROM C_DunningRunLine l "
|
||||||
+ "WHERE e.C_DunningRunEntry_ID=l.C_DunningRunEntry_ID), "
|
+ "WHERE e.C_DunningRunEntry_ID=l.C_DunningRunEntry_ID), 0), "
|
||||||
+ "QTY=(SELECT COUNT(*)"
|
+ "QTY=(SELECT COUNT(*)"
|
||||||
+ " FROM C_DunningRunLine l "
|
+ " FROM C_DunningRunLine l "
|
||||||
+ "WHERE e.C_DunningRunEntry_ID=l.C_DunningRunEntry_ID "
|
+ "WHERE e.C_DunningRunEntry_ID=l.C_DunningRunEntry_ID "
|
||||||
|
|
Loading…
Reference in New Issue