svn commit: r1155300 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1155300 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy

bibryam
Author: bibryam
Date: Tue Aug  9 10:38:04 2011
New Revision: 1155300

URL: http://svn.apache.org/viewvc?rev=1155300&view=rev
Log:
A patch from Pierre Smits - Overview of invoices in AP and AR don't show invoices with status approved https://issues.apache.org/jira/browse/OFBIZ-4330

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy?rev=1155300&r1=1155299&r2=1155300&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy Tue Aug  9 10:38:04 2011
@@ -36,9 +36,9 @@ if (invoiceTypeId) {
         LESS_THAN(dueDate: UtilDateTime.nowTimestamp())
     }
     if ("PURCHASE_INVOICE".equals(invoiceTypeId)) {
-        invoiceStatusesCondition = exprBldr.IN(statusId: ["INVOICE_RECEIVED", "INVOICE_IN_PROCESS"])
+        invoiceStatusesCondition = exprBldr.IN(statusId: ["INVOICE_RECEIVED", "INVOICE_IN_PROCESS", "INVOICE_READY"])
     } else if ("SALES_INVOICE".equals(invoiceTypeId)) {
-        invoiceStatusesCondition = exprBldr.IN(statusId: ["INVOICE_SENT", "INVOICE_APPROVED"])
+        invoiceStatusesCondition = exprBldr.IN(statusId: ["INVOICE_SENT", "INVOICE_APPROVED", "INVOICE_READY"])
     }
     expr = exprBldr.AND([expr, invoiceStatusesCondition]);
 
@@ -53,6 +53,7 @@ if (invoiceTypeId) {
     }
 
     invoicesCond = exprBldr.AND(invoiceStatusesCondition) {
+        EQUALS(invoiceTypeId: invoiceTypeId)
         GREATER_THAN_EQUAL_TO(dueDate: UtilDateTime.nowTimestamp())
     }
     EntityFindOptions findOptions = new EntityFindOptions();