[
https://issues.apache.org/jira/browse/OFBIZ-4940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13598255#comment-13598255 ]
Paul Foxworthy commented on OFBIZ-4940:
---------------------------------------
Hi Alexander,
I walked through an example on the demo site, and I think the tax stuff is OK.
I think you're right that we should be fetching the dates. But note the entity here: it's ProductCategoryMember. Like almost all entities in OFBiz, there are from and thru dates here, but it is unlikely that the fact that a product is a member of a category will expire, so it is unlikely the missing dates will cause a problem for most OFBiz .
The place where the expiry date for *tax* is filtered is here:
https://fisheye6.atlassian.com/browse/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?hb=true#to389In the call to findList on the previous line, the fieldsToSelect parameter is null, so all fields will be fetched, including from and thru dates.
So I believe there is a bug, but not as serious or likely to occur as you've suggested.
Do you concur? If you are in agreement, we can write up a walkthrough on the demo site that brings on the bug.
Cheers
Paul Foxworthy
> TaxAuthorityServices try to filter by date without getting date fields
> ----------------------------------------------------------------------
>
> Key: OFBIZ-4940
> URL:
https://issues.apache.org/jira/browse/OFBIZ-4940> Project: OFBiz
> Issue Type: Bug
> Components: accounting
> Affects Versions: SVN trunk
> Reporter: Alexander Reelsen
>
> The TaxAuthorityServices try to get product category members and filter by date. However they do not get the fromDate/thruDate fields and therefore EntityUtil.filterByDate() fails silently. This can lead to accumulated tax when two different tax rates were active on two totally different time ranges.
> Fix is changing line 329 from
> List<GenericValue> pcmList = delegator.findList("ProductCategoryMember", productIdCond, UtilMisc.toSet("productCategoryId"), null, null, true);
> to
> List<GenericValue> pcmList = delegator.findList("ProductCategoryMember", productIdCond, UtilMisc.toSet("productCategoryId", "fromDate", "thruDate"), null, null, true);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira