You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Bilgin Ibryam (JIRA)" <ji...@apache.org> on 2006/10/19 19:14:35 UTC
[jira] Created: (OFBIZ-392) Wrong week numbers in the fixed asset
calendar
Wrong week numbers in the fixed asset calendar
----------------------------------------------
Key: OFBIZ-392
URL: http://issues.apache.org/jira/browse/OFBIZ-392
Project: OFBiz (The Open for Business Project)
Issue Type: Improvement
Components: accounting
Reporter: Bilgin Ibryam
Priority: Minor
Attachments: UtilDateTime.patch
Week numbers in the fixed asset calendar are not correct. So i fixed the problematic function and also added a possibility for choosing the week start day (Sunday or Monday).
Regards,
Bilgin
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (OFBIZ-392) Wrong week numbers in the fixed asset
calendar
Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/OFBIZ-392?page=all ]
Jacopo Cappellato updated OFBIZ-392:
------------------------------------
Attachment: UtilDateTime-reviewed.patch
I'd propose this slightly different patch, where I've used Calendar.SUNDAY instead of 1 Calendar.MONDAY instead of 2: I think that in this was it's a bit more easier to read.
However, I don't quite understand the following code:
if(startOfWeek == Calendar.MONDAY) {
calendar.setMinimalDaysInFirstWeek(4);
} else if(startOfWeek == Calendar.SUNDAY) {
calendar.setMinimalDaysInFirstWeek(3);
}
but this is due to my ignorance about the method calendar.setMinimalDaysInFirstWeek(...)
Apart from this, I really think that this is a good patch because it reimplements an old method following a more standard approach (i.e. using the Calendar class instead of custom code).
> Wrong week numbers in the fixed asset calendar
> ----------------------------------------------
>
> Key: OFBIZ-392
> URL: http://issues.apache.org/jira/browse/OFBIZ-392
> Project: OFBiz (The Open for Business Project)
> Issue Type: Improvement
> Components: accounting
> Reporter: Bilgin Ibryam
> Priority: Minor
> Attachments: UtilDateTime-reviewed.patch, UtilDateTime.patch
>
>
> Week numbers in the fixed asset calendar are not correct. So i fixed the problematic function and also added a possibility for choosing the week start day (Sunday or Monday).
> Regards,
> Bilgin
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (OFBIZ-392) Wrong week numbers in the fixed asset
calendar
Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/OFBIZ-392?page=comments#action_12443789 ]
Jacques Le Roux commented on OFBIZ-392:
---------------------------------------
Hi Bilgin,
Please have you an example that shows this error ? It's interesting to choose the week start day, but I'd appreciate that you change also calls to weekNumber (as in applications/accounting/webapp/accounting/fixedasset/month.bsh the only one I found). Never mind now I will change it if I commit your patch.
Thanks
> Wrong week numbers in the fixed asset calendar
> ----------------------------------------------
>
> Key: OFBIZ-392
> URL: http://issues.apache.org/jira/browse/OFBIZ-392
> Project: OFBiz (The Open for Business Project)
> Issue Type: Improvement
> Components: accounting
> Reporter: Bilgin Ibryam
> Priority: Minor
> Attachments: UtilDateTime.patch
>
>
> Week numbers in the fixed asset calendar are not correct. So i fixed the problematic function and also added a possibility for choosing the week start day (Sunday or Monday).
> Regards,
> Bilgin
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (OFBIZ-392) Wrong week numbers in the fixed asset
calendar
Posted by "Bilgin Ibryam (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/OFBIZ-392?page=comments#action_12443828 ]
Bilgin Ibryam commented on OFBIZ-392:
-------------------------------------
Hi,
For example today is 20 October and it is 42 week of the year, but in fixed asset calendar it is shown as week 41.
And also the first week of the next year 1-7 January is shown as 52 week of the 2006.
The same problem has the 2008 year.
Also 2009 has 53 weeks, but fixed asset calendar shows only 52. I think that all the week numbers are wrong.
And i will fix also month.bsh of course.
Regards,
Bilgin
> Wrong week numbers in the fixed asset calendar
> ----------------------------------------------
>
> Key: OFBIZ-392
> URL: http://issues.apache.org/jira/browse/OFBIZ-392
> Project: OFBiz (The Open for Business Project)
> Issue Type: Improvement
> Components: accounting
> Reporter: Bilgin Ibryam
> Priority: Minor
> Attachments: UtilDateTime.patch
>
>
> Week numbers in the fixed asset calendar are not correct. So i fixed the problematic function and also added a possibility for choosing the week start day (Sunday or Monday).
> Regards,
> Bilgin
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (OFBIZ-392) Wrong week numbers in the fixed asset
calendar
Posted by "Bilgin Ibryam (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/OFBIZ-392?page=all ]
Bilgin Ibryam updated OFBIZ-392:
--------------------------------
Attachment: UtilDateTime.patch
> Wrong week numbers in the fixed asset calendar
> ----------------------------------------------
>
> Key: OFBIZ-392
> URL: http://issues.apache.org/jira/browse/OFBIZ-392
> Project: OFBiz (The Open for Business Project)
> Issue Type: Improvement
> Components: accounting
> Reporter: Bilgin Ibryam
> Priority: Minor
> Attachments: UtilDateTime.patch
>
>
> Week numbers in the fixed asset calendar are not correct. So i fixed the problematic function and also added a possibility for choosing the week start day (Sunday or Monday).
> Regards,
> Bilgin
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (OFBIZ-392) Wrong week numbers in the fixed asset
calendar
Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/OFBIZ-392?page=comments#action_12443898 ]
Jacques Le Roux commented on OFBIZ-392:
---------------------------------------
I'm surely missing something : 20 october 2006 is in week 42 in screenshot above (grrrr I tried 3 times to send this screenshoot, loosing my comment at each attempt)
Anyway I will commit Jacopo's patch ASA I'm sure to understand all that.
BTW forget about month.bsh, it's a cover that's called, my mistake, sorry.
> Wrong week numbers in the fixed asset calendar
> ----------------------------------------------
>
> Key: OFBIZ-392
> URL: http://issues.apache.org/jira/browse/OFBIZ-392
> Project: OFBiz (The Open for Business Project)
> Issue Type: Improvement
> Components: accounting
> Reporter: Bilgin Ibryam
> Priority: Minor
> Attachments: UtilDateTime-reviewed.patch, UtilDateTime.patch
>
>
> Week numbers in the fixed asset calendar are not correct. So i fixed the problematic function and also added a possibility for choosing the week start day (Sunday or Monday).
> Regards,
> Bilgin
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira