IDEMPIERE-3947 Fixed Asset bugs and enhancements. Implement import fixed asset for multiple accounting schema.

This commit is contained in:
hengsin 2020-03-24 18:35:08 +08:00
parent 1414928029
commit 41b8e0e62b
8 changed files with 1669 additions and 67 deletions

View File

@ -0,0 +1,594 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3947 Fixed Asset bugs and enhancements
-- Feb 11, 2020, 11:36:17 AM SGT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_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 (214180,0,'ISO Currency Code','Three letter ISO 4217 Code of the Currency','For details - http://www.unece.org/trade/rec/rec09en.htm',53277,'ISO_Code',3,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2020-02-11 11:36:15','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:36:15','YYYY-MM-DD HH24:MI:SS'),100,328,'Y','N','D','N','N','N','Y','d3b4c038-fcfd-4276-bee8-b879cc870806','Y',0,'N','N','N')
;
-- Feb 11, 2020, 11:36:26 AM SGT
ALTER TABLE I_FixedAsset ADD ISO_Code VARCHAR2(3) DEFAULT NULL
;
-- Feb 11, 2020, 11:37:03 AM SGT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_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,FKConstraintType,IsHtml) VALUES (214181,0,'Currency','The Currency for this record','Indicates the Currency to be used when processing or reporting on this record',53277,'C_Currency_ID',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_DATE('2020-02-11 11:37:02','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:37:02','YYYY-MM-DD HH24:MI:SS'),100,193,'Y','N','D','N','N','N','Y','e7596989-7e4c-43f8-9e55-f20866d5c12d','Y',0,'N','N','N','N')
;
-- Feb 11, 2020, 11:40:00 AM SGT
UPDATE AD_Column SET FKConstraintName='CCurrency_IFixedAsset', FKConstraintType='N',Updated=TO_DATE('2020-02-11 11:40:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214181
;
-- Feb 11, 2020, 11:40:00 AM SGT
ALTER TABLE I_FixedAsset ADD C_Currency_ID NUMBER(10) DEFAULT NULL
;
-- Feb 11, 2020, 11:40:00 AM SGT
ALTER TABLE I_FixedAsset ADD CONSTRAINT CCurrency_IFixedAsset FOREIGN KEY (C_Currency_ID) REFERENCES c_currency(c_currency_id) DEFERRABLE INITIALLY DEFERRED
;
-- Feb 11, 2020, 11:40:46 AM SGT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_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 (214182,0,'Entered Amount',53277,'AssetAmtEntered','0',10,'N','N','N','N','N',0,'N',12,0,0,'Y',TO_DATE('2020-02-11 11:40:45','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:40:45','YYYY-MM-DD HH24:MI:SS'),100,54207,'Y','N','D','N','N','N','Y','bc12181f-f685-46fe-9c76-b2468ad29e9b','Y',0,'N','N','N')
;
-- Feb 11, 2020, 11:40:51 AM SGT
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2020-02-11 11:40:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214182
;
-- Feb 11, 2020, 11:40:57 AM SGT
ALTER TABLE I_FixedAsset ADD AssetAmtEntered NUMBER DEFAULT 0 NOT NULL
;
-- Feb 11, 2020, 11:41:51 AM SGT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_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 (214183,0,'Source Amount',53277,'AssetSourceAmt','0',22,'N','N','Y','N','N',0,'N',12,0,0,'Y',TO_DATE('2020-02-11 11:41:50','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:41:50','YYYY-MM-DD HH24:MI:SS'),100,54202,'Y','N','D','N','N','N','Y','43286a53-e708-431f-978e-1b7a25ec3841','Y',0,'N','N','N')
;
-- Feb 11, 2020, 11:42:15 AM SGT
ALTER TABLE I_FixedAsset ADD AssetSourceAmt NUMBER DEFAULT 0 NOT NULL
;
-- Feb 11, 2020, 11:42:52 AM SGT
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_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 (214184,0,'Account Schema Name','Name of the Accounting Schema',53277,'AcctSchemaName',120,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2020-02-11 11:42:51','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:42:51','YYYY-MM-DD HH24:MI:SS'),100,2084,'Y','Y','D','N','N','N','Y','63f665c5-5085-4c7e-9f2c-b5ae163de16e','Y',10,'N','N','N')
;
-- Feb 11, 2020, 11:42:58 AM SGT
ALTER TABLE I_FixedAsset ADD AcctSchemaName VARCHAR2(120) DEFAULT NULL
;
-- Feb 11, 2020, 11:43:45 AM SGT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_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,FKConstraintType,IsHtml) VALUES (214185,0,'Accounting Schema','Rules for accounting','An Accounting Schema defines the rules used in accounting such as costing method, currency and calendar',53277,'C_AcctSchema_ID',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_DATE('2020-02-11 11:43:45','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:43:45','YYYY-MM-DD HH24:MI:SS'),100,181,'N','N','D','N','N','N','Y','bf429587-d193-4190-a32d-8503ce63c2d3','Y',0,'N','N','C','N')
;
-- Feb 11, 2020, 11:43:51 AM SGT
UPDATE AD_Column SET FKConstraintName='CAcctSchema_IFixedAsset', FKConstraintType='C',Updated=TO_DATE('2020-02-11 11:43:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214185
;
-- Feb 11, 2020, 11:43:51 AM SGT
ALTER TABLE I_FixedAsset ADD C_AcctSchema_ID NUMBER(10) DEFAULT NULL
;
-- Feb 11, 2020, 11:43:51 AM SGT
ALTER TABLE I_FixedAsset ADD CONSTRAINT CAcctSchema_IFixedAsset FOREIGN KEY (C_AcctSchema_ID) REFERENCES c_acctschema(c_acctschema_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
;
-- Feb 11, 2020, 11:44:43 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206390,'ISO Currency Code','Three letter ISO 4217 Code of the Currency','For details - http://www.unece.org/trade/rec/rec09en.htm',53334,214180,'Y',3,310,'N','N','N','N',0,0,'Y',TO_DATE('2020-02-11 11:44:42','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:44:42','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7236b757-b73a-450a-9c85-98a8ab08389d','Y',310,2)
;
-- Feb 11, 2020, 11:44:44 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206391,'Currency','The Currency for this record','Indicates the Currency to be used when processing or reporting on this record',53334,214181,'Y',22,320,'N','N','N','N',0,0,'Y',TO_DATE('2020-02-11 11:44:43','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:44:43','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','11bdfc71-4d1f-4d31-9b3a-b88d75406bd8','Y',320,2)
;
-- Feb 11, 2020, 11:44:45 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206392,'Entered Amount',53334,214182,'Y',10,330,'N','N','N','N',0,0,'Y',TO_DATE('2020-02-11 11:44:45','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:44:45','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','bfe5930e-9348-4b2a-9087-a4d0461d3fc2','Y',330,2)
;
-- Feb 11, 2020, 11:44:46 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206393,'Source Amount',53334,214183,'Y',22,340,'N','N','N','N',0,0,'Y',TO_DATE('2020-02-11 11:44:45','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:44:45','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','e2b58b61-b516-4f16-b282-f861cc3248bb','Y',340,2)
;
-- Feb 11, 2020, 11:44:47 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206394,'Account Schema Name','Name of the Accounting Schema',53334,214184,'Y',120,350,'N','N','N','N',0,0,'Y',TO_DATE('2020-02-11 11:44:47','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:44:47','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','3e4eaad8-098f-418d-a9be-3deb18a4e00b','Y',350,5)
;
-- Feb 11, 2020, 11:44:48 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206395,'Accounting Schema','Rules for accounting','An Accounting Schema defines the rules used in accounting such as costing method, currency and calendar',53334,214185,'Y',22,360,'N','N','N','N',0,0,'Y',TO_DATE('2020-02-11 11:44:47','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-02-11 11:44:47','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','0adfa648-05b8-415f-a655-3ca44584dfc9','Y',360,2)
;
-- Feb 11, 2020, 11:46:29 AM SGT
UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-11 11:46:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 11, 2020, 11:46:29 AM SGT
UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-11 11:46:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206393
;
-- Feb 11, 2020, 11:46:30 AM SGT
UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-11 11:46:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 11, 2020, 11:46:30 AM SGT
UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-11 11:46:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206392
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206393
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59489
;
-- Feb 11, 2020, 11:47:45 AM SGT
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59499
;
-- Feb 11, 2020, 11:47:58 AM SGT
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59485
;
-- Feb 11, 2020, 11:47:58 AM SGT
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59498
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59474
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59494
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59497
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59493
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59470
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59478
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59479
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59481
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59482
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=130,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59501
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=140,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59502
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=150,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59488
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=160,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59507
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=170,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59506
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=180,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59495
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=190,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59496
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=200,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59503
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=210,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59476
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=220,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=200161
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=230,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59508
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=240,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59509
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=250,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59486
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=260,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59471
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=270,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59472
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=280,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=290,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=300,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206392
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=310,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206393
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=320,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=330,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=340,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59489
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=350,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59499
;
-- Feb 11, 2020, 12:00:51 PM SGT
UPDATE AD_Field SET SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-11 12:00:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59494
;
-- Feb 11, 2020, 12:00:51 PM SGT
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-11 12:00:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59479
;
-- Feb 11, 2020, 12:00:52 PM SGT
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-11 12:00:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59482
;
-- Feb 11, 2020, 12:00:52 PM SGT
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-11 12:00:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59502
;
-- Feb 11, 2020, 12:00:52 PM SGT
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-11 12:00:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59496
;
-- Feb 27, 2020, 2:40:01 PM SGT
UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:40:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 27, 2020, 2:40:01 PM SGT
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:40:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 27, 2020, 2:40:01 PM SGT
UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:40:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 27, 2020, 2:40:02 PM SGT
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:40:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 27, 2020, 2:40:43 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, SeqNoGrid=280, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:40:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 27, 2020, 2:40:48 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, SeqNoGrid=290, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:40:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 27, 2020, 2:40:59 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, SeqNoGrid=320, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:40:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 27, 2020, 2:41:05 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, SeqNoGrid=330, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:41:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 27, 2020, 2:48:27 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, MandatoryLogic='@C_Currency_ID@=0 & @ISO_Code@=''''', IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:48:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 27, 2020, 2:54:44 PM SGT
UPDATE AD_Field SET IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:54:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59508
;
-- Feb 27, 2020, 2:55:03 PM SGT
UPDATE AD_Field SET IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 14:55:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59471
;
-- Feb 27, 2020, 3:09:22 PM SGT
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59477
;
-- Feb 27, 2020, 3:09:22 PM SGT
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59478
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59479
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59481
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59482
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59501
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59502
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59488
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59507
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59506
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59495
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59496
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59503
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59476
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=200161
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59508
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59509
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59486
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59471
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59472
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206392
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206393
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59489
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59499
;
-- Feb 27, 2020, 3:09:39 PM SGT
UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59477
;
-- Feb 27, 2020, 3:09:39 PM SGT
UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59478
;
-- Feb 27, 2020, 3:09:39 PM SGT
UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59479
;
-- Feb 27, 2020, 3:09:39 PM SGT
UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59481
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=130,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59482
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=140,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59501
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=150,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59502
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=160,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59488
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=170,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59507
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=180,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59506
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=190,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59495
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=200,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59496
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=210,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59503
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=220,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59476
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=230,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=200161
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=240,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59508
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=250,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59509
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=260,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59486
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=270,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59471
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=280,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59472
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=290,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=300,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=310,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206392
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=320,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206393
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=330,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 27, 2020, 3:09:43 PM SGT
UPDATE AD_Field SET SeqNoGrid=340,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 27, 2020, 3:09:43 PM SGT
UPDATE AD_Field SET SeqNoGrid=350,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59489
;
-- Feb 27, 2020, 3:09:43 PM SGT
UPDATE AD_Field SET SeqNoGrid=360,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=59499
;
-- Feb 27, 2020, 3:10:13 PM SGT
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 15:10:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59477
;
-- Feb 27, 2020, 3:15:38 PM SGT
UPDATE AD_Field SET IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-27 15:15:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59477
;
-- Feb 17, 2020, 5:43:36 PM SGT
UPDATE AD_Field SET IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-02-17 17:43:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59493
;
-- Feb 17, 2020, 5:51:40 PM SGT
UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='N',Updated=TO_DATE('2020-02-17 17:51:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=59521
;
-- Feb 17, 2020, 5:55:28 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ReadOnlyLogic='@Processed@=''Y''', IsToolbarButton=NULL,Updated=TO_DATE('2020-02-17 17:55:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59489
;
-- Feb 17, 2020, 6:15:27 PM SGT
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_DATE('2020-02-17 18:15:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214185
;
SELECT register_migration_script('202003021203_IDEMPIERE-3947.sql') FROM dual
;

View File

@ -0,0 +1,591 @@
-- IDEMPIERE-3947 Fixed Asset bugs and enhancements
-- Feb 11, 2020, 11:36:17 AM SGT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_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 (214180,0,'ISO Currency Code','Three letter ISO 4217 Code of the Currency','For details - http://www.unece.org/trade/rec/rec09en.htm',53277,'ISO_Code',3,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2020-02-11 11:36:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:36:15','YYYY-MM-DD HH24:MI:SS'),100,328,'Y','N','D','N','N','N','Y','d3b4c038-fcfd-4276-bee8-b879cc870806','Y',0,'N','N','N')
;
-- Feb 11, 2020, 11:36:26 AM SGT
ALTER TABLE I_FixedAsset ADD COLUMN ISO_Code VARCHAR(3) DEFAULT NULL
;
-- Feb 11, 2020, 11:37:03 AM SGT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_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,FKConstraintType,IsHtml) VALUES (214181,0,'Currency','The Currency for this record','Indicates the Currency to be used when processing or reporting on this record',53277,'C_Currency_ID',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2020-02-11 11:37:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:37:02','YYYY-MM-DD HH24:MI:SS'),100,193,'Y','N','D','N','N','N','Y','e7596989-7e4c-43f8-9e55-f20866d5c12d','Y',0,'N','N','N','N')
;
-- Feb 11, 2020, 11:40:00 AM SGT
UPDATE AD_Column SET FKConstraintName='CCurrency_IFixedAsset', FKConstraintType='N',Updated=TO_TIMESTAMP('2020-02-11 11:40:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214181
;
-- Feb 11, 2020, 11:40:00 AM SGT
ALTER TABLE I_FixedAsset ADD COLUMN C_Currency_ID NUMERIC(10) DEFAULT NULL
;
-- Feb 11, 2020, 11:40:00 AM SGT
ALTER TABLE I_FixedAsset ADD CONSTRAINT CCurrency_IFixedAsset FOREIGN KEY (C_Currency_ID) REFERENCES c_currency(c_currency_id) DEFERRABLE INITIALLY DEFERRED
;
-- Feb 11, 2020, 11:40:46 AM SGT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_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 (214182,0,'Entered Amount',53277,'AssetAmtEntered','0',10,'N','N','N','N','N',0,'N',12,0,0,'Y',TO_TIMESTAMP('2020-02-11 11:40:45','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:40:45','YYYY-MM-DD HH24:MI:SS'),100,54207,'Y','N','D','N','N','N','Y','bc12181f-f685-46fe-9c76-b2468ad29e9b','Y',0,'N','N','N')
;
-- Feb 11, 2020, 11:40:51 AM SGT
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2020-02-11 11:40:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214182
;
-- Feb 11, 2020, 11:40:57 AM SGT
ALTER TABLE I_FixedAsset ADD COLUMN AssetAmtEntered NUMERIC DEFAULT '0' NOT NULL
;
-- Feb 11, 2020, 11:41:51 AM SGT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_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 (214183,0,'Source Amount',53277,'AssetSourceAmt','0',22,'N','N','Y','N','N',0,'N',12,0,0,'Y',TO_TIMESTAMP('2020-02-11 11:41:50','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:41:50','YYYY-MM-DD HH24:MI:SS'),100,54202,'Y','N','D','N','N','N','Y','43286a53-e708-431f-978e-1b7a25ec3841','Y',0,'N','N','N')
;
-- Feb 11, 2020, 11:42:15 AM SGT
ALTER TABLE I_FixedAsset ADD COLUMN AssetSourceAmt NUMERIC DEFAULT '0' NOT NULL
;
-- Feb 11, 2020, 11:42:52 AM SGT
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_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 (214184,0,'Account Schema Name','Name of the Accounting Schema',53277,'AcctSchemaName',120,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2020-02-11 11:42:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:42:51','YYYY-MM-DD HH24:MI:SS'),100,2084,'Y','Y','D','N','N','N','Y','63f665c5-5085-4c7e-9f2c-b5ae163de16e','Y',10,'N','N','N')
;
-- Feb 11, 2020, 11:42:58 AM SGT
ALTER TABLE I_FixedAsset ADD COLUMN AcctSchemaName VARCHAR(120) DEFAULT NULL
;
-- Feb 11, 2020, 11:43:45 AM SGT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_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,FKConstraintType,IsHtml) VALUES (214185,0,'Accounting Schema','Rules for accounting','An Accounting Schema defines the rules used in accounting such as costing method, currency and calendar',53277,'C_AcctSchema_ID',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2020-02-11 11:43:45','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:43:45','YYYY-MM-DD HH24:MI:SS'),100,181,'N','N','D','N','N','N','Y','bf429587-d193-4190-a32d-8503ce63c2d3','Y',0,'N','N','C','N')
;
-- Feb 11, 2020, 11:43:51 AM SGT
UPDATE AD_Column SET FKConstraintName='CAcctSchema_IFixedAsset', FKConstraintType='C',Updated=TO_TIMESTAMP('2020-02-11 11:43:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214185
;
-- Feb 11, 2020, 11:43:51 AM SGT
ALTER TABLE I_FixedAsset ADD COLUMN C_AcctSchema_ID NUMERIC(10) DEFAULT NULL
;
-- Feb 11, 2020, 11:43:51 AM SGT
ALTER TABLE I_FixedAsset ADD CONSTRAINT CAcctSchema_IFixedAsset FOREIGN KEY (C_AcctSchema_ID) REFERENCES c_acctschema(c_acctschema_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
;
-- Feb 11, 2020, 11:44:43 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206390,'ISO Currency Code','Three letter ISO 4217 Code of the Currency','For details - http://www.unece.org/trade/rec/rec09en.htm',53334,214180,'Y',3,310,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-02-11 11:44:42','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:44:42','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7236b757-b73a-450a-9c85-98a8ab08389d','Y',310,2)
;
-- Feb 11, 2020, 11:44:44 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206391,'Currency','The Currency for this record','Indicates the Currency to be used when processing or reporting on this record',53334,214181,'Y',22,320,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-02-11 11:44:43','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:44:43','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','11bdfc71-4d1f-4d31-9b3a-b88d75406bd8','Y',320,2)
;
-- Feb 11, 2020, 11:44:45 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206392,'Entered Amount',53334,214182,'Y',10,330,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-02-11 11:44:45','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:44:45','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','bfe5930e-9348-4b2a-9087-a4d0461d3fc2','Y',330,2)
;
-- Feb 11, 2020, 11:44:46 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206393,'Source Amount',53334,214183,'Y',22,340,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-02-11 11:44:45','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:44:45','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','e2b58b61-b516-4f16-b282-f861cc3248bb','Y',340,2)
;
-- Feb 11, 2020, 11:44:47 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206394,'Account Schema Name','Name of the Accounting Schema',53334,214184,'Y',120,350,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-02-11 11:44:47','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:44:47','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','3e4eaad8-098f-418d-a9be-3deb18a4e00b','Y',350,5)
;
-- Feb 11, 2020, 11:44:48 AM SGT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206395,'Accounting Schema','Rules for accounting','An Accounting Schema defines the rules used in accounting such as costing method, currency and calendar',53334,214185,'Y',22,360,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2020-02-11 11:44:47','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2020-02-11 11:44:47','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','0adfa648-05b8-415f-a655-3ca44584dfc9','Y',360,2)
;
-- Feb 11, 2020, 11:46:29 AM SGT
UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-11 11:46:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 11, 2020, 11:46:29 AM SGT
UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-11 11:46:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206393
;
-- Feb 11, 2020, 11:46:30 AM SGT
UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-11 11:46:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 11, 2020, 11:46:30 AM SGT
UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-11 11:46:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206392
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206393
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 11, 2020, 11:47:44 AM SGT
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 11, 2020, 11:47:45 AM SGT
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59489
;
-- Feb 11, 2020, 11:47:45 AM SGT
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59499
;
-- Feb 11, 2020, 11:47:58 AM SGT
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59485
;
-- Feb 11, 2020, 11:47:58 AM SGT
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59498
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59474
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59494
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59497
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59493
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59470
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59478
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59479
;
-- Feb 11, 2020, 11:47:59 AM SGT
UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59481
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59482
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=130,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59501
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=140,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59502
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=150,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59488
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=160,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59507
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=170,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59506
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=180,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59495
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=190,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59496
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=200,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59503
;
-- Feb 11, 2020, 11:48:00 AM SGT
UPDATE AD_Field SET SeqNoGrid=210,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59476
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=220,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=200161
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=230,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59508
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=240,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59509
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=250,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59486
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=260,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59471
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=270,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59472
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=280,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 11, 2020, 11:48:01 AM SGT
UPDATE AD_Field SET SeqNoGrid=290,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=300,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206392
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=310,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206393
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=320,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=330,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=340,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59489
;
-- Feb 11, 2020, 11:48:02 AM SGT
UPDATE AD_Field SET SeqNoGrid=350,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59499
;
-- Feb 11, 2020, 12:00:51 PM SGT
UPDATE AD_Field SET SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-11 12:00:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59494
;
-- Feb 11, 2020, 12:00:51 PM SGT
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-11 12:00:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59479
;
-- Feb 11, 2020, 12:00:52 PM SGT
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-11 12:00:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59482
;
-- Feb 11, 2020, 12:00:52 PM SGT
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-11 12:00:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59502
;
-- Feb 11, 2020, 12:00:52 PM SGT
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-11 12:00:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59496
;
-- Feb 27, 2020, 2:40:01 PM SGT
UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:40:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 27, 2020, 2:40:01 PM SGT
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:40:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 27, 2020, 2:40:02 PM SGT
UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:40:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 27, 2020, 2:40:02 PM SGT
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:40:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 27, 2020, 2:40:43 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, SeqNoGrid=280, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:40:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 27, 2020, 2:40:48 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, SeqNoGrid=290, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:40:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 27, 2020, 2:40:59 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, SeqNoGrid=320, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:40:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 27, 2020, 2:41:05 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, SeqNoGrid=330, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:41:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 27, 2020, 2:48:27 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, MandatoryLogic='@C_Currency_ID@=0 & @ISO_Code@=''''', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:48:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 27, 2020, 2:54:44 PM SGT
UPDATE AD_Field SET IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:54:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59508
;
-- Feb 27, 2020, 2:55:03 PM SGT
UPDATE AD_Field SET IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 14:55:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59471
;
-- Feb 27, 2020, 3:09:22 PM SGT
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59477
;
-- Feb 27, 2020, 3:09:22 PM SGT
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59478
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59479
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59481
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59482
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59501
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59502
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59488
;
-- Feb 27, 2020, 3:09:23 PM SGT
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59507
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59506
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59495
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59496
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59503
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59476
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=200161
;
-- Feb 27, 2020, 3:09:24 PM SGT
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59508
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59509
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59486
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59471
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59472
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 27, 2020, 3:09:25 PM SGT
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206392
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206393
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59489
;
-- Feb 27, 2020, 3:09:26 PM SGT
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59499
;
-- Feb 27, 2020, 3:09:39 PM SGT
UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59477
;
-- Feb 27, 2020, 3:09:39 PM SGT
UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59478
;
-- Feb 27, 2020, 3:09:39 PM SGT
UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59479
;
-- Feb 27, 2020, 3:09:39 PM SGT
UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59481
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=130,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59482
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=140,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59501
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=150,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59502
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=160,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59488
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=170,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59507
;
-- Feb 27, 2020, 3:09:40 PM SGT
UPDATE AD_Field SET SeqNoGrid=180,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59506
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=190,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59495
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=200,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59496
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=210,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59503
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=220,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59476
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=230,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=200161
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=240,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59508
;
-- Feb 27, 2020, 3:09:41 PM SGT
UPDATE AD_Field SET SeqNoGrid=250,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59509
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=260,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59486
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=270,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59471
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=280,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59472
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=290,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206391
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=300,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206390
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=310,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206392
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=320,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206393
;
-- Feb 27, 2020, 3:09:42 PM SGT
UPDATE AD_Field SET SeqNoGrid=330,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206395
;
-- Feb 27, 2020, 3:09:43 PM SGT
UPDATE AD_Field SET SeqNoGrid=340,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=206394
;
-- Feb 27, 2020, 3:09:43 PM SGT
UPDATE AD_Field SET SeqNoGrid=350,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59489
;
-- Feb 27, 2020, 3:09:43 PM SGT
UPDATE AD_Field SET SeqNoGrid=360,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=59499
;
-- Feb 27, 2020, 3:10:13 PM SGT
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 15:10:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59477
;
-- Feb 27, 2020, 3:15:38 PM SGT
UPDATE AD_Field SET IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-27 15:15:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59477
;
-- Feb 17, 2020, 5:43:36 PM SGT
UPDATE AD_Field SET IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-17 17:43:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59493
;
-- Feb 17, 2020, 5:51:40 PM SGT
UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='N',Updated=TO_TIMESTAMP('2020-02-17 17:51:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=59521
;
-- Feb 17, 2020, 5:55:28 PM SGT
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ReadOnlyLogic='@Processed@=''Y''', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-02-17 17:55:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59489
;
-- Feb 17, 2020, 6:15:27 PM SGT
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2020-02-17 18:15:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=214185
;
SELECT register_migration_script('202003021203_IDEMPIERE-3947.sql') FROM dual
;

View File

@ -147,6 +147,19 @@ public interface I_I_FixedAsset
/** Get Asset Type Value */
public String getA_Asset_Type_Value();
/** Column name AcctSchemaName */
public static final String COLUMNNAME_AcctSchemaName = "AcctSchemaName";
/** Set Account Schema Name.
* Name of the Accounting Schema
*/
public void setAcctSchemaName (String AcctSchemaName);
/** Get Account Schema Name.
* Name of the Accounting Schema
*/
public String getAcctSchemaName();
/** Column name A_Current_Period */
public static final String COLUMNNAME_A_Current_Period = "A_Current_Period";
@ -195,6 +208,15 @@ public interface I_I_FixedAsset
/** Get Asset Salvage Value */
public BigDecimal getA_Salvage_Value();
/** Column name AssetAmtEntered */
public static final String COLUMNNAME_AssetAmtEntered = "AssetAmtEntered";
/** Set Entered Amount */
public void setAssetAmtEntered (BigDecimal AssetAmtEntered);
/** Get Entered Amount */
public BigDecimal getAssetAmtEntered();
/** Column name AssetDepreciationDate */
public static final String COLUMNNAME_AssetDepreciationDate = "AssetDepreciationDate";
@ -234,6 +256,15 @@ public interface I_I_FixedAsset
*/
public Timestamp getAssetServiceDate();
/** Column name AssetSourceAmt */
public static final String COLUMNNAME_AssetSourceAmt = "AssetSourceAmt";
/** Set Source Amount */
public void setAssetSourceAmt (BigDecimal AssetSourceAmt);
/** Get Source Amount */
public BigDecimal getAssetSourceAmt();
/** Column name BPartner_Value */
public static final String COLUMNNAME_BPartner_Value = "BPartner_Value";
@ -247,6 +278,21 @@ public interface I_I_FixedAsset
*/
public String getBPartner_Value();
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
public org.compiere.model.I_C_AcctSchema getC_AcctSchema() throws RuntimeException;
/** Column name C_BPartnerSR_ID */
public static final String COLUMNNAME_C_BPartnerSR_ID = "C_BPartnerSR_ID";
@ -286,6 +332,21 @@ public interface I_I_FixedAsset
/** Get City Value */
public String getC_City_Value();
/** Column name C_Currency_ID */
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
/** Set Currency.
* The Currency for this record
*/
public void setC_Currency_ID (int C_Currency_ID);
/** Get Currency.
* The Currency for this record
*/
public int getC_Currency_ID();
public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException;
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
@ -422,6 +483,19 @@ public interface I_I_FixedAsset
*/
public boolean isActive();
/** Column name ISO_Code */
public static final String COLUMNNAME_ISO_Code = "ISO_Code";
/** Set ISO Currency Code.
* Three letter ISO 4217 Code of the Currency
*/
public void setISO_Code (String ISO_Code);
/** Get ISO Currency Code.
* Three letter ISO 4217 Code of the Currency
*/
public String getISO_Code();
/** Column name LocatorValue */
public static final String COLUMNNAME_LocatorValue = "LocatorValue";

View File

@ -161,6 +161,8 @@ public class MAsset extends X_A_Asset
setDateAcct(ifa.getDateAcct());
setName(ifa.getName());
setDescription(ifa.getDescription());
setI_FixedAsset(ifa);
}
/**
@ -413,6 +415,9 @@ public class MAsset extends X_A_Asset
{
if (assetgrpacct.getAD_Org_ID() == 0 || assetgrpacct.getAD_Org_ID() == getAD_Org_ID())
{
if (getI_FixedAsset() != null && assetgrpacct.getC_AcctSchema_ID() != getI_FixedAsset().getC_AcctSchema_ID())
continue;
// Asset Accounting
MAssetAcct assetacct = new MAssetAcct(this, assetgrpacct);
assetacct.setAD_Org_ID(getAD_Org_ID()); //added by @win
@ -576,6 +581,10 @@ public class MAsset extends X_A_Asset
public void setA_Accumulated_Depr(BigDecimal A_Accumulated_Depr) { m_A_Accumulated_Depr = A_Accumulated_Depr; }
public BigDecimal getA_Accumulated_Depr_F() { return m_A_Accumulated_Depr_F; }
public void setA_Accumulated_Depr_F(BigDecimal A_Accumulated_Depr_F) { m_A_Accumulated_Depr_F = A_Accumulated_Depr_F; }
private MIFixedAsset m_I_FixedAsset = null;
public MIFixedAsset getI_FixedAsset() { return m_I_FixedAsset; }
public void setI_FixedAsset(MIFixedAsset I_FixedAsset) { m_I_FixedAsset = I_FixedAsset; }
public MAssetDelivery confirmDelivery(EMail email, int ad_User_ID) {
// TODO Auto-generated method stub

View File

@ -293,6 +293,7 @@ public class MAssetAddition extends X_A_Asset_Addition
setA_SourceType(A_SOURCETYPE_Imported);
//
setM_Product_ID(ifa.getM_Product_ID());
setAssetValueAmt(ifa.getA_Asset_Cost());
setSourceAmt(ifa.getA_Asset_Cost());
setDateDoc(ifa.getAssetServiceDate());
setM_Locator_ID(ifa.getM_Locator_ID());
@ -311,6 +312,13 @@ public class MAssetAddition extends X_A_Asset_Addition
if (log.isLoggable(Level.FINE)) log.fine("DateAcct=" + dateAcct);
setDateAcct(dateAcct);
}
if (ifa.getA_Asset_ID() > 0)
setA_Asset_ID(ifa.getA_Asset_ID());
if (ifa.getC_Currency_ID() > 0)
setC_Currency_ID(ifa.getC_Currency_ID());
setAssetAmtEntered(ifa.getAssetAmtEntered());
setAssetSourceAmt(ifa.getAssetSourceAmt());
setI_FixedAsset(ifa);
}
@ -445,6 +453,8 @@ public class MAssetAddition extends X_A_Asset_Addition
*/
private void setAssetValueAmt()
{
if (A_SOURCETYPE_Imported.equals(getA_SourceType()))
return;
getDateAcct();
MConversionRateUtil.convertBase(SetGetUtil.wrap(this),
COLUMNNAME_DateAcct,
@ -554,7 +564,8 @@ public class MAssetAddition extends X_A_Asset_Addition
// Only New assets can be activated
if (isA_CreateAsset() && !MAsset.A_ASSET_STATUS_New.equals(asset.getA_Asset_Status()))
{
throw new AssetException("Only new assets can be activated");
if (!A_SOURCETYPE_Imported.equals(getA_SourceType()))
throw new AssetException("Only new assets can be activated");
}
//
// Validate Source - Project
@ -667,9 +678,10 @@ public class MAssetAddition extends X_A_Asset_Addition
MDepreciationWorkfile assetwk = MDepreciationWorkfile.get(getCtx(), getA_Asset_ID(), getPostingType(), get_TrxName());
if (assetwk == null)
{
for (MAssetGroupAcct assetgrpacct : MAssetGroupAcct.forA_Asset_Group_ID(getCtx(), asset.getA_Asset_Group_ID(), getPostingType()))
{
if (A_SOURCETYPE_Imported.equals(getA_SourceType()) && assetgrpacct.getC_AcctSchema_ID() != getI_FixedAsset().getC_AcctSchema_ID())
continue;
assetwk = new MDepreciationWorkfile(asset, getPostingType(), assetgrpacct);
}
}
@ -685,17 +697,23 @@ public class MAssetAddition extends X_A_Asset_Addition
//
for (MDepreciationWorkfile assetworkFile : MDepreciationWorkfile.forA_Asset_ID(getCtx(), getA_Asset_ID(), get_TrxName()))
{
if (A_SOURCETYPE_Imported.equals(getA_SourceType()) && assetworkFile.getC_AcctSchema_ID() != getI_FixedAsset().getC_AcctSchema_ID())
continue;
assetworkFile.setDateAcct(getDateAcct());
if (assetworkFile.getC_AcctSchema().getC_Currency_ID() != getC_Currency_ID())
{
BigDecimal convertedAssetCost = MConversionRate.convert(getCtx(), getAssetSourceAmt(),
getC_Currency_ID(), assetworkFile.getC_AcctSchema().getC_Currency_ID() ,
getDateAcct(), getC_ConversionType_ID(),
getAD_Client_ID(), getAD_Org_ID());
assetworkFile.adjustCost(convertedAssetCost, getA_QTY_Current(), isA_CreateAsset()); // reset if isA_CreateAsset
if (A_SOURCETYPE_Imported.equals(getA_SourceType())) {
assetworkFile.adjustCost(getI_FixedAsset().getA_Asset_Cost(), getA_QTY_Current(), isA_CreateAsset());
} else {
assetworkFile.adjustCost(getAssetSourceAmt(), getA_QTY_Current(), isA_CreateAsset()); // reset if isA_CreateAsset
if (assetworkFile.getC_AcctSchema().getC_Currency_ID() != getC_Currency_ID())
{
BigDecimal convertedAssetCost = MConversionRate.convert(getCtx(), getAssetSourceAmt(),
getC_Currency_ID(), assetworkFile.getC_AcctSchema().getC_Currency_ID() ,
getDateAcct(), getC_ConversionType_ID(),
getAD_Client_ID(), getAD_Org_ID());
assetworkFile.adjustCost(convertedAssetCost, getA_QTY_Current(), isA_CreateAsset()); // reset if isA_CreateAsset
} else {
assetworkFile.adjustCost(getAssetSourceAmt(), getA_QTY_Current(), isA_CreateAsset()); // reset if isA_CreateAsset
}
}
// Do we have entries that are not processed and before this date:
if (this.getA_CapvsExp().equals(A_CAPVSEXP_Capital)) {
@ -703,15 +721,19 @@ public class MAssetAddition extends X_A_Asset_Addition
MDepreciationExp.checkExistsNotProcessedEntries(assetworkFile.getCtx(), assetworkFile.getA_Asset_ID(), getDateAcct(), assetworkFile.getPostingType(), assetworkFile.get_TrxName());
//
if (this.getA_Salvage_Value().signum() > 0) {
if (assetworkFile.getC_AcctSchema().getC_Currency_ID() != getC_Currency_ID())
{
BigDecimal salvageValue = MConversionRate.convert(getCtx(), this.getA_Salvage_Value(),
getC_Currency_ID(), assetworkFile.getC_AcctSchema().getC_Currency_ID() ,
getDateAcct(), getC_ConversionType_ID(),
getAD_Client_ID(), getAD_Org_ID());
assetworkFile.setA_Salvage_Value(salvageValue);
} else{
if (A_SOURCETYPE_Imported.equals(getA_SourceType())) {
assetworkFile.setA_Salvage_Value(this.getA_Salvage_Value());
} else {
if (assetworkFile.getC_AcctSchema().getC_Currency_ID() != getC_Currency_ID())
{
BigDecimal salvageValue = MConversionRate.convert(getCtx(), this.getA_Salvage_Value(),
getC_Currency_ID(), assetworkFile.getC_AcctSchema().getC_Currency_ID() ,
getDateAcct(), getC_ConversionType_ID(),
getAD_Client_ID(), getAD_Org_ID());
assetworkFile.setA_Salvage_Value(salvageValue);
} else{
assetworkFile.setA_Salvage_Value(this.getA_Salvage_Value());
}
}
}
assetworkFile.setDateAcct(getDateAcct());
@ -721,8 +743,11 @@ public class MAssetAddition extends X_A_Asset_Addition
//@win set initial depreciation period = 1
if (isA_CreateAsset())
{
assetworkFile.setA_Current_Period(1);
assetworkFile.saveEx();
if (assetworkFile.getA_Current_Period() == 0)
{
assetworkFile.setA_Current_Period(1);
assetworkFile.saveEx();
}
}
//
// Rebuild depreciation:
@ -1169,6 +1194,10 @@ public class MAssetAddition extends X_A_Asset_Addition
{
setA_CreateAsset(false);
}
else if (A_SOURCETYPE_Imported.equals(getA_SourceType()))
{
setA_CreateAsset(true);
}
else
{
final String sql = "SELECT COUNT(*) FROM A_Asset_Addition WHERE A_Asset_ID=? AND A_CreateAsset='Y'"

View File

@ -647,7 +647,7 @@ public class MDepreciationWorkfile extends X_A_Depreciation_Workfile
//logging
if(CLogMgt.isLevelFine())
{
sb.append("currentPeriod=" + getA_Current_Period() + ", AssetServiceDate=" + getAssetDepreciationDate() + "\n");
sb.append("currentPeriod=" + getA_Current_Period() + ", AssetServiceDate=" + getAssetServiceDate() + "\n");
sb.append("offset: C|F=" + offset_C + "|" + offset_F + "\n");
sb.append("life: C|F=" + lifePeriods_C + "|" + lifePeriods_F + " + offset =" + lifePeriods + "\n");
}
@ -675,6 +675,20 @@ public class MDepreciationWorkfile extends X_A_Depreciation_Workfile
lifePeriods_F = lifePeriods;
}
Timestamp startDateAcct = getDateAcct();
if (getAssetDepreciationDate() != null)
{
if (getAssetDepreciationDate().compareTo(getDateAcct()) >= 0)
{
if (TimeUtil.getMonthLastDay(startDateAcct).compareTo(getAssetDepreciationDate()) == 0)
{
startDateAcct = TimeUtil.addMonths(getAssetDepreciationDate(), 1);
++A_Current_Period;
}
else
startDateAcct = getAssetDepreciationDate();
}
}
for (int currentPeriod = A_Current_Period, cnt = 1; currentPeriod <= lifePeriods; currentPeriod++, cnt++)
{
@ -721,7 +735,7 @@ public class MDepreciationWorkfile extends X_A_Depreciation_Workfile
int months = 0;
months = months + (currentPeriod - A_Current_Period);
Timestamp dateAcct = TimeUtil.getMonthLastDay(TimeUtil.addMonths(getDateAcct(), months));
Timestamp dateAcct = TimeUtil.getMonthLastDay(TimeUtil.addMonths(startDateAcct, months));
MDepreciationExp.createDepreciation (this, currentPeriod, dateAcct,
exp_C, exp_F,

View File

@ -32,7 +32,7 @@ public class X_I_FixedAsset extends PO implements I_I_FixedAsset, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20191121L;
private static final long serialVersionUID = 20200225L;
/** Standard Constructor */
public X_I_FixedAsset (Properties ctx, int I_FixedAsset_ID, String trxName)
@ -43,8 +43,12 @@ public class X_I_FixedAsset extends PO implements I_I_FixedAsset, I_Persistent
setA_Asset_Cost (Env.ZERO);
// 0
setA_Remaining_Period (0);
// 0
setAssetAmtEntered (Env.ZERO);
// 0
setAssetPeriodDepreciationAmt (Env.ZERO);
// 0
setAssetSourceAmt (Env.ZERO);
// 0
setDocAction (null);
// 'CO'
@ -280,6 +284,23 @@ public class X_I_FixedAsset extends PO implements I_I_FixedAsset, I_Persistent
return (String)get_Value(COLUMNNAME_A_Asset_Type_Value);
}
/** Set Account Schema Name.
@param AcctSchemaName
Name of the Accounting Schema
*/
public void setAcctSchemaName (String AcctSchemaName)
{
set_Value (COLUMNNAME_AcctSchemaName, AcctSchemaName);
}
/** Get Account Schema Name.
@return Name of the Accounting Schema
*/
public String getAcctSchemaName ()
{
return (String)get_Value(COLUMNNAME_AcctSchemaName);
}
/** Set Current Period.
@param A_Current_Period Current Period */
public void setA_Current_Period (int A_Current_Period)
@ -331,6 +352,23 @@ public class X_I_FixedAsset extends PO implements I_I_FixedAsset, I_Persistent
return bd;
}
/** Set Entered Amount.
@param AssetAmtEntered Entered Amount */
public void setAssetAmtEntered (BigDecimal AssetAmtEntered)
{
set_Value (COLUMNNAME_AssetAmtEntered, AssetAmtEntered);
}
/** Get Entered Amount.
@return Entered Amount */
public BigDecimal getAssetAmtEntered ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AssetAmtEntered);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Asset Depreciation Date.
@param AssetDepreciationDate
Date of last depreciation
@ -385,6 +423,23 @@ public class X_I_FixedAsset extends PO implements I_I_FixedAsset, I_Persistent
return (Timestamp)get_Value(COLUMNNAME_AssetServiceDate);
}
/** Set Source Amount.
@param AssetSourceAmt Source Amount */
public void setAssetSourceAmt (BigDecimal AssetSourceAmt)
{
set_Value (COLUMNNAME_AssetSourceAmt, AssetSourceAmt);
}
/** Get Source Amount.
@return Source Amount */
public BigDecimal getAssetSourceAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AssetSourceAmt);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Business Partner Key.
@param BPartner_Value
The Key of the Business Partner
@ -402,6 +457,34 @@ public class X_I_FixedAsset extends PO implements I_I_FixedAsset, I_Persistent
return (String)get_Value(COLUMNNAME_BPartner_Value);
}
public org.compiere.model.I_C_AcctSchema getC_AcctSchema() throws RuntimeException
{
return (org.compiere.model.I_C_AcctSchema)MTable.get(getCtx(), org.compiere.model.I_C_AcctSchema.Table_Name)
.getPO(getC_AcctSchema_ID(), get_TrxName()); }
/** Set Accounting Schema.
@param C_AcctSchema_ID
Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID)
{
if (C_AcctSchema_ID < 1)
set_Value (COLUMNNAME_C_AcctSchema_ID, null);
else
set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID));
}
/** Get Accounting Schema.
@return Rules for accounting
*/
public int getC_AcctSchema_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_C_BPartner getC_BPartnerSR() throws RuntimeException
{
return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
@ -472,6 +555,34 @@ public class X_I_FixedAsset extends PO implements I_I_FixedAsset, I_Persistent
return (String)get_Value(COLUMNNAME_C_City_Value);
}
public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException
{
return (org.compiere.model.I_C_Currency)MTable.get(getCtx(), org.compiere.model.I_C_Currency.Table_Name)
.getPO(getC_Currency_ID(), get_TrxName()); }
/** Set Currency.
@param C_Currency_ID
The Currency for this record
*/
public void setC_Currency_ID (int C_Currency_ID)
{
if (C_Currency_ID < 1)
set_Value (COLUMNNAME_C_Currency_ID, null);
else
set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
}
/** Get Currency.
@return The Currency for this record
*/
public int getC_Currency_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_C_UOM getC_UOM() throws RuntimeException
{
return (org.compiere.model.I_C_UOM)MTable.get(getCtx(), org.compiere.model.I_C_UOM.Table_Name)
@ -671,6 +782,23 @@ public class X_I_FixedAsset extends PO implements I_I_FixedAsset, I_Persistent
return (String)get_Value(COLUMNNAME_InventoryNo);
}
/** Set ISO Currency Code.
@param ISO_Code
Three letter ISO 4217 Code of the Currency
*/
public void setISO_Code (String ISO_Code)
{
set_Value (COLUMNNAME_ISO_Code, ISO_Code);
}
/** Get ISO Currency Code.
@return Three letter ISO 4217 Code of the Currency
*/
public String getISO_Code ()
{
return (String)get_Value(COLUMNNAME_ISO_Code);
}
/** Set Locator Key.
@param LocatorValue
Key of the Warehouse Locator

View File

@ -4,7 +4,11 @@ import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.logging.Level;
import org.compiere.model.MAsset;
import org.compiere.model.MAssetAcct;
import org.compiere.model.MAssetAddition;
import org.compiere.model.MAssetGroupAcct;
import org.compiere.model.MDepreciationWorkfile;
import org.compiere.model.MIFixedAsset;
import org.compiere.model.POResultSet;
import org.compiere.model.Query;
@ -73,7 +77,7 @@ public class ImportFixedAsset extends SvrProcess
*/
protected String doIt() throws java.lang.Exception
{
StringBuffer sql = null;
StringBuilder sql = null;
int no = 0;
if(p_AD_Client_ID==0)
p_AD_Client_ID = Env.getAD_Client_ID(getCtx());
@ -84,14 +88,14 @@ public class ImportFixedAsset extends SvrProcess
// Delete Old Imported
if (p_DeleteOldImported)
{
sql = new StringBuffer ("DELETE "+X_I_FixedAsset.Table_Name
sql = new StringBuilder ("DELETE "+X_I_FixedAsset.Table_Name
+ " WHERE I_IsImported='Y'").append (sqlCheck);
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Imported =" + no);
}
// Set Client, Org, IsActive, Created/Updated
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+ " "
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+ " "
+ "SET AD_Client_ID = COALESCE (AD_Client_ID,").append (p_AD_Client_ID).append ("),"
+ " AD_Org_ID = COALESCE (AD_Org_ID,").append (p_AD_Org_ID).append ("),"
+ " IsActive = COALESCE (IsActive, 'Y'),"
@ -106,8 +110,8 @@ public class ImportFixedAsset extends SvrProcess
if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no);
// Check if Org is Null or 0
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET I_IsImported='N', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '"
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '"
+ "WHERE (AD_Org_ID IS NULL OR AD_Org_ID=0"
+ " OR EXISTS (SELECT * FROM AD_Org oo WHERE ifa.AD_Org_ID=oo.AD_Org_ID AND (oo.IsSummary='Y' OR oo.IsActive='N')))"
+ " AND I_IsImported<>'Y'").append (sqlCheck);
@ -116,15 +120,15 @@ public class ImportFixedAsset extends SvrProcess
log.warning ("Invalid Org=" + no);
// Check if Name is Null
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET I_IsImported='N', I_ErrorMsg=I_ErrorMsg||'ERR=Name Is Mandatory, '"
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Name Is Mandatory, '"
+ "WHERE Name IS NULL AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.warning ("Invalid Name=" + no);
// Asset Group From Value
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET A_Asset_Group_ID=(SELECT MAX(A_Asset_Group_ID) FROM A_Asset_Group t"
+ " WHERE ifa.A_Asset_Group_Value=t.Name AND ifa.AD_Client_ID=t.AD_Client_ID) "
+ "WHERE A_Asset_Group_ID IS NULL AND A_Asset_Group_Value IS NOT NULL"
@ -133,8 +137,8 @@ public class ImportFixedAsset extends SvrProcess
if (log.isLoggable(Level.FINE)) log.fine("Set Asset Group from Value=" + no);
// Check if Asset Group Have Asset Group Acct Record
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET I_IsImported='N', I_ErrorMsg=I_ErrorMsg||'ERR=Asset Group Doesnt Have Asset Group Acct Record, ' "
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Asset Group Doesnt Have Asset Group Acct Record, ' "
+ "WHERE A_Asset_Group_ID IS NOT NULL AND A_Asset_Group_ID>0 " //@win change to AND from OR
+ "AND NOT EXISTS (SELECT 1 FROM A_Asset_Group_Acct aga WHERE ifa.A_Asset_Group_ID=aga.A_Asset_Group_ID) " //@win change to AND from OR
+ "AND I_IsImported<>'Y'").append (sqlCheck);
@ -154,7 +158,7 @@ public class ImportFixedAsset extends SvrProcess
*/
// BP From Value
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET C_BPartnerSR_ID=(SELECT MAX(C_BPartner_ID) FROM C_BPartner t"
+ " WHERE ifa.BPartner_Value=t.Value AND ifa.AD_Client_ID=t.AD_Client_ID) "
+ "WHERE C_BPartnerSR_ID IS NULL AND BPartner_Value IS NOT NULL"
@ -163,7 +167,7 @@ public class ImportFixedAsset extends SvrProcess
if (log.isLoggable(Level.FINE)) log.fine("Set BP from Value=" + no);
// City From Value
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET C_City_ID=(SELECT MAX(C_City_ID) FROM C_City t"
+ " WHERE ifa.C_City_Value=t.Name AND ifa.AD_Client_ID=t.AD_Client_ID) "
+ "WHERE C_City_ID IS NULL AND C_City_Value IS NOT NULL"
@ -172,7 +176,7 @@ public class ImportFixedAsset extends SvrProcess
if (log.isLoggable(Level.FINE)) log.fine("Set City from Value=" + no);
// Product
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product t"
+ " WHERE ifa.ProductValue=t.Value AND ifa.AD_Client_ID=t.AD_Client_ID) "
+ "WHERE M_Product_ID IS NULL AND ProductValue IS NOT NULL"
@ -180,8 +184,8 @@ public class ImportFixedAsset extends SvrProcess
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Set Product from Value=" + no);
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET I_IsImported='N', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Product, ' "
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Product, ' "
+ "WHERE M_Product_ID IS NULL AND ProductValue IS NOT NULL"
+ " AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
@ -189,8 +193,8 @@ public class ImportFixedAsset extends SvrProcess
log.warning ("Invalid Product=" + no);
// Check if Product using Product Category has A Asset Category Set
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET I_IsImported='N', I_ErrorMsg=I_ErrorMsg||'ERR=Product Using Product Category Without Asset Group Defined, ' "
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Product Using Product Category Without Asset Group Defined, ' "
+ "WHERE EXISTS (SELECT 1 FROM M_Product p "
+ "JOIN M_Product_Category pc ON p.M_Product_Category_ID=pc.M_Product_Category_ID "
+ "WHERE ifa.M_Product_ID=p.M_Product_ID "
@ -201,13 +205,82 @@ public class ImportFixedAsset extends SvrProcess
log.warning ("Invalid Product Category=" + no);
// Locator From Value
sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa "
+ "SET M_Locator_ID=(SELECT MAX(M_Locator_ID) FROM M_Product t"
+ " WHERE ifa.LocatorValue=t.Value AND ifa.AD_Client_ID=t.AD_Client_ID) "
+ "WHERE M_Locator_ID IS NULL AND LocatorValue IS NOT NULL"
+ " AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Set Locator from Value=" + no);
// Currency From ISO Code
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa ")
.append("SET C_Currency_ID=(SELECT c.C_Currency_ID FROM C_Currency c")
.append(" WHERE c.ISO_Code=ifa.ISO_Code AND c.AD_Client_ID IN (0,ifa.AD_Client_ID)) ")
.append("WHERE C_Currency_ID IS NULL AND ISO_Code IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Set Currency from ISO=" + no);
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa ")
.append("SET C_Currency_ID=(SELECT a.C_Currency_ID FROM C_AcctSchema a")
.append(" WHERE a.C_AcctSchema_ID=ifa.C_AcctSchema_ID AND a.AD_Client_ID=ifa.AD_Client_ID)")
.append("WHERE C_Currency_ID IS NULL AND ISO_Code IS NULL")
.append(" AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Set Default Currency=" + no);
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency, '")
.append("WHERE (C_Currency_ID IS NULL OR C_Currency_ID=0)")
.append(" AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.warning ("Invalid Currency=" + no);
// AcctSchema From Name
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa ")
.append("SET C_AcctSchema_ID=(SELECT a.C_AcctSchema_ID FROM C_AcctSchema a")
.append(" WHERE ifa.AcctSchemaName=a.Name AND ifa.AD_Client_ID=a.AD_Client_ID) ")
.append("WHERE C_AcctSchema_ID IS NULL AND AcctSchemaName IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Set AcctSchema from Name=" + no);
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa ")
.append("SET C_AcctSchema_ID=(SELECT c.C_AcctSchema1_ID FROM AD_ClientInfo c WHERE c.AD_Client_ID=ifa.AD_Client_ID) ")
.append("WHERE C_AcctSchema_ID IS NULL AND AcctSchemaName IS NULL")
.append(" AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Set AcctSchema from Client=" + no);
// Error AcctSchema
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid AcctSchema, '")
.append("WHERE (C_AcctSchema_ID IS NULL OR C_AcctSchema_ID=0")
.append(" OR NOT EXISTS (SELECT * FROM C_AcctSchema a WHERE ifa.AD_Client_ID=a.AD_Client_ID))")
.append(" AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.warning ("Invalid AcctSchema=" + no);
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=AssetServiceDate Is Mandatory, '")
.append("WHERE AssetServiceDate IS NULL AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.warning ("No AssetServiceDate=" + no);
sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=AssetDepreciationDate Is Mandatory, '")
.append("WHERE AssetDepreciationDate IS NULL AND I_IsImported<>'Y'").append (sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.warning ("No AssetDepreciationDate=" + no);
// // Set DateAcct (mandatory)
// sql = new StringBuilder ("UPDATE "+MIFixedAsset.Table_Name+" ifa ")
// .append("SET DateAcct=SysDate ")
// .append("WHERE DateAcct IS NULL")
// .append(" AND I_IsImported<>'Y'").append (sqlCheck);
// no = DB.executeUpdate(sql.toString(), get_TrxName());
// if (log.isLoggable(Level.FINE)) log.fine("Set DateAcct=" + no);
//-- New BPartner ---------------------------------------------------
@ -332,16 +405,16 @@ public class ImportFixedAsset extends SvrProcess
commitEx();
*/ //commented by @win
if(p_IsValidateOnly)
if (p_IsValidateOnly)
return "Data Was Validated";
int cnt_ok = 0;
int cnt_err = 0;
int noInsert = 0;
int noUpdate = 0;
String whereClause = "NVL(I_IsImported,'N')='N'"+sqlCheck;
POResultSet<X_I_FixedAsset>
rs = new Query(getCtx(), X_I_FixedAsset.Table_Name, whereClause, get_TrxName())
.scroll();
POResultSet<X_I_FixedAsset> rs = new Query(getCtx(), X_I_FixedAsset.Table_Name, whereClause, get_TrxName())
.setOrderBy(X_I_FixedAsset.COLUMNNAME_I_FixedAsset_ID)
.scroll();
try
{
while (rs.hasNext()) {
@ -349,41 +422,126 @@ public class ImportFixedAsset extends SvrProcess
MIFixedAsset ifa = new MIFixedAsset(getCtx(), xfa.getI_FixedAsset_ID(), get_TrxName());
try
{
boolean isUpdate = ifa.getA_Asset_ID() > 0;
if (ifa.getA_Asset_ID() == 0)
{
// check for existing active asset by name and inventory no
sql = new StringBuilder("SELECT A_Asset_ID FROM A_Asset WHERE IsActive='Y' AND Name=? AND InventoryNo=?");
int A_Asset_ID = DB.getSQLValue(get_TrxName(), sql.toString(), ifa.getName(), ifa.getInventoryNo());
if (A_Asset_ID > 0)
{
isUpdate = true;
ifa.setA_Asset_ID(A_Asset_ID);
ifa.saveEx();
}
}
if (ifa.getDateAcct() == null && p_DateAcct != null)
ifa.setDateAcct(p_DateAcct);
MAssetAddition assetAdd = MAssetAddition.createAsset(ifa);
if(assetAdd==null){
if (assetAdd == null)
{
ifa.setI_ErrorMsg("Failed Create Assets");
cnt_err++;
assetAdd=null;
assetAdd = null;
continue;
}
//if(p_A_Asset_Group_ID>0)
// assetAdd.getA_Asset().setA_Asset_Group_ID(p_A_Asset_Group_ID);
if(p_DateAcct!=null)
assetAdd.setDateAcct(p_DateAcct);
assetAdd.saveEx();
//Process Asset Addition Based on Document Action
if(!assetAdd.processIt(ifa.getDocAction())){
ifa.setA_Asset_ID(assetAdd.getA_Asset_ID());
if (isUpdate)
{
MAsset asset = MAsset.get(getCtx(), ifa.getA_Asset_ID(), get_TrxName());
for (MAssetGroupAcct assetgrpacct : MAssetGroupAcct.forA_Asset_Group_ID(getCtx(), asset.getA_Asset_Group_ID()))
{
if (assetgrpacct.getAD_Org_ID() == 0 || assetgrpacct.getAD_Org_ID() == asset.getAD_Org_ID())
{
if (assetgrpacct.getC_AcctSchema_ID() != ifa.getC_AcctSchema_ID())
continue;
// Asset Accounting
MAssetAcct assetacct = new MAssetAcct(asset, assetgrpacct);
assetacct.setAD_Org_ID(asset.getAD_Org_ID()); //added by @win
assetacct.saveEx();
// Asset Depreciation Workfile
MDepreciationWorkfile assetworkFile = new MDepreciationWorkfile(asset, assetacct.getPostingType(), assetgrpacct);
assetworkFile.setAD_Org_ID(asset.getAD_Org_ID()); //added by @win
assetworkFile.setUseLifeYears(assetgrpacct.getUseLifeYears());
assetworkFile.setUseLifeMonths(assetgrpacct.getUseLifeMonths());
assetworkFile.setUseLifeYears_F(assetgrpacct.getUseLifeYears_F());
assetworkFile.setUseLifeMonths_F(assetgrpacct.getUseLifeMonths_F());
assetworkFile.saveEx();
}
}
}
for (MDepreciationWorkfile assetworkFile : MDepreciationWorkfile.forA_Asset_ID(getCtx(), ifa.getA_Asset_ID(), get_TrxName()))
{
if (assetworkFile.getC_AcctSchema_ID() != ifa.getC_AcctSchema_ID())
continue;
if (ifa.getAssetDepreciationDate() != null)
assetworkFile.setAssetDepreciationDate(ifa.getAssetDepreciationDate());
assetworkFile.setDateAcct(assetAdd.getDateAcct());
BigDecimal assetCost = ifa.getA_Asset_Cost();
if (assetCost == null)
assetCost = Env.ZERO;
assetworkFile.setA_Asset_Cost(assetCost);
BigDecimal accumulatedDepr = ifa.getA_Accumulated_Depr();
if (accumulatedDepr == null)
accumulatedDepr = Env.ZERO;
assetworkFile.setA_Accumulated_Depr(accumulatedDepr);
BigDecimal accumulatedDeprF = ifa.getA_Accumulated_Depr_F();
if (accumulatedDeprF == null)
accumulatedDeprF = Env.ZERO;
assetworkFile.setA_Accumulated_Depr_F(accumulatedDeprF);
BigDecimal salvageValue = ifa.getA_Salvage_Value();
if (salvageValue == null)
salvageValue = Env.ZERO;
assetworkFile.setA_Salvage_Value(salvageValue);
assetworkFile.setUseLifeMonths(ifa.getUseLifeMonths());
assetworkFile.setUseLifeMonths_F(ifa.getUseLifeMonths_F());
int currentPeriod = ifa.getA_Current_Period();
if (currentPeriod == 0)
{
int useLifeMonths = ifa.getUseLifeMonths();
if (useLifeMonths > 0)
currentPeriod = (int) (accumulatedDepr.doubleValue() / (assetCost.doubleValue() / useLifeMonths));
}
assetworkFile.setA_Current_Period(currentPeriod > 0 ? currentPeriod : 1);
assetworkFile.saveEx();
}
// Process Asset Addition Based on Document Action
if (!assetAdd.processIt(ifa.getDocAction()))
{
ifa.setI_ErrorMsg("Failed Process Asset Addition");
cnt_err++;
assetAdd=null;
assetAdd = null;
continue;
}
assetAdd.saveEx();
ifa.setI_IsImported(true);
ifa.setI_ErrorMsg(null);
ifa.setA_Asset_ID(assetAdd.getA_Asset_ID());
ifa.setProcessed(true);
ifa.saveEx();
cnt_ok++;
if (isUpdate)
noUpdate++;
else
noInsert++;
}
catch (Exception e) {
ifa.setI_ErrorMsg(e.getLocalizedMessage());
cnt_err++;
ifa.saveEx();
}
}
@ -392,8 +550,13 @@ public class ImportFixedAsset extends SvrProcess
{
DB.close(rs); rs = null;
//
addLog (0, null, new BigDecimal (cnt_ok), "Imported @Ok@: ");
addLog (0, null, new BigDecimal (cnt_err), "Imported @Error@: ");
sql = new StringBuilder ("UPDATE "+X_I_FixedAsset.Table_Name)
.append(" SET I_IsImported='N', Updated=SysDate ")
.append("WHERE I_IsImported<>'Y'").append(sqlCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
addLog (0, null, new BigDecimal (no), "@Errors@");
addLog (0, null, new BigDecimal (noInsert), "@A_Asset_ID@: @Inserted@");
addLog (0, null, new BigDecimal (noUpdate), "@A_Asset_ID@: @Updated@");
}
return "";