Fixes bug 0006783 Now Invoiced Sales Order Report, Orders Awaiting Invoice Report, Delivered Sales Order Report, Invoice Detail and Shipment Report only show data from active partners.
authorRafa Roda Palacios <rafael.roda@openbravo.com>
Thu, 08 Jan 2009 07:17:18 +0000
changeset 2526 3b09206e90cf
parent 2525 f125312f3c12
child 2527 8968db983765
Fixes bug 0006783 Now Invoiced Sales Order Report, Orders Awaiting Invoice Report, Delivered Sales Order Report, Invoice Detail and Shipment Report only show data from active partners.
src/org/openbravo/erpCommon/ad_reports/InoutEdition_data.xsql
src/org/openbravo/erpCommon/ad_reports/ReportInvoices_data.xsql
src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoice_data.xsql
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderInvoiced_data.xsql
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvided_data.xsql
--- a/src/org/openbravo/erpCommon/ad_reports/InoutEdition_data.xsql	Thu Jan 08 07:14:01 2009 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/InoutEdition_data.xsql	Thu Jan 08 07:17:18 2009 +0000
@@ -65,6 +65,7 @@
       AND M_INOUT.M_INOUT_ID = M_INOUTLINE.M_INOUT_ID
       AND M_INOUTLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
       AND M_INOUTLINE.C_UOM_ID = C_UOM.C_UOM_ID
+      AND C_BPARTNER.ISACTIVE = 'Y' 
       AND M_INOUT.AD_ORG_ID IN ('1')
       AND M_INOUT.AD_CLIENT_ID IN ('1')
       AND 1=1
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoices_data.xsql	Thu Jan 08 07:14:01 2009 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoices_data.xsql	Thu Jan 08 07:17:18 2009 +0000
@@ -54,6 +54,7 @@
       AND IL.C_INVOICELINE_ID = C_INVOICELINE.C_INVOICELINE_ID
       AND C_INVOICELINE.C_UOM_ID = C_UOM.C_UOM_ID
       AND C_INVOICELINE.C_TAX_ID = C_TAX.C_TAX_ID
+      AND B.ISACTIVE = 'Y'
       AND I.AD_Client_ID IN ('1')
       AND I.AD_ORG_ID IN ('1')
       AND 1=1
@@ -77,6 +78,7 @@
       AND IL.C_BPARTNER_ID = B.C_BPARTNER_ID
       AND C_INVOICETAX.C_INVOICE_ID= I2.C_INVOICE_ID
       AND C_INVOICETAX.C_TAX_ID = C_TAX.C_TAX_ID
+      AND B.ISACTIVE = 'Y'
       AND I2.AD_Client_ID IN ('2')
       AND I2.AD_ORG_ID IN ('2')
       AND 2=2) A
--- a/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoice_data.xsql	Thu Jan 08 07:14:01 2009 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoice_data.xsql	Thu Jan 08 07:17:18 2009 +0000
@@ -66,6 +66,7 @@
       AND C_ORDER.PROCESSED = 'Y'
       AND C_ORDER.ISSOTRX = 'Y'
       AND C_ORDERLINE.QTYORDERED<>C_ORDERLINE.QTYINVOICED
+      AND C_BPARTNER.ISACTIVE = 'Y' 
       AND C_ORDER.AD_Client_ID IN ('1')
       AND C_ORDER.AD_ORG_ID IN ('1')
       AND 1=1
@@ -105,6 +106,7 @@
                  WHERE C2.c_order_id = C.c_order_id
                  and c2.c_order_id=cl.c_order_id
                  and cl.QTYORDERED<>cl.QTYINVOICED)
+      AND C_BPARTNER.ISACTIVE = 'Y' 
       AND C.AD_Client_ID IN ('2')
       AND C.AD_ORG_ID IN ('2')
       AND 2=2
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderInvoiced_data.xsql	Thu Jan 08 07:14:01 2009 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderInvoiced_data.xsql	Thu Jan 08 07:17:18 2009 +0000
@@ -52,6 +52,7 @@
       WHERE C_ORDER.C_ORDER_ID = C_ORDERLINE.C_ORDER_ID
       AND C_ORDERLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
       AND C_ORDERLINE.C_UOM_ID = C_UOM.C_UOM_ID
+      AND C_BPARTNER.ISACTIVE = 'Y'
       AND C_ORDER.AD_CLIENT_ID IN ('1')
       AND C_ORDER.AD_ORG_ID IN ('1')
       AND 1=1
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvided_data.xsql	Thu Jan 08 07:14:01 2009 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvided_data.xsql	Thu Jan 08 07:17:18 2009 +0000
@@ -50,6 +50,7 @@
       WHERE C_ORDER.C_ORDER_ID = C_ORDERLINE.C_ORDER_ID 
       AND C_ORDERLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
       AND C_ORDERLINE.C_UOM_ID = C_UOM.C_UOM_ID
+      AND C_BPARTNER.ISACTIVE = 'Y'
       AND C_ORDER.AD_CLIENT_ID IN ('1')
       AND C_ORDER.AD_ORG_ID IN ('1')
       AND 1=1