IDEMPIERE-3494 Implement DocStatus/DocAction for Project Issue (#839)

This commit is contained in:
hengsin 2021-08-18 00:59:14 +08:00 committed by GitHub
parent ac01e77a40
commit 461b597c8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 935 additions and 33 deletions

View File

@ -0,0 +1,195 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3494 Implement DocStatus/DocAction for Project Issue
-- Aug 17, 2021, 4:14:00 PM MYT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (214575,0.0,'Approved','Indicates if this document requires approval','The Approved checkbox indicates if this document requires approval before it can be processed.',623,'IsApproved','N',1,'N','N','Y','N','N','N',20,0,0,'Y',TO_DATE('2021-08-17 16:13:59','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 16:13:59','YYYY-MM-DD HH24:MI:SS'),100,351,'Y','N','D','N','e9809c24-128d-4f73-960f-4930cb0451ed','N')
;
-- Aug 17, 2021, 4:14:01 PM MYT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (214576,0.0,'Document Action','The targeted status of the document','You find the current status in the Document Status field. The options are listed in a popup',623,'DocAction','CO',2,'N','N','Y','N','N','N',28,135,0,0,'Y',TO_DATE('2021-08-17 16:14:00','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 16:14:00','YYYY-MM-DD HH24:MI:SS'),100,287,'Y','N','D','N','67095868-e746-46fb-9666-fd3a655bee1c','N')
;
-- Aug 17, 2021, 4:14:01 PM MYT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (214577,0.0,'Document Status','The current status of the document','The Document Status indicates the status of a document at this time. If you want to change the document status, use the Document Action field',623,'DocStatus','DR',2,'N','N','Y','N','N','N',17,131,0,0,'Y',TO_DATE('2021-08-17 16:14:01','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 16:14:01','YYYY-MM-DD HH24:MI:SS'),100,289,'Y','N','D','N','46e6517e-eec1-46c2-9220-064929e4e921','N')
;
-- Aug 17, 2021, 4:16:23 PM MYT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (214578,0,'Reversal ID','ID of document reversal',623,'Reversal_ID',10,'N','N','N','N','N',0,'N',30,200060,0,0,'Y',TO_DATE('2021-08-17 16:16:22','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 16:16:22','YYYY-MM-DD HH24:MI:SS'),100,53457,'N','N','D','N','N','N','Y','0ae65bfe-c3e1-4402-885d-34ccbe5dcf43','N',0,'N','N','N')
;
-- Aug 17, 2021, 4:16:46 PM MYT
UPDATE AD_Column SET FKConstraintName='Reversal_CProjectIssue', FKConstraintType='N',Updated=TO_DATE('2021-08-17 16:16:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214578
;
-- Aug 17, 2021, 4:16:46 PM MYT
ALTER TABLE C_ProjectIssue ADD Reversal_ID NUMBER(10) DEFAULT NULL
;
-- Aug 17, 2021, 4:16:46 PM MYT
ALTER TABLE C_ProjectIssue ADD CONSTRAINT Reversal_CProjectIssue FOREIGN KEY (Reversal_ID) REFERENCES c_projectissue(c_projectissue_id) DEFERRABLE INITIALLY DEFERRED
;
-- Aug 17, 2021, 4:20:24 PM MYT
UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='B',Updated=TO_DATE('2021-08-17 16:20:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214576
;
-- Aug 17, 2021, 4:20:36 PM MYT
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2021-08-17 16:20:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214577
;
-- Aug 17, 2021, 4:27:31 PM MYT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField,IsQuickForm) VALUES (206738,'Document Status','The current status of the document','The Document Status indicates the status of a document at this time. If you want to change the document status, use the Document Action field',558,214577,'Y',0,180,0,'N','N','N','N',0,0,'Y',TO_DATE('2021-08-17 16:27:30','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 16:27:30','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','2eca16e7-28bd-481c-98f8-433039f657e4','Y',180,1,2,1,'N','N','N','N')
;
-- Aug 17, 2021, 4:28:54 PM MYT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField,IsQuickForm) VALUES (206739,'Document Action','The targeted status of the document','You find the current status in the Document Status field. The options are listed in a popup',558,214576,'Y',0,190,0,'N','N','N','N',0,0,'Y',TO_DATE('2021-08-17 16:28:54','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 16:28:54','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7e84f0d4-4b70-48bd-b1ab-2e90ffc04d6b','Y',190,5,2,1,'N','N','N','N')
;
-- Aug 17, 2021, 4:29:18 PM MYT
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8347
;
-- Aug 17, 2021, 4:29:18 PM MYT
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8222
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8213
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8221
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8214
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8220
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8224
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8229
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8223
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8217
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8225
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8218
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8216
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8236
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=8235
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=206738
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=206739
;
-- Aug 17, 2021, 4:30:16 PM MYT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField,IsQuickForm) VALUES (206740,'Reversal ID','ID of document reversal',558,214578,'Y',0,180,0,'N','N','N','N',0,0,'Y',TO_DATE('2021-08-17 16:30:15','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 16:30:15','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','e439e95a-906b-431d-a36f-77eb3583027a','Y',200,1,2,1,'N','N','N','N')
;
-- Aug 17, 2021, 4:30:23 PM MYT
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N', Updated=getDate(), UpdatedBy=100 WHERE AD_Field_ID=206740
;
-- Aug 17, 2021, 4:31:18 PM MYT
UPDATE AD_Field SET AD_FieldGroup_ID=101, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2021-08-17 16:31:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206738
;
-- Aug 17, 2021, 6:08:04 PM MYT
ALTER TABLE C_ProjectIssue ADD IsApproved CHAR(1) DEFAULT 'N' CHECK (IsApproved IN ('Y','N')) NOT NULL
;
-- Aug 17, 2021, 6:08:04 PM MYT
ALTER TABLE C_ProjectIssue ADD DocAction CHAR(2) DEFAULT 'CO' NOT NULL
;
-- Aug 17, 2021, 6:08:04 PM MYT
ALTER TABLE C_ProjectIssue ADD DocStatus VARCHAR2(2 CHAR) DEFAULT 'DR' NOT NULL
;
-- Aug 17, 2021, 6:08:04 PM MYT
ALTER TABLE C_ProjectIssue MODIFY Reversal_ID NUMBER(10) DEFAULT NULL
;
-- Aug 17, 2021, 6:10:48 PM MYT
INSERT INTO AD_Workflow (Name,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AccessLevel,EntityType,Author,WorkingTime,Duration,Version,Cost,DurationUnit,WaitingTime,PublishStatus,IsDefault,AD_Table_ID,Value,WorkflowType,IsValid,DocumentNo,IsBetaFunctionality,AD_Workflow_UU) VALUES ('Process_C_ProjectIssue',200007,0,0,'Y',TO_DATE('2021-08-17 18:10:47','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 18:10:47','YYYY-MM-DD HH24:MI:SS'),100,'1','U','iDempiere',0,1,0,0.0,'D',0,'U','N',623,'Process_C_ProjectIssue','P','N','10000000','N','8ffb218e-e2b9-4375-87ec-11ca5d648283')
;
-- Aug 17, 2021, 6:10:49 PM MYT
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,Description,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Action,IsCentrallyMaintained,YPosition,EntityType,XPosition,Limit,Duration,Cost,WaitingTime,JoinElement,SplitElement,DocAction,Value,AD_WF_Node_UU) VALUES (200028,'(DocAuto)','(Standard Node)',200007,0,0,'Y',TO_DATE('2021-08-17 18:10:48','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 18:10:48','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',0,'U',0,0,0,0.0,0,'X','X','--','(DocAuto)','3ae63237-fa0f-4b96-900b-77f814d31304')
;
-- Aug 17, 2021, 6:10:50 PM MYT
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,Description,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Action,IsCentrallyMaintained,YPosition,EntityType,XPosition,Limit,Duration,Cost,WaitingTime,JoinElement,SplitElement,DocAction,Value,AD_WF_Node_UU) VALUES (200029,'(DocComplete)','(Standard Node)',200007,0,0,'Y',TO_DATE('2021-08-17 18:10:49','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 18:10:49','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',0,'U',0,0,0,0.0,0,'X','X','CO','(DocComplete)','e7b1f604-2233-45e2-9f99-ac4f27392edb')
;
-- Aug 17, 2021, 6:10:50 PM MYT
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,Description,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Action,IsCentrallyMaintained,YPosition,EntityType,XPosition,Limit,Duration,Cost,WaitingTime,JoinElement,SplitElement,DocAction,Value,AD_WF_Node_UU) VALUES (200030,'(DocPrepare)','(Standard Node)',200007,0,0,'Y',TO_DATE('2021-08-17 18:10:50','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 18:10:50','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',0,'U',0,0,0,0.0,0,'X','X','PR','(DocPrepare)','be9ed2b0-f470-48d7-a83a-b37cc1c3a074')
;
-- Aug 17, 2021, 6:10:51 PM MYT
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,Description,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Action,IsCentrallyMaintained,YPosition,EntityType,XPosition,Limit,Duration,Cost,WaitingTime,JoinElement,SplitElement,Value,AD_WF_Node_UU) VALUES (200031,'(Start)','(Standard Node)',200007,0,0,'Y',TO_DATE('2021-08-17 18:10:50','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 18:10:50','YYYY-MM-DD HH24:MI:SS'),100,'Z','Y',0,'U',0,0,0,0.0,0,'X','X','(Start)','274360c6-7c88-4e4d-9887-0042fd8f38af')
;
-- Aug 17, 2021, 6:10:51 PM MYT
INSERT INTO AD_WF_NodeNext (AD_WF_Node_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,EntityType,SeqNo,Description,AD_WF_NodeNext_ID,IsStdUserWorkflow,AD_WF_NodeNext_UU) VALUES (200031,'Y',TO_DATE('2021-08-17 18:10:51','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 18:10:51','YYYY-MM-DD HH24:MI:SS'),100,0,0,200030,'U',10,'(Standard Approval)',200028,'Y','b27ec4a5-b18e-4eec-8aa9-cc1903554e74')
;
-- Aug 17, 2021, 6:10:52 PM MYT
INSERT INTO AD_WF_NodeNext (AD_WF_Node_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,EntityType,SeqNo,Description,AD_WF_NodeNext_ID,IsStdUserWorkflow,AD_WF_NodeNext_UU) VALUES (200031,'Y',TO_DATE('2021-08-17 18:10:51','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 18:10:51','YYYY-MM-DD HH24:MI:SS'),100,0,0,200028,'U',100,'(Standard Transition)',200029,'N','8f0f7d9b-c4d1-4b80-8b77-e78ac4918de2')
;
-- Aug 17, 2021, 6:10:53 PM MYT
INSERT INTO AD_WF_NodeNext (AD_WF_Node_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,EntityType,SeqNo,Description,AD_WF_NodeNext_ID,IsStdUserWorkflow,AD_WF_NodeNext_UU) VALUES (200030,'Y',TO_DATE('2021-08-17 18:10:52','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 18:10:52','YYYY-MM-DD HH24:MI:SS'),100,0,0,200029,'U',100,'(Standard Transition)',200030,'N','e993246e-21ae-496f-857f-9d30c2f486ba')
;
-- Aug 17, 2021, 6:10:53 PM MYT
UPDATE AD_Workflow SET AD_WF_Node_ID=200031, IsValid='Y',Updated=TO_DATE('2021-08-17 18:10:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=200007
;
-- Aug 17, 2021, 6:10:53 PM MYT
INSERT INTO AD_Process (AD_Process_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,IsReport,Value,AccessLevel,EntityType,AD_Workflow_ID,IsBetaFunctionality,AD_Process_UU) VALUES (200135,0,0,'Y',TO_DATE('2021-08-17 18:10:53','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2021-08-17 18:10:53','YYYY-MM-DD HH24:MI:SS'),100,'Process Project Issue','N','C_ProjectIssue Process','3','U',200007,'N','10c5f71a-c84d-43df-87bd-29a4778351ef')
;
-- Aug 17, 2021, 6:10:53 PM MYT
UPDATE AD_Column SET AD_Process_ID=200135,Updated=TO_DATE('2021-08-17 18:10:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214576
;
-- Aug 17, 2021, 6:56:43 PM MYT
UPDATE AD_Tab SET IsReadOnly='N',Updated=TO_DATE('2021-08-17 18:56:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=558
;
SELECT register_migration_script('202108172001_IDEMPIERE-3494.sql') FROM dual
;

View File

@ -0,0 +1,192 @@
-- IDEMPIERE-3494 Implement DocStatus/DocAction for Project Issue
-- Aug 17, 2021, 4:14:00 PM MYT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (214575,0.0,'Approved','Indicates if this document requires approval','The Approved checkbox indicates if this document requires approval before it can be processed.',623,'IsApproved','N',1,'N','N','Y','N','N','N',20,0,0,'Y',TO_TIMESTAMP('2021-08-17 16:13:59','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 16:13:59','YYYY-MM-DD HH24:MI:SS'),100,351,'Y','N','D','N','e9809c24-128d-4f73-960f-4930cb0451ed','N')
;
-- Aug 17, 2021, 4:14:01 PM MYT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (214576,0.0,'Document Action','The targeted status of the document','You find the current status in the Document Status field. The options are listed in a popup',623,'DocAction','CO',2,'N','N','Y','N','N','N',28,135,0,0,'Y',TO_TIMESTAMP('2021-08-17 16:14:00','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 16:14:00','YYYY-MM-DD HH24:MI:SS'),100,287,'Y','N','D','N','67095868-e746-46fb-9666-fd3a655bee1c','N')
;
-- Aug 17, 2021, 4:14:01 PM MYT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (214577,0.0,'Document Status','The current status of the document','The Document Status indicates the status of a document at this time. If you want to change the document status, use the Document Action field',623,'DocStatus','DR',2,'N','N','Y','N','N','N',17,131,0,0,'Y',TO_TIMESTAMP('2021-08-17 16:14:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 16:14:01','YYYY-MM-DD HH24:MI:SS'),100,289,'Y','N','D','N','46e6517e-eec1-46c2-9220-064929e4e921','N')
;
-- Aug 17, 2021, 4:16:23 PM MYT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (214578,0,'Reversal ID','ID of document reversal',623,'Reversal_ID',10,'N','N','N','N','N',0,'N',30,200060,0,0,'Y',TO_TIMESTAMP('2021-08-17 16:16:22','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 16:16:22','YYYY-MM-DD HH24:MI:SS'),100,53457,'N','N','D','N','N','N','Y','0ae65bfe-c3e1-4402-885d-34ccbe5dcf43','N',0,'N','N','N')
;
-- Aug 17, 2021, 4:16:46 PM MYT
UPDATE AD_Column SET FKConstraintName='Reversal_CProjectIssue', FKConstraintType='N',Updated=TO_TIMESTAMP('2021-08-17 16:16:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214578
;
-- Aug 17, 2021, 4:16:46 PM MYT
ALTER TABLE C_ProjectIssue ADD COLUMN Reversal_ID NUMERIC(10) DEFAULT NULL
;
-- Aug 17, 2021, 4:16:46 PM MYT
ALTER TABLE C_ProjectIssue ADD CONSTRAINT Reversal_CProjectIssue FOREIGN KEY (Reversal_ID) REFERENCES c_projectissue(c_projectissue_id) DEFERRABLE INITIALLY DEFERRED
;
-- Aug 17, 2021, 4:20:24 PM MYT
UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='B',Updated=TO_TIMESTAMP('2021-08-17 16:20:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214576
;
-- Aug 17, 2021, 4:20:36 PM MYT
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2021-08-17 16:20:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214577
;
-- Aug 17, 2021, 4:27:31 PM MYT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField,IsQuickForm) VALUES (206738,'Document Status','The current status of the document','The Document Status indicates the status of a document at this time. If you want to change the document status, use the Document Action field',558,214577,'Y',0,180,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2021-08-17 16:27:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 16:27:30','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','2eca16e7-28bd-481c-98f8-433039f657e4','Y',180,1,2,1,'N','N','N','N')
;
-- Aug 17, 2021, 4:28:54 PM MYT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField,IsQuickForm) VALUES (206739,'Document Action','The targeted status of the document','You find the current status in the Document Status field. The options are listed in a popup',558,214576,'Y',0,190,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2021-08-17 16:28:54','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 16:28:54','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7e84f0d4-4b70-48bd-b1ab-2e90ffc04d6b','Y',190,5,2,1,'N','N','N','N')
;
-- Aug 17, 2021, 4:29:18 PM MYT
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8347
;
-- Aug 17, 2021, 4:29:18 PM MYT
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8222
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8213
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8221
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8214
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8220
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8224
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8229
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8223
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8217
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8225
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8218
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8216
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8236
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=8235
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206738
;
-- Aug 17, 2021, 4:29:19 PM MYT
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206739
;
-- Aug 17, 2021, 4:30:16 PM MYT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField,IsQuickForm) VALUES (206740,'Reversal ID','ID of document reversal',558,214578,'Y',0,180,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2021-08-17 16:30:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 16:30:15','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','e439e95a-906b-431d-a36f-77eb3583027a','Y',200,1,2,1,'N','N','N','N')
;
-- Aug 17, 2021, 4:30:23 PM MYT
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206740
;
-- Aug 17, 2021, 4:31:18 PM MYT
UPDATE AD_Field SET AD_FieldGroup_ID=101, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2021-08-17 16:31:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206738
;
-- Aug 17, 2021, 6:08:04 PM MYT
ALTER TABLE C_ProjectIssue ADD COLUMN IsApproved CHAR(1) DEFAULT 'N' CHECK (IsApproved IN ('Y','N')) NOT NULL
;
-- Aug 17, 2021, 6:08:04 PM MYT
ALTER TABLE C_ProjectIssue ADD COLUMN DocAction CHAR(2) DEFAULT 'CO' NOT NULL
;
-- Aug 17, 2021, 6:08:04 PM MYT
ALTER TABLE C_ProjectIssue ADD COLUMN DocStatus VARCHAR(2) DEFAULT 'DR' NOT NULL
;
-- Aug 17, 2021, 6:08:04 PM MYT
INSERT INTO t_alter_column values('c_projectissue','Reversal_ID','NUMERIC(10)',null,'NULL')
;
-- Aug 17, 2021, 6:10:48 PM MYT
INSERT INTO AD_Workflow (Name,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AccessLevel,EntityType,Author,WorkingTime,Duration,Version,Cost,DurationUnit,WaitingTime,PublishStatus,IsDefault,AD_Table_ID,Value,WorkflowType,IsValid,DocumentNo,IsBetaFunctionality,AD_Workflow_UU) VALUES ('Process_C_ProjectIssue',200007,0,0,'Y',TO_TIMESTAMP('2021-08-17 18:10:47','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 18:10:47','YYYY-MM-DD HH24:MI:SS'),100,'1','U','iDempiere',0,1,0,0.0,'D',0,'U','N',623,'Process_C_ProjectIssue','P','N','10000000','N','8ffb218e-e2b9-4375-87ec-11ca5d648283')
;
-- Aug 17, 2021, 6:10:49 PM MYT
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,Description,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"action",IsCentrallyMaintained,YPosition,EntityType,XPosition,"limit",Duration,Cost,WaitingTime,JoinElement,SplitElement,DocAction,Value,AD_WF_Node_UU) VALUES (200028,'(DocAuto)','(Standard Node)',200007,0,0,'Y',TO_TIMESTAMP('2021-08-17 18:10:48','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 18:10:48','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',0,'U',0,0,0,0.0,0,'X','X','--','(DocAuto)','3ae63237-fa0f-4b96-900b-77f814d31304')
;
-- Aug 17, 2021, 6:10:50 PM MYT
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,Description,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"action",IsCentrallyMaintained,YPosition,EntityType,XPosition,"limit",Duration,Cost,WaitingTime,JoinElement,SplitElement,DocAction,Value,AD_WF_Node_UU) VALUES (200029,'(DocComplete)','(Standard Node)',200007,0,0,'Y',TO_TIMESTAMP('2021-08-17 18:10:49','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 18:10:49','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',0,'U',0,0,0,0.0,0,'X','X','CO','(DocComplete)','e7b1f604-2233-45e2-9f99-ac4f27392edb')
;
-- Aug 17, 2021, 6:10:50 PM MYT
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,Description,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"action",IsCentrallyMaintained,YPosition,EntityType,XPosition,"limit",Duration,Cost,WaitingTime,JoinElement,SplitElement,DocAction,Value,AD_WF_Node_UU) VALUES (200030,'(DocPrepare)','(Standard Node)',200007,0,0,'Y',TO_TIMESTAMP('2021-08-17 18:10:50','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 18:10:50','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',0,'U',0,0,0,0.0,0,'X','X','PR','(DocPrepare)','be9ed2b0-f470-48d7-a83a-b37cc1c3a074')
;
-- Aug 17, 2021, 6:10:51 PM MYT
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,Description,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"action",IsCentrallyMaintained,YPosition,EntityType,XPosition,"limit",Duration,Cost,WaitingTime,JoinElement,SplitElement,Value,AD_WF_Node_UU) VALUES (200031,'(Start)','(Standard Node)',200007,0,0,'Y',TO_TIMESTAMP('2021-08-17 18:10:50','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 18:10:50','YYYY-MM-DD HH24:MI:SS'),100,'Z','Y',0,'U',0,0,0,0.0,0,'X','X','(Start)','274360c6-7c88-4e4d-9887-0042fd8f38af')
;
-- Aug 17, 2021, 6:10:51 PM MYT
INSERT INTO AD_WF_NodeNext (AD_WF_Node_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,EntityType,SeqNo,Description,AD_WF_NodeNext_ID,IsStdUserWorkflow,AD_WF_NodeNext_UU) VALUES (200031,'Y',TO_TIMESTAMP('2021-08-17 18:10:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 18:10:51','YYYY-MM-DD HH24:MI:SS'),100,0,0,200030,'U',10,'(Standard Approval)',200028,'Y','b27ec4a5-b18e-4eec-8aa9-cc1903554e74')
;
-- Aug 17, 2021, 6:10:52 PM MYT
INSERT INTO AD_WF_NodeNext (AD_WF_Node_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,EntityType,SeqNo,Description,AD_WF_NodeNext_ID,IsStdUserWorkflow,AD_WF_NodeNext_UU) VALUES (200031,'Y',TO_TIMESTAMP('2021-08-17 18:10:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 18:10:51','YYYY-MM-DD HH24:MI:SS'),100,0,0,200028,'U',100,'(Standard Transition)',200029,'N','8f0f7d9b-c4d1-4b80-8b77-e78ac4918de2')
;
-- Aug 17, 2021, 6:10:53 PM MYT
INSERT INTO AD_WF_NodeNext (AD_WF_Node_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,EntityType,SeqNo,Description,AD_WF_NodeNext_ID,IsStdUserWorkflow,AD_WF_NodeNext_UU) VALUES (200030,'Y',TO_TIMESTAMP('2021-08-17 18:10:52','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 18:10:52','YYYY-MM-DD HH24:MI:SS'),100,0,0,200029,'U',100,'(Standard Transition)',200030,'N','e993246e-21ae-496f-857f-9d30c2f486ba')
;
-- Aug 17, 2021, 6:10:53 PM MYT
UPDATE AD_Workflow SET AD_WF_Node_ID=200031, IsValid='Y',Updated=TO_TIMESTAMP('2021-08-17 18:10:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=200007
;
-- Aug 17, 2021, 6:10:53 PM MYT
INSERT INTO AD_Process (AD_Process_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,IsReport,Value,AccessLevel,EntityType,AD_Workflow_ID,IsBetaFunctionality,AD_Process_UU) VALUES (200135,0,0,'Y',TO_TIMESTAMP('2021-08-17 18:10:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2021-08-17 18:10:53','YYYY-MM-DD HH24:MI:SS'),100,'Process Project Issue','N','C_ProjectIssue Process','3','U',200007,'N','10c5f71a-c84d-43df-87bd-29a4778351ef')
;
-- Aug 17, 2021, 6:10:53 PM MYT
UPDATE AD_Column SET AD_Process_ID=200135,Updated=TO_TIMESTAMP('2021-08-17 18:10:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214576
;
-- Aug 17, 2021, 6:56:43 PM MYT
UPDATE AD_Tab SET IsReadOnly='N',Updated=TO_TIMESTAMP('2021-08-17 18:56:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=558
;
SELECT register_migration_script('202108172001_IDEMPIERE-3494.sql') FROM dual
;

View File

@ -29,6 +29,7 @@ import org.compiere.model.MStorageOnHand;
import org.compiere.model.MTimeExpense;
import org.compiere.model.MTimeExpenseLine;
import org.compiere.util.Env;
import org.compiere.wf.MWorkflow;
/**
* Issue to Project.
@ -173,7 +174,11 @@ public class ProjectIssue extends SvrProcess
else if (inOut.getDescription() != null)
pi.setDescription(inOut.getDescription());
pi.setM_InOutLine_ID(inOutLines[i].getM_InOutLine_ID());
pi.process();
pi.saveEx();
ProcessInfo processInfo = MWorkflow.runDocumentActionWorkflow(pi, DocAction.ACTION_Complete);
if (processInfo.isError())
throw new RuntimeException(processInfo.getSummary());
pi.saveEx();
// Find/Create Project Line
MProjectLine pl = null;
@ -250,7 +255,12 @@ public class ProjectIssue extends SvrProcess
else if (expenseLines[i].getDescription() != null)
pi.setDescription(expenseLines[i].getDescription());
pi.setS_TimeExpenseLine_ID(expenseLines[i].getS_TimeExpenseLine_ID());
pi.process();
pi.saveEx();
ProcessInfo processInfo = MWorkflow.runDocumentActionWorkflow(pi, DocAction.ACTION_Complete);
if (processInfo.isError())
throw new RuntimeException(processInfo.getSummary());
pi.saveEx();
// Find/Create Project Line
MProjectLine pl = new MProjectLine(m_project);
pl.setMProjectIssue(pi); // setIssue
@ -289,7 +299,11 @@ public class ProjectIssue extends SvrProcess
pi.setDescription(m_Description);
else if (pl.getDescription() != null)
pi.setDescription(pl.getDescription());
pi.process();
pi.saveEx();
ProcessInfo processInfo = MWorkflow.runDocumentActionWorkflow(pi, DocAction.ACTION_Complete);
if (processInfo.isError())
throw new RuntimeException(processInfo.getSummary());
pi.saveEx();
// Update Line
pl.setMProjectIssue(pi);
@ -319,7 +333,11 @@ public class ProjectIssue extends SvrProcess
pi.setMovementDate(m_MovementDate);
if (m_Description != null && m_Description.length() > 0)
pi.setDescription(m_Description);
pi.process();
pi.saveEx();
ProcessInfo processInfo = MWorkflow.runDocumentActionWorkflow(pi, DocAction.ACTION_Complete);
if (processInfo.isError())
throw new RuntimeException(processInfo.getSummary());
pi.saveEx();
// Create Project Line
MProjectLine pl = new MProjectLine(m_project);
@ -340,7 +358,8 @@ public class ProjectIssue extends SvrProcess
m_projectIssues = m_project.getIssues();
for (int i = 0; i < m_projectIssues.length; i++)
{
if (m_projectIssues[i].getS_TimeExpenseLine_ID() == S_TimeExpenseLine_ID)
if (m_projectIssues[i].getS_TimeExpenseLine_ID() == S_TimeExpenseLine_ID
&& (m_projectIssues[i].getDocStatus().equals(DocAction.STATUS_Completed) || m_projectIssues[i].getDocStatus().equals(DocAction.STATUS_Closed)))
return true;
}
return false;
@ -357,7 +376,8 @@ public class ProjectIssue extends SvrProcess
m_projectIssues = m_project.getIssues();
for (int i = 0; i < m_projectIssues.length; i++)
{
if (m_projectIssues[i].getM_InOutLine_ID() == M_InOutLine_ID)
if (m_projectIssues[i].getM_InOutLine_ID() == M_InOutLine_ID
&& (m_projectIssues[i].getDocStatus().equals(DocAction.STATUS_Completed) || m_projectIssues[i].getDocStatus().equals(DocAction.STATUS_Closed)))
return true;
}
return false;

View File

@ -28,7 +28,10 @@ package org.adempiere.model;
import java.io.File;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
@ -58,6 +61,8 @@ public class DocActionDelegate<T extends PO & DocAction> implements DocAction {
/** Just Prepared Flag */
private boolean m_justPrepared = false;
private Map<String, Callable<String>> actionCallables = new HashMap<String, Callable<String>>();
/** Logger */
protected transient CLogger log = CLogger.getCLogger (getClass());
@ -65,6 +70,15 @@ public class DocActionDelegate<T extends PO & DocAction> implements DocAction {
this.po = po;
}
/**
* set callable for docaction
* @param docAction
* @param callable
*/
public void setActionCallable(String docAction, Callable<String> callable) {
actionCallables.put(docAction, callable);
}
@Override
public void setDocStatus(String DocStatus) {
po.columnExists(DOC_COLUMNNAME_DocStatus, true);
@ -123,6 +137,17 @@ public class DocActionDelegate<T extends PO & DocAction> implements DocAction {
MPeriod.testPeriodOpen(getCtx(), date, doctype, getAD_Org_ID());
}
Callable<String> callable = actionCallables.get(DocAction.ACTION_Prepare);
if (callable != null) {
try {
m_processMsg = callable.call();
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(po, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
@ -175,6 +200,17 @@ public class DocActionDelegate<T extends PO & DocAction> implements DocAction {
approveIt();
if (log.isLoggable(Level.INFO)) log.info(po.toString());
Callable<String> callable = actionCallables.get(DocAction.ACTION_Complete);
if (callable != null) {
try {
m_processMsg = callable.call();
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
// User Validation
String valid = ModelValidationEngine.get().fireDocValidate(po, ModelValidator.TIMING_AFTER_COMPLETE);
if (valid != null)
@ -211,6 +247,16 @@ public class DocActionDelegate<T extends PO & DocAction> implements DocAction {
m_processMsg = ModelValidationEngine.get().fireDocValidate(po,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
Callable<String> callable = actionCallables.get(DocAction.ACTION_Void);
if (callable != null) {
try {
m_processMsg = callable.call();
if (m_processMsg != null)
return false;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
} else {
boolean accrual = false;
int doctype = -1;
@ -259,6 +305,17 @@ public class DocActionDelegate<T extends PO & DocAction> implements DocAction {
if (m_processMsg != null)
return false;
Callable<String> callable = actionCallables.get(DocAction.ACTION_Close);
if (callable != null) {
try {
m_processMsg = callable.call();
if (m_processMsg != null)
return false;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
setProcessed(true);
setDocAction(DocAction.ACTION_None);
@ -277,11 +334,23 @@ public class DocActionDelegate<T extends PO & DocAction> implements DocAction {
if (m_processMsg != null)
return false;
Callable<String> callable = actionCallables.get(DocAction.ACTION_Reverse_Correct);
if (callable != null) {
try {
m_processMsg = callable.call();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(po,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
if (callable != null)
return m_processMsg == null;
else
return false; // reverse needs to be implemented to create a negative document
}
@ -293,11 +362,23 @@ public class DocActionDelegate<T extends PO & DocAction> implements DocAction {
if (m_processMsg != null)
return false;
Callable<String> callable = actionCallables.get(DocAction.ACTION_Reverse_Accrual);
if (callable != null) {
try {
m_processMsg = callable.call();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(po,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
if (callable != null)
return m_processMsg == null;
else
return false; // reverse needs to be implemented to create a negative document
}
@ -309,6 +390,15 @@ public class DocActionDelegate<T extends PO & DocAction> implements DocAction {
if (m_processMsg != null)
return false;
Callable<String> callable = actionCallables.get(DocAction.ACTION_ReActivate);
if (callable != null) {
try {
m_processMsg = callable.call();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(po,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
@ -316,6 +406,10 @@ public class DocActionDelegate<T extends PO & DocAction> implements DocAction {
setDocAction(DocAction.ACTION_Complete);
setProcessed(false);
if (callable != null)
return m_processMsg == null;
else
return false; // reactivate needs to be implemented to reverse the effect of complete and post
}

View File

@ -128,6 +128,32 @@ public interface I_C_ProjectIssue
*/
public String getDescription();
/** Column name DocAction */
public static final String COLUMNNAME_DocAction = "DocAction";
/** Set Document Action.
* The targeted status of the document
*/
public void setDocAction (String DocAction);
/** Get Document Action.
* The targeted status of the document
*/
public String getDocAction();
/** Column name DocStatus */
public static final String COLUMNNAME_DocStatus = "DocStatus";
/** Set Document Status.
* The current status of the document
*/
public void setDocStatus (String DocStatus);
/** Get Document Status.
* The current status of the document
*/
public String getDocStatus();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
@ -141,6 +167,19 @@ public interface I_C_ProjectIssue
*/
public boolean isActive();
/** Column name IsApproved */
public static final String COLUMNNAME_IsApproved = "IsApproved";
/** Set Approved.
* Indicates if this document requires approval
*/
public void setIsApproved (boolean IsApproved);
/** Get Approved.
* Indicates if this document requires approval
*/
public boolean isApproved();
/** Column name Line */
public static final String COLUMNNAME_Line = "Line";
@ -288,6 +327,21 @@ public interface I_C_ProjectIssue
/** Get Process Now */
public boolean isProcessing();
/** Column name Reversal_ID */
public static final String COLUMNNAME_Reversal_ID = "Reversal_ID";
/** Set Reversal ID.
* ID of document reversal
*/
public void setReversal_ID (int Reversal_ID);
/** Get Reversal ID.
* ID of document reversal
*/
public int getReversal_ID();
public org.compiere.model.I_C_ProjectIssue getReversal() throws RuntimeException;
/** Column name S_TimeExpenseLine_ID */
public static final String COLUMNNAME_S_TimeExpenseLine_ID = "S_TimeExpenseLine_ID";

View File

@ -16,6 +16,7 @@
*****************************************************************************/
package org.compiere.model;
import java.io.File;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
@ -24,6 +25,10 @@ import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.exceptions.NegativeInventoryDisallowedException;
import org.adempiere.model.DocActionDelegate;
import org.compiere.process.DocAction;
import org.compiere.process.DocOptions;
import org.compiere.process.DocumentEngine;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -34,13 +39,14 @@ import org.compiere.util.Msg;
* @author Jorg Janke
* @version $Id: MProjectIssue.java,v 1.2 2006/07/30 00:51:02 jjanke Exp $
*/
public class MProjectIssue extends X_C_ProjectIssue
public class MProjectIssue extends X_C_ProjectIssue implements DocAction, DocOptions
{
/**
*
*/
private static final long serialVersionUID = 4714411434615096132L;
private static final long serialVersionUID = 1653681817205265764L;
private DocActionDelegate<MProjectIssue> docActionDelegate = null;
/**
* Standard Constructor
@ -57,6 +63,7 @@ public class MProjectIssue extends X_C_ProjectIssue
setPosted (false);
setProcessed (false);
}
init();
} // MProjectIssue
/**
@ -68,6 +75,7 @@ public class MProjectIssue extends X_C_ProjectIssue
public MProjectIssue (Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
init();
} // MProjectIssue
/**
@ -86,8 +94,16 @@ public class MProjectIssue extends X_C_ProjectIssue
setMovementQty (Env.ZERO);
setPosted (false);
setProcessed (false);
init();
} // MProjectIssue
private void init() {
docActionDelegate = new DocActionDelegate<>(this);
docActionDelegate.setActionCallable(DocAction.ACTION_Complete, () -> { return doComplete(); });
docActionDelegate.setActionCallable(DocAction.ACTION_Reverse_Correct, () -> { return doReverse(false); });
docActionDelegate.setActionCallable(DocAction.ACTION_Reverse_Accrual, () -> { return doReverse(true); });
}
/** Parent */
private MProject m_parent = null;
@ -127,16 +143,22 @@ public class MProjectIssue extends X_C_ProjectIssue
/**************************************************************************
* Process Issue
* @deprecated
* @return true if processed
*/
public boolean process()
{
if (!save())
return false;
saveEx();
return doComplete() == null;
} // process
private String doComplete()
{
if (getM_Product_ID() == 0)
{
log.log(Level.SEVERE, "No Product");
return false;
return "No Product";
}
MProduct product = MProduct.get (getCtx(), getM_Product_ID());
@ -145,11 +167,10 @@ public class MProjectIssue extends X_C_ProjectIssue
if (!product.isStocked())
{
setProcessed(true);
return save();
saveEx();
return null;
}
/** @todo Transaction */
// ** Create Material Transactions **
MTransaction mTrx = new MTransaction (getCtx(), getAD_Org_ID(),
MTransaction.MOVEMENTTYPE_WorkOrderPlus,
@ -219,21 +240,197 @@ public class MProjectIssue extends X_C_ProjectIssue
if (ok)
{
if (mTrx.save(get_TrxName()))
mTrx.saveEx(get_TrxName());
}
else
{
setProcessed (true);
if (save())
return true;
else
log.log(Level.SEVERE, "Issue not saved"); // requires trx !!
log.log(Level.SEVERE, "Storage not updated");
return "Storage not updated";
}
else
log.log(Level.SEVERE, "Transaction not saved"); // requires trx !!
}
else
log.log(Level.SEVERE, "Storage not updated"); // OK
//
return false;
} // process
return null;
}
private String doReverse(boolean accrual) {
MProject project = getParent();
MProjectIssue reversal = new MProjectIssue (project);
reversal.set_TrxName(get_TrxName());
reversal.setM_Locator_ID(getM_Locator_ID());
reversal.setM_Product_ID(getM_Product_ID());
reversal.setM_AttributeSetInstance_ID(getM_AttributeSetInstance_ID());
reversal.setMovementQty(getMovementQty().negate());
if (accrual)
reversal.setMovementDate(new Timestamp(System.currentTimeMillis()));
else
reversal.setMovementDate(getMovementDate());
reversal.setDescription("Reversal for Line No " + getLine() + "<"+getC_ProjectIssue_ID()+">");
reversal.setReversal_ID(getC_ProjectIssue_ID());
reversal.saveEx(get_TrxName());
//
try {
if (!reversal.processIt(DocAction.ACTION_Complete))
{
return "Reversal ERROR: " + reversal.getProcessMsg();
}
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException)e;
else
throw new AdempiereException(e);
}
reversal.closeIt();
reversal.setProcessing (false);
reversal.setDocStatus(DocAction.STATUS_Reversed);
reversal.setDocAction(DocAction.ACTION_None);
reversal.saveEx(get_TrxName());
setReversal_ID(reversal.getC_ProjectIssue_ID());
setDocStatus(DOCSTATUS_Reversed);
setDocAction(DOCACTION_None);
return null;
}
/**
*
* @return true if this is a reversal document created to reverse another document
*/
public boolean isReversal() {
return getReversal_ID() > 0 && (getC_ProjectIssue_ID() > getReversal_ID() || getC_ProjectIssue_ID() == 0);
}
@Override
public void setDocStatus(String newStatus) {
docActionDelegate.setDocStatus(newStatus);
}
@Override
public String getDocStatus() {
return docActionDelegate.getDocStatus();
}
@Override
public boolean processIt(String action) throws Exception {
return docActionDelegate.processIt(action);
}
@Override
public boolean unlockIt() {
return docActionDelegate.unlockIt();
}
@Override
public boolean invalidateIt() {
return docActionDelegate.invalidateIt();
}
@Override
public String prepareIt() {
return docActionDelegate.prepareIt();
}
@Override
public boolean approveIt() {
return docActionDelegate.approveIt();
}
@Override
public boolean rejectIt() {
return docActionDelegate.rejectIt();
}
@Override
public String completeIt() {
return docActionDelegate.completeIt();
}
@Override
public boolean voidIt() {
return docActionDelegate.voidIt();
}
@Override
public boolean closeIt() {
return docActionDelegate.closeIt();
}
@Override
public boolean reverseCorrectIt() {
return docActionDelegate.reverseCorrectIt();
}
@Override
public boolean reverseAccrualIt() {
return docActionDelegate.reverseAccrualIt();
}
@Override
public boolean reActivateIt() {
return false;
}
@Override
public String getSummary() {
String summary = getDocumentInfo();
if (getM_Product_ID() > 0) {
summary = summary + "|" + MProduct.get(getM_Product_ID()).getValue() + "|" + getMovementQty().toPlainString();
}
return summary;
}
@Override
public String getDocumentNo() {
return getParent().getValue()+"|"+getLine();
}
@Override
public String getDocumentInfo() {
return getParent().getValue()+"|"+getParent().getName()+"|"+getLine();
}
@Override
public File createPDF() {
return docActionDelegate.createPDF();
}
@Override
public String getProcessMsg() {
return docActionDelegate.getProcessMsg();
}
@Override
public int getDoc_User_ID() {
return getParent().getSalesRep_ID();
}
@Override
public int getC_Currency_ID() {
return docActionDelegate.getC_Currency_ID();
}
@Override
public BigDecimal getApprovalAmt() {
return docActionDelegate.getApprovalAmt();
}
@Override
public String getDocAction() {
return docActionDelegate.getDocAction();
}
@Override
public int customizeValidActions(String docStatus, Object processing, String orderType, String isSOTrx,
int AD_Table_ID, String[] docAction, String[] options, int index) {
// Complete .. CO
if (AD_Table_ID == get_Table_ID() && docStatus.equals(DocumentEngine.STATUS_Completed)) {
boolean periodOpen = MPeriod.isOpen(Env.getCtx(), getMovementDate(), MDocType.DOCBASETYPE_ProjectIssue, getAD_Org_ID());
if (periodOpen) {
options[index++] = DocumentEngine.ACTION_Reverse_Correct;
}
options[index++] = DocumentEngine.ACTION_Reverse_Accrual;
}
return index;
}
} // MProjectIssue

View File

@ -33,7 +33,7 @@ public class X_C_ProjectIssue extends PO implements I_C_ProjectIssue, I_Persiste
/**
*
*/
private static final long serialVersionUID = 20201220L;
private static final long serialVersionUID = 20210817L;
/** Standard Constructor */
public X_C_ProjectIssue (Properties ctx, int C_ProjectIssue_ID, String trxName)
@ -43,6 +43,12 @@ public class X_C_ProjectIssue extends PO implements I_C_ProjectIssue, I_Persiste
{
setC_Project_ID (0);
setC_ProjectIssue_ID (0);
setDocAction (null);
// CO
setDocStatus (null);
// DR
setIsApproved (false);
// N
setLine (0);
// @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM C_ProjectIssue WHERE C_Project_ID=@C_Project_ID@
setM_AttributeSetInstance_ID (0);
@ -174,6 +180,122 @@ public class X_C_ProjectIssue extends PO implements I_C_ProjectIssue, I_Persiste
return (String)get_Value(COLUMNNAME_Description);
}
/** DocAction AD_Reference_ID=135 */
public static final int DOCACTION_AD_Reference_ID=135;
/** <None> = -- */
public static final String DOCACTION_None = "--";
/** Approve = AP */
public static final String DOCACTION_Approve = "AP";
/** Close = CL */
public static final String DOCACTION_Close = "CL";
/** Complete = CO */
public static final String DOCACTION_Complete = "CO";
/** Invalidate = IN */
public static final String DOCACTION_Invalidate = "IN";
/** Post = PO */
public static final String DOCACTION_Post = "PO";
/** Prepare = PR */
public static final String DOCACTION_Prepare = "PR";
/** Reverse - Accrual = RA */
public static final String DOCACTION_Reverse_Accrual = "RA";
/** Reverse - Correct = RC */
public static final String DOCACTION_Reverse_Correct = "RC";
/** Re-activate = RE */
public static final String DOCACTION_Re_Activate = "RE";
/** Reject = RJ */
public static final String DOCACTION_Reject = "RJ";
/** Void = VO */
public static final String DOCACTION_Void = "VO";
/** Wait Complete = WC */
public static final String DOCACTION_WaitComplete = "WC";
/** Unlock = XL */
public static final String DOCACTION_Unlock = "XL";
/** Set Document Action.
@param DocAction
The targeted status of the document
*/
public void setDocAction (String DocAction)
{
set_Value (COLUMNNAME_DocAction, DocAction);
}
/** Get Document Action.
@return The targeted status of the document
*/
public String getDocAction ()
{
return (String)get_Value(COLUMNNAME_DocAction);
}
/** DocStatus AD_Reference_ID=131 */
public static final int DOCSTATUS_AD_Reference_ID=131;
/** Unknown = ?? */
public static final String DOCSTATUS_Unknown = "??";
/** Approved = AP */
public static final String DOCSTATUS_Approved = "AP";
/** Closed = CL */
public static final String DOCSTATUS_Closed = "CL";
/** Completed = CO */
public static final String DOCSTATUS_Completed = "CO";
/** Drafted = DR */
public static final String DOCSTATUS_Drafted = "DR";
/** Invalid = IN */
public static final String DOCSTATUS_Invalid = "IN";
/** In Progress = IP */
public static final String DOCSTATUS_InProgress = "IP";
/** Not Approved = NA */
public static final String DOCSTATUS_NotApproved = "NA";
/** Reversed = RE */
public static final String DOCSTATUS_Reversed = "RE";
/** Voided = VO */
public static final String DOCSTATUS_Voided = "VO";
/** Waiting Confirmation = WC */
public static final String DOCSTATUS_WaitingConfirmation = "WC";
/** Waiting Payment = WP */
public static final String DOCSTATUS_WaitingPayment = "WP";
/** Set Document Status.
@param DocStatus
The current status of the document
*/
public void setDocStatus (String DocStatus)
{
set_Value (COLUMNNAME_DocStatus, DocStatus);
}
/** Get Document Status.
@return The current status of the document
*/
public String getDocStatus ()
{
return (String)get_Value(COLUMNNAME_DocStatus);
}
/** Set Approved.
@param IsApproved
Indicates if this document requires approval
*/
public void setIsApproved (boolean IsApproved)
{
set_Value (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved));
}
/** Get Approved.
@return Indicates if this document requires approval
*/
public boolean isApproved ()
{
Object oo = get_Value(COLUMNNAME_IsApproved);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Line No.
@param Line
Unique line for this document
@ -432,6 +554,34 @@ public class X_C_ProjectIssue extends PO implements I_C_ProjectIssue, I_Persiste
return false;
}
public org.compiere.model.I_C_ProjectIssue getReversal() throws RuntimeException
{
return (org.compiere.model.I_C_ProjectIssue)MTable.get(getCtx(), org.compiere.model.I_C_ProjectIssue.Table_Name)
.getPO(getReversal_ID(), get_TrxName()); }
/** Set Reversal ID.
@param Reversal_ID
ID of document reversal
*/
public void setReversal_ID (int Reversal_ID)
{
if (Reversal_ID < 1)
set_ValueNoCheck (COLUMNNAME_Reversal_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Reversal_ID, Integer.valueOf(Reversal_ID));
}
/** Get Reversal ID.
@return ID of document reversal
*/
public int getReversal_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Reversal_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_S_TimeExpenseLine getS_TimeExpenseLine() throws RuntimeException
{
return (org.compiere.model.I_S_TimeExpenseLine)MTable.get(getCtx(), org.compiere.model.I_S_TimeExpenseLine.Table_Name)