Issue Fixes 10063: Do not invoice invoice term are not respected.
authorHarikrishnan Raja <harikrishnan.raja@openbravo.com>
Wed, 23 Sep 2009 11:03:25 +0530
changeset 5068 ff6ccc39f03c
parent 5067 e13fc21ebf9c
child 5069 b4990292ae3e
Issue Fixes 10063: Do not invoice invoice term are not respected.
src-db/database/sourcedata/AD_VAL_RULE.xml
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql
src/org/openbravo/erpCommon/ad_forms/GenerateInvoicesmanual_data.xsql
src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.java
src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoice_data.xsql
--- a/src-db/database/sourcedata/AD_VAL_RULE.xml	Tue Sep 22 18:39:13 2009 +0200
+++ b/src-db/database/sourcedata/AD_VAL_RULE.xml	Wed Sep 23 11:03:25 2009 +0530
@@ -1303,6 +1303,18 @@
 <!--53AE60A473D2460D8663D7A1BC5BA732-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--53AE60A473D2460D8663D7A1BC5BA732--></AD_VAL_RULE>
 
+<!--5B897800ED59442DA1FA1EBBECE14047--><AD_VAL_RULE>
+<!--5B897800ED59442DA1FA1EBBECE14047-->  <AD_VAL_RULE_ID><![CDATA[5B897800ED59442DA1FA1EBBECE14047]]></AD_VAL_RULE_ID>
+<!--5B897800ED59442DA1FA1EBBECE14047-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5B897800ED59442DA1FA1EBBECE14047-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5B897800ED59442DA1FA1EBBECE14047-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5B897800ED59442DA1FA1EBBECE14047-->  <NAME><![CDATA[Invoice Terms used in Orders Awaiting Invoice report]]></NAME>
+<!--5B897800ED59442DA1FA1EBBECE14047-->  <DESCRIPTION><![CDATA[Invoice Terms used in the Orders Awaiting Invoice report,with Do Not Invoice value removed.]]></DESCRIPTION>
+<!--5B897800ED59442DA1FA1EBBECE14047-->  <TYPE><![CDATA[S]]></TYPE>
+<!--5B897800ED59442DA1FA1EBBECE14047-->  <CODE><![CDATA[AD_Ref_List.Value <> 'N']]></CODE>
+<!--5B897800ED59442DA1FA1EBBECE14047-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5B897800ED59442DA1FA1EBBECE14047--></AD_VAL_RULE>
+
 <!--78CBED13BC3F4BF989A90CA75BA8DFCD--><AD_VAL_RULE>
 <!--78CBED13BC3F4BF989A90CA75BA8DFCD-->  <AD_VAL_RULE_ID><![CDATA[78CBED13BC3F4BF989A90CA75BA8DFCD]]></AD_VAL_RULE_ID>
 <!--78CBED13BC3F4BF989A90CA75BA8DFCD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql	Tue Sep 22 18:39:13 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql	Wed Sep 23 11:03:25 2009 +0530
@@ -117,6 +117,7 @@
         AND ic.AD_Client_ID IN ('1') 
         AND ic.AD_Org_ID IN ('1') 
         AND ic.C_BPartner_ID = ? 
+        AND ic.term <> 'N'
         GROUP BY o.C_ORDER_ID, o.DocumentNo, o.DateOrdered, o.GrandTotal 
         ORDER BY NAME
       ]]>
--- a/src/org/openbravo/erpCommon/ad_forms/GenerateInvoicesmanual_data.xsql	Tue Sep 22 18:39:13 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/GenerateInvoicesmanual_data.xsql	Wed Sep 23 11:03:25 2009 +0530
@@ -37,6 +37,7 @@
       AND ic.C_BPartner_ID=bp.C_BPartner_ID
       AND ic.C_DocType_ID=dt.C_DocType_ID
       AND l.value = ic.term
+      AND ic.term <> 'N'
       AND AD_Reference_ID='150'
       AND ic.ad_client_id in ('1')
       AND ic.ad_org_id in ('1')
@@ -67,6 +68,7 @@
       AND ic.C_BPartner_ID=bp.C_BPartner_ID
       AND ic.C_DocType_ID=dt.C_DocType_ID
       AND l.value = ic.term
+      AND ic.term <> 'N'
       AND AD_Reference_ID='150'
       AND ic.ad_client_id in ('1')
       AND ic.ad_org_id in ('1')
--- a/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.java	Tue Sep 22 18:39:13 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.java	Wed Sep 23 11:03:25 2009 +0530
@@ -140,9 +140,9 @@
     xmlDocument.setParameter("adOrgId", strCOrgId);
     try {
       ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "",
-          "C_Order InvoiceRule", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
-              "ReportOrderNotInvoiceFilterJR"), Utility.getContext(this, vars, "#User_Client",
-              "ReportOrderNotInvoiceJR"), 0);
+          "C_Order InvoiceRule", "Invoice Terms used in Orders Awaiting Invoice report", Utility
+              .getContext(this, vars, "#AccessibleOrgTree", "ReportOrderNotInvoiceFilterJR"),
+          Utility.getContext(this, vars, "#User_Client", "ReportOrderNotInvoiceJR"), 0);
       Utility.fillSQLParameters(this, vars, null, comboTableData, "ReportOrderNotInvoiceJR",
           strInvoiceRule);
       xmlDocument.setData("reportInvoiceRule", "liststructure", comboTableData.select(false));
--- a/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoice_data.xsql	Tue Sep 22 18:39:13 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoice_data.xsql	Wed Sep 23 11:03:25 2009 +0530
@@ -59,6 +59,7 @@
       WHERE C_ORDER.C_ORDER_ID=C_ORDERLINE.C_ORDER_ID
       AND C_ORDER.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
       AND C_ORDER.INVOICERULE = AD_REF_LIST.VALUE
+      AND C_ORDER.INVOICERULE <> 'N'
       AND C_ORDERLINE.C_UOM_ID = C_UOM.C_UOM_ID
       AND C_ORDER.AD_ORG_ID = AD_ORG.AD_ORG_ID
       AND C_ORDER.C_CURRENCY_ID = C_CURRENCY.C_CURRENCY_ID
@@ -96,6 +97,7 @@
       AND C.C_BPARTNER_ID=C_BPARTNER.C_BPARTNER_ID
       AND C.C_CURRENCY_ID = C_CURRENCY.C_CURRENCY_ID
       AND C.INVOICERULE = AD_REF_LIST.VALUE
+      AND C.INVOICERULE <> 'N'
       AND AD_REF_LIST.AD_REFERENCE_ID = '150'
       AND C_ORDERTAX.C_TAX_ID = C_TAX.C_TAX_ID
       AND C.AD_ORG_ID = AD_ORG.AD_ORG_ID