details:   https://code.openbravo.com/erp/devel/pi/rev/334861bec141
changeset: 34828:334861bec141
user:      Atul Gaware <atul.gaware <at> openbravo.com>
date:      Fri Sep 28 01:58:48 2018 +0530
summary:   Fixes Issue 39330:Invoice status field in Goods Shipment don't
work appropriately

Added clause whether invoice is processed when calculating
invoice status.

diffstat:

 src-db/database/model/functions/C_GETINVOICESTATUSFROMSHIPMENT.xml |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 5abfa42b2a58 -r 334861bec141 
src-db/database/model/functions/C_GETINVOICESTATUSFROMSHIPMENT.xml
--- a/src-db/database/model/functions/C_GETINVOICESTATUSFROMSHIPMENT.xml        
Mon Oct 01 09:35:38 2018 +0000
+++ b/src-db/database/model/functions/C_GETINVOICESTATUSFROMSHIPMENT.xml        
Fri Sep 28 01:58:48 2018 +0530
@@ -16,7 +16,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2012 Openbravo SLU
+* All portions are Copyright (C) 2012-2018 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -28,7 +28,9 @@
 join c_invoiceline inv on minline.m_inoutline_id=inv.m_inoutline_id,
  (select COALESCE(sum(g.movementqty), 0) as suma
       from m_inoutline g where g.m_inout_id =p_minoutid) a
-where minline.m_inout_id=p_minoutid;
+where minline.m_inout_id=p_minoutid
+and exists (select 1 from c_invoice i where i.c_invoice_id = inv.c_invoice_id
+and i.processed = 'Y');
 If (v_percent is NULL) then
 v_percent:=0;
 else if (v_percent > 100) then


_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to