IDEMPIERE-3837 Revenue Recognition - integrate Revenue Recognition implementation from Adaxa
This commit is contained in:
parent
c4af5b6523
commit
fc2d69e8ab
|
@ -0,0 +1,322 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- File = 3820_Revenue_recognition.xml
|
||||||
|
-- Migration Revenue recognition, SeqNo=3820
|
||||||
|
-- Step SeqNo = 10, StepType = AD
|
||||||
|
INSERT INTO AD_Table(AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AccessLevel,Created,CreatedBy,Description,EntityType,IsActive,IsCentrallyMaintained,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy,AD_Table_UU) VALUES (0,0,53888,174,'1',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:39:41'),100,'Plan for recognizing or recording revenue based on service','D','Y','Y','N','Y','N','N','N','135','Revenue Recognition Service','L','C_RevenueRecognition_Service',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:39:41'),100,'833c94dc-3df8-4105-99a6-e224969e01f7');
|
||||||
|
|
||||||
|
-- Step SeqNo = 20, StepType = AD
|
||||||
|
INSERT INTO AD_Sequence(AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy,AD_Sequence_UU) VALUES (0,0,54047,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:39:46'),100,'1000000','50000','Table C_RevenueRecognition_Service','1','Y','N','Y','Y','C_RevenueRecognition_Service','N','1000000',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:39:46'),100,'3681cc25-0bec-40f0-943a-560503ad9e3e');
|
||||||
|
|
||||||
|
-- Step SeqNo = 30, StepType = AD
|
||||||
|
INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,AD_Val_Rule_ID,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('@AD_Client_ID@',74644,53888,'D','1','Y','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:40:47'),'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',0,'N','Y','22','N',19,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:40:47'),129,'N',102,100,'N','N','N','AD_Client_ID','Client/Tenant for this installation.','Client','N',0,'162ba895-dbf1-415a-8263-7afd1698ed42');
|
||||||
|
|
||||||
|
-- Step SeqNo = 40, StepType = AD
|
||||||
|
INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,AD_Val_Rule_ID,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('@AD_Org_ID@',74645,53888,'D','1','Y','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:40:51'),'An organisation is a unit of your client or legal entity - examples are store, department. You can share data between organisations.',0,'N','Y','22','N',19,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:40:51'),130,'N',113,100,'N','N','N','AD_Org_ID','Organisational entity within client','Organisation','N',0,'a0cc2c33-4222-48f5-b976-a1a3aba834ea');
|
||||||
|
|
||||||
|
-- Step SeqNo = 80, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74649,53888,'D','1','Y','N','Y','1',100,'2014-10-28 11:41:06.16','The Revenue Recognition indicates how revenue will be recognized for this product',0,'Y','Y','22','N',19,'2014-10-28 11:41:06.16','N',1078,100,'N','N','N','C_RevenueRecognition_ID','Method for recording revenue','Revenue Recognition','N',0,'4678f5ff-a1cb-4cd4-8803-b1b3e38ad2fc');
|
||||||
|
|
||||||
|
-- Step SeqNo = 90, StepType = AD
|
||||||
|
INSERT INTO AD_Element(AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy,AD_Element_UU) VALUES (0,57527,0,'C_RevenueRecognition_Service_I','2014-10-28 11:41:10.01',100,'D','Y','Revenue Recognition Service','Revenue Recognition Service','2014-10-28 11:41:10.01',100,'11df9ee7-d5b8-44a5-88f2-dedaa9cd44df');
|
||||||
|
|
||||||
|
-- Step SeqNo = 100, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74650,53888,'D','1','Y','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:09'),0,'N','Y','22','N',13,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:09'),'Y',57527,100,'N','N','N','C_RevenueRecognition_Service_I','Revenue Recognition Service','N',0,'ddada063-14b9-4a03-8f4b-6d57a5dd1ce2');
|
||||||
|
|
||||||
|
-- Step SeqNo = 110, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74651,53888,'D','1','Y','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:16'),'The Created field indicates the date that this record was created.',0,'N','Y','7','N',16,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:16'),'N',245,100,'N','N','N','Created','Date this record was created','Created','N',0,'0ed8bf8e-ea79-4233-a370-f51af2839fbb');
|
||||||
|
|
||||||
|
-- Step SeqNo = 120, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74652,53888,'D','1',110,'Y','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:20'),'The Created By field indicates the user who created this record.',0,'N','Y','22','N',18,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:20'),'N',246,100,'N','N','N','CreatedBy','User who created this records','Created By','N',0,'f5eabfcf-d99f-4cee-b0e6-f0fc0ce73e0a');
|
||||||
|
|
||||||
|
-- Step SeqNo = 130, StepType = AD
|
||||||
|
INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('Y',74653,53888,'D','1','Y','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:24'),'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
|
||||||
|
There are two reasons for de-activating and not deleting records:
|
||||||
|
(1) The system requires the record for audit purposes.
|
||||||
|
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',0,'N','Y','1','N',20,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:24'),'N',348,100,'N','Y','N','IsActive','The record is active in the system','Active','N',0,'4496768c-7a55-4d49-9294-45edb4528ff6');
|
||||||
|
|
||||||
|
-- Step SeqNo = 180, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74658,53888,'D','1','Y','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:43'),'The Updated field indicates the date that this record was updated.',0,'N','Y','7','N',16,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:43'),'N',607,100,'N','N','N','Updated','Date this record was updated','Updated','N',0,'9384d25d-e719-4db4-b640-0b14c4ae3e58');
|
||||||
|
|
||||||
|
-- Step SeqNo = 190, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74659,53888,'D','1',110,'Y','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:47'),'The Updated By field indicates the user who updated this record.',0,'N','Y','22','N',18,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:47'),'N',608,100,'N','N','N','UpdatedBy','User who updated this records','Updated By','N',0,'6a938db8-5b02-45a6-a64a-cb3af8e74352');
|
||||||
|
|
||||||
|
-- Step SeqNo = 200, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74660,53888,'D','0','N','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:47:05'),'A description is limited to 255 characters.',0,'N','Y','255','Y',10,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:47:05'),'N',275,100,'N','Y','N','Y','N','Description','Optional short description of the record','Description','N',0,'N','f4c5aef9-310c-4c84-8f23-397c1c185dc2');
|
||||||
|
|
||||||
|
-- Step SeqNo = 210, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74661,53888,'D','0','N','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:48:18'),'The Percent indicates the percentage used.',0,'N','Y','10','N',12,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:48:18'),'N',951,100,'N','Y','N','Y','N','Percent','Percentage','Percent','N',0,'N','82a993ff-84fc-48d1-90cf-278d8932d3d9');
|
||||||
|
|
||||||
|
-- Step SeqNo = 220, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74662,53888,'D','0','N','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:48:54'),'Indicates the unique line for a document. It will also control the display order of the lines within a document.',0,'N','Y','10','N',11,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:48:54'),'N',439,100,'N','Y','N','Y','N','Line','Unique line for this document','Line No','N',0,'N','cec34917-4f48-4420-beb5-1fc18e678ff5');
|
||||||
|
|
||||||
|
-- Step SeqNo = 230, StepType = AD
|
||||||
|
INSERT INTO AD_Tab(AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy,AD_Tab_UU) VALUES (0,74649,0,54010,53888,174,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:07'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Service','N','15','1',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:07'),100,'1318769d-126e-4dff-845a-91986295d34f');
|
||||||
|
|
||||||
|
-- Step SeqNo = 240, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74653,74741,0,54010,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:16'),100,'The record is active in the system','1','D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
|
||||||
|
There are two reasons for de-activating and not deleting records:
|
||||||
|
(1) The system requires the record for audit purposes.
|
||||||
|
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:16'),100,'a9be764b-77e8-43ab-aca6-3d7ebf3a431c');
|
||||||
|
|
||||||
|
-- Step SeqNo = 250, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74644,74742,0,54010,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:19'),100,'Client/Tenant for this installation.','22','D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:19'),100,'89c58d7c-c56a-4325-a7e5-00d6b9993867');
|
||||||
|
|
||||||
|
-- Step SeqNo = 260, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74660,74743,0,54010,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:23'),100,'Optional short description of the record','255','D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:23'),100,'61a18e8d-1a14-4335-abca-d055ec25f634');
|
||||||
|
|
||||||
|
-- Step SeqNo = 270, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74662,74744,0,54010,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:26'),100,'Unique line for this document','10','D','Indicates the unique line for a document. It will also control the display order of the lines within a document.','Y','Y','Y','N','N','N','N','N','Line No',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:26'),100,'30b213d1-479a-41dd-beb3-11ab483119df');
|
||||||
|
|
||||||
|
-- Step SeqNo = 280, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74645,74745,0,54010,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:29'),100,'Organisational entity within client','22','D','An organisation is a unit of your client or legal entity - examples are store, department. You can share data between organisations.','Y','Y','Y','N','N','N','N','N','Organisation',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:29'),100,'769dcd46-ed5e-462e-9c53-cc8ce1761e8c');
|
||||||
|
|
||||||
|
-- Step SeqNo = 290, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74661,74746,0,54010,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:31'),100,'Percentage','10','D','The Percent indicates the percentage used.','Y','Y','Y','N','N','N','N','N','Percent',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:31'),100,'ccfd985b-8d28-4fe7-ad04-b10a331014fe');
|
||||||
|
|
||||||
|
-- Step SeqNo = 300, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74649,74747,0,54010,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:35'),100,'Method for recording revenue','22','D','The Revenue Recognition indicates how revenue will be recognized for this product','Y','Y','Y','N','N','N','N','N','Revenue Recognition',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:35'),100,'335a8b7b-90bf-4436-8c69-cf5225b95be7');
|
||||||
|
|
||||||
|
-- Step SeqNo = 310, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74650,74748,0,54010,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:38'),100,'22','D','Y','Y','N','N','N','N','N','N','Revenue Recognition Service',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:38'),100,'df66a794-719b-426e-82a7-e67bf0b636b5');
|
||||||
|
|
||||||
|
-- Step SeqNo = 320, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayed='N',SeqNo='0' WHERE AD_Field_ID=74741;
|
||||||
|
|
||||||
|
-- Step SeqNo = 330, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='10' WHERE AD_Field_ID=74742;
|
||||||
|
|
||||||
|
-- Step SeqNo = 340, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='20' WHERE AD_Field_ID=74745;
|
||||||
|
|
||||||
|
-- Step SeqNo = 350, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='30' WHERE AD_Field_ID=74747;
|
||||||
|
|
||||||
|
-- Step SeqNo = 360, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='40' WHERE AD_Field_ID=74744;
|
||||||
|
|
||||||
|
-- Step SeqNo = 370, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74746;
|
||||||
|
|
||||||
|
-- Step SeqNo = 380, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74743;
|
||||||
|
|
||||||
|
-- Step SeqNo = 390, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74745;
|
||||||
|
|
||||||
|
-- Step SeqNo = 400, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74746;
|
||||||
|
|
||||||
|
-- Step SeqNo = 410, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=74742;
|
||||||
|
|
||||||
|
-- Step SeqNo = 420, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=74745;
|
||||||
|
|
||||||
|
-- Step SeqNo = 430, StepType = AD
|
||||||
|
UPDATE AD_Tab SET Parent_Column_ID=3918 WHERE AD_Tab_ID=54010;
|
||||||
|
|
||||||
|
-- Step SeqNo = 440, StepType = AD
|
||||||
|
UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MAX(Line),0)+10 FROM C_RevenueRecognition_Service WHERE C_RevenueRecognition_ID=@C_RevenueRecognition_ID@' WHERE AD_Column_ID=74662;
|
||||||
|
|
||||||
|
-- Step SeqNo = 450, StepType = AD
|
||||||
|
UPDATE AD_Tab SET DisplayLogic='@IsTimeBased@=''N''' WHERE AD_Tab_ID=54010;
|
||||||
|
|
||||||
|
-- Step SeqNo = 460, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=4834;
|
||||||
|
|
||||||
|
-- Step SeqNo = 470, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=4832;
|
||||||
|
|
||||||
|
-- Step SeqNo = 480, StepType = AD
|
||||||
|
UPDATE AD_Window SET WinHeight='500',WinWidth='1000' WHERE AD_Window_ID=174;
|
||||||
|
|
||||||
|
-- Step SeqNo = 490, StepType = AD
|
||||||
|
UPDATE AD_Element SET ColumnName='C_RevenueRecog_Service_ID' WHERE AD_Element_ID=57527;
|
||||||
|
|
||||||
|
-- Step SeqNo = 500, StepType = AD
|
||||||
|
UPDATE AD_Table SET TableName='C_RevenueRecog_Service' WHERE AD_Table_ID=53888;
|
||||||
|
|
||||||
|
-- Step SeqNo = 520, StepType = AD
|
||||||
|
INSERT INTO AD_Element(AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy,AD_Element_UU) VALUES (0,57528,0,'DateRecognized',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:14:14'),100,'D','Y','Recognition Date','Recognition Date',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:14:14'),100,'1af0f323-b3d0-4750-9da9-fc96cc248aa6');
|
||||||
|
|
||||||
|
-- Step SeqNo = 530, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74663,444,'D','0','N','N','N','0',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:14:41'),0,'N','Y','7','N',15,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:14:41'),'N',57528,100,'N','Y','N','Y','N','DateRecognized','Recognition Date','N',0,'N','a2a2f66a-e6da-4858-bdae-68f8b3f6798c');
|
||||||
|
|
||||||
|
-- Step SeqNo = 540, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74663,74749,0,379,TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:47:32'),100,'7','D','Y','Y','Y','N','N','N','N','N','Recognition Date',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:47:32'),100,'a27b2876-5b35-4325-9013-6553458347a8');
|
||||||
|
|
||||||
|
-- Step SeqNo = 550, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='0' WHERE AD_Field_ID=4829;
|
||||||
|
|
||||||
|
-- Step SeqNo = 560, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='10' WHERE AD_Field_ID=4830;
|
||||||
|
|
||||||
|
-- Step SeqNo = 570, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='20' WHERE AD_Field_ID=4834;
|
||||||
|
|
||||||
|
-- Step SeqNo = 580, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='30' WHERE AD_Field_ID=4831;
|
||||||
|
|
||||||
|
-- Step SeqNo = 590, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='40' WHERE AD_Field_ID=4835;
|
||||||
|
|
||||||
|
-- Step SeqNo = 600, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74749;
|
||||||
|
|
||||||
|
-- Step SeqNo = 610, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=4832;
|
||||||
|
|
||||||
|
-- Step SeqNo = 620, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=4833;
|
||||||
|
|
||||||
|
-- Step SeqNo = 630, StepType = AD
|
||||||
|
UPDATE AD_Tab SET IsReadOnly='N' WHERE AD_Tab_ID=379;
|
||||||
|
|
||||||
|
-- Step SeqNo = 640, StepType = AD
|
||||||
|
INSERT INTO AD_Process(AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value,AD_Process_UU) VALUES (0,0,53710,'3','org.compiere.process.RevenueRecognition','N',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:14:54'),100,'Generate journal entries based on valid revenue recognition run entries','D','Y','N','N','N','N','Revenue Recognition Run','Y','0','0',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:14:54'),100,'C_RevenueRecognition','48c2742a-be9f-40fb-94eb-85297a7fca49');
|
||||||
|
|
||||||
|
-- Step SeqNo = 650, StepType = AD
|
||||||
|
INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,196,0,53710,55002,18,170,'C_DocType_ID',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:15:43'),100,'D','10','Y','Y','Y','N','Document Type','10',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:15:43'),100,'b21af721-dab7-4632-a49c-a9f3cbef22b1');
|
||||||
|
|
||||||
|
-- Step SeqNo = 660, StepType = AD
|
||||||
|
INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,263,0,53710,55003,15,'DateAcct','2014-10-28 13:16:14.84',100,'D','0','Y','Y','Y','N','Date','20','2014-10-28 13:16:14.84',100,'9d9daf55-fe52-4b7d-896e-6d45880e6566');
|
||||||
|
|
||||||
|
-- Step SeqNo = 670, StepType = AD
|
||||||
|
UPDATE AD_Process_Para SET FieldLength='7' WHERE AD_Process_Para_ID=55003;
|
||||||
|
|
||||||
|
-- Step SeqNo = 680, StepType = AD
|
||||||
|
INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,1078,0,53710,55004,19,'C_RevenueRecognition_ID',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:03'),100,'D','10','Y','Y','N','N','Revenue Recognition','30',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:03'),100,'c5723c3d-419a-406c-a33f-b5edf481e652');
|
||||||
|
|
||||||
|
-- Step SeqNo = 690, StepType = AD
|
||||||
|
INSERT INTO AD_Menu(AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Action,Created,CreatedBy,EntityType,IsActive,IsCentrallyMaintained,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,AD_Menu_UU) VALUES (0,53885,0,53710,'P',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:37'),100,'D','Y','Y','N','N','N','Revenue Recognition Run',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:37'),100,'7e9b6837-4f50-4fb7-b7ae-78bbb2a77ba0');
|
||||||
|
|
||||||
|
-- Step SeqNo = 700, StepType = AD
|
||||||
|
UPDATE AD_Process SET Description='Generate revenue recognition journal',Help='Generate GL journal based on valid revenue recognition run entries' WHERE AD_Process_ID=53710;
|
||||||
|
|
||||||
|
-- Step SeqNo = 710, StepType = AD
|
||||||
|
UPDATE AD_Menu SET Description='Generate revenue recognition journal' WHERE AD_Menu_ID=53885;
|
||||||
|
|
||||||
|
-- Step SeqNo = 720, StepType = AD
|
||||||
|
UPDATE AD_Tab SET OrderByClause='C_RevenueRecognition_Run.C_RevenueRecognition_Run_ID' WHERE AD_Tab_ID=379;
|
||||||
|
|
||||||
|
-- Step SeqNo = 730, StepType = AD
|
||||||
|
UPDATE AD_Tab SET AD_Column_ID=5983 WHERE AD_Tab_ID=379;
|
||||||
|
|
||||||
|
-- Step SeqNo = 740, StepType = SQL
|
||||||
|
--ALTER TABLE c_revenuerecognition_run ALTER COLUMN gl_journal_id DROP NOT NULL;
|
||||||
|
|
||||||
|
|
||||||
|
-- File = 3830_revenue_recognition_process.xml
|
||||||
|
-- Migration Revenue recognition process, SeqNo=3830
|
||||||
|
-- Step SeqNo = 10, StepType = AD
|
||||||
|
--INSERT INTO AD_Process(AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value,AD_Process_UU) VALUES (0,0,53710,'3','org.compiere.process.RevenueRecognition','N',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:14:54'),100,'Generate journal entries based on valid revenue recognition run entries','D','Y','N','N','N','N','Revenue Recognition Run','Y','0','0',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:14:54'),100,'C_RevenueRecognition','6b4adee2-46d2-422e-9dc7-4ab88b4caacb');
|
||||||
|
|
||||||
|
-- Step SeqNo = 20, StepType = AD
|
||||||
|
--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,196,0,53710,55002,18,170,'C_DocType_ID',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:15:43'),100,'D','10','Y','Y','Y','N','Document Type','10',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:15:43'),100,'e96484b3-b7de-4217-9337-be9ff72da09b');
|
||||||
|
|
||||||
|
-- Step SeqNo = 30, StepType = AD
|
||||||
|
--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,263,0,53710,55003,15,'DateAcct','2014-10-28 13:16:14.84',100,'D','0','Y','Y','Y','N','Date','20','2014-10-28 13:16:14.84',100,'c0f66c1a-59b6-4e54-a09e-cd9fc6acf4bc');
|
||||||
|
|
||||||
|
-- Step SeqNo = 40, StepType = AD
|
||||||
|
--UPDATE AD_Process_Para SET FieldLength='7' WHERE AD_Process_Para_ID=55003;
|
||||||
|
|
||||||
|
-- Step SeqNo = 50, StepType = AD
|
||||||
|
--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,1078,0,53710,55004,19,'C_RevenueRecognition_ID',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:03'),100,'D','10','Y','Y','N','N','Revenue Recognition','30',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:03'),100,'ef1332d8-a888-43fb-b0d8-99ff37e05ac0');
|
||||||
|
|
||||||
|
-- Step SeqNo = 60, StepType = AD
|
||||||
|
--INSERT INTO AD_Menu(AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Action,Created,CreatedBy,EntityType,IsActive,IsCentrallyMaintained,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,AD_Menu_UU) VALUES (0,53885,0,53710,'P',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:37'),100,'D','Y','Y','N','N','N','Revenue Recognition Run',TO_DATE('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:37'),100,'63ae1179-1642-4529-ad26-0cfa0f4226c6');
|
||||||
|
|
||||||
|
-- Step SeqNo = 70, StepType = AD
|
||||||
|
UPDATE AD_Process SET Description='Generate revenue recognition journal',Help='Generate GL journal based on valid revenue recognition run entries' WHERE AD_Process_ID=53710;
|
||||||
|
|
||||||
|
-- Step SeqNo = 80, StepType = AD
|
||||||
|
UPDATE AD_Menu SET Description='Generate revenue recognition journal' WHERE AD_Menu_ID=53885;
|
||||||
|
|
||||||
|
-- File = 4760_Rev_recog_update.xml
|
||||||
|
-- Migration Revenue recognition changes, SeqNo=4760
|
||||||
|
-- Step SeqNo = 10, StepType = AD
|
||||||
|
UPDATE AD_Column SET IsMandatory='N' WHERE AD_Column_ID=5984;
|
||||||
|
|
||||||
|
-- Step SeqNo = 20, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayed='Y',SeqNo='40' WHERE AD_Field_ID=74741;
|
||||||
|
|
||||||
|
-- Step SeqNo = 30, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74744;
|
||||||
|
|
||||||
|
-- Step SeqNo = 40, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74746;
|
||||||
|
|
||||||
|
-- Step SeqNo = 50, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=74743;
|
||||||
|
|
||||||
|
-- Step SeqNo = 60, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74741;
|
||||||
|
|
||||||
|
-- Step SeqNo = 70, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74742;
|
||||||
|
|
||||||
|
-- Step SeqNo = 80, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74745;
|
||||||
|
|
||||||
|
-- Step SeqNo = 90, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74747;
|
||||||
|
|
||||||
|
-- Step SeqNo = 100, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74741;
|
||||||
|
|
||||||
|
-- Step SeqNo = 110, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74744;
|
||||||
|
|
||||||
|
-- Step SeqNo = 120, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74746;
|
||||||
|
|
||||||
|
-- Step SeqNo = 130, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74743;
|
||||||
|
|
||||||
|
-- Step SeqNo = 140, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74749;
|
||||||
|
|
||||||
|
-- Step SeqNo = 150, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSecure,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,IsActive,Created,UpdatedBy,AD_Column_ID,AD_Org_ID,AD_Column_UU) VALUES (444,'D','0','N','N','N','0','N','10','N',19,'N','N','N',57527,'N','Y','N','Y','N','C_RevenueRecog_Service_ID','Revenue Recognition Service','Y',100,'2015-08-26 00:38:16.28',0,'Y','2015-08-26 00:38:16.28',100,77928,0,'e3f17477-6545-4694-bac4-6280147344f3');
|
||||||
|
|
||||||
|
-- Step SeqNo = 160, StepType = AD
|
||||||
|
INSERT INTO AD_Field(IsEncrypted,Created,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,IsReadOnly,EntityType,Name,UpdatedBy,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Field_ID,AD_Org_ID,AD_Field_UU) VALUES ('N',TO_DATE('yyyy-mm-dd HH24:MI:SS','2015-08-26 00:38:27'),'10','Y','N','N',77928,'N','Y',379,'N','D','Revenue Recognition Service',100,'Y',0,100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2015-08-26 00:38:27'),77047,0,'a186c69e-44d7-45dc-a461-98dfd8238f1c');
|
||||||
|
|
||||||
|
-- Step SeqNo = 170, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=77047;
|
||||||
|
|
||||||
|
-- Step SeqNo = 180, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74749;
|
||||||
|
|
||||||
|
-- Step SeqNo = 190, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=4832;
|
||||||
|
|
||||||
|
-- Step SeqNo = 200, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='80' WHERE AD_Field_ID=4833;
|
||||||
|
|
||||||
|
-- Step SeqNo = 210, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=77047;
|
||||||
|
|
||||||
|
-- Step SeqNo = 220, StepType = AD
|
||||||
|
UPDATE AD_Column SET IsIdentifier='Y',SeqNo='2' WHERE AD_Column_ID=74662;
|
||||||
|
|
||||||
|
-- Step SeqNo = 230, StepType = AD
|
||||||
|
UPDATE AD_Column SET IsIdentifier='Y',SeqNo='3' WHERE AD_Column_ID=74660;
|
||||||
|
|
||||||
|
-- Step SeqNo = 240, StepType = AD
|
||||||
|
INSERT INTO AD_Element(ColumnName,AD_Client_ID,Help,EntityType,Name,Description,PrintName,Created,Updated,IsActive,CreatedBy,UpdatedBy,AD_Element_ID,AD_Org_ID,AD_Element_UU) VALUES ('FixedRecogDay',0,'The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','D','Fixed recognition day','Day of the period recognition occurs','Fixed recognition day','2015-08-26 11:13:46.83','2015-08-26 11:13:46.83','Y',100,100,58294,0,'06ed8fd6-89bf-4596-9a7a-6040bf80cebf');
|
||||||
|
|
||||||
|
-- Step SeqNo = 250, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSecure,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,IsActive,Created,UpdatedBy,AD_Column_ID,AD_Org_ID,AD_Column_UU) VALUES (336,'D','0','N','N','N','0','The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','N','22','N',11,'N','N','N',58294,'N','Y','N','Y','N','FixedRecogDay','Day of the period recognition occurs','Fixed recognition day','Y',100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2015-08-26 11:14:02'),0,'Y',TO_DATE('yyyy-mm-dd HH24:MI:SS','2015-08-26 11:14:02'),100,77929,0,'8ec4b7bc-4426-44c1-b42c-6f4be1ee02bd');
|
||||||
|
|
||||||
|
-- Step SeqNo = 260, StepType = AD
|
||||||
|
INSERT INTO AD_Field(IsEncrypted,Created,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Field_ID,AD_Org_ID,AD_Field_UU) VALUES ('N',TO_DATE('yyyy-mm-dd HH24:MI:SS','2015-08-26 11:14:16'),'22','Y','N','N',77929,'N','Y',272,'N','The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','D','Day of the period recognition occurs','Fixed recognition day',100,'Y',0,100,TO_DATE('yyyy-mm-dd HH24:MI:SS','2015-08-26 11:14:16'),77048,0,'d361f6e4-0597-4ab6-b511-cfdda309ed36');
|
||||||
|
|
||||||
|
-- Step SeqNo = 270, StepType = AD
|
||||||
|
UPDATE AD_Field SET DisplayLogic='@IsTimeBased@=Y' WHERE AD_Field_ID=77048;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201811271750_RevenueRecognitionAdaxa.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,319 @@
|
||||||
|
-- File = 3820_Revenue_recognition.xml
|
||||||
|
-- Migration Revenue recognition, SeqNo=3820
|
||||||
|
-- Step SeqNo = 10, StepType = AD
|
||||||
|
INSERT INTO AD_Table(AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AccessLevel,Created,CreatedBy,Description,EntityType,IsActive,IsCentrallyMaintained,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy,AD_Table_UU) VALUES (0,0,53888,174,'1',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:39:41'),100,'Plan for recognizing or recording revenue based on service','D','Y','Y','N','Y','N','N','N','135','Revenue Recognition Service','L','C_RevenueRecognition_Service',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:39:41'),100,'833c94dc-3df8-4105-99a6-e224969e01f7');
|
||||||
|
|
||||||
|
-- Step SeqNo = 20, StepType = AD
|
||||||
|
INSERT INTO AD_Sequence(AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy,AD_Sequence_UU) VALUES (0,0,54047,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:39:46'),100,'1000000','50000','Table C_RevenueRecognition_Service','1','Y','N','Y','Y','C_RevenueRecognition_Service','N','1000000',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:39:46'),100,'3681cc25-0bec-40f0-943a-560503ad9e3e');
|
||||||
|
|
||||||
|
-- Step SeqNo = 30, StepType = AD
|
||||||
|
INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,AD_Val_Rule_ID,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('@AD_Client_ID@',74644,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:40:47'),'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',0,'N','Y','22','N',19,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:40:47'),129,'N',102,100,'N','N','N','AD_Client_ID','Client/Tenant for this installation.','Client','N',0,'162ba895-dbf1-415a-8263-7afd1698ed42');
|
||||||
|
|
||||||
|
-- Step SeqNo = 40, StepType = AD
|
||||||
|
INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,AD_Val_Rule_ID,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('@AD_Org_ID@',74645,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:40:51'),'An organisation is a unit of your client or legal entity - examples are store, department. You can share data between organisations.',0,'N','Y','22','N',19,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:40:51'),130,'N',113,100,'N','N','N','AD_Org_ID','Organisational entity within client','Organisation','N',0,'a0cc2c33-4222-48f5-b976-a1a3aba834ea');
|
||||||
|
|
||||||
|
-- Step SeqNo = 80, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74649,53888,'D','1','Y','N','Y','1',100,'2014-10-28 11:41:06.16','The Revenue Recognition indicates how revenue will be recognized for this product',0,'Y','Y','22','N',19,'2014-10-28 11:41:06.16','N',1078,100,'N','N','N','C_RevenueRecognition_ID','Method for recording revenue','Revenue Recognition','N',0,'4678f5ff-a1cb-4cd4-8803-b1b3e38ad2fc');
|
||||||
|
|
||||||
|
-- Step SeqNo = 90, StepType = AD
|
||||||
|
INSERT INTO AD_Element(AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy,AD_Element_UU) VALUES (0,57527,0,'C_RevenueRecognition_Service_I','2014-10-28 11:41:10.01',100,'D','Y','Revenue Recognition Service','Revenue Recognition Service','2014-10-28 11:41:10.01',100,'11df9ee7-d5b8-44a5-88f2-dedaa9cd44df');
|
||||||
|
|
||||||
|
-- Step SeqNo = 100, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74650,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:09'),0,'N','Y','22','N',13,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:09'),'Y',57527,100,'N','N','N','C_RevenueRecognition_Service_I','Revenue Recognition Service','N',0,'ddada063-14b9-4a03-8f4b-6d57a5dd1ce2');
|
||||||
|
|
||||||
|
-- Step SeqNo = 110, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74651,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:16'),'The Created field indicates the date that this record was created.',0,'N','Y','7','N',16,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:16'),'N',245,100,'N','N','N','Created','Date this record was created','Created','N',0,'0ed8bf8e-ea79-4233-a370-f51af2839fbb');
|
||||||
|
|
||||||
|
-- Step SeqNo = 120, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74652,53888,'D','1',110,'Y','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:20'),'The Created By field indicates the user who created this record.',0,'N','Y','22','N',18,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:20'),'N',246,100,'N','N','N','CreatedBy','User who created this records','Created By','N',0,'f5eabfcf-d99f-4cee-b0e6-f0fc0ce73e0a');
|
||||||
|
|
||||||
|
-- Step SeqNo = 130, StepType = AD
|
||||||
|
INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('Y',74653,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:24'),'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
|
||||||
|
There are two reasons for de-activating and not deleting records:
|
||||||
|
(1) The system requires the record for audit purposes.
|
||||||
|
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',0,'N','Y','1','N',20,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:24'),'N',348,100,'N','Y','N','IsActive','The record is active in the system','Active','N',0,'4496768c-7a55-4d49-9294-45edb4528ff6');
|
||||||
|
|
||||||
|
-- Step SeqNo = 180, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74658,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:43'),'The Updated field indicates the date that this record was updated.',0,'N','Y','7','N',16,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:43'),'N',607,100,'N','N','N','Updated','Date this record was updated','Updated','N',0,'9384d25d-e719-4db4-b640-0b14c4ae3e58');
|
||||||
|
|
||||||
|
-- Step SeqNo = 190, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74659,53888,'D','1',110,'Y','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:47'),'The Updated By field indicates the user who updated this record.',0,'N','Y','22','N',18,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:41:47'),'N',608,100,'N','N','N','UpdatedBy','User who updated this records','Updated By','N',0,'6a938db8-5b02-45a6-a64a-cb3af8e74352');
|
||||||
|
|
||||||
|
-- Step SeqNo = 200, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74660,53888,'D','0','N','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:47:05'),'A description is limited to 255 characters.',0,'N','Y','255','Y',10,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:47:05'),'N',275,100,'N','Y','N','Y','N','Description','Optional short description of the record','Description','N',0,'N','f4c5aef9-310c-4c84-8f23-397c1c185dc2');
|
||||||
|
|
||||||
|
-- Step SeqNo = 210, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74661,53888,'D','0','N','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:48:18'),'The Percent indicates the percentage used.',0,'N','Y','10','N',12,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:48:18'),'N',951,100,'N','Y','N','Y','N','Percent','Percentage','Percent','N',0,'N','82a993ff-84fc-48d1-90cf-278d8932d3d9');
|
||||||
|
|
||||||
|
-- Step SeqNo = 220, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74662,53888,'D','0','N','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:48:54'),'Indicates the unique line for a document. It will also control the display order of the lines within a document.',0,'N','Y','10','N',11,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:48:54'),'N',439,100,'N','Y','N','Y','N','Line','Unique line for this document','Line No','N',0,'N','cec34917-4f48-4420-beb5-1fc18e678ff5');
|
||||||
|
|
||||||
|
-- Step SeqNo = 230, StepType = AD
|
||||||
|
INSERT INTO AD_Tab(AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy,AD_Tab_UU) VALUES (0,74649,0,54010,53888,174,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:07'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Service','N','15','1',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:07'),100,'1318769d-126e-4dff-845a-91986295d34f');
|
||||||
|
|
||||||
|
-- Step SeqNo = 240, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74653,74741,0,54010,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:16'),100,'The record is active in the system','1','D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
|
||||||
|
There are two reasons for de-activating and not deleting records:
|
||||||
|
(1) The system requires the record for audit purposes.
|
||||||
|
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:16'),100,'a9be764b-77e8-43ab-aca6-3d7ebf3a431c');
|
||||||
|
|
||||||
|
-- Step SeqNo = 250, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74644,74742,0,54010,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:19'),100,'Client/Tenant for this installation.','22','D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:19'),100,'89c58d7c-c56a-4325-a7e5-00d6b9993867');
|
||||||
|
|
||||||
|
-- Step SeqNo = 260, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74660,74743,0,54010,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:23'),100,'Optional short description of the record','255','D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:23'),100,'61a18e8d-1a14-4335-abca-d055ec25f634');
|
||||||
|
|
||||||
|
-- Step SeqNo = 270, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74662,74744,0,54010,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:26'),100,'Unique line for this document','10','D','Indicates the unique line for a document. It will also control the display order of the lines within a document.','Y','Y','Y','N','N','N','N','N','Line No',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:26'),100,'30b213d1-479a-41dd-beb3-11ab483119df');
|
||||||
|
|
||||||
|
-- Step SeqNo = 280, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74645,74745,0,54010,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:29'),100,'Organisational entity within client','22','D','An organisation is a unit of your client or legal entity - examples are store, department. You can share data between organisations.','Y','Y','Y','N','N','N','N','N','Organisation',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:29'),100,'769dcd46-ed5e-462e-9c53-cc8ce1761e8c');
|
||||||
|
|
||||||
|
-- Step SeqNo = 290, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74661,74746,0,54010,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:31'),100,'Percentage','10','D','The Percent indicates the percentage used.','Y','Y','Y','N','N','N','N','N','Percent',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:31'),100,'ccfd985b-8d28-4fe7-ad04-b10a331014fe');
|
||||||
|
|
||||||
|
-- Step SeqNo = 300, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74649,74747,0,54010,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:35'),100,'Method for recording revenue','22','D','The Revenue Recognition indicates how revenue will be recognized for this product','Y','Y','Y','N','N','N','N','N','Revenue Recognition',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:35'),100,'335a8b7b-90bf-4436-8c69-cf5225b95be7');
|
||||||
|
|
||||||
|
-- Step SeqNo = 310, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74650,74748,0,54010,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:38'),100,'22','D','Y','Y','N','N','N','N','N','N','Revenue Recognition Service',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 11:51:38'),100,'df66a794-719b-426e-82a7-e67bf0b636b5');
|
||||||
|
|
||||||
|
-- Step SeqNo = 320, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayed='N',SeqNo='0' WHERE AD_Field_ID=74741;
|
||||||
|
|
||||||
|
-- Step SeqNo = 330, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='10' WHERE AD_Field_ID=74742;
|
||||||
|
|
||||||
|
-- Step SeqNo = 340, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='20' WHERE AD_Field_ID=74745;
|
||||||
|
|
||||||
|
-- Step SeqNo = 350, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='30' WHERE AD_Field_ID=74747;
|
||||||
|
|
||||||
|
-- Step SeqNo = 360, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='40' WHERE AD_Field_ID=74744;
|
||||||
|
|
||||||
|
-- Step SeqNo = 370, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74746;
|
||||||
|
|
||||||
|
-- Step SeqNo = 380, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74743;
|
||||||
|
|
||||||
|
-- Step SeqNo = 390, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74745;
|
||||||
|
|
||||||
|
-- Step SeqNo = 400, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74746;
|
||||||
|
|
||||||
|
-- Step SeqNo = 410, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=74742;
|
||||||
|
|
||||||
|
-- Step SeqNo = 420, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=74745;
|
||||||
|
|
||||||
|
-- Step SeqNo = 430, StepType = AD
|
||||||
|
UPDATE AD_Tab SET Parent_Column_ID=3918 WHERE AD_Tab_ID=54010;
|
||||||
|
|
||||||
|
-- Step SeqNo = 440, StepType = AD
|
||||||
|
UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MAX(Line),0)+10 FROM C_RevenueRecognition_Service WHERE C_RevenueRecognition_ID=@C_RevenueRecognition_ID@' WHERE AD_Column_ID=74662;
|
||||||
|
|
||||||
|
-- Step SeqNo = 450, StepType = AD
|
||||||
|
UPDATE AD_Tab SET DisplayLogic='@IsTimeBased@=''N''' WHERE AD_Tab_ID=54010;
|
||||||
|
|
||||||
|
-- Step SeqNo = 460, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=4834;
|
||||||
|
|
||||||
|
-- Step SeqNo = 470, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=4832;
|
||||||
|
|
||||||
|
-- Step SeqNo = 480, StepType = AD
|
||||||
|
UPDATE AD_Window SET WinHeight='500',WinWidth='1000' WHERE AD_Window_ID=174;
|
||||||
|
|
||||||
|
-- Step SeqNo = 490, StepType = AD
|
||||||
|
UPDATE AD_Element SET ColumnName='C_RevenueRecog_Service_ID' WHERE AD_Element_ID=57527;
|
||||||
|
|
||||||
|
-- Step SeqNo = 500, StepType = AD
|
||||||
|
UPDATE AD_Table SET TableName='C_RevenueRecog_Service' WHERE AD_Table_ID=53888;
|
||||||
|
|
||||||
|
-- Step SeqNo = 520, StepType = AD
|
||||||
|
INSERT INTO AD_Element(AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy,AD_Element_UU) VALUES (0,57528,0,'DateRecognized',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:14:14'),100,'D','Y','Recognition Date','Recognition Date',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:14:14'),100,'1af0f323-b3d0-4750-9da9-fc96cc248aa6');
|
||||||
|
|
||||||
|
-- Step SeqNo = 530, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74663,444,'D','0','N','N','N','0',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:14:41'),0,'N','Y','7','N',15,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:14:41'),'N',57528,100,'N','Y','N','Y','N','DateRecognized','Recognition Date','N',0,'N','a2a2f66a-e6da-4858-bdae-68f8b3f6798c');
|
||||||
|
|
||||||
|
-- Step SeqNo = 540, StepType = AD
|
||||||
|
INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74663,74749,0,379,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:47:32'),100,'7','D','Y','Y','Y','N','N','N','N','N','Recognition Date',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 12:47:32'),100,'a27b2876-5b35-4325-9013-6553458347a8');
|
||||||
|
|
||||||
|
-- Step SeqNo = 550, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='0' WHERE AD_Field_ID=4829;
|
||||||
|
|
||||||
|
-- Step SeqNo = 560, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='10' WHERE AD_Field_ID=4830;
|
||||||
|
|
||||||
|
-- Step SeqNo = 570, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='20' WHERE AD_Field_ID=4834;
|
||||||
|
|
||||||
|
-- Step SeqNo = 580, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='30' WHERE AD_Field_ID=4831;
|
||||||
|
|
||||||
|
-- Step SeqNo = 590, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='40' WHERE AD_Field_ID=4835;
|
||||||
|
|
||||||
|
-- Step SeqNo = 600, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74749;
|
||||||
|
|
||||||
|
-- Step SeqNo = 610, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=4832;
|
||||||
|
|
||||||
|
-- Step SeqNo = 620, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=4833;
|
||||||
|
|
||||||
|
-- Step SeqNo = 630, StepType = AD
|
||||||
|
UPDATE AD_Tab SET IsReadOnly='N' WHERE AD_Tab_ID=379;
|
||||||
|
|
||||||
|
-- Step SeqNo = 640, StepType = AD
|
||||||
|
INSERT INTO AD_Process(AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value,AD_Process_UU) VALUES (0,0,53710,'3','org.compiere.process.RevenueRecognition','N',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:14:54'),100,'Generate journal entries based on valid revenue recognition run entries','D','Y','N','N','N','N','Revenue Recognition Run','Y','0','0',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:14:54'),100,'C_RevenueRecognition','48c2742a-be9f-40fb-94eb-85297a7fca49');
|
||||||
|
|
||||||
|
-- Step SeqNo = 650, StepType = AD
|
||||||
|
INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,196,0,53710,55002,18,170,'C_DocType_ID',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:15:43'),100,'D','10','Y','Y','Y','N','Document Type','10',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:15:43'),100,'b21af721-dab7-4632-a49c-a9f3cbef22b1');
|
||||||
|
|
||||||
|
-- Step SeqNo = 660, StepType = AD
|
||||||
|
INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,263,0,53710,55003,15,'DateAcct','2014-10-28 13:16:14.84',100,'D','0','Y','Y','Y','N','Date','20','2014-10-28 13:16:14.84',100,'9d9daf55-fe52-4b7d-896e-6d45880e6566');
|
||||||
|
|
||||||
|
-- Step SeqNo = 670, StepType = AD
|
||||||
|
UPDATE AD_Process_Para SET FieldLength='7' WHERE AD_Process_Para_ID=55003;
|
||||||
|
|
||||||
|
-- Step SeqNo = 680, StepType = AD
|
||||||
|
INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,1078,0,53710,55004,19,'C_RevenueRecognition_ID',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:03'),100,'D','10','Y','Y','N','N','Revenue Recognition','30',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:03'),100,'c5723c3d-419a-406c-a33f-b5edf481e652');
|
||||||
|
|
||||||
|
-- Step SeqNo = 690, StepType = AD
|
||||||
|
INSERT INTO AD_Menu(AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Action,Created,CreatedBy,EntityType,IsActive,IsCentrallyMaintained,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,AD_Menu_UU) VALUES (0,53885,0,53710,'P',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:37'),100,'D','Y','Y','N','N','N','Revenue Recognition Run',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:37'),100,'7e9b6837-4f50-4fb7-b7ae-78bbb2a77ba0');
|
||||||
|
|
||||||
|
-- Step SeqNo = 700, StepType = AD
|
||||||
|
UPDATE AD_Process SET Description='Generate revenue recognition journal',Help='Generate GL journal based on valid revenue recognition run entries' WHERE AD_Process_ID=53710;
|
||||||
|
|
||||||
|
-- Step SeqNo = 710, StepType = AD
|
||||||
|
UPDATE AD_Menu SET Description='Generate revenue recognition journal' WHERE AD_Menu_ID=53885;
|
||||||
|
|
||||||
|
-- Step SeqNo = 720, StepType = AD
|
||||||
|
UPDATE AD_Tab SET OrderByClause='C_RevenueRecognition_Run.C_RevenueRecognition_Run_ID' WHERE AD_Tab_ID=379;
|
||||||
|
|
||||||
|
-- Step SeqNo = 730, StepType = AD
|
||||||
|
UPDATE AD_Tab SET AD_Column_ID=5983 WHERE AD_Tab_ID=379;
|
||||||
|
|
||||||
|
-- Step SeqNo = 740, StepType = SQL
|
||||||
|
--ALTER TABLE c_revenuerecognition_run ALTER COLUMN gl_journal_id DROP NOT NULL;
|
||||||
|
|
||||||
|
|
||||||
|
-- File = 3830_revenue_recognition_process.xml
|
||||||
|
-- Migration Revenue recognition process, SeqNo=3830
|
||||||
|
-- Step SeqNo = 10, StepType = AD
|
||||||
|
--INSERT INTO AD_Process(AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value,AD_Process_UU) VALUES (0,0,53710,'3','org.compiere.process.RevenueRecognition','N',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:14:54'),100,'Generate journal entries based on valid revenue recognition run entries','D','Y','N','N','N','N','Revenue Recognition Run','Y','0','0',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:14:54'),100,'C_RevenueRecognition','6b4adee2-46d2-422e-9dc7-4ab88b4caacb');
|
||||||
|
|
||||||
|
-- Step SeqNo = 20, StepType = AD
|
||||||
|
--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,196,0,53710,55002,18,170,'C_DocType_ID',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:15:43'),100,'D','10','Y','Y','Y','N','Document Type','10',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:15:43'),100,'e96484b3-b7de-4217-9337-be9ff72da09b');
|
||||||
|
|
||||||
|
-- Step SeqNo = 30, StepType = AD
|
||||||
|
--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,263,0,53710,55003,15,'DateAcct','2014-10-28 13:16:14.84',100,'D','0','Y','Y','Y','N','Date','20','2014-10-28 13:16:14.84',100,'c0f66c1a-59b6-4e54-a09e-cd9fc6acf4bc');
|
||||||
|
|
||||||
|
-- Step SeqNo = 40, StepType = AD
|
||||||
|
--UPDATE AD_Process_Para SET FieldLength='7' WHERE AD_Process_Para_ID=55003;
|
||||||
|
|
||||||
|
-- Step SeqNo = 50, StepType = AD
|
||||||
|
--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,1078,0,53710,55004,19,'C_RevenueRecognition_ID',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:03'),100,'D','10','Y','Y','N','N','Revenue Recognition','30',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:03'),100,'ef1332d8-a888-43fb-b0d8-99ff37e05ac0');
|
||||||
|
|
||||||
|
-- Step SeqNo = 60, StepType = AD
|
||||||
|
--INSERT INTO AD_Menu(AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Action,Created,CreatedBy,EntityType,IsActive,IsCentrallyMaintained,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,AD_Menu_UU) VALUES (0,53885,0,53710,'P',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:37'),100,'D','Y','Y','N','N','N','Revenue Recognition Run',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2014-10-28 13:17:37'),100,'63ae1179-1642-4529-ad26-0cfa0f4226c6');
|
||||||
|
|
||||||
|
-- Step SeqNo = 70, StepType = AD
|
||||||
|
UPDATE AD_Process SET Description='Generate revenue recognition journal',Help='Generate GL journal based on valid revenue recognition run entries' WHERE AD_Process_ID=53710;
|
||||||
|
|
||||||
|
-- Step SeqNo = 80, StepType = AD
|
||||||
|
UPDATE AD_Menu SET Description='Generate revenue recognition journal' WHERE AD_Menu_ID=53885;
|
||||||
|
|
||||||
|
-- File = 4760_Rev_recog_update.xml
|
||||||
|
-- Migration Revenue recognition changes, SeqNo=4760
|
||||||
|
-- Step SeqNo = 10, StepType = AD
|
||||||
|
UPDATE AD_Column SET IsMandatory='N' WHERE AD_Column_ID=5984;
|
||||||
|
|
||||||
|
-- Step SeqNo = 20, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayed='Y',SeqNo='40' WHERE AD_Field_ID=74741;
|
||||||
|
|
||||||
|
-- Step SeqNo = 30, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74744;
|
||||||
|
|
||||||
|
-- Step SeqNo = 40, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74746;
|
||||||
|
|
||||||
|
-- Step SeqNo = 50, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=74743;
|
||||||
|
|
||||||
|
-- Step SeqNo = 60, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74741;
|
||||||
|
|
||||||
|
-- Step SeqNo = 70, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74742;
|
||||||
|
|
||||||
|
-- Step SeqNo = 80, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74745;
|
||||||
|
|
||||||
|
-- Step SeqNo = 90, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74747;
|
||||||
|
|
||||||
|
-- Step SeqNo = 100, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74741;
|
||||||
|
|
||||||
|
-- Step SeqNo = 110, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74744;
|
||||||
|
|
||||||
|
-- Step SeqNo = 120, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74746;
|
||||||
|
|
||||||
|
-- Step SeqNo = 130, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74743;
|
||||||
|
|
||||||
|
-- Step SeqNo = 140, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74749;
|
||||||
|
|
||||||
|
-- Step SeqNo = 150, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSecure,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,IsActive,Created,UpdatedBy,AD_Column_ID,AD_Org_ID,AD_Column_UU) VALUES (444,'D','0','N','N','N','0','N','10','N',19,'N','N','N',57527,'N','Y','N','Y','N','C_RevenueRecog_Service_ID','Revenue Recognition Service','Y',100,'2015-08-26 00:38:16.28',0,'Y','2015-08-26 00:38:16.28',100,77928,0,'e3f17477-6545-4694-bac4-6280147344f3');
|
||||||
|
|
||||||
|
-- Step SeqNo = 160, StepType = AD
|
||||||
|
INSERT INTO AD_Field(IsEncrypted,Created,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,IsReadOnly,EntityType,Name,UpdatedBy,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Field_ID,AD_Org_ID,AD_Field_UU) VALUES ('N',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2015-08-26 00:38:27'),'10','Y','N','N',77928,'N','Y',379,'N','D','Revenue Recognition Service',100,'Y',0,100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2015-08-26 00:38:27'),77047,0,'a186c69e-44d7-45dc-a461-98dfd8238f1c');
|
||||||
|
|
||||||
|
-- Step SeqNo = 170, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=77047;
|
||||||
|
|
||||||
|
-- Step SeqNo = 180, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74749;
|
||||||
|
|
||||||
|
-- Step SeqNo = 190, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=4832;
|
||||||
|
|
||||||
|
-- Step SeqNo = 200, StepType = AD
|
||||||
|
UPDATE AD_Field SET SeqNo='80' WHERE AD_Field_ID=4833;
|
||||||
|
|
||||||
|
-- Step SeqNo = 210, StepType = AD
|
||||||
|
UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=77047;
|
||||||
|
|
||||||
|
-- Step SeqNo = 220, StepType = AD
|
||||||
|
UPDATE AD_Column SET IsIdentifier='Y',SeqNo='2' WHERE AD_Column_ID=74662;
|
||||||
|
|
||||||
|
-- Step SeqNo = 230, StepType = AD
|
||||||
|
UPDATE AD_Column SET IsIdentifier='Y',SeqNo='3' WHERE AD_Column_ID=74660;
|
||||||
|
|
||||||
|
-- Step SeqNo = 240, StepType = AD
|
||||||
|
INSERT INTO AD_Element(ColumnName,AD_Client_ID,Help,EntityType,Name,Description,PrintName,Created,Updated,IsActive,CreatedBy,UpdatedBy,AD_Element_ID,AD_Org_ID,AD_Element_UU) VALUES ('FixedRecogDay',0,'The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','D','Fixed recognition day','Day of the period recognition occurs','Fixed recognition day','2015-08-26 11:13:46.83','2015-08-26 11:13:46.83','Y',100,100,58294,0,'06ed8fd6-89bf-4596-9a7a-6040bf80cebf');
|
||||||
|
|
||||||
|
-- Step SeqNo = 250, StepType = AD
|
||||||
|
INSERT INTO AD_Column(AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSecure,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,IsActive,Created,UpdatedBy,AD_Column_ID,AD_Org_ID,AD_Column_UU) VALUES (336,'D','0','N','N','N','0','The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','N','22','N',11,'N','N','N',58294,'N','Y','N','Y','N','FixedRecogDay','Day of the period recognition occurs','Fixed recognition day','Y',100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2015-08-26 11:14:02'),0,'Y',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2015-08-26 11:14:02'),100,77929,0,'8ec4b7bc-4426-44c1-b42c-6f4be1ee02bd');
|
||||||
|
|
||||||
|
-- Step SeqNo = 260, StepType = AD
|
||||||
|
INSERT INTO AD_Field(IsEncrypted,Created,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Field_ID,AD_Org_ID,AD_Field_UU) VALUES ('N',TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2015-08-26 11:14:16'),'22','Y','N','N',77929,'N','Y',272,'N','The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','D','Day of the period recognition occurs','Fixed recognition day',100,'Y',0,100,TO_TIMESTAMP('yyyy-mm-dd HH24:MI:SS','2015-08-26 11:14:16'),77048,0,'d361f6e4-0597-4ab6-b511-cfdda309ed36');
|
||||||
|
|
||||||
|
-- Step SeqNo = 270, StepType = AD
|
||||||
|
UPDATE AD_Field SET DisplayLogic='@IsTimeBased@=Y' WHERE AD_Field_ID=77048;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201811271750_RevenueRecognitionAdaxa.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,215 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.process;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.compiere.model.MAcctSchema;
|
||||||
|
import org.compiere.model.MConversionType;
|
||||||
|
import org.compiere.model.MDocType;
|
||||||
|
import org.compiere.model.MGLCategory;
|
||||||
|
import org.compiere.model.MInvoice;
|
||||||
|
import org.compiere.model.MInvoiceLine;
|
||||||
|
import org.compiere.model.MJournal;
|
||||||
|
import org.compiere.model.MJournalBatch;
|
||||||
|
import org.compiere.model.MJournalLine;
|
||||||
|
import org.compiere.model.MOrg;
|
||||||
|
import org.compiere.model.MRevenueRecognitionRun;
|
||||||
|
import org.compiere.model.Query;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public class RevenueRecognition extends SvrProcess
|
||||||
|
{
|
||||||
|
/** The date to calculate the days due from */
|
||||||
|
private Timestamp p_Date = null;
|
||||||
|
/** GL Document Type */
|
||||||
|
private int p_C_DocType_ID = 0;
|
||||||
|
|
||||||
|
/** Recognition Type */
|
||||||
|
private int p_C_RevenueRecognition_ID = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare - e.g., get Parameters.
|
||||||
|
*/
|
||||||
|
protected void prepare()
|
||||||
|
{
|
||||||
|
ProcessInfoParameter[] para = getParameter();
|
||||||
|
for (int i = 0; i < para.length; i++)
|
||||||
|
{
|
||||||
|
String name = para[i].getParameterName();
|
||||||
|
if (para[i].getParameter() == null)
|
||||||
|
;
|
||||||
|
else if (name.equals("C_RevenueRecognition_ID"))
|
||||||
|
p_C_RevenueRecognition_ID = ((BigDecimal)para[i].getParameter()).intValue();
|
||||||
|
else if (name.equals("DateAcct"))
|
||||||
|
p_Date = (Timestamp)para[i].getParameter();
|
||||||
|
else if (name.equals("C_DocType_ID"))
|
||||||
|
p_C_DocType_ID = para[i].getParameterAsInt();
|
||||||
|
else
|
||||||
|
log.log(Level.SEVERE, "Unknown Parameter: " + name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (p_Date == null)
|
||||||
|
p_Date = new Timestamp (System.currentTimeMillis());
|
||||||
|
|
||||||
|
} // prepare
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DoIt
|
||||||
|
* @return Message
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
protected String doIt() throws Exception
|
||||||
|
{
|
||||||
|
MAcctSchema[] schemas = MAcctSchema.getClientAcctSchema(getCtx(), getAD_Client_ID());
|
||||||
|
|
||||||
|
String result ="@OK@";
|
||||||
|
for (MAcctSchema schema : schemas)
|
||||||
|
{
|
||||||
|
result = createGLJournal(schema);
|
||||||
|
|
||||||
|
}
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
} // doIt
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create GL Journal
|
||||||
|
* @return document info
|
||||||
|
*/
|
||||||
|
private String createGLJournal(MAcctSchema as)
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
MGLCategory cat = MGLCategory.getDefaultSystem(getCtx());
|
||||||
|
if (cat == null)
|
||||||
|
{
|
||||||
|
MDocType docType = MDocType.get(getCtx(), p_C_DocType_ID);
|
||||||
|
cat = MGLCategory.get(getCtx(), docType.getGL_Category_ID());
|
||||||
|
}
|
||||||
|
//
|
||||||
|
MJournalBatch batch = new MJournalBatch(getCtx(), 0, get_TrxName());
|
||||||
|
batch.setDescription (getName());
|
||||||
|
batch.setC_DocType_ID(p_C_DocType_ID);
|
||||||
|
batch.setDateDoc(p_Date);
|
||||||
|
batch.setDateAcct(p_Date);
|
||||||
|
batch.setC_Currency_ID(as.getC_Currency_ID());
|
||||||
|
if (!batch.save())
|
||||||
|
return " - Could not create Batch";
|
||||||
|
//
|
||||||
|
|
||||||
|
MJournal journal = null;
|
||||||
|
BigDecimal drTotal = Env.ZERO;
|
||||||
|
BigDecimal crTotal = Env.ZERO;
|
||||||
|
|
||||||
|
String where = "DateRecognized IS NOT NULL AND DateRecognized <= ? AND GL_Journal_ID IS NULL " +
|
||||||
|
" AND (SELECT rp.C_AcctSchema_ID " +
|
||||||
|
"FROM C_RevenueRecognition_Plan rp " +
|
||||||
|
"WHERE rp.C_RevenueRecognition_Plan_ID=C_RevenueRecognition_Run.C_RevenueRecognition_Plan_ID) = ? " +
|
||||||
|
" AND EXISTS (SELECT * " +
|
||||||
|
" FROM C_RevenueRecognition_Plan rp " +
|
||||||
|
" WHERE rp.C_RevenueRecognition_Plan_ID=C_RevenueRecognition_Run.C_RevenueRecognition_Plan_ID "
|
||||||
|
+ " AND rp.C_RevenueRecognition_ID = ? OR 0 = ?) ";
|
||||||
|
|
||||||
|
Query query = new Query(getCtx(), MRevenueRecognitionRun.Table_Name,
|
||||||
|
where, get_TrxName());
|
||||||
|
query.setParameters(p_Date, as.getC_AcctSchema_ID(), p_C_RevenueRecognition_ID, p_C_RevenueRecognition_ID);
|
||||||
|
query.setOrderBy("C_RevenueRecognition_Run_ID");
|
||||||
|
List<MRevenueRecognitionRun> list = query.list();
|
||||||
|
|
||||||
|
int lineNo = 1;
|
||||||
|
for (MRevenueRecognitionRun run : list)
|
||||||
|
{
|
||||||
|
if (run.getRecognizedAmt().signum() == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
if (journal == null)
|
||||||
|
{
|
||||||
|
journal = new MJournal (batch);
|
||||||
|
journal.setC_AcctSchema_ID (as.getC_AcctSchema_ID());
|
||||||
|
journal.setC_Currency_ID(as.getC_Currency_ID());
|
||||||
|
journal.setC_ConversionType_ID(MConversionType.getDefault(getAD_Client_ID()));
|
||||||
|
MOrg org = MOrg.get(getCtx(), run.getAD_Org_ID());
|
||||||
|
journal.setDescription (getName() + " - " + org.getName());
|
||||||
|
journal.setGL_Category_ID (cat.getGL_Category_ID());
|
||||||
|
if (!journal.save())
|
||||||
|
return " - Could not create Journal";
|
||||||
|
}
|
||||||
|
|
||||||
|
MInvoiceLine il = (MInvoiceLine) run.getC_RevenueRecognition_Plan().getC_InvoiceLine();
|
||||||
|
MInvoice inv = il.getParent();
|
||||||
|
String description = inv.getDocumentInfo() + " (" + il.getLine() + ")";
|
||||||
|
if (!Util.isEmpty(il.getDescription()))
|
||||||
|
description = description + " " + il.getDescription();
|
||||||
|
//
|
||||||
|
MJournalLine line = new MJournalLine(journal);
|
||||||
|
line.setLine(lineNo++ * 10);
|
||||||
|
line.setDescription(description);
|
||||||
|
|
||||||
|
//
|
||||||
|
line.setC_ValidCombination_ID(run.getC_RevenueRecognition_Plan().getP_Revenue_Acct());
|
||||||
|
|
||||||
|
BigDecimal amtReval = run.getRecognizedAmt();
|
||||||
|
|
||||||
|
BigDecimal dr = amtReval.compareTo(Env.ZERO) > 0 ? amtReval : Env.ZERO;
|
||||||
|
BigDecimal cr = amtReval.compareTo(Env.ZERO) < 0 ? amtReval.negate() : Env.ZERO;
|
||||||
|
|
||||||
|
drTotal = drTotal.add(dr);
|
||||||
|
crTotal = crTotal.add(cr);
|
||||||
|
line.setAmtSourceDr (dr);
|
||||||
|
line.setAmtAcctDr (dr);
|
||||||
|
line.setAmtSourceCr (cr);
|
||||||
|
line.setAmtAcctCr (cr);
|
||||||
|
line.saveEx();
|
||||||
|
|
||||||
|
MJournalLine drline = new MJournalLine(journal);
|
||||||
|
drline.setLine(lineNo++ * 10);
|
||||||
|
|
||||||
|
drline.setDescription(description);
|
||||||
|
//
|
||||||
|
drline.setC_ValidCombination_ID(run.getC_RevenueRecognition_Plan().getUnEarnedRevenue_Acct());
|
||||||
|
|
||||||
|
dr = amtReval.compareTo(Env.ZERO) < 0 ? amtReval.negate() : Env.ZERO;
|
||||||
|
cr = amtReval.compareTo(Env.ZERO) > 0 ? amtReval : Env.ZERO;
|
||||||
|
|
||||||
|
drTotal = drTotal.add(dr);
|
||||||
|
crTotal = crTotal.add(cr);
|
||||||
|
drline.setAmtSourceDr (dr);
|
||||||
|
drline.setAmtAcctDr (dr);
|
||||||
|
drline.setAmtSourceCr (cr);
|
||||||
|
drline.setAmtAcctCr (cr);
|
||||||
|
drline.saveEx();
|
||||||
|
//
|
||||||
|
run.setGL_Journal_ID(journal.getGL_Journal_ID());
|
||||||
|
run.saveEx();
|
||||||
|
}
|
||||||
|
|
||||||
|
return " - " + batch.getDocumentNo() + " #" + list.size();
|
||||||
|
} // createGLJournal
|
||||||
|
} // Aging
|
||||||
|
|
|
@ -1005,14 +1005,13 @@ public final class FactLine extends X_Fact_Acct
|
||||||
int C_Campaign_ID, int C_Activity_ID,
|
int C_Campaign_ID, int C_Activity_ID,
|
||||||
int User1_ID, int User2_ID, int UserElement1_ID, int UserElement2_ID)
|
int User1_ID, int User2_ID, int UserElement1_ID, int UserElement2_ID)
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("From Accout_ID=" + Account_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("From Account_ID=" + Account_ID);
|
||||||
// get VC for P_Revenue (from Product)
|
// get VC for P_Revenue (from Product)
|
||||||
MAccount revenue = MAccount.get(getCtx(),
|
MAccount revenue = MAccount.get(getCtx(),
|
||||||
AD_Client_ID, AD_Org_ID, getC_AcctSchema_ID(), Account_ID, C_SubAcct_ID,
|
AD_Client_ID, AD_Org_ID, getC_AcctSchema_ID(), Account_ID, C_SubAcct_ID,
|
||||||
M_Product_ID, C_BPartner_ID, AD_OrgTrx_ID, C_LocFrom_ID, C_LocTo_ID, C_SRegion_ID,
|
M_Product_ID, C_BPartner_ID, AD_OrgTrx_ID, C_LocFrom_ID, C_LocTo_ID, C_SRegion_ID,
|
||||||
C_Project_ID, C_Campaign_ID, C_Activity_ID,
|
C_Project_ID, C_Campaign_ID, C_Activity_ID,
|
||||||
User1_ID, User2_ID, UserElement1_ID, UserElement2_ID,
|
User1_ID, User2_ID, UserElement1_ID, UserElement2_ID, get_TrxName());
|
||||||
get_TrxName());
|
|
||||||
if (revenue != null && revenue.get_ID() == 0)
|
if (revenue != null && revenue.get_ID() == 0)
|
||||||
revenue.saveEx();
|
revenue.saveEx();
|
||||||
if (revenue == null || revenue.get_ID() == 0)
|
if (revenue == null || revenue.get_ID() == 0)
|
||||||
|
@ -1020,6 +1019,15 @@ public final class FactLine extends X_Fact_Acct
|
||||||
log.severe ("Revenue_Acct not found");
|
log.severe ("Revenue_Acct not found");
|
||||||
return Account_ID;
|
return Account_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int existing = DB.getSQLValue(get_TrxName(), "SELECT vc.Account_ID FROM C_RevenueRecognition_Plan rp" +
|
||||||
|
" JOIN C_ValidCombination vc ON rp.UnearnedRevenue_Acct=vc.C_ValidCombination_ID" +
|
||||||
|
" WHERE rp.C_InvoiceLine_ID = ? AND rp.C_AcctSchema_ID=?"
|
||||||
|
, C_InvoiceLine_ID, getC_AcctSchema_ID());
|
||||||
|
if ( existing > 0 )
|
||||||
|
return existing;
|
||||||
|
|
||||||
|
|
||||||
int P_Revenue_Acct = revenue.get_ID();
|
int P_Revenue_Acct = revenue.get_ID();
|
||||||
|
|
||||||
// get Unearned Revenue Acct from BPartner Group
|
// get Unearned Revenue Acct from BPartner Group
|
||||||
|
@ -1058,11 +1066,18 @@ public final class FactLine extends X_Fact_Acct
|
||||||
return Account_ID;
|
return Account_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
MRevenueRecognitionPlan plan = new MRevenueRecognitionPlan(getCtx(), 0, null);
|
MAccount unearned = MAccount.get(getCtx(),
|
||||||
|
AD_Client_ID, AD_Org_ID, getC_AcctSchema_ID(), new_Account_ID, C_SubAcct_ID,
|
||||||
|
M_Product_ID, C_BPartner_ID, AD_OrgTrx_ID, C_LocFrom_ID, C_LocTo_ID, C_SRegion_ID,
|
||||||
|
C_Project_ID, C_Campaign_ID, C_Activity_ID,
|
||||||
|
User1_ID, User2_ID, UserElement1_ID, UserElement2_ID, get_TrxName());
|
||||||
|
|
||||||
|
MRevenueRecognitionPlan plan = new MRevenueRecognitionPlan(getCtx(), 0, get_TrxName());
|
||||||
|
plan.setAD_Org_ID(AD_Org_ID);
|
||||||
plan.setC_RevenueRecognition_ID (C_RevenueRecognition_ID);
|
plan.setC_RevenueRecognition_ID (C_RevenueRecognition_ID);
|
||||||
plan.setC_AcctSchema_ID (getC_AcctSchema_ID());
|
plan.setC_AcctSchema_ID (getC_AcctSchema_ID());
|
||||||
plan.setC_InvoiceLine_ID (C_InvoiceLine_ID);
|
plan.setC_InvoiceLine_ID (C_InvoiceLine_ID);
|
||||||
plan.setUnEarnedRevenue_Acct (UnearnedRevenue_Acct);
|
plan.setUnEarnedRevenue_Acct (unearned.getC_ValidCombination_ID());
|
||||||
plan.setP_Revenue_Acct (P_Revenue_Acct);
|
plan.setP_Revenue_Acct (P_Revenue_Acct);
|
||||||
plan.setC_Currency_ID (getC_Currency_ID());
|
plan.setC_Currency_ID (getC_Currency_ID());
|
||||||
plan.setTotalAmt (getAcctBalance());
|
plan.setTotalAmt (getAcctBalance());
|
||||||
|
@ -1071,7 +1086,7 @@ public final class FactLine extends X_Fact_Acct
|
||||||
log.severe ("Plan NOT created");
|
log.severe ("Plan NOT created");
|
||||||
return Account_ID;
|
return Account_ID;
|
||||||
}
|
}
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("From Acctount_ID=" + Account_ID + " to " + new_Account_ID
|
if (log.isLoggable(Level.FINE)) log.fine("From Account_ID=" + Account_ID + " to " + new_Account_ID
|
||||||
+ " - Plan from UnearnedRevenue_Acct=" + UnearnedRevenue_Acct + " to Revenue_Acct=" + P_Revenue_Acct);
|
+ " - Plan from UnearnedRevenue_Acct=" + UnearnedRevenue_Acct + " to Revenue_Acct=" + P_Revenue_Acct);
|
||||||
return new_Account_ID;
|
return new_Account_ID;
|
||||||
} // createRevenueRecognition
|
} // createRevenueRecognition
|
||||||
|
|
|
@ -0,0 +1,172 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Interface for C_RevenueRecog_Service
|
||||||
|
* @author iDempiere (generated)
|
||||||
|
* @version Release 6.1
|
||||||
|
*/
|
||||||
|
public interface I_C_RevenueRecog_Service
|
||||||
|
{
|
||||||
|
|
||||||
|
/** TableName=C_RevenueRecog_Service */
|
||||||
|
public static final String Table_Name = "C_RevenueRecog_Service";
|
||||||
|
|
||||||
|
/** AD_Table_ID=53888 */
|
||||||
|
public static final int Table_ID = 53888;
|
||||||
|
|
||||||
|
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||||
|
|
||||||
|
/** AccessLevel = 1 - Org
|
||||||
|
*/
|
||||||
|
BigDecimal accessLevel = BigDecimal.valueOf(1);
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
|
||||||
|
/** Column name AD_Client_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||||
|
|
||||||
|
/** Get Client.
|
||||||
|
* Client/Tenant for this installation.
|
||||||
|
*/
|
||||||
|
public int getAD_Client_ID();
|
||||||
|
|
||||||
|
/** Column name AD_Org_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||||
|
|
||||||
|
/** Set Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public void setAD_Org_ID (int AD_Org_ID);
|
||||||
|
|
||||||
|
/** Get Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public int getAD_Org_ID();
|
||||||
|
|
||||||
|
/** Column name Created */
|
||||||
|
public static final String COLUMNNAME_Created = "Created";
|
||||||
|
|
||||||
|
/** Get Created.
|
||||||
|
* Date this record was created
|
||||||
|
*/
|
||||||
|
public Timestamp getCreated();
|
||||||
|
|
||||||
|
/** Column name CreatedBy */
|
||||||
|
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||||
|
|
||||||
|
/** Get Created By.
|
||||||
|
* User who created this records
|
||||||
|
*/
|
||||||
|
public int getCreatedBy();
|
||||||
|
|
||||||
|
/** Column name C_RevenueRecognition_ID */
|
||||||
|
public static final String COLUMNNAME_C_RevenueRecognition_ID = "C_RevenueRecognition_ID";
|
||||||
|
|
||||||
|
/** Set Revenue Recognition.
|
||||||
|
* Method for recording revenue
|
||||||
|
*/
|
||||||
|
public void setC_RevenueRecognition_ID (int C_RevenueRecognition_ID);
|
||||||
|
|
||||||
|
/** Get Revenue Recognition.
|
||||||
|
* Method for recording revenue
|
||||||
|
*/
|
||||||
|
public int getC_RevenueRecognition_ID();
|
||||||
|
|
||||||
|
public org.compiere.model.I_C_RevenueRecognition getC_RevenueRecognition() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name C_RevenueRecog_Service_ID */
|
||||||
|
public static final String COLUMNNAME_C_RevenueRecog_Service_ID = "C_RevenueRecog_Service_ID";
|
||||||
|
|
||||||
|
/** Set Revenue Recognition Service */
|
||||||
|
public void setC_RevenueRecog_Service_ID (int C_RevenueRecog_Service_ID);
|
||||||
|
|
||||||
|
/** Get Revenue Recognition Service */
|
||||||
|
public int getC_RevenueRecog_Service_ID();
|
||||||
|
|
||||||
|
/** Column name Description */
|
||||||
|
public static final String COLUMNNAME_Description = "Description";
|
||||||
|
|
||||||
|
/** Set Description.
|
||||||
|
* Optional short description of the record
|
||||||
|
*/
|
||||||
|
public void setDescription (String Description);
|
||||||
|
|
||||||
|
/** Get Description.
|
||||||
|
* Optional short description of the record
|
||||||
|
*/
|
||||||
|
public String getDescription();
|
||||||
|
|
||||||
|
/** Column name IsActive */
|
||||||
|
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||||
|
|
||||||
|
/** Set Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public void setIsActive (boolean IsActive);
|
||||||
|
|
||||||
|
/** Get Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public boolean isActive();
|
||||||
|
|
||||||
|
/** Column name Line */
|
||||||
|
public static final String COLUMNNAME_Line = "Line";
|
||||||
|
|
||||||
|
/** Set Line No.
|
||||||
|
* Unique line for this document
|
||||||
|
*/
|
||||||
|
public void setLine (int Line);
|
||||||
|
|
||||||
|
/** Get Line No.
|
||||||
|
* Unique line for this document
|
||||||
|
*/
|
||||||
|
public int getLine();
|
||||||
|
|
||||||
|
/** Column name Percent */
|
||||||
|
public static final String COLUMNNAME_Percent = "Percent";
|
||||||
|
|
||||||
|
/** Set Percent.
|
||||||
|
* Percentage
|
||||||
|
*/
|
||||||
|
public void setPercent (BigDecimal Percent);
|
||||||
|
|
||||||
|
/** Get Percent.
|
||||||
|
* Percentage
|
||||||
|
*/
|
||||||
|
public BigDecimal getPercent();
|
||||||
|
|
||||||
|
/** Column name Updated */
|
||||||
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
||||||
|
/** Get Updated.
|
||||||
|
* Date this record was updated
|
||||||
|
*/
|
||||||
|
public Timestamp getUpdated();
|
||||||
|
|
||||||
|
/** Column name UpdatedBy */
|
||||||
|
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||||
|
|
||||||
|
/** Get Updated By.
|
||||||
|
* User who updated this records
|
||||||
|
*/
|
||||||
|
public int getUpdatedBy();
|
||||||
|
}
|
|
@ -113,6 +113,19 @@ public interface I_C_RevenueRecognition
|
||||||
*/
|
*/
|
||||||
public String getDescription();
|
public String getDescription();
|
||||||
|
|
||||||
|
/** Column name FixedRecogDay */
|
||||||
|
public static final String COLUMNNAME_FixedRecogDay = "FixedRecogDay";
|
||||||
|
|
||||||
|
/** Set Fixed recognition day.
|
||||||
|
* Day of the period recognition occurs
|
||||||
|
*/
|
||||||
|
public void setFixedRecogDay (int FixedRecogDay);
|
||||||
|
|
||||||
|
/** Get Fixed recognition day.
|
||||||
|
* Day of the period recognition occurs
|
||||||
|
*/
|
||||||
|
public int getFixedRecogDay();
|
||||||
|
|
||||||
/** Column name IsActive */
|
/** Column name IsActive */
|
||||||
public static final String COLUMNNAME_IsActive = "IsActive";
|
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,26 @@ public interface I_C_RevenueRecognition_Run
|
||||||
/** Get C_RevenueRecognition_Run_UU */
|
/** Get C_RevenueRecognition_Run_UU */
|
||||||
public String getC_RevenueRecognition_Run_UU();
|
public String getC_RevenueRecognition_Run_UU();
|
||||||
|
|
||||||
|
/** Column name C_RevenueRecog_Service_ID */
|
||||||
|
public static final String COLUMNNAME_C_RevenueRecog_Service_ID = "C_RevenueRecog_Service_ID";
|
||||||
|
|
||||||
|
/** Set Revenue Recognition Service */
|
||||||
|
public void setC_RevenueRecog_Service_ID (int C_RevenueRecog_Service_ID);
|
||||||
|
|
||||||
|
/** Get Revenue Recognition Service */
|
||||||
|
public int getC_RevenueRecog_Service_ID();
|
||||||
|
|
||||||
|
public org.compiere.model.I_C_RevenueRecog_Service getC_RevenueRecog_Service() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name DateRecognized */
|
||||||
|
public static final String COLUMNNAME_DateRecognized = "DateRecognized";
|
||||||
|
|
||||||
|
/** Set Recognition Date */
|
||||||
|
public void setDateRecognized (Timestamp DateRecognized);
|
||||||
|
|
||||||
|
/** Get Recognition Date */
|
||||||
|
public Timestamp getDateRecognized();
|
||||||
|
|
||||||
/** Column name GL_Journal_ID */
|
/** Column name GL_Journal_ID */
|
||||||
public static final String COLUMNNAME_GL_Journal_ID = "GL_Journal_ID";
|
public static final String COLUMNNAME_GL_Journal_ID = "GL_Journal_ID";
|
||||||
|
|
||||||
|
|
|
@ -469,7 +469,8 @@ public class MJournalLine extends X_GL_JournalLine
|
||||||
setM_Product_ID(combi.getM_Product_ID() > 0 ? combi.getM_Product_ID() : 0);
|
setM_Product_ID(combi.getM_Product_ID() > 0 ? combi.getM_Product_ID() : 0);
|
||||||
setC_BPartner_ID(combi.getC_BPartner_ID() > 0 ? combi.getC_BPartner_ID() : 0);
|
setC_BPartner_ID(combi.getC_BPartner_ID() > 0 ? combi.getC_BPartner_ID() : 0);
|
||||||
setAD_OrgTrx_ID(combi.getAD_OrgTrx_ID() > 0 ? combi.getAD_OrgTrx_ID() : 0);
|
setAD_OrgTrx_ID(combi.getAD_OrgTrx_ID() > 0 ? combi.getAD_OrgTrx_ID() : 0);
|
||||||
setAD_Org_ID(combi.getAD_Org_ID() > 0 ? combi.getAD_Org_ID() : 0);
|
if (combi.getAD_Org_ID() > 0)
|
||||||
|
setAD_Org_ID(combi.getAD_Org_ID());
|
||||||
setC_LocFrom_ID(combi.getC_LocFrom_ID() > 0 ? combi.getC_LocFrom_ID() : 0);
|
setC_LocFrom_ID(combi.getC_LocFrom_ID() > 0 ? combi.getC_LocFrom_ID() : 0);
|
||||||
setC_LocTo_ID(combi.getC_LocTo_ID() > 0 ? combi.getC_LocTo_ID() : 0);
|
setC_LocTo_ID(combi.getC_LocTo_ID() > 0 ? combi.getC_LocTo_ID() : 0);
|
||||||
setC_SalesRegion_ID(combi.getC_SalesRegion_ID() > 0 ? combi.getC_SalesRegion_ID() : 0);
|
setC_SalesRegion_ID(combi.getC_SalesRegion_ID() > 0 ? combi.getC_SalesRegion_ID() : 0);
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revenue Recognition Service Model
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class MRevenueRecogService extends X_C_RevenueRecog_Service
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -3434480004031478264L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Standard Constructor
|
||||||
|
* @param ctx context
|
||||||
|
* @param C_RevenueRecognition_ID id
|
||||||
|
*/
|
||||||
|
public MRevenueRecogService (Properties ctx, int C_RevenueRecog_Service_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, C_RevenueRecog_Service_ID, trxName);
|
||||||
|
} // MRevenueRecogService
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Constructor
|
||||||
|
* @param ctx context
|
||||||
|
* @param rs result set
|
||||||
|
*/
|
||||||
|
public MRevenueRecogService (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super(ctx, rs, trxName);
|
||||||
|
} // MRevenueRecognition
|
||||||
|
|
||||||
|
} // MRevenueRecogService
|
|
@ -17,6 +17,7 @@
|
||||||
package org.compiere.model;
|
package org.compiere.model;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,4 +55,22 @@ public class MRevenueRecognition extends X_C_RevenueRecognition
|
||||||
super(ctx, rs, trxName);
|
super(ctx, rs, trxName);
|
||||||
} // MRevenueRecognition
|
} // MRevenueRecognition
|
||||||
|
|
||||||
|
public List<MRevenueRecogService> getServicesList() {
|
||||||
|
|
||||||
|
if ( isTimeBased() )
|
||||||
|
return null;
|
||||||
|
|
||||||
|
Query query = new Query(getCtx(),MRevenueRecogService.Table_Name, "C_RevenueRecognition_ID = ?",get_TrxName());
|
||||||
|
query.setParameters(getC_RevenueRecognition_ID());
|
||||||
|
query.setOnlyActiveRecords(true);
|
||||||
|
query.setOrderBy("Line");
|
||||||
|
|
||||||
|
return query.list();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<MRevenueRecognition> getAll(Properties ctx, String trxName) {
|
||||||
|
Query query = new Query(ctx,MRevenueRecognition.Table_Name, null, trxName);
|
||||||
|
return query.list();
|
||||||
|
}
|
||||||
|
|
||||||
} // MRevenueRecognition
|
} // MRevenueRecognition
|
||||||
|
|
|
@ -16,7 +16,12 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.compiere.model;
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
@ -73,35 +78,115 @@ public class MRevenueRecognitionPlan extends X_C_RevenueRecognition_Plan
|
||||||
* @param success success
|
* @param success success
|
||||||
* @return success
|
* @return success
|
||||||
*/
|
*/
|
||||||
// protected boolean afterSave (boolean newRecord, boolean success)
|
protected boolean afterSave (boolean newRecord, boolean success)
|
||||||
// {
|
{
|
||||||
// if (!success)
|
if (newRecord)
|
||||||
// return success;
|
{
|
||||||
// if (newRecord)
|
MRevenueRecognition rr = new MRevenueRecognition(getCtx(), getC_RevenueRecognition_ID(), get_TrxName());
|
||||||
// {
|
if (rr.isTimeBased())
|
||||||
// MRevenueRecognition rr = new MRevenueRecognition(getCtx(), getC_RevenueRecognition_ID(), get_TrxName());
|
{
|
||||||
// if (rr.isTimeBased())
|
MInvoiceLine il = (MInvoiceLine) getC_InvoiceLine();
|
||||||
// {
|
|
||||||
// /** Get InvoiveQty
|
Calendar cal = Calendar.getInstance();
|
||||||
// SELECT QtyInvoiced, M_Product_ID
|
Timestamp startDate = new Timestamp(cal.getTimeInMillis());
|
||||||
// INTO v_Qty, v_M_Product_ID
|
if ( il.getRRStartDate() != null )
|
||||||
// FROM C_InvoiceLine
|
startDate = il.getRRStartDate();
|
||||||
// WHERE C_InvoiceLine_ID=:new.C_InvoiceLine_ID;
|
else if ( il.getParent().getDateInvoiced() != null )
|
||||||
// -- Insert
|
startDate = il.getParent().getDateInvoiced();
|
||||||
// AD_Sequence_Next ('C_ServiceLevel', :new.AD_Client_ID, v_NextNo);
|
|
||||||
// INSERT INTO C_ServiceLevel
|
cal.setTimeInMillis(startDate.getTime());
|
||||||
// (C_ServiceLevel_ID, C_RevenueRecognition_Plan_ID,
|
|
||||||
// AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,
|
int interval = 1;
|
||||||
// M_Product_ID, Description, ServiceLevelInvoiced, ServiceLevelProvided,
|
if ( MRevenueRecognition.RECOGNITIONFREQUENCY_Quarter.equals(rr.getRecognitionFrequency()))
|
||||||
// Processing,Processed)
|
interval = 3;
|
||||||
// VALUES
|
else if ( MRevenueRecognition.RECOGNITIONFREQUENCY_Year.equals(rr.getRecognitionFrequency()))
|
||||||
// (v_NextNo, :new.C_RevenueRecognition_Plan_ID,
|
interval = 12;
|
||||||
// :new.AD_Client_ID,:new.AD_Org_ID,'Y',SysDate,:new.CreatedBy,SysDate,:new.UpdatedBy,
|
|
||||||
// v_M_Product_ID, NULL, v_Qty, 0,
|
|
||||||
// 'N', 'N');
|
int periods = rr.getNoMonths();
|
||||||
// **/
|
BigDecimal amt = getTotalAmt().divide(new BigDecimal(periods + ""), RoundingMode.HALF_UP);
|
||||||
// }
|
BigDecimal total = Env.ZERO;
|
||||||
// }
|
BigDecimal startAmt = amt;
|
||||||
// return success;
|
|
||||||
// } // afterSave
|
int monthOffset = cal.get(Calendar.MONTH);
|
||||||
|
|
||||||
|
double startDay = cal.get(Calendar.DAY_OF_MONTH);
|
||||||
|
|
||||||
|
if ( MRevenueRecognition.RECOGNITIONFREQUENCY_Month.equals(rr.getRecognitionFrequency()) &&
|
||||||
|
rr.getFixedRecogDay() != 0 )
|
||||||
|
{ // include start day
|
||||||
|
double daysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||||
|
periods = periods + 1;
|
||||||
|
|
||||||
|
double totalDays = rr.getFixedRecogDay() > daysInMonth ? daysInMonth : rr.getFixedRecogDay();
|
||||||
|
|
||||||
|
double noDays = totalDays - (startDay-1);
|
||||||
|
|
||||||
|
if ( noDays <= 0 ) // start recognition following month
|
||||||
|
{
|
||||||
|
monthOffset +=1;
|
||||||
|
noDays = noDays + daysInMonth;
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal proportion = new BigDecimal( noDays / daysInMonth);
|
||||||
|
startAmt = amt.multiply(proportion);
|
||||||
|
startAmt = startAmt.setScale(2, RoundingMode.HALF_UP);
|
||||||
|
cal.set(Calendar.DAY_OF_MONTH, rr.getFixedRecogDay());
|
||||||
|
}
|
||||||
|
|
||||||
|
cal.set(Calendar.MONTH, 0); // January
|
||||||
|
|
||||||
|
|
||||||
|
for ( int i = 0; i <= periods - 1; i++ )
|
||||||
|
{
|
||||||
|
Calendar cal2 = Calendar.getInstance();
|
||||||
|
cal2.setTimeInMillis(cal.getTimeInMillis());
|
||||||
|
cal2.add(Calendar.MONTH, (interval*i)+monthOffset);
|
||||||
|
|
||||||
|
MRevenueRecognitionRun run = new MRevenueRecognitionRun(getCtx(), 0, get_TrxName());
|
||||||
|
run.setClientOrg(this);
|
||||||
|
run.setC_RevenueRecognition_Plan_ID(getC_RevenueRecognition_Plan_ID());
|
||||||
|
run.setDateRecognized(new Timestamp(cal2.getTimeInMillis()));
|
||||||
|
BigDecimal recogAmt = amt;
|
||||||
|
|
||||||
|
if ( i == 0)
|
||||||
|
recogAmt = startAmt;
|
||||||
|
if ( i == periods - 1 )
|
||||||
|
recogAmt = getTotalAmt().subtract(total);
|
||||||
|
run.setRecognizedAmt(recogAmt);
|
||||||
|
if ( recogAmt.signum() != 0 )
|
||||||
|
run.saveEx();
|
||||||
|
total = total.add(recogAmt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<MRevenueRecogService> services = rr.getServicesList();
|
||||||
|
BigDecimal totalAmt = Env.ZERO;
|
||||||
|
MRevenueRecognitionRun last = null;
|
||||||
|
for (MRevenueRecogService service : services )
|
||||||
|
{
|
||||||
|
BigDecimal recogAmt = getTotalAmt().multiply(service.getPercent()).divide(Env.ONEHUNDRED, 4, RoundingMode.HALF_UP);
|
||||||
|
MRevenueRecognitionRun run = new MRevenueRecognitionRun(getCtx(), 0, get_TrxName());
|
||||||
|
run.setClientOrg(this);
|
||||||
|
run.setC_RevenueRecognition_Plan_ID(getC_RevenueRecognition_Plan_ID());
|
||||||
|
run.setRecognizedAmt(recogAmt);
|
||||||
|
run.setC_RevenueRecog_Service_ID(service.getC_RevenueRecog_Service_ID());
|
||||||
|
run.saveEx();
|
||||||
|
|
||||||
|
last = run;
|
||||||
|
totalAmt = totalAmt.add(recogAmt);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( getTotalAmt().subtract(totalAmt).compareTo(Env.ZERO) != 0)
|
||||||
|
{
|
||||||
|
last.setRecognizedAmt(last.getRecognizedAmt().add(getTotalAmt().subtract(totalAmt)));
|
||||||
|
last.saveEx();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return success;
|
||||||
|
} // afterSave
|
||||||
} // MRevenueRecognitionPlan
|
} // MRevenueRecognitionPlan
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revenue Recognition Run Model
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class MRevenueRecognitionRun extends X_C_RevenueRecognition_Run
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -6068883255121303257L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Standard Constructor
|
||||||
|
* @param ctx context
|
||||||
|
* @param C_RevenueRecognition_ID id
|
||||||
|
*/
|
||||||
|
public MRevenueRecognitionRun (Properties ctx, int C_RevenueRecognition_Run_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, C_RevenueRecognition_Run_ID, trxName);
|
||||||
|
} // MRevenueRecognitionRun
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Constructor
|
||||||
|
* @param ctx context
|
||||||
|
* @param rs result set
|
||||||
|
*/
|
||||||
|
public MRevenueRecognitionRun (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super(ctx, rs, trxName);
|
||||||
|
} // MRevenueRecognitionRun
|
||||||
|
|
||||||
|
} // MRevenueRecognitionRun
|
|
@ -0,0 +1,188 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
/** Generated Model - DO NOT CHANGE */
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.Properties;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Model for C_RevenueRecog_Service
|
||||||
|
* @author iDempiere (generated)
|
||||||
|
* @version Release 6.1 - $Id$ */
|
||||||
|
public class X_C_RevenueRecog_Service extends PO implements I_C_RevenueRecog_Service, I_Persistent
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 20181127L;
|
||||||
|
|
||||||
|
/** Standard Constructor */
|
||||||
|
public X_C_RevenueRecog_Service (Properties ctx, int C_RevenueRecog_Service_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, C_RevenueRecog_Service_ID, trxName);
|
||||||
|
/** if (C_RevenueRecog_Service_ID == 0)
|
||||||
|
{
|
||||||
|
setC_RevenueRecognition_ID (0);
|
||||||
|
setC_RevenueRecog_Service_ID (0);
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Constructor */
|
||||||
|
public X_C_RevenueRecog_Service (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, rs, trxName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** AccessLevel
|
||||||
|
* @return 1 - Org
|
||||||
|
*/
|
||||||
|
protected int get_AccessLevel()
|
||||||
|
{
|
||||||
|
return accessLevel.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
protected POInfo initPO (Properties ctx)
|
||||||
|
{
|
||||||
|
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||||
|
return poi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer ("X_C_RevenueRecog_Service[")
|
||||||
|
.append(get_ID()).append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.compiere.model.I_C_RevenueRecognition getC_RevenueRecognition() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (org.compiere.model.I_C_RevenueRecognition)MTable.get(getCtx(), org.compiere.model.I_C_RevenueRecognition.Table_Name)
|
||||||
|
.getPO(getC_RevenueRecognition_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Revenue Recognition.
|
||||||
|
@param C_RevenueRecognition_ID
|
||||||
|
Method for recording revenue
|
||||||
|
*/
|
||||||
|
public void setC_RevenueRecognition_ID (int C_RevenueRecognition_ID)
|
||||||
|
{
|
||||||
|
if (C_RevenueRecognition_ID < 1)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_C_RevenueRecognition_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_C_RevenueRecognition_ID, Integer.valueOf(C_RevenueRecognition_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Revenue Recognition.
|
||||||
|
@return Method for recording revenue
|
||||||
|
*/
|
||||||
|
public int getC_RevenueRecognition_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_C_RevenueRecognition_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Record ID/ColumnName
|
||||||
|
@return ID/ColumnName pair
|
||||||
|
*/
|
||||||
|
public KeyNamePair getKeyNamePair()
|
||||||
|
{
|
||||||
|
return new KeyNamePair(get_ID(), String.valueOf(getC_RevenueRecognition_ID()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Revenue Recognition Service.
|
||||||
|
@param C_RevenueRecog_Service_ID Revenue Recognition Service */
|
||||||
|
public void setC_RevenueRecog_Service_ID (int C_RevenueRecog_Service_ID)
|
||||||
|
{
|
||||||
|
if (C_RevenueRecog_Service_ID < 1)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_C_RevenueRecog_Service_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_C_RevenueRecog_Service_ID, Integer.valueOf(C_RevenueRecog_Service_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Revenue Recognition Service.
|
||||||
|
@return Revenue Recognition Service */
|
||||||
|
public int getC_RevenueRecog_Service_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_C_RevenueRecog_Service_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Description.
|
||||||
|
@param Description
|
||||||
|
Optional short description of the record
|
||||||
|
*/
|
||||||
|
public void setDescription (String Description)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Description, Description);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Description.
|
||||||
|
@return Optional short description of the record
|
||||||
|
*/
|
||||||
|
public String getDescription ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Description);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Line No.
|
||||||
|
@param Line
|
||||||
|
Unique line for this document
|
||||||
|
*/
|
||||||
|
public void setLine (int Line)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Line, Integer.valueOf(Line));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Line No.
|
||||||
|
@return Unique line for this document
|
||||||
|
*/
|
||||||
|
public int getLine ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_Line);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Percent.
|
||||||
|
@param Percent
|
||||||
|
Percentage
|
||||||
|
*/
|
||||||
|
public void setPercent (BigDecimal Percent)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Percent, Percent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Percent.
|
||||||
|
@return Percentage
|
||||||
|
*/
|
||||||
|
public BigDecimal getPercent ()
|
||||||
|
{
|
||||||
|
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Percent);
|
||||||
|
if (bd == null)
|
||||||
|
return Env.ZERO;
|
||||||
|
return bd;
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,7 +30,7 @@ public class X_C_RevenueRecognition extends PO implements I_C_RevenueRecognition
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 20181104L;
|
private static final long serialVersionUID = 20181127L;
|
||||||
|
|
||||||
/** Standard Constructor */
|
/** Standard Constructor */
|
||||||
public X_C_RevenueRecognition (Properties ctx, int C_RevenueRecognition_ID, String trxName)
|
public X_C_RevenueRecognition (Properties ctx, int C_RevenueRecognition_ID, String trxName)
|
||||||
|
@ -127,6 +127,26 @@ public class X_C_RevenueRecognition extends PO implements I_C_RevenueRecognition
|
||||||
return (String)get_Value(COLUMNNAME_Description);
|
return (String)get_Value(COLUMNNAME_Description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set Fixed recognition day.
|
||||||
|
@param FixedRecogDay
|
||||||
|
Day of the period recognition occurs
|
||||||
|
*/
|
||||||
|
public void setFixedRecogDay (int FixedRecogDay)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_FixedRecogDay, Integer.valueOf(FixedRecogDay));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Fixed recognition day.
|
||||||
|
@return Day of the period recognition occurs
|
||||||
|
*/
|
||||||
|
public int getFixedRecogDay ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_FixedRecogDay);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
/** Set Time based.
|
/** Set Time based.
|
||||||
@param IsTimeBased
|
@param IsTimeBased
|
||||||
Time based Revenue Recognition rather than Service Level based
|
Time based Revenue Recognition rather than Service Level based
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.compiere.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.Timestamp;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
|
@ -32,7 +33,7 @@ public class X_C_RevenueRecognition_Run extends PO implements I_C_RevenueRecogni
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 20181104L;
|
private static final long serialVersionUID = 20181127L;
|
||||||
|
|
||||||
/** Standard Constructor */
|
/** Standard Constructor */
|
||||||
public X_C_RevenueRecognition_Run (Properties ctx, int C_RevenueRecognition_Run_ID, String trxName)
|
public X_C_RevenueRecognition_Run (Properties ctx, int C_RevenueRecognition_Run_ID, String trxName)
|
||||||
|
@ -42,7 +43,6 @@ public class X_C_RevenueRecognition_Run extends PO implements I_C_RevenueRecogni
|
||||||
{
|
{
|
||||||
setC_RevenueRecognition_Plan_ID (0);
|
setC_RevenueRecognition_Plan_ID (0);
|
||||||
setC_RevenueRecognition_Run_ID (0);
|
setC_RevenueRecognition_Run_ID (0);
|
||||||
setGL_Journal_ID (0);
|
|
||||||
setRecognizedAmt (Env.ZERO);
|
setRecognizedAmt (Env.ZERO);
|
||||||
} */
|
} */
|
||||||
}
|
}
|
||||||
|
@ -148,6 +148,45 @@ public class X_C_RevenueRecognition_Run extends PO implements I_C_RevenueRecogni
|
||||||
return (String)get_Value(COLUMNNAME_C_RevenueRecognition_Run_UU);
|
return (String)get_Value(COLUMNNAME_C_RevenueRecognition_Run_UU);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public org.compiere.model.I_C_RevenueRecog_Service getC_RevenueRecog_Service() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (org.compiere.model.I_C_RevenueRecog_Service)MTable.get(getCtx(), org.compiere.model.I_C_RevenueRecog_Service.Table_Name)
|
||||||
|
.getPO(getC_RevenueRecog_Service_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Revenue Recognition Service.
|
||||||
|
@param C_RevenueRecog_Service_ID Revenue Recognition Service */
|
||||||
|
public void setC_RevenueRecog_Service_ID (int C_RevenueRecog_Service_ID)
|
||||||
|
{
|
||||||
|
if (C_RevenueRecog_Service_ID < 1)
|
||||||
|
set_Value (COLUMNNAME_C_RevenueRecog_Service_ID, null);
|
||||||
|
else
|
||||||
|
set_Value (COLUMNNAME_C_RevenueRecog_Service_ID, Integer.valueOf(C_RevenueRecog_Service_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Revenue Recognition Service.
|
||||||
|
@return Revenue Recognition Service */
|
||||||
|
public int getC_RevenueRecog_Service_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_C_RevenueRecog_Service_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Recognition Date.
|
||||||
|
@param DateRecognized Recognition Date */
|
||||||
|
public void setDateRecognized (Timestamp DateRecognized)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_DateRecognized, DateRecognized);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Recognition Date.
|
||||||
|
@return Recognition Date */
|
||||||
|
public Timestamp getDateRecognized ()
|
||||||
|
{
|
||||||
|
return (Timestamp)get_Value(COLUMNNAME_DateRecognized);
|
||||||
|
}
|
||||||
|
|
||||||
public org.compiere.model.I_GL_Journal getGL_Journal() throws RuntimeException
|
public org.compiere.model.I_GL_Journal getGL_Journal() throws RuntimeException
|
||||||
{
|
{
|
||||||
return (org.compiere.model.I_GL_Journal)MTable.get(getCtx(), org.compiere.model.I_GL_Journal.Table_Name)
|
return (org.compiere.model.I_GL_Journal)MTable.get(getCtx(), org.compiere.model.I_GL_Journal.Table_Name)
|
||||||
|
|
Loading…
Reference in New Issue