Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029808Openbravo ERP09. Financial managementpublic2015-01-27 18:092015-05-19 15:56
vmromanos 
vmromanos 
immediateminoralways
closedfixed 
20Debian 5.0
 
3.0PR15Q2.13.0PR15Q2.1 
Sandrahuguet
Core
Production - Confirmed Stable
2012-05-21
3.0MP12
https://code.openbravo.com/erp/devel/pi/rev/c00d43ad77bdee88849caf11468e4c08c9e964e3 [^]
No
0029808: Impossible to create several calendars for the same organization
Right 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.
Go 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.
Allow to create several calendars per organization
Ensure this restriction of overlapping periods is applied grouping by calendar
Approved
blocks defect 0028787 closed vmromanos Impossible to create several calendars for the same organization 
Issue History
2015-05-07 10:50vmromanosTypedesign defect => backport
2015-05-07 10:50vmromanosTarget Version => 3.0PR15Q2.1
2015-05-07 10:53vmromanosAssigned Todmiguelez => vmromanos
2015-05-07 17:55dmitry_mezentsevTag Attached: Approved
2015-05-11 16:56hgbotCheckin
2015-05-11 16:56hgbotNote Added: 0077291
2015-05-11 16:56hgbotStatusscheduled => resolved
2015-05-11 16:56hgbotResolutionopen => fixed
2015-05-11 16:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q2.1/rev/26d39e051d58c731b40fad4bd997cd74a6f9677d [^]
2015-05-11 16:59SandrahuguetReview Assigned To => Sandrahuguet
2015-05-11 16:59SandrahuguetNote Added: 0077293
2015-05-11 16:59SandrahuguetStatusresolved => closed
2015-05-11 16:59SandrahuguetFixed in Version => 3.0PR15Q2.1
2015-05-19 14:48hgbotCheckin
2015-05-19 14:48hgbotNote Added: 0077579
2015-05-19 14:48hgbotCheckin
2015-05-19 14:48hgbotNote Added: 0077580
2015-05-19 14:48hgbotStatusclosed => resolved
2015-05-19 14:48hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/backports/3.0PR15Q2.1/rev/26d39e051d58c731b40fad4bd997cd74a6f9677d [^] => http://code.openbravo.com/erp/backports/3.0PR15Q2.1/rev/19fce9568e90b9cc35816d6de3fda902719b16fa [^]
2015-05-19 15:56SandrahuguetStatusresolved => closed

Notes
(0077291)
hgbot   
2015-05-11 16:56   
Repository: erp/backports/3.0PR15Q2.1
Changeset: 26d39e051d58c731b40fad4bd997cd74a6f9677d
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/backports/3.0PR15Q2.1/rev/26d39e051d58c731b40fad4bd997cd74a6f9677d [^]

Fixed bug 29808: 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
---
(0077293)
Sandrahuguet   
2015-05-11 16:59   
Code review + testing OK
(0077579)
hgbot   
2015-05-19 14:48   
Repository: erp/backports/3.0PR15Q2.1
Changeset: ba8075e92bef519d814102142f797ff33778a9dc
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue May 19 14:23:05 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2.1/rev/ba8075e92bef519d814102142f797ff33778a9dc [^]

Related to issue 29808: Backout wrong changeset
The changeset pushed was not the good one, and failed in Oracle

---
M src-db/database/model/functions/C_YEARPERIODS.xml
M src/org/openbravo/event/PeriodEventHandler.java
---
(0077580)
hgbot   
2015-05-19 14:48   
Repository: erp/backports/3.0PR15Q2.1
Changeset: 19fce9568e90b9cc35816d6de3fda902719b16fa
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/backports/3.0PR15Q2.1/rev/19fce9568e90b9cc35816d6de3fda902719b16fa [^]

Fixed bug 29808: 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
---