Fixes issue 41037: Fixes default value of Period column.
authorNono Carballo <nonofce@gmail.com>
Thu, 06 Jun 2019 15:59:31 -0400
changeset 36127 f90da150f6a7
parent 36126 eb4807b14aa9
child 36128 01243bac26fd
Fixes issue 41037: Fixes default value of Period column.

The query to get default value of Period column in GL_Journal table was fixed
src-db/database/sourcedata/AD_COLUMN.xml
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Tue Jun 11 17:05:05 2019 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jun 06 15:59:31 2019 -0400
@@ -25372,7 +25372,7 @@
 <!--1636-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
 <!--1636-->  <AD_REFERENCE_VALUE_ID><![CDATA[233]]></AD_REFERENCE_VALUE_ID>
 <!--1636-->  <FIELDLENGTH><![CDATA[22]]></FIELDLENGTH>
-<!--1636-->  <DEFAULTVALUE><![CDATA[@SQL= SELECT CASE WHEN @C_Period_ID@ IS NOT NULL THEN @C_Period_ID@ ELSE C_Period_ID END FROM C_Period WHERE C_Year_ID IN (SELECT C_Year_ID FROM C_Year WHERE C_Calendar_ID =(SELECT C_Calendar_ID FROM AD_ORG WHERE AD_Client_ID= @AD_Client_ID@ AND AD_ORG_ID=(SELECT AD_ORG_GETCALENDAROWNER( @AD_Org_ID@ ) from dual))) AND to_date( COALESCE(@DateAcct@,@#Date@) ) BETWEEN StartDate AND EndDate AND PeriodType='S' AND exists (select 1 from c_periodcontrol where c_periodcontrol.c_period_id = c_period.c_period_id AND periodstatus = 'O')]]></DEFAULTVALUE>
+<!--1636-->  <DEFAULTVALUE><![CDATA[@SQL= SELECT C_Period_ID FROM C_Period WHERE C_Year_ID IN (SELECT C_Year_ID FROM C_Year WHERE C_Calendar_ID =(SELECT C_Calendar_ID FROM AD_ORG WHERE AD_Client_ID= @AD_Client_ID@ AND AD_ORG_ID=(SELECT AD_ORG_GETCALENDAROWNER( @AD_Org_ID@ ) from dual))) AND to_date( COALESCE(@DateAcct@,@#Date@) ) BETWEEN StartDate AND EndDate AND PeriodType='S' AND exists (select 1 from c_periodcontrol where c_periodcontrol.c_period_id = c_period.c_period_id AND periodstatus = 'O')]]></DEFAULTVALUE>
 <!--1636-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--1636-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--1636-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>