Fixes issue 30185: AlertsForWrongOrders modulescript generates wrong alerts
authorAlvaro Ferraz <alvaro.ferraz@openbravo.com>
Wed, 17 Jun 2015 19:17:55 +0200
changeset 27138 c85e2fa57fa1
parent 27137 1d10b6a08a30
child 27139 89faeb629846
Fixes issue 30185: AlertsForWrongOrders modulescript generates wrong alerts

The query of the modulescript did not take into account the isinvoicepaid status (if the payment was paid or not) to check if the amount of the paymentschedule was correct.
modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrdersData.class
modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrders_data.xsql
modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrdersData.java
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrdersData.class has changed
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrders_data.xsql	Tue Jun 23 14:46:54 2015 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrders_data.xsql	Wed Jun 17 19:17:55 2015 +0200
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  ************************************************************************************
- * Copyright (C) 2014 Openbravo S.L.U.
+ * Copyright (C) 2014-2015 Openbravo S.L.U.
  * Licensed under the Openbravo Commercial License version 1.0
  * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
  * or in the legal folder of this module distribution.
@@ -18,7 +18,7 @@
       from c_order, fin_payment_schedule, fin_payment_scheduledetail 
       where c_order.c_order_id = fin_payment_schedule.c_order_id
       and fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_order 
-      and fin_payment_scheduledetail.iscanceled = 'N' 
+      and fin_payment_scheduledetail.isinvoicepaid = 'Y'
       and fin_payment_scheduledetail.fin_payment_detail_id IS NOT NULL 
       group by fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, c_order.issotrx, fin_payment_schedule.fin_payment_schedule_id, 
       fin_payment_schedule.c_order_id, fin_payment_schedule.paidamt 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrdersData.java	Tue Jun 23 14:46:54 2015 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrdersData.java	Wed Jun 17 19:17:55 2015 +0200
@@ -63,7 +63,7 @@
       "      from c_order, fin_payment_schedule, fin_payment_scheduledetail " +
       "      where c_order.c_order_id = fin_payment_schedule.c_order_id" +
       "      and fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_order " +
-      "      and fin_payment_scheduledetail.iscanceled = 'N' " +
+      "      and fin_payment_scheduledetail.isinvoicepaid = 'Y'" +
       "      and fin_payment_scheduledetail.fin_payment_detail_id IS NOT NULL " +
       "      group by fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, c_order.issotrx, fin_payment_schedule.fin_payment_schedule_id, " +
       "      fin_payment_schedule.c_order_id, fin_payment_schedule.paidamt " +