Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006903Openbravo ERP09. Financial managementpublic2009-01-15 10:102009-02-20 15:35
plujan 
vmromanos 
normalminorhave not tried
closedfixed 
30
2.50alpha-r6 
2.50beta 
Core
No
0006903: On Fiscal Calendar, Year field has no validation
When creating a Fiscal Calendar I should enter the Fiscal Year, but this field has no validation, so I can enter no valid values and save. Then, the Create Periods button performs an incorrect action.
1. Go Financial Management > Accounting > Setup > Fiscal Calendar
2. Create a new Calendar
3. Create a new Year, on Fiscal Year field enter a valid value, 2009
4. Save and click on Create Periods. All this works fine.
5. Go back Year tab and create a new record. This time enter a text "current".
6. Save. It is possible to save. Create periods. The periods are created for 9999 year, but no error is shown.
5. Go back Year tab and create a new record. This time enter a negative value, -2.
6. Save. It is possible to save. Create periods. The periods are created for 0003 year, but no error is shown. Note that name is missing the two digit year.
No tags attached.
related to defect 0007723 closed dbaz Blue informations label disappear too quickly to read them 
Issue History
2009-01-15 10:10plujanNew Issue
2009-01-15 10:10plujanAssigned To => rafaroda
2009-01-15 10:10plujansf_bug_id0 => 2509254
2009-01-15 10:10plujanRegression testing => No
2009-01-15 10:12plujanversion => 2.50alpha-r6
2009-01-19 11:20psarobeStatusnew => scheduled
2009-01-19 11:20psarobeNote Added: 0012309
2009-01-19 11:20psarobeAssigned Torafaroda => eduardo_Argal
2009-01-19 11:20psarobefix_in_branch => trunk
2009-01-27 09:10vmromanosAssigned Toeduardo_Argal => vmromanos
2009-01-27 18:32vmromanosNote Added: 0012704
2009-01-27 19:16svnbotCheckin
2009-01-27 19:16svnbotNote Added: 0012709
2009-01-27 19:16svnbotStatusscheduled => resolved
2009-01-27 19:16svnbotResolutionopen => fixed
2009-01-27 19:16svnbotsvn_revision => 12337
2009-02-19 08:24sureshbabuStatusresolved => new
2009-02-19 08:24sureshbabuResolutionfixed => open
2009-02-19 08:24sureshbabuNote Added: 0013712
2009-02-19 13:25svnbotCheckin
2009-02-19 13:25svnbotNote Added: 0013737
2009-02-19 13:25svnbotStatusnew => resolved
2009-02-19 13:25svnbotResolutionopen => fixed
2009-02-19 13:25svnbotsvn_revision12337 => 13402
2009-02-20 15:32plujanRelationship addedrelated to 0007723
2009-02-20 15:34plujanStatusresolved => closed
2009-02-20 15:34plujanNote Added: 0013847

Notes
(0012309)
psarobe   
2009-01-19 11:20   
The solution could be to make a trigger or callout
(0012704)
vmromanos   
2009-01-27 18:32   
We have decided to create both a callout and a check into the Create Periods procedure.

The callout will inform the user if he inserts a non-numeric value, and the procedure will exit if the fiscal year is not in a valid numeric format
(0012709)
svnbot   
2009-01-27 19:16   
Repository: openbravo
Revision: 12337
Author: vmromanos
Date: 2009-01-27 19:15:38 +0100 (Tue, 27 Jan 2009)

Fixed bug 6903: On Fiscal Calendar, Year field has no validation.
Created a callout and added a check into the C_YearPeriods procedure.

---
A trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Year_Validation.java
U trunk/src-db/database/model/functions/C_YEARPERIODS.xml
U trunk/src-db/database/sourcedata/AD_CALLOUT.xml
U trunk/src-db/database/sourcedata/AD_COLUMN.xml
U trunk/src-db/database/sourcedata/AD_MESSAGE.xml
U trunk/src-db/database/sourcedata/AD_MODEL_OBJECT.xml
U trunk/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
U trunk/src-db/database/sourcedata/AD_TEXTINTERFACES.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=12337&sc=1 [^]
(0013712)
sureshbabu   
2009-02-19 08:24   
If the user enters a non numeric value in Fiscal year field the callout is rightly informing the user, but the system still accepts the Negative number.
(0013737)
svnbot   
2009-02-19 13:25   
Repository: openbravo
Revision: 13402
Author: vmromanos
Date: 2009-02-19 13:25:09 +0100 (Thu, 19 Feb 2009)

Fixed bug 6903: On Fiscal Calendar, Year field has no validation. We also don't avoid negative values

---
U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Year_Validation.java
U trunk/src-db/database/model/functions/C_YEARPERIODS.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=13402&sc=1 [^]
(0013847)
plujan   
2009-02-20 15:34   
See related bug 0007723 to fully understand this fix