[
https://issues.apache.org/jira/browse/OFBIZ-5740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143110#comment-14143110
]
Deepak Dixit commented on OFBIZ-5740:
-------------------------------------
Comments from Christian Carlow (User mailing list)
{quote}
Does anyone know why CustomTimePeriod fromDate and thruDate are of type date
instead of timestamp? Because the fields are of type date, it causes issues
when joining the it for date comparison for view-entities.
For example:
<view-entity entity-name="OrderHeaderAndCustomTimePeriod" package-name="">
<member-entity entity-alias="OH" entity-name="OrderHeader"/>
<member-entity entity-alias="CTP" entity-name="CustomTimePeriod"/>
<alias-all entity-alias="OH"/>
<alias-all entity-alias="CTP"/>
<entity-condition>
<condition-expr field-name="orderDate" entity-alias="OH"
operator="greater-equals" rel-field-name="fromDate" rel-entity-alias="CTP"/>
<condition-expr field-name="orderDate" entity-alias="OH"
operator="less-equals" rel-field-name="thruDate" rel-entity-alias="CTP"/>
</entity-condition>
</view-entity>
The problem occurs when the OrderHeader.orderDate falls on the last day of the
CustomTimePeriod.thruDate because the CustomTimePeriod.thruDate is converted to
Timestamp but with time 00:00:00.000. Changing the CustomTimePeriod Date types
to Timestamp seems like the easiest but I'm sure Accounting code will have to
be changed.
{quote}
> Wrong field type for fromDate and thruDate of CustomTimePeriod entity.
> ----------------------------------------------------------------------
>
> Key: OFBIZ-5740
> URL: https://issues.apache.org/jira/browse/OFBIZ-5740
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: Release Branch 11.04, Release Branch 12.04, Release
> Branch 13.07, Trunk, Upcoming Branch
> Reporter: Deepak Dixit
> Priority: Minor
>
> Wrong field type is set for fromDate and thruDate for CustomTimePeriod
> entity. Type should be 'date-time' instead of 'date'
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)