Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018395Openbravo ERPA. Platformpublic2011-08-31 10:452011-09-07 17:58
egoitz 
dbaz 
immediatecriticalalways
closedfixed 
5
3.0MP2 
3.0MP33.0MP3 
Core
No
0018395: Not possible to save documents with a date of a month with 30 or 28 days.
Not possible to save dates if the month has 30 or 28 days.
Not possible to save documents with a date of February, April, June, September, November.
-Create a new invoice.
-Define the date 01-09-2011
*See that the date is changed to 01-10-2011
No tags attached.
Issue History
2011-08-31 10:45egoitzNew Issue
2011-08-31 10:45egoitzAssigned To => alostale
2011-08-31 10:45egoitzModules => Core
2011-08-31 10:46egoitzResolution time => 1315260000
2011-08-31 10:46egoitzIssue Monitored: networkb
2011-08-31 10:52jonalegriaesarteAssigned Toalostale => dbaz
2011-08-31 11:33jonalegriaesarteTarget Version => 3.0MP3
2011-08-31 20:04dbazNote Added: 0040640
2011-08-31 20:07hgbotCheckin
2011-08-31 20:07hgbotNote Added: 0040641
2011-08-31 20:07hgbotStatusnew => resolved
2011-08-31 20:07hgbotResolutionopen => fixed
2011-08-31 20:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/144538d99c984f1937d34fa18ed61943090f2030 [^]
2011-09-01 14:35hudsonbotCheckin
2011-09-01 14:35hudsonbotNote Added: 0040674
2011-09-01 18:05jonalegriaesarteNote Added: 0040691
2011-09-01 18:05jonalegriaesarteStatusresolved => closed
2011-09-01 18:05jonalegriaesarteFixed in Version => 3.0MP3
2011-09-07 11:27hgbotCheckin
2011-09-07 11:27hgbotNote Added: 0040778
2011-09-07 11:27hgbotStatusclosed => resolved
2011-09-07 11:27hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/144538d99c984f1937d34fa18ed61943090f2030 [^] => http://code.openbravo.com/erp/devel/pi/rev/fe4778854fbd50e58ed5a32fec9a937665bc278f [^]
2011-09-07 17:58egoitzNote Added: 0040811
2011-09-07 17:58egoitzStatusresolved => closed

Notes
(0040640)
dbaz   
2011-08-31 20:04   
Notice that the issue is only reproducible the 31th of each month (if the month has 31 days).

The problem is in the Date object construction way.

  JSDate.setFullYear(fullYear);
  JSDate.setMonth(month - 1); (javascript months goes from 0 to 11)
  JSDate.setDate(day);

Let's assume that we are in 31-08-2011 and we enter the date 01-09-2011

The Date object starts from 'today' date: 31-08-2011

setFullYear puts the year to 2011, so we have 31-08-2011

setMonth changes the month to September, so we have 31-09-2011 which really is 01-10-2011

setDate sets the day to 1, so we have 01-10-2011
(0040641)
hgbot   
2011-08-31 20:07   
Repository: erp/devel/pi
Changeset: 144538d99c984f1937d34fa18ed61943090f2030
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Aug 31 20:06:35 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/144538d99c984f1937d34fa18ed61943090f2030 [^]

Fixed issue 18395: Now date is right calculated also the 31th of each month

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js
---
(0040674)
hudsonbot   
2011-09-01 14:35   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/6b7e3ac301b9 [^]

Maturity status: Test
(0040691)
jonalegriaesarte   
2011-09-01 18:05   
Verified
(0040778)
hgbot   
2011-09-07 11:27   
Repository: erp/devel/pi
Changeset: fe4778854fbd50e58ed5a32fec9a937665bc278f
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Aug 31 20:06:35 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fe4778854fbd50e58ed5a32fec9a937665bc278f [^]

Fixed issue 18395: Now date is right calculated also the 31th of each month

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js
---
(0040811)
egoitz   
2011-09-07 17:58   
verified