From 779d89462c1356c40c55294ad8d1a51e5a04040a Mon Sep 17 00:00:00 2001 From: armenrz Date: Mon, 9 Feb 2009 10:31:16 +0000 Subject: [PATCH] BF #2498949 BP Get Not Invoiced Shipment Value return null --- base/src/org/compiere/model/MBPartner.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/base/src/org/compiere/model/MBPartner.java b/base/src/org/compiere/model/MBPartner.java index 65892198a0..265f01dd1e 100644 --- a/base/src/org/compiere/model/MBPartner.java +++ b/base/src/org/compiere/model/MBPartner.java @@ -40,6 +40,7 @@ import org.compiere.util.Msg; *
  • BF [ 1817752 ] MBPartner.getLocations should return only active one * @author Armen Rizal, GOODWILL CONSULT *
  • BF [ 2041226 ] BP Open Balance should count only Completed Invoice + *
  • BF [ 2498949 ] BP Get Not Invoiced Shipment Value return null */ public class MBPartner extends X_C_BPartner { @@ -163,11 +164,11 @@ public class MBPartner extends X_C_BPartner public static BigDecimal getNotInvoicedAmt (int C_BPartner_ID) { BigDecimal retValue = null; - String sql = "SELECT SUM(COALESCE(" - + "currencyBase((ol.QtyDelivered-ol.QtyInvoiced)*ol.PriceActual,o.C_Currency_ID,o.DateOrdered, o.AD_Client_ID,o.AD_Org_ID) ,0)) " + String sql = "SELECT COALESCE(SUM(COALESCE(" + + "currencyBase((ol.QtyDelivered-ol.QtyInvoiced)*ol.PriceActual,o.C_Currency_ID,o.DateOrdered, o.AD_Client_ID,o.AD_Org_ID) ,0)),0) " + "FROM C_OrderLine ol" + " INNER JOIN C_Order o ON (ol.C_Order_ID=o.C_Order_ID) " - + "WHERE o.IsSOTrx='Y' AND Bill_BPartner_ID=?"; + + "WHERE o.IsSOTrx='Y' AND Bill_BPartner_ID=?"; PreparedStatement pstmt = null; try {