This will work, but it would have been best to include the date range
filter in the entity condition.
-Adrian
On 3/15/2013 11:16 AM, paulfoxwor...@apache.org wrote:
Author: paulfoxworthy
Date: Fri Mar 15 11:16:38 2013
New Revision: 1456897
URL: http://svn.apache.org/r1456897
Log:
Exclude expired product category members from tax calc (OFBIZ-4940)
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?rev=1456897&r1=1456896&r2=1456897&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
(original)
+++
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
Fri Mar 15 11:16:38 2013
@@ -330,7 +330,7 @@ public class TaxAuthorityServices {
} else {
productIdCond = EntityCondition.makeCondition("productId",
EntityOperator.EQUALS, product.getString("productId"));
}
- List<GenericValue> pcmList = delegator.findList("ProductCategoryMember",
productIdCond, UtilMisc.toSet("productCategoryId"), null, null, true);
+ List<GenericValue> pcmList = delegator.findList("ProductCategoryMember", productIdCond,
UtilMisc.toSet("productCategoryId", "fromDate", "thruDate"), null, null, true);
pcmList = EntityUtil.filterByDate(pcmList, true);
for(GenericValue pcm : pcmList) {
productCategoryIdSet.add(pcm.getString("productCategoryId"));