Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028787
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementminoralways2015-01-27 18:092015-05-12 17:40
ReportervmromanosView Statuspublic 
Assigned Tovmromanos 
PriorityimmediateResolutionfixedFixed in Version3.0PR15Q3
StatusclosedFix in branchFixed in SCM revision6c0299666135
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_12
OS VersionDebian 5.0Database version8.3.8Ant version1.7.0
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2012-05-21
Regression introduced in release3.0MP12
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/c00d43ad77bdee88849caf11468e4c08c9e964e3 [^]
Triggers an Emergency PackNo
Summary

0028787: Impossible to create several calendars for the same organization

DescriptionRight now it's impossible to create several calendars for the same organization along as the calendars have similar periods.
This is a restriction that from a functional point of view has no sense and it creates problems in modules (like Intrastat) where it may be interesting to define several calendars per organization.
Steps To ReproduceGo to Fiscal Calendar window
Create a new record for org F&B España, S.A (note that sampledata has another calendar already created for this org)
Go to year and create 2014 year.
Run create periods process. An error is shown:
Error:
Saving failed. The dates period defined is overlapped with another period of an existing year.
Proposed SolutionAllow to create several calendars per organization
Ensure this restriction of overlapping periods is applied grouping by calendar
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0028040 closedvmromanos Modules It is not possible to obtain proper AEAT reports with Fiscal Calendar defined from July to June 
related to defect 0029823 closedvmromanos Openbravo ERP Open/Close Period Control window should only shown the calendars associated to an Organization 
depends on backport 00298083.0PR15Q2.1 closedvmromanos Openbravo ERP Impossible to create several calendars for the same organization 
depends on backport 00298093.0PR15Q1.4 closedvmromanos Openbravo ERP Impossible to create several calendars for the same organization 
caused by defect 00203363.0MP12 closedjecharri Openbravo ERP Should not be possible to create several periods for same date range in different years 
caused by defect 00222933.0MP20 closedjecharri Openbravo ERP Wrong checking in c_period_trg3 trigger 

-  Notes
(0077075)
vmromanos (manager)
2015-05-07 10:40

Note that the code that originally created the regression has been moved from C_PERIOD_TRG2 trigger (0020336) to C_YEARPERIODS function (0022293) and PeriodEventHandler.java (0022293)
(0077088)
vmromanos (manager)
2015-05-07 12:21

Test plan I:
Go to Fiscal Calendar window
Create a new record called TEST for org F&B España, S.A (note that sampledata has another calendar already created for this org)
Go to year and create 2014 year.
Go to periods tab and create a new record from 01/01/2014 to 31/01/2014.
Save it. Verify no error is raised

Test plan II:
Update ending date of the previously created period to 30/01/2014.
Save it. Verify no error is raised

Test plan III:
Update ending date of the previously created period to 31/01/2014.
Save it. Verify no error is raised

Test plan IV:
Create a new period for this year from 01/01/2014 to 31/01/2014.
Save it. Verify an error is displayed informing about the overlap
Change start date to 02/01/2014
Save it. Verify an error is displayed informing about the overlap

Test plan V:
Delete the periods previously created
Run the Create Periods process
Verify periods are properly created and no errors are raised.

Test plan VI:
Change the Fiscal Year name from 2014 to 2014_
Create a new Fiscal Year for 2014
Create a new period for this year from 01/01/2014 to 31/01/2014.
Save it. Verify an error is displayed informing about the overlap
Discard the changes.
Run Create Periods process.
Verify an error is displayed informing about the overlap
(0077234)
psanjuan (manager)
2015-05-08 13:05
edited on: 2015-05-08 15:41

Verified.

All scenarios above tested besides Open/Close Period Control window. New issue found. See issue 29823

Additional test: creation of another Calendar with a fiscal year 2014-2015, periods manually created for oct-14, nov-14, dec-14, jan-15, etc.


Issue related 20336 also verified.

1. Go to Fiscal Calendar "Calendario España". Go to Year 2012 and create new Period with any name and for date range: 01-03-2011 to 31-03-2011
2. Realize that you are able to create period although correct March2011 period already exist for year 2011

This scenario can not be reproduced anymore, that period (March 2011) can be created only for another Calendar than "Calendario España".

Intrastat Calendar also tested.

(0077286)
hgbot (developer)
2015-05-11 16:04

Repository: erp/devel/pi
Changeset: 6c02996661357804174204ba3dca9a390ed0c9ee
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu May 07 12:11:39 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6c02996661357804174204ba3dca9a390ed0c9ee [^]

Fixed bug 28787: Impossible to create several calendars for the same organization

Two pieces of code were affected by this bug:
PeriodEventHandler.java: EntityPersistenceEventObserver in charge of checking overlap in manual inserts/updates (or any java process) in c_period table
C_YEARPERIODS: db function associated to the create periods process inside the Fiscal Calendar | Year tab. It also verifies the periods don't overlap other periods.

The fix consists in checking that there is no date overlap per calendar. Before this fix the calendar wasn't taken into account, so it was not possible to define several calendars for the same organization with the same periods.

---
M src-db/database/model/functions/C_YEARPERIODS.xml
M src/org/openbravo/event/PeriodEventHandler.java
---
(0077295)
Sandrahuguet (developer)
2015-05-11 17:04

Code review + testing OK
(0077345)
hudsonbot (developer)
2015-05-12 17:40

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/6d9fee60cdbd [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-01-27 18:09 vmromanos New Issue
2015-01-27 18:09 vmromanos Assigned To => dmiguelez
2015-01-27 18:09 vmromanos Modules => Core
2015-01-27 18:09 vmromanos Triggers an Emergency Pack => No
2015-01-27 18:10 vmromanos Relationship added caused by 0020336
2015-02-26 10:28 vmromanos Relationship added related to 0028040
2015-02-26 17:21 vmromanos Type defect => design defect
2015-02-26 17:22 vmromanos Relationship deleted related to 0028040
2015-02-26 17:23 vmromanos Relationship added caused by 0028040
2015-02-26 17:24 vmromanos Relationship deleted caused by 0028040
2015-02-26 17:24 vmromanos Relationship added related to 0028040
2015-05-05 16:44 psanjuan Priority normal => urgent
2015-05-07 10:18 vmromanos Relationship added caused by 0022293
2015-05-07 10:26 vmromanos Regression level => Production - Confirmed Stable
2015-05-07 10:26 vmromanos Regression date => 2012-05-21
2015-05-07 10:26 vmromanos Regression introduced in release => 3.0MP12
2015-05-07 10:26 vmromanos Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/c00d43ad77bdee88849caf11468e4c08c9e964e3 [^]
2015-05-07 10:40 vmromanos Note Added: 0077075
2015-05-07 10:40 vmromanos Priority urgent => immediate
2015-05-07 10:50 vmromanos Status new => scheduled
2015-05-07 10:50 vmromanos Assigned To dmiguelez => vmromanos
2015-05-07 12:12 vmromanos Type design defect => defect
2015-05-07 12:21 vmromanos Note Added: 0077088
2015-05-08 12:34 psanjuan Relationship added causes 0029823
2015-05-08 13:05 psanjuan Note Added: 0077234
2015-05-08 13:10 psanjuan Note Edited: 0077234 View Revisions
2015-05-08 13:12 psanjuan Note Edited: 0077234 View Revisions
2015-05-08 14:23 psanjuan Relationship deleted causes 0029823
2015-05-08 14:24 psanjuan Relationship added related to 0029823
2015-05-08 14:25 psanjuan Note Edited: 0077234 View Revisions
2015-05-08 15:41 psanjuan Note Edited: 0077234 View Revisions
2015-05-11 16:04 hgbot Checkin
2015-05-11 16:04 hgbot Note Added: 0077286
2015-05-11 16:04 hgbot Status scheduled => resolved
2015-05-11 16:04 hgbot Resolution open => fixed
2015-05-11 16:04 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6c02996661357804174204ba3dca9a390ed0c9ee [^]
2015-05-11 17:04 Sandrahuguet Review Assigned To => Sandrahuguet
2015-05-11 17:04 Sandrahuguet Note Added: 0077295
2015-05-11 17:04 Sandrahuguet Status resolved => closed
2015-05-11 17:04 Sandrahuguet Fixed in Version => 3.0PR15Q3
2015-05-12 17:40 hudsonbot Checkin
2015-05-12 17:40 hudsonbot Note Added: 0077345


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker