author Víctor Martínez Romanos <victor.martinez@openbravo.com>
Thu, 07 May 2015 12:11:39 +0200
changeset 26684 2311966afd7b
parent 5839 fd6f3ff0d871
permissions -rw-r--r--
Fixed bug 29809: 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.
# Set root category priority to DEBUG and its only appender to A1.
log4j.rootCategory=WARN, A1
# A1 is set to be a ConsoleAppender. 
# A1 uses PatternLayout.
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c - %m%n