IDEMPIERE-1285 Estimated Landed Cost for PO.

This commit is contained in:
Heng Sin Low 2013-08-19 21:27:04 +08:00
parent be50c979a6
commit 7246f49bab
30 changed files with 3843 additions and 314 deletions

View File

@ -0,0 +1,960 @@
-- Aug 19, 2013 11:33:20 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Help,EntityType,Name,Description,PrintName,AD_Element_UU,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID) VALUES ('P_LandedCostClearing_Acct',202587,'Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.','D','Landed Cost Clearing','Product Landed Cost Clearing Account','Landed Cost Clearing','b701e5a5-c94b-4298-8dab-3b93da803e24',TO_DATE('2013-08-19 11:33:03','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-08-19 11:33:03','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y',0)
;
-- Aug 19, 2013 11:33:21 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202587 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Aug 19, 2013 11:35:43 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',1,315,210730,'N','N','N',0,'N',22,'N',25,'N','N','Y','d2b7f7a6-cf25-4bb6-aac8-c765fff73349','Y','P_LandedCostClearing_Acct','Product Landed Cost Clearing Account','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.','Landed Cost Clearing','Y',TO_DATE('2013-08-19 11:35:33','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 11:35:33','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202587,'N')
;
-- Aug 19, 2013 11:35:43 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210730 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 11:35:50 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_AcctSchema_Default ADD P_LandedCostClearing_Acct VARCHAR2(22) DEFAULT NULL
;
-- Aug 19, 2013 11:37:32 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',1,273,210731,'N','N','N',0,'N',22,'N',25,'N','N','Y','9d37c254-f88a-4d7b-b3a0-03edacd8c1dc','Y','P_LandedCostClearing_Acct','Product Landed Cost Clearing Account','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.','Landed Cost Clearing','Y',TO_DATE('2013-08-19 11:37:23','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 11:37:23','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202587,'N')
;
-- Aug 19, 2013 11:37:32 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210731 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 11:37:43 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE M_Product_Acct ADD P_LandedCostClearing_Acct VARCHAR2(22) DEFAULT NULL
;
-- Aug 19, 2013 11:38:40 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',1,401,210732,'N','N','N',0,'N',22,'N',25,'N','N','Y','9de1b9e9-202c-4e62-8bc9-e0e6c9b0be94','Y','P_LandedCostClearing_Acct','Product Landed Cost Clearing Account','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.','Landed Cost Clearing','Y',TO_DATE('2013-08-19 11:38:35','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 11:38:35','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202587,'N')
;
-- Aug 19, 2013 11:38:40 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210732 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 11:38:57 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE M_Product_Category_Acct ADD P_LandedCostClearing_Acct VARCHAR2(22) DEFAULT NULL
;
-- Aug 19, 2013 11:45:17 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (NumLines,SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_FieldGroup_ID,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,IsAdvancedField) VALUES (1,0,'N',252,0,'N','N',210730,680,'Y',202403,'N','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.',200013,'D','Product Landed Cost Clearing Account','Landed Cost Clearing','Y','N','7226a38b-d3a2-42a3-aa56-c60f6670582b',100,0,TO_DATE('2013-08-19 11:45:16','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 11:45:16','YYYY-MM-DD HH24:MI:SS'),'Y','Y',780,1,'N',0,1,'N')
;
-- Aug 19, 2013 11:45:17 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202403 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=280, IsDisplayed='Y', XPosition=4, ColumnSpan=2,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202403
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=290,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2662
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=300,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3842
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=310,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3841
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=320,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5132
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=330,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5133
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=340,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3845
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=350,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3844
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=360,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3839
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=370,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3840
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=380,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3836
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=390,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3851
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=400,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2654
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=410,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3835
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=420,Updated=TO_DATE('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3823
;
-- Aug 19, 2013 2:20:24 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Table (ImportTable,CopyColumnsFromTable,IsSecurityEnabled,AccessLevel,LoadSeq,AD_Table_ID,IsHighVolume,IsView,IsChangeLog,EntityType,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,Name,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Created,AD_Client_ID) VALUES ('N','N','N','1',0,200103,'N','N','Y','D','L','a4b95653-aef2-435a-a605-8ad71c8b7be8','Y','Y','C_OrderLandedCost','Estimated Landed Cost for Purchase Order','Estimated Landed Cost','Y',0,100,TO_DATE('2013-08-19 14:20:13','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:13','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Aug 19, 2013 2:20:24 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Table_Trl_UU ) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200103 AND NOT EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID)
;
-- Aug 19, 2013 2:20:24 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Sequence_UU,IncrementNo,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,StartNo,AD_Client_ID) VALUES ('N',200000,'Y',1000000,'N','Y',200140,'Table C_OrderLandedCost','C_OrderLandedCost','df1316a8-37eb-41cf-8cb8-d13fb414fbeb',1,0,TO_DATE('2013-08-19 14:20:24','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000000,0)
;
-- Aug 19, 2013 2:20:25 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('C_OrderLandedCost_ID',202595,'Estimated Landed Cost','Estimated Landed Cost','45c5a103-7fb1-4578-916d-41c846432446',TO_DATE('2013-08-19 14:20:24','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-08-19 14:20:24','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
;
-- Aug 19, 2013 2:20:25 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202595 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210787,'Y','N','N',0,'N',22,'N',13,'Y','N','Y','a01b1596-4225-4fc4-824a-ce971fdb4521','N','C_OrderLandedCost_ID','Estimated Landed Cost','N',TO_DATE('2013-08-19 14:20:25','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:25','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202595,'N')
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210787 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
CREATE TABLE C_OrderLandedCost (C_OrderLandedCost_ID NUMBER(10) NOT NULL, CONSTRAINT C_OrderLandedCost_Key PRIMARY KEY (C_OrderLandedCost_ID))
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210788,'Y','N','N',0,'N',22,'N',19,129,'N','N','Y','82ae1d27-29ef-43b6-bd9b-1d9ca02d7143','N','AD_Client_ID','Client/Tenant for this installation.','@AD_Client_ID@','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client','N',TO_DATE('2013-08-19 14:20:26','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:26','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',102,'N')
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210788 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD AD_Client_ID NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:20:27 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210789,'Y','N','N',0,'N',22,'N',19,104,'N','N','Y','57a258fb-8006-4357-9d2f-634a65b97a33','N','AD_Org_ID','Organizational entity within client','@AD_Org_ID@','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization','N',TO_DATE('2013-08-19 14:20:26','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:26','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',113,'N')
;
-- Aug 19, 2013 2:20:27 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210789 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:27 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD AD_Org_ID NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:20:28 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('C_OrderLandedCost_UU',202596,'C_OrderLandedCost_UU','C_OrderLandedCost_UU','3111982b-fc8b-4fd1-80bc-9e177c161e4a',TO_DATE('2013-08-19 14:20:27','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-08-19 14:20:27','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
;
-- Aug 19, 2013 2:20:28 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202596 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Aug 19, 2013 2:20:28 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1.00,200103,210790,'N','N','N','N',36,'N',10,'N','N','Y','f81bff83-676c-40bd-9b81-c6177acb9b36','Y','C_OrderLandedCost_UU','C_OrderLandedCost_UU','N',TO_DATE('2013-08-19 14:20:28','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:28','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202596,'N')
;
-- Aug 19, 2013 2:20:28 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210790 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:28 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD C_OrderLandedCost_UU NVARCHAR2(36) DEFAULT NULL
;
-- Aug 19, 2013 2:20:29 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD CONSTRAINT C_OrderLandedCost_UU_idx UNIQUE (C_OrderLandedCost_UU)
;
-- Aug 19, 2013 2:20:29 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210791,'Y','N','N',0,'N',7,'N',16,'N','N','Y','232d3fb6-a457-4275-b1fc-3a1cd397524d','N','Created','Date this record was created','The Created field indicates the date that this record was created.','Created','N',TO_DATE('2013-08-19 14:20:29','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:29','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',245,'N')
;
-- Aug 19, 2013 2:20:29 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210791 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:29 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD Created DATE NOT NULL
;
-- Aug 19, 2013 2:20:30 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210792,110,'Y','N','N',0,'N',22,'N',18,'N','N','Y','a2aa6895-00e8-4403-a4e3-392e92a41e6a','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',TO_DATE('2013-08-19 14:20:29','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:29','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',246,'N')
;
-- Aug 19, 2013 2:20:30 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210792 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:30 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD CreatedBy NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:20:31 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210793,'N','N','N',0,'N',255,'Y',10,'N','N','Y','b8a1d6f4-b738-4577-be7b-78030d4cfdad','Y','Description','Optional short description of the record','A description is limited to 255 characters.','Description','Y',TO_DATE('2013-08-19 14:20:30','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:30','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',275,'N')
;
-- Aug 19, 2013 2:20:31 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210793 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:31 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD Description NVARCHAR2(255) DEFAULT NULL
;
-- Aug 19, 2013 2:20:32 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',0,200103,210794,339,'Y','N','N','N',1,'N',17,'N','N','Y','42c95ca0-d55e-4f26-9125-0b6f0edab662','Y','LandedCostDistribution','Landed Cost Distribution','Q','How landed costs are distributed to material receipts','Cost Distribution','Y',TO_DATE('2013-08-19 14:20:31','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:31','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',2703,'N')
;
-- Aug 19, 2013 2:20:32 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210794 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:32 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD LandedCostDistribution CHAR(1) DEFAULT 'Q' NOT NULL
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',0,200103,210795,'Y','N','N','N',10,'N',19,222,'N','N','Y','e68cfb06-ce8a-4434-81fb-1c10997298a5','Y','M_CostElement_ID','Product Cost Element','Cost Element','Y',TO_DATE('2013-08-19 14:20:32','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:32','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',2700,'N')
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210795 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD M_CostElement_ID NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210796,'Y','N','N',0,'N',7,'N',16,'N','N','Y','de3237e4-d938-4a21-9ed5-016163598ee2','N','Updated','Date this record was updated','The Updated field indicates the date that this record was updated.','Updated','N',TO_DATE('2013-08-19 14:20:33','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:33','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',607,'N')
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210796 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD Updated DATE NOT NULL
;
-- Aug 19, 2013 2:20:34 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210797,110,'Y','N','N',0,'N',22,'N',18,'N','N','Y','b02e0d84-eb4d-4109-be67-b1cfa9b057de','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',TO_DATE('2013-08-19 14:20:33','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:33','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',608,'N')
;
-- Aug 19, 2013 2:20:34 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210797 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:34 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD UpdatedBy NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',0,200103,210798,'Y','N','N',0,'Y',22,'N',30,'N','N','Y','6b95895b-ceed-4d8c-909e-b2366e2b3ded','N','C_Order_ID','Order','The Order is a control document. The Order is complete when the quantity ordered is the same as the quantity shipped and invoiced. When you close an order, unshipped (backordered) quantities are cancelled.','Order','Y',TO_DATE('2013-08-19 14:20:34','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:34','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',558,'N')
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210798 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD C_Order_ID NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',0,200103,210799,'Y','N','N',0,'N',22,'N',12,'N','N','Y','21f22033-fa5a-48d4-b283-f4dd591cb904','Y','Amt','Amount','0','Amount','Amount','N',TO_DATE('2013-08-19 14:20:35','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:35','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',160,'N')
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210799 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD Amt NUMBER DEFAULT 0 NOT NULL
;
-- Aug 19, 2013 2:20:36 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',1,200103,210800,'Y','N','N',0,'N',1,'N',20,'N','N','Y','6200b3be-e355-4e75-9a1b-3301a27262ed','Y','IsActive','The record is active in the system','Y','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Active','N',TO_DATE('2013-08-19 14:20:36','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:36','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',348,'N')
;
-- Aug 19, 2013 2:20:36 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210800 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:36 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL
;
-- Aug 19, 2013 2:20:37 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',1,200103,210801,'Y','N','N',0,'N',1,'N',20,'N','N','Y','9103b1f1-9614-4c0b-bb19-e57446201fc0','Y','Processed','The document has been processed','N','The Processed checkbox indicates that a document has been processed.','Processed','Y',TO_DATE('2013-08-19 14:20:37','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:37','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',1047,'N')
;
-- Aug 19, 2013 2:20:37 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210801 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:37 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD Processed CHAR(1) DEFAULT 'N' CHECK (Processed IN ('Y','N')) NOT NULL
;
-- Aug 19, 2013 2:20:38 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,AD_Table_ID,HasTree,IsInfoTab,IsReadOnly,IsInsertRecord,IsAdvancedTab,TabLevel,AD_Tab_UU,EntityType,Name,AD_Tab_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Client_ID) VALUES ('N','N','Y',181,70,'N','N',200103,'N','N','N','Y','N',1,'92141899-a52e-4902-bf11-fae2907fd747','D','Estimated Landed Cost',200109,0,TO_DATE('2013-08-19 14:20:38','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:38','YYYY-MM-DD HH24:MI:SS'),100,'Y',0)
;
-- Aug 19, 2013 2:20:38 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, Help,CommitWarning,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Tab_Trl_UU ) SELECT l.AD_Language,t.AD_Tab_ID, t.Help,t.CommitWarning,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200109 AND NOT EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID)
;
-- Aug 19, 2013 2:20:39 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,36,'N','N',210790,0,'Y',202429,'N','D','C_OrderLandedCost_UU','23995911-ee7e-49ad-929f-5e73a5ae691f','N','N',100,0,TO_DATE('2013-08-19 14:20:38','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:38','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:39 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202429 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:40 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,22,'N','N',210787,0,'Y',202430,'N','D','Estimated Landed Cost','923e4e19-4b63-41cb-a257-1c96c684a6c6','N','N',100,0,TO_DATE('2013-08-19 14:20:39','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:39','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:40 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202430 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:40 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,22,'N','N',210788,10,'Y',202431,'N','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','D','Client/Tenant for this installation.','Client','1ae8b7aa-07c6-46b7-906d-4dbbc5ee2671','Y','N',100,0,TO_DATE('2013-08-19 14:20:40','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:40','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:40 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202431 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:41 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,IsAllowCopy,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,22,'N','N',210789,20,'Y',202432,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','D','Organizational entity within client','Organization','7b8c644e-7b17-4923-9958-519e1257ff7b','Y','N','Y',100,0,TO_DATE('2013-08-19 14:20:40','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:40','YYYY-MM-DD HH24:MI:SS'),'Y','Y',4,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:41 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202432 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:42 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,22,'N','N',210798,30,'Y',202433,'N','The Order is a control document. The Order is complete when the quantity ordered is the same as the quantity shipped and invoiced. When you close an order, unshipped (backordered) quantities are cancelled.','D','Order','Order','d95e1a8d-1a99-42d1-b5fb-8f0df85c2f46','Y','N',100,0,TO_DATE('2013-08-19 14:20:41','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:41','YYYY-MM-DD HH24:MI:SS'),'Y','Y',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:42 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202433 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:42 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,10,'N','N',210795,40,'Y',202434,'N','D','Product Cost Element','Cost Element','34d9ce77-6e18-4183-9531-470af17e5263','Y','N',100,0,TO_DATE('2013-08-19 14:20:42','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:42','YYYY-MM-DD HH24:MI:SS'),'Y','Y',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:42 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202434 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:43 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,255,'N','N',210793,50,'Y',202435,'N','A description is limited to 255 characters.','D','Optional short description of the record','Description','3a05203b-c7b0-43f0-9a74-602598d54985','Y','N',100,0,TO_DATE('2013-08-19 14:20:42','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:42','YYYY-MM-DD HH24:MI:SS'),'Y','Y',1,'N',0,5,1,'N')
;
-- Aug 19, 2013 2:20:43 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202435 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:44 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,1,'N','N',210794,60,'Y',202436,'N','How landed costs are distributed to material receipts','D','Landed Cost Distribution','Cost Distribution','00631adb-d3f6-49dc-ab42-6becd6eeec33','Y','N',100,0,TO_DATE('2013-08-19 14:20:43','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:43','YYYY-MM-DD HH24:MI:SS'),'Y','Y',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:44 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202436 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:44 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,22,'N','N',210799,70,'Y',202437,'N','Amount','D','Amount','Amount','17d760d6-f4d6-4702-834e-cb76c7442ac2','Y','N',100,0,TO_DATE('2013-08-19 14:20:44','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:44','YYYY-MM-DD HH24:MI:SS'),'Y','Y',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:44 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202437 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:45 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Table (ImportTable,CopyColumnsFromTable,IsSecurityEnabled,AccessLevel,LoadSeq,AD_Table_ID,IsHighVolume,IsView,IsChangeLog,EntityType,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,Name,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Created,AD_Client_ID) VALUES ('N','N','N','1',0,200104,'N','N','Y','D','L','2daed095-c101-4922-b05a-1587562a85bb','Y','Y','C_OrderLandedCostAllocation','Estimate landed cost allocation for order line','Estimated Landed Cost Allocation','Y',0,100,TO_DATE('2013-08-19 14:20:44','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:44','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Aug 19, 2013 2:20:45 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Table_Trl_UU ) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200104 AND NOT EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID)
;
-- Aug 19, 2013 2:20:46 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Sequence_UU,IncrementNo,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,StartNo,AD_Client_ID) VALUES ('N',200000,'Y',1000000,'N','Y',200141,'Table C_OrderLandedCostAllocation','C_OrderLandedCostAllocation','61ef937d-bf27-46e5-8a1f-ca8748f56732',1,0,TO_DATE('2013-08-19 14:20:45','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:20:45','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000000,0)
;
-- Aug 19, 2013 2:20:46 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('C_OrderLandedCostAllocation_ID',202597,'Estimated Landed Cost Allocation','Estimated Landed Cost Allocation','742abb97-fd35-4d73-a6f6-400de13e1972',TO_DATE('2013-08-19 14:20:46','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-08-19 14:20:46','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
;
-- Aug 19, 2013 2:20:46 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202597 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Aug 19, 2013 2:20:47 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',0,200104,210802,'Y','N','N','N',10,'N',13,'Y','N','Y','300b4467-3258-4aa7-a23a-f8945df71ddc','N','C_OrderLandedCostAllocation_ID','Estimated Landed Cost Allocation','N',TO_DATE('2013-08-19 14:20:46','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:46','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202597,'N')
;
-- Aug 19, 2013 2:20:47 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210802 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:47 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
CREATE TABLE C_OrderLandedCostAllocation (C_OrderLandedCostAllocation_ID NUMBER(10) NOT NULL, CONSTRAINT C_OrderLandedCostAllocatio_Key PRIMARY KEY (C_OrderLandedCostAllocation_ID))
;
-- Aug 19, 2013 2:20:48 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210803,'Y','N','N',0,'N',22,'N',19,129,'N','N','Y','515d51df-fb8f-48cf-9cc1-09888ce70895','N','AD_Client_ID','Client/Tenant for this installation.','@AD_Client_ID@','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client','N',TO_DATE('2013-08-19 14:20:47','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:47','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',102,'N')
;
-- Aug 19, 2013 2:20:48 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210803 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:48 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD AD_Client_ID NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210804,'Y','N','N',0,'N',22,'N',19,104,'N','N','Y','d306fcb8-a551-4cba-a089-4276979e1ba4','N','AD_Org_ID','Organizational entity within client','@AD_Org_ID@','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization','N',TO_DATE('2013-08-19 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',113,'N')
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210804 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD AD_Org_ID NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210805,'Y','N','N',0,'N',22,'N',12,'N','N','Y','0ab4a43c-f93b-4465-a334-3dedddc33e73','Y','Amt','Amount','Amount','Amount','Y',TO_DATE('2013-08-19 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',160,'N')
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210805 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD Amt NUMBER NOT NULL
;
-- Aug 19, 2013 2:20:50 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',0,200104,210806,'Y','N','N','N',22,'N',22,'N','N','Y','daed0386-9b97-4ef0-bb69-642674c687c2','Y','Base','Calculation Base','Base','Y',TO_DATE('2013-08-19 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',2818,'N')
;
-- Aug 19, 2013 2:20:50 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210806 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:50 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD Base NUMBER NOT NULL
;
-- Aug 19, 2013 2:20:51 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('C_OrderLandedCostAllocation_UU',202598,'C_OrderLandedCostAllocation_UU','C_OrderLandedCostAllocation_UU','5a57282b-b393-4888-bef7-828b4e733160',TO_DATE('2013-08-19 14:20:50','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-08-19 14:20:50','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
;
-- Aug 19, 2013 2:20:51 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202598 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Aug 19, 2013 2:20:51 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1.00,200104,210807,'N','N','N','N',36,'N',10,'N','N','Y','695fd3aa-79e4-448b-b805-f324c81d4fd9','Y','C_OrderLandedCostAllocation_UU','C_OrderLandedCostAllocation_UU','N',TO_DATE('2013-08-19 14:20:51','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:51','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202598,'N')
;
-- Aug 19, 2013 2:20:51 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210807 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:52 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD C_OrderLandedCostAllocation_UU NVARCHAR2(36) DEFAULT NULL
;
-- Aug 19, 2013 2:20:52 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD CONSTRAINT C_OrderLandedCostAllocation_uu_idx UNIQUE (C_OrderLandedCostAllocation_UU)
;
-- Aug 19, 2013 2:20:52 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210808,'Y','N','N',0,'N',7,'N',16,'N','N','Y','e59adeb1-4235-41d5-a0e6-720d44ba00a1','N','Created','Date this record was created','The Created field indicates the date that this record was created.','Created','N',TO_DATE('2013-08-19 14:20:52','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:52','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',245,'N')
;
-- Aug 19, 2013 2:20:52 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210808 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:52 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD Created DATE NOT NULL
;
-- Aug 19, 2013 2:20:53 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210809,110,'Y','N','N',0,'N',22,'N',18,'N','N','Y','50d2d00f-76e9-412f-ae58-da8204f7f12a','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',TO_DATE('2013-08-19 14:20:52','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:52','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',246,'N')
;
-- Aug 19, 2013 2:20:53 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210809 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:53 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD CreatedBy NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210810,'Y','N','N',0,'N',22,'N',29,'N','N','Y','7d69150f-57f8-4ee7-8f08-65ca9af2a62c','Y','Qty','Quantity','The Quantity indicates the number of a specific product or item for this document.','Quantity','Y',TO_DATE('2013-08-19 14:20:53','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:20:53','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',526,'N')
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210810 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD Qty NUMBER NOT NULL
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210811,'Y','N','N',0,'N',7,'N',16,'N','N','Y','b2ebea38-4227-416f-9ddb-7107811be05e','N','Updated','Date this record was updated','The Updated field indicates the date that this record was updated.','Updated','N',TO_DATE('2013-08-19 14:21:08','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:21:08','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',607,'N')
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210811 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD Updated DATE NOT NULL
;
-- Aug 19, 2013 2:21:09 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210812,110,'Y','N','N',0,'N',22,'N',18,'N','N','Y','3d8627b7-e083-4d5d-a7a4-6557dca512b4','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',TO_DATE('2013-08-19 14:21:08','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:21:08','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',608,'N')
;
-- Aug 19, 2013 2:21:09 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210812 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:09 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD UpdatedBy NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:21:10 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',0,200104,210813,'Y','N','N',0,'Y',22,'N',30,'N','N','Y','b9a55455-cb48-42ff-b52b-5037a7deca75','N','C_OrderLandedCost_ID','Estimated Landed Cost','Y',TO_DATE('2013-08-19 14:21:09','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:21:09','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202595,'N')
;
-- Aug 19, 2013 2:21:10 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210813 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:10 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD C_OrderLandedCost_ID NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',0,200104,210815,'Y','N','N',0,'N',10,'N',19,203,'N','N','Y','30a85b9a-2dba-4a25-9b46-8ac2b0671369','N','C_OrderLine_ID','Sales Order Line','The Sales Order Line is a unique identifier for a line in an order.','Sales Order Line','N',TO_DATE('2013-08-19 14:21:10','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:21:10','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',561,'N')
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210815 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD C_OrderLine_ID NUMBER(10) NOT NULL
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',1,200104,210816,'Y','N','N',0,'N',1,'N',20,'N','N','Y','f5aa9b00-359a-4a53-a5ab-521d57b77ff5','Y','IsActive','The record is active in the system','Y','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Active','N',TO_DATE('2013-08-19 14:21:11','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:21:11','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',348,'N')
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210816 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL
;
-- Aug 19, 2013 2:21:12 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',1,200104,210817,'Y','N','N',0,'N',1,'N',20,'N','N','Y','7c8519a2-9f39-48bc-b3f4-97fd526a3783','Y','Processed','The document has been processed','N','The Processed checkbox indicates that a document has been processed.','Processed','Y',TO_DATE('2013-08-19 14:21:11','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:21:11','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',1047,'N')
;
-- Aug 19, 2013 2:21:12 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210817 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:12 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD Processed CHAR(1) DEFAULT 'N' CHECK (Processed IN ('Y','N')) NOT NULL
;
-- Aug 19, 2013 2:21:13 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,AD_Table_ID,HasTree,IsInfoTab,IsReadOnly,IsInsertRecord,IsAdvancedTab,TabLevel,AD_Tab_UU,EntityType,Name,AD_Tab_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Client_ID) VALUES ('N','N','Y',181,80,'N','N',200104,'N','N','N','Y','N',2,'d91b0ef9-ff2a-4836-b9d8-7ea8ccb7c40c','D','Estimated Landed Cost Allocation',200110,0,TO_DATE('2013-08-19 14:21:13','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:21:13','YYYY-MM-DD HH24:MI:SS'),100,'Y',0)
;
-- Aug 19, 2013 2:21:13 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, Help,CommitWarning,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Tab_Trl_UU ) SELECT l.AD_Language,t.AD_Tab_ID, t.Help,t.CommitWarning,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200110 AND NOT EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID)
;
-- Aug 19, 2013 2:21:14 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,36,'N','N',210807,0,'Y',202438,'N','D','C_OrderLandedCostAllocation_UU','e5af5151-1438-40b6-8d25-3ee3750149d6','N','N',100,0,TO_DATE('2013-08-19 14:21:13','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:21:13','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:14 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202438 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:15 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,10,'N','N',210802,0,'Y',202439,'N','D','Estimated Landed Cost Allocation','bb7c5e71-68e0-444b-a03f-80d87dd35277','N','N',100,0,TO_DATE('2013-08-19 14:21:14','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:21:14','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:15 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202439 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:15 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210803,10,'Y',202440,'N','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','D','Client/Tenant for this installation.','Client','821a8736-1e23-4570-9089-629391e3418d','Y','N',100,0,TO_DATE('2013-08-19 14:21:15','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:21:15','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:15 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202440 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:16 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,IsAllowCopy,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210804,20,'Y',202441,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','D','Organizational entity within client','Organization','86fb439b-38c1-45cb-9052-ab93607f36b9','Y','N','Y',100,0,TO_DATE('2013-08-19 14:21:15','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:21:15','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,4,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:16 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202441 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:17 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210813,30,'Y',202442,'N','D','Estimated Landed Cost','5984bc56-9945-4223-bcac-dc215d48e472','Y','N',100,0,TO_DATE('2013-08-19 14:21:16','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:21:16','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:17 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202442 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:17 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,10,'N','N',210815,40,'N',202443,'N','The Purchase Order Line is a unique identifier for a line in an order.','D','Purchase Order Line','Purchase Order Line','d0f72770-0e17-40bd-be7c-a33e523fcbe0','Y','N',100,0,TO_DATE('2013-08-19 14:21:17','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:21:17','YYYY-MM-DD HH24:MI:SS'),'Y','Y',10,1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:17 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202443 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:18 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210806,50,'Y',202444,'Y','D','Calculation Base','Base','61094f01-e51a-4a14-bb1d-c9e6de6e1e55','Y','N',100,0,TO_DATE('2013-08-19 14:21:17','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:21:17','YYYY-MM-DD HH24:MI:SS'),'Y','Y',20,1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:18 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202444 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:19 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210810,60,'Y',202445,'Y','The Quantity indicates the number of a specific product or item for this document.','D','Quantity','Quantity','742c6628-ee79-475c-91e5-21cdbe4b12b2','Y','N',100,0,TO_DATE('2013-08-19 14:21:18','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:21:18','YYYY-MM-DD HH24:MI:SS'),'Y','Y',30,1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:19 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202445 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:19 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210805,70,'Y',202446,'Y','Amount','D','Amount','Amount','b67089e2-a8e5-473f-86d8-f2c50ed17ad9','Y','N',100,0,TO_DATE('2013-08-19 14:21:19','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:21:19','YYYY-MM-DD HH24:MI:SS'),'Y','Y',40,1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:19 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202446 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:20 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',0,760,210818,'N','N','N',0,'N',22,'N',30,'N','N','Y','ca6ad084-ba7f-4204-8ffc-2fbda8bcc41c','N','M_InOutLine_ID','Line on Shipment or Receipt document','The Shipment/Receipt Line indicates a unique line in a Shipment/Receipt document','Shipment/Receipt Line','N',TO_DATE('2013-08-19 14:21:19','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-08-19 14:21:19','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',1026,'N')
;
-- Aug 19, 2013 2:21:20 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210818 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:20 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_LandedCostAllocation ADD M_InOutLine_ID NUMBER(10) DEFAULT NULL
;
-- Aug 19, 2013 2:31:25 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_FieldGroup_ID,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES (0,'N',324,0,'N','N',210732,310,'Y',202467,'N','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.',200011,'D','Product Landed Cost Clearing Account','Landed Cost Clearing','d2f20ec0-e107-44d9-a88d-4099484eb213','Y','N',100,0,TO_DATE('2013-08-19 14:31:10','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:31:10','YYYY-MM-DD HH24:MI:SS'),'Y','Y',320,1,'N',0,1,1,'N')
;
-- Aug 19, 2013 2:31:25 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202467 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:32:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=200, IsDisplayed='Y', XPosition=1, ColumnSpan=2,Updated=TO_DATE('2013-08-19 14:32:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202467
;
-- Aug 19, 2013 2:32:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=210,Updated=TO_DATE('2013-08-19 14:32:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3945
;
-- Aug 19, 2013 2:33:41 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES (0,'N',210,0,'N','N',210731,290,'Y',202469,'N','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.','D','Product Landed Cost Clearing Account','Landed Cost Clearing','1d627daa-21d8-4bbe-9250-d069e2ea8971','Y','N',100,0,TO_DATE('2013-08-19 14:33:20','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:33:20','YYYY-MM-DD HH24:MI:SS'),'Y','Y',290,1,'N',0,1,1,'N')
;
-- Aug 19, 2013 2:33:41 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202469 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:34:00 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=180, ColumnSpan=2,Updated=TO_DATE('2013-08-19 14:34:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202469
;
-- Aug 19, 2013 2:58:23 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO C_ElementValue (IsSummary,PostEncumbrance,AccountSign,IsDocControlled,C_ElementValue_ID,PostStatistical,C_Element_ID,AccountType,PostActual,IsForeignCurrency,C_Currency_ID,IsBankAccount,PostBudget,C_BankAccount_ID,Name,Description,C_ElementValue_UU,Value,Updated,UpdatedBy,CreatedBy,AD_Client_ID,Created,IsActive,AD_Org_ID) VALUES ('N','Y','N','Y',200000,'Y',105,'E','Y','N',100,'N','Y',100,'Landed Cost Clearing','Account for Landed Cost Clearing','15b486d5-8ce6-42a1-9dbf-e111e77a1581','58900',TO_DATE('2013-08-19 14:58:18','YYYY-MM-DD HH24:MI:SS'),100,100,11,TO_DATE('2013-08-19 14:58:18','YYYY-MM-DD HH24:MI:SS'),'Y',0)
;
-- Aug 19, 2013 2:58:23 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO C_ElementValue_Trl (AD_Language,C_ElementValue_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_ElementValue_Trl_UU ) SELECT l.AD_Language,t.C_ElementValue_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, C_ElementValue t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_ElementValue_ID=200000 AND NOT EXISTS (SELECT * FROM C_ElementValue_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_ElementValue_ID=t.C_ElementValue_ID)
;
-- Aug 19, 2013 2:58:23 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_TreeNode (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNode_UU) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 100, SysDate, 100,t.AD_Tree_ID, 200000, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=11 AND t.IsActive='Y' AND EXISTS (SELECT * FROM C_Element ae WHERE ae.C_Element_ID=105 AND t.AD_Tree_ID=ae.AD_Tree_ID) AND NOT EXISTS (SELECT * FROM AD_TreeNode e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200000)
;
-- Aug 19, 2013 2:59:14 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO C_ValidCombination (C_ValidCombination_ID,IsFullyQualified,Combination,C_AcctSchema_ID,Account_ID,Description,C_ValidCombination_UU,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Org_ID,AD_Client_ID) VALUES (200000,'Y','HQ-58900-_-_-_-_',101,200000,'HQ-Landed Cost Clearing-_-_-_-_','7a7e6f38-b914-471f-a23b-9ad79b853073','Y',TO_DATE('2013-08-19 14:59:08','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-08-19 14:59:08','YYYY-MM-DD HH24:MI:SS'),100,11,11)
;
-- Aug 19, 2013 2:59:25 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE C_AcctSchema_Default SET P_LandedCostClearing_Acct=200000,Updated=TO_DATE('2013-08-19 14:59:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101
;
Update M_Product_Category_Acct Set P_LandedCostClearing_Acct=200000 WHERE P_LandedCostClearing_Acct IS NULL AND C_AcctSchema_ID=101 AND AD_Client_ID=11
;
Update M_Product_Acct Set P_LandedCostClearing_Acct=200000 WHERE P_LandedCostClearing_Acct IS NULL AND C_AcctSchema_ID=101 AND AD_Client_ID=11
;
SELECT register_migration_script('201308190830_IDEMPIERE-1285.sql') FROM dual
;

View File

@ -0,0 +1,958 @@
-- Aug 19, 2013 11:33:20 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Help,EntityType,Name,Description,PrintName,AD_Element_UU,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID) VALUES ('P_LandedCostClearing_Acct',202587,'Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.','D','Landed Cost Clearing','Product Landed Cost Clearing Account','Landed Cost Clearing','b701e5a5-c94b-4298-8dab-3b93da803e24',TO_TIMESTAMP('2013-08-19 11:33:03','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-08-19 11:33:03','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y',0)
;
-- Aug 19, 2013 11:33:21 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202587 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Aug 19, 2013 11:35:43 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',1,315,210730,'N','N','N',0,'N',22,'N',25,'N','N','Y','d2b7f7a6-cf25-4bb6-aac8-c765fff73349','Y','P_LandedCostClearing_Acct','Product Landed Cost Clearing Account','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.','Landed Cost Clearing','Y',TO_TIMESTAMP('2013-08-19 11:35:33','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 11:35:33','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202587,'N')
;
-- Aug 19, 2013 11:35:43 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210730 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 11:35:50 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_AcctSchema_Default ADD COLUMN P_LandedCostClearing_Acct VARCHAR(22) DEFAULT NULL
;
-- Aug 19, 2013 11:37:32 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',1,273,210731,'N','N','N',0,'N',22,'N',25,'N','N','Y','9d37c254-f88a-4d7b-b3a0-03edacd8c1dc','Y','P_LandedCostClearing_Acct','Product Landed Cost Clearing Account','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.','Landed Cost Clearing','Y',TO_TIMESTAMP('2013-08-19 11:37:23','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 11:37:23','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202587,'N')
;
-- Aug 19, 2013 11:37:32 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210731 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 11:37:43 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE M_Product_Acct ADD COLUMN P_LandedCostClearing_Acct VARCHAR(22) DEFAULT NULL
;
-- Aug 19, 2013 11:38:40 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',1,401,210732,'N','N','N',0,'N',22,'N',25,'N','N','Y','9de1b9e9-202c-4e62-8bc9-e0e6c9b0be94','Y','P_LandedCostClearing_Acct','Product Landed Cost Clearing Account','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.','Landed Cost Clearing','Y',TO_TIMESTAMP('2013-08-19 11:38:35','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 11:38:35','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202587,'N')
;
-- Aug 19, 2013 11:38:40 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210732 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 11:38:57 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE M_Product_Category_Acct ADD COLUMN P_LandedCostClearing_Acct VARCHAR(22) DEFAULT NULL
;
-- Aug 19, 2013 11:45:17 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (NumLines,SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_FieldGroup_ID,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,IsAdvancedField) VALUES (1,0,'N',252,0,'N','N',210730,680,'Y',202403,'N','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.',200013,'D','Product Landed Cost Clearing Account','Landed Cost Clearing','Y','N','7226a38b-d3a2-42a3-aa56-c60f6670582b',100,0,TO_TIMESTAMP('2013-08-19 11:45:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 11:45:16','YYYY-MM-DD HH24:MI:SS'),'Y','Y',780,1,'N',0,1,'N')
;
-- Aug 19, 2013 11:45:17 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202403 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=280, IsDisplayed='Y', XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202403
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=290,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2662
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=300,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3842
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=310,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3841
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=320,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5132
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=330,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5133
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=340,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3845
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=350,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3844
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=360,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3839
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=370,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3840
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=380,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3836
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=390,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3851
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=400,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2654
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=410,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3835
;
-- Aug 19, 2013 11:46:39 AM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=420,Updated=TO_TIMESTAMP('2013-08-19 11:46:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3823
;
-- Aug 19, 2013 2:20:24 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Table (ImportTable,CopyColumnsFromTable,IsSecurityEnabled,AccessLevel,LoadSeq,AD_Table_ID,IsHighVolume,IsView,IsChangeLog,EntityType,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,Name,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Created,AD_Client_ID) VALUES ('N','N','N','1',0,200103,'N','N','Y','D','L','a4b95653-aef2-435a-a605-8ad71c8b7be8','Y','Y','C_OrderLandedCost','Estimated Landed Cost for Purchase Order','Estimated Landed Cost','Y',0,100,TO_TIMESTAMP('2013-08-19 14:20:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:13','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Aug 19, 2013 2:20:24 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Table_Trl_UU ) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200103 AND NOT EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID)
;
-- Aug 19, 2013 2:20:24 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Sequence_UU,IncrementNo,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,StartNo,AD_Client_ID) VALUES ('N',200000,'Y',1000000,'N','Y',200140,'Table C_OrderLandedCost','C_OrderLandedCost','df1316a8-37eb-41cf-8cb8-d13fb414fbeb',1,0,TO_TIMESTAMP('2013-08-19 14:20:24','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000000,0)
;
-- Aug 19, 2013 2:20:25 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('C_OrderLandedCost_ID',202595,'Estimated Landed Cost','Estimated Landed Cost','45c5a103-7fb1-4578-916d-41c846432446',TO_TIMESTAMP('2013-08-19 14:20:24','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-08-19 14:20:24','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
;
-- Aug 19, 2013 2:20:25 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202595 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210787,'Y','N','N',0,'N',22,'N',13,'Y','N','Y','a01b1596-4225-4fc4-824a-ce971fdb4521','N','C_OrderLandedCost_ID','Estimated Landed Cost','N',TO_TIMESTAMP('2013-08-19 14:20:25','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:25','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202595,'N')
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210787 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
CREATE TABLE C_OrderLandedCost (C_OrderLandedCost_ID NUMERIC(10) NOT NULL, CONSTRAINT C_OrderLandedCost_Key PRIMARY KEY (C_OrderLandedCost_ID))
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210788,'Y','N','N',0,'N',22,'N',19,129,'N','N','Y','82ae1d27-29ef-43b6-bd9b-1d9ca02d7143','N','AD_Client_ID','Client/Tenant for this installation.','@AD_Client_ID@','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client','N',TO_TIMESTAMP('2013-08-19 14:20:26','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:26','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',102,'N')
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210788 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:26 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN AD_Client_ID NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:20:27 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210789,'Y','N','N',0,'N',22,'N',19,104,'N','N','Y','57a258fb-8006-4357-9d2f-634a65b97a33','N','AD_Org_ID','Organizational entity within client','@AD_Org_ID@','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization','N',TO_TIMESTAMP('2013-08-19 14:20:26','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:26','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',113,'N')
;
-- Aug 19, 2013 2:20:27 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210789 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:27 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN AD_Org_ID NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:20:28 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('C_OrderLandedCost_UU',202596,'C_OrderLandedCost_UU','C_OrderLandedCost_UU','3111982b-fc8b-4fd1-80bc-9e177c161e4a',TO_TIMESTAMP('2013-08-19 14:20:27','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-08-19 14:20:27','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
;
-- Aug 19, 2013 2:20:28 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202596 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Aug 19, 2013 2:20:28 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1.00,200103,210790,'N','N','N','N',36,'N',10,'N','N','Y','f81bff83-676c-40bd-9b81-c6177acb9b36','Y','C_OrderLandedCost_UU','C_OrderLandedCost_UU','N',TO_TIMESTAMP('2013-08-19 14:20:28','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:28','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202596,'N')
;
-- Aug 19, 2013 2:20:28 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210790 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:28 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN C_OrderLandedCost_UU VARCHAR(36) DEFAULT NULL
;
-- Aug 19, 2013 2:20:29 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD CONSTRAINT C_OrderLandedCost_UU_idx UNIQUE (C_OrderLandedCost_UU)
;
-- Aug 19, 2013 2:20:29 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210791,'Y','N','N',0,'N',7,'N',16,'N','N','Y','232d3fb6-a457-4275-b1fc-3a1cd397524d','N','Created','Date this record was created','The Created field indicates the date that this record was created.','Created','N',TO_TIMESTAMP('2013-08-19 14:20:29','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:29','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',245,'N')
;
-- Aug 19, 2013 2:20:29 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210791 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:29 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN Created TIMESTAMP NOT NULL
;
-- Aug 19, 2013 2:20:30 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210792,110,'Y','N','N',0,'N',22,'N',18,'N','N','Y','a2aa6895-00e8-4403-a4e3-392e92a41e6a','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',TO_TIMESTAMP('2013-08-19 14:20:29','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:29','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',246,'N')
;
-- Aug 19, 2013 2:20:30 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210792 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:30 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN CreatedBy NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:20:31 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210793,'N','N','N',0,'N',255,'Y',10,'N','N','Y','b8a1d6f4-b738-4577-be7b-78030d4cfdad','Y','Description','Optional short description of the record','A description is limited to 255 characters.','Description','Y',TO_TIMESTAMP('2013-08-19 14:20:30','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:30','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',275,'N')
;
-- Aug 19, 2013 2:20:31 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210793 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:31 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN Description VARCHAR(255) DEFAULT NULL
;
-- Aug 19, 2013 2:20:32 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',0,200103,210794,339,'Y','N','N','N',1,'N',17,'N','N','Y','42c95ca0-d55e-4f26-9125-0b6f0edab662','Y','LandedCostDistribution','Landed Cost Distribution','Q','How landed costs are distributed to material receipts','Cost Distribution','Y',TO_TIMESTAMP('2013-08-19 14:20:31','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:31','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',2703,'N')
;
-- Aug 19, 2013 2:20:32 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210794 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:32 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN LandedCostDistribution CHAR(1) DEFAULT 'Q' NOT NULL
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',0,200103,210795,'Y','N','N','N',10,'N',19,222,'N','N','Y','e68cfb06-ce8a-4434-81fb-1c10997298a5','Y','M_CostElement_ID','Product Cost Element','Cost Element','Y',TO_TIMESTAMP('2013-08-19 14:20:32','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:32','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',2700,'N')
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210795 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN M_CostElement_ID NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210796,'Y','N','N',0,'N',7,'N',16,'N','N','Y','de3237e4-d938-4a21-9ed5-016163598ee2','N','Updated','Date this record was updated','The Updated field indicates the date that this record was updated.','Updated','N',TO_TIMESTAMP('2013-08-19 14:20:33','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:33','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',607,'N')
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210796 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:33 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN Updated TIMESTAMP NOT NULL
;
-- Aug 19, 2013 2:20:34 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200103,210797,110,'Y','N','N',0,'N',22,'N',18,'N','N','Y','b02e0d84-eb4d-4109-be67-b1cfa9b057de','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',TO_TIMESTAMP('2013-08-19 14:20:33','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:33','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',608,'N')
;
-- Aug 19, 2013 2:20:34 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210797 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:34 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN UpdatedBy NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',0,200103,210798,'Y','N','N',0,'Y',22,'N',30,'N','N','Y','6b95895b-ceed-4d8c-909e-b2366e2b3ded','N','C_Order_ID','Order','The Order is a control document. The Order is complete when the quantity ordered is the same as the quantity shipped and invoiced. When you close an order, unshipped (backordered) quantities are cancelled.','Order','Y',TO_TIMESTAMP('2013-08-19 14:20:34','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:34','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',558,'N')
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210798 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN C_Order_ID NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',0,200103,210799,'Y','N','N',0,'N',22,'N',12,'N','N','Y','21f22033-fa5a-48d4-b283-f4dd591cb904','Y','Amt','Amount','0','Amount','Amount','N',TO_TIMESTAMP('2013-08-19 14:20:35','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:35','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',160,'N')
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210799 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:35 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN Amt NUMERIC DEFAULT '0' NOT NULL
;
-- Aug 19, 2013 2:20:36 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',1,200103,210800,'Y','N','N',0,'N',1,'N',20,'N','N','Y','6200b3be-e355-4e75-9a1b-3301a27262ed','Y','IsActive','The record is active in the system','Y','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Active','N',TO_TIMESTAMP('2013-08-19 14:20:36','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:36','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',348,'N')
;
-- Aug 19, 2013 2:20:36 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210800 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:36 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL
;
-- Aug 19, 2013 2:20:37 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',1,200103,210801,'Y','N','N',0,'N',1,'N',20,'N','N','Y','9103b1f1-9614-4c0b-bb19-e57446201fc0','Y','Processed','The document has been processed','N','The Processed checkbox indicates that a document has been processed.','Processed','Y',TO_TIMESTAMP('2013-08-19 14:20:37','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:37','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',1047,'N')
;
-- Aug 19, 2013 2:20:37 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210801 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:37 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCost ADD COLUMN Processed CHAR(1) DEFAULT 'N' CHECK (Processed IN ('Y','N')) NOT NULL
;
-- Aug 19, 2013 2:20:38 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,AD_Table_ID,HasTree,IsInfoTab,IsReadOnly,IsInsertRecord,IsAdvancedTab,TabLevel,AD_Tab_UU,EntityType,Name,AD_Tab_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Client_ID) VALUES ('N','N','Y',181,70,'N','N',200103,'N','N','N','Y','N',1,'92141899-a52e-4902-bf11-fae2907fd747','D','Estimated Landed Cost',200109,0,TO_TIMESTAMP('2013-08-19 14:20:38','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:38','YYYY-MM-DD HH24:MI:SS'),100,'Y',0)
;
-- Aug 19, 2013 2:20:38 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, Help,CommitWarning,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Tab_Trl_UU ) SELECT l.AD_Language,t.AD_Tab_ID, t.Help,t.CommitWarning,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200109 AND NOT EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID)
;
-- Aug 19, 2013 2:20:39 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,36,'N','N',210790,0,'Y',202429,'N','D','C_OrderLandedCost_UU','23995911-ee7e-49ad-929f-5e73a5ae691f','N','N',100,0,TO_TIMESTAMP('2013-08-19 14:20:38','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:38','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:39 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202429 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:40 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,22,'N','N',210787,0,'Y',202430,'N','D','Estimated Landed Cost','923e4e19-4b63-41cb-a257-1c96c684a6c6','N','N',100,0,TO_TIMESTAMP('2013-08-19 14:20:39','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:39','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:40 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202430 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:40 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,22,'N','N',210788,10,'Y',202431,'N','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','D','Client/Tenant for this installation.','Client','1ae8b7aa-07c6-46b7-906d-4dbbc5ee2671','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:20:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:40','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:40 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202431 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:41 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,IsAllowCopy,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,22,'N','N',210789,20,'Y',202432,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','D','Organizational entity within client','Organization','7b8c644e-7b17-4923-9958-519e1257ff7b','Y','N','Y',100,0,TO_TIMESTAMP('2013-08-19 14:20:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:40','YYYY-MM-DD HH24:MI:SS'),'Y','Y',4,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:41 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202432 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:42 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,22,'N','N',210798,30,'Y',202433,'N','The Order is a control document. The Order is complete when the quantity ordered is the same as the quantity shipped and invoiced. When you close an order, unshipped (backordered) quantities are cancelled.','D','Order','Order','d95e1a8d-1a99-42d1-b5fb-8f0df85c2f46','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:20:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:41','YYYY-MM-DD HH24:MI:SS'),'Y','Y',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:42 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202433 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:42 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,10,'N','N',210795,40,'Y',202434,'N','D','Product Cost Element','Cost Element','34d9ce77-6e18-4183-9531-470af17e5263','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:20:42','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:42','YYYY-MM-DD HH24:MI:SS'),'Y','Y',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:42 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202434 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:43 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,255,'N','N',210793,50,'Y',202435,'N','A description is limited to 255 characters.','D','Optional short description of the record','Description','3a05203b-c7b0-43f0-9a74-602598d54985','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:20:42','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:42','YYYY-MM-DD HH24:MI:SS'),'Y','Y',1,'N',0,5,1,'N')
;
-- Aug 19, 2013 2:20:43 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202435 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:44 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,1,'N','N',210794,60,'Y',202436,'N','How landed costs are distributed to material receipts','D','Landed Cost Distribution','Cost Distribution','00631adb-d3f6-49dc-ab42-6becd6eeec33','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:20:43','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:43','YYYY-MM-DD HH24:MI:SS'),'Y','Y',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:44 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202436 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:44 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200109,22,'N','N',210799,70,'Y',202437,'N','Amount','D','Amount','Amount','17d760d6-f4d6-4702-834e-cb76c7442ac2','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:20:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:44','YYYY-MM-DD HH24:MI:SS'),'Y','Y',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:20:44 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202437 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:20:45 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Table (ImportTable,CopyColumnsFromTable,IsSecurityEnabled,AccessLevel,LoadSeq,AD_Table_ID,IsHighVolume,IsView,IsChangeLog,EntityType,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,Name,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Created,AD_Client_ID) VALUES ('N','N','N','1',0,200104,'N','N','Y','D','L','2daed095-c101-4922-b05a-1587562a85bb','Y','Y','C_OrderLandedCostAllocation','Estimate landed cost allocation for order line','Estimated Landed Cost Allocation','Y',0,100,TO_TIMESTAMP('2013-08-19 14:20:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:44','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Aug 19, 2013 2:20:45 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Table_Trl_UU ) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200104 AND NOT EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID)
;
-- Aug 19, 2013 2:20:46 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Sequence_UU,IncrementNo,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,StartNo,AD_Client_ID) VALUES ('N',200000,'Y',1000000,'N','Y',200141,'Table C_OrderLandedCostAllocation','C_OrderLandedCostAllocation','61ef937d-bf27-46e5-8a1f-ca8748f56732',1,0,TO_TIMESTAMP('2013-08-19 14:20:45','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:20:45','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000000,0)
;
-- Aug 19, 2013 2:20:46 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('C_OrderLandedCostAllocation_ID',202597,'Estimated Landed Cost Allocation','Estimated Landed Cost Allocation','742abb97-fd35-4d73-a6f6-400de13e1972',TO_TIMESTAMP('2013-08-19 14:20:46','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-08-19 14:20:46','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
;
-- Aug 19, 2013 2:20:46 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202597 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Aug 19, 2013 2:20:47 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',0,200104,210802,'Y','N','N','N',10,'N',13,'Y','N','Y','300b4467-3258-4aa7-a23a-f8945df71ddc','N','C_OrderLandedCostAllocation_ID','Estimated Landed Cost Allocation','N',TO_TIMESTAMP('2013-08-19 14:20:46','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:46','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202597,'N')
;
-- Aug 19, 2013 2:20:47 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210802 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:47 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
CREATE TABLE C_OrderLandedCostAllocation (C_OrderLandedCostAllocation_ID NUMERIC(10) NOT NULL, CONSTRAINT C_OrderLandedCostAllocatio_Key PRIMARY KEY (C_OrderLandedCostAllocation_ID))
;
-- Aug 19, 2013 2:20:48 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210803,'Y','N','N',0,'N',22,'N',19,129,'N','N','Y','515d51df-fb8f-48cf-9cc1-09888ce70895','N','AD_Client_ID','Client/Tenant for this installation.','@AD_Client_ID@','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client','N',TO_TIMESTAMP('2013-08-19 14:20:47','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:47','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',102,'N')
;
-- Aug 19, 2013 2:20:48 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210803 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:48 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN AD_Client_ID NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210804,'Y','N','N',0,'N',22,'N',19,104,'N','N','Y','d306fcb8-a551-4cba-a089-4276979e1ba4','N','AD_Org_ID','Organizational entity within client','@AD_Org_ID@','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization','N',TO_TIMESTAMP('2013-08-19 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',113,'N')
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210804 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN AD_Org_ID NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210805,'Y','N','N',0,'N',22,'N',12,'N','N','Y','0ab4a43c-f93b-4465-a334-3dedddc33e73','Y','Amt','Amount','Amount','Amount','Y',TO_TIMESTAMP('2013-08-19 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',160,'N')
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210805 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:49 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN Amt NUMERIC NOT NULL
;
-- Aug 19, 2013 2:20:50 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',0,200104,210806,'Y','N','N','N',22,'N',22,'N','N','Y','daed0386-9b97-4ef0-bb69-642674c687c2','Y','Base','Calculation Base','Base','Y',TO_TIMESTAMP('2013-08-19 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',2818,'N')
;
-- Aug 19, 2013 2:20:50 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210806 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:50 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN Base NUMERIC NOT NULL
;
-- Aug 19, 2013 2:20:51 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('C_OrderLandedCostAllocation_UU',202598,'C_OrderLandedCostAllocation_UU','C_OrderLandedCostAllocation_UU','5a57282b-b393-4888-bef7-828b4e733160',TO_TIMESTAMP('2013-08-19 14:20:50','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-08-19 14:20:50','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
;
-- Aug 19, 2013 2:20:51 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202598 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Aug 19, 2013 2:20:51 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1.00,200104,210807,'N','N','N','N',36,'N',10,'N','N','Y','695fd3aa-79e4-448b-b805-f324c81d4fd9','Y','C_OrderLandedCostAllocation_UU','C_OrderLandedCostAllocation_UU','N',TO_TIMESTAMP('2013-08-19 14:20:51','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:51','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202598,'N')
;
-- Aug 19, 2013 2:20:51 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210807 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:52 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN C_OrderLandedCostAllocation_UU VARCHAR(36) DEFAULT NULL
;
-- Aug 19, 2013 2:20:52 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD CONSTRAINT C_OrderLandedCostAllocation_uu_idx UNIQUE (C_OrderLandedCostAllocation_UU)
;
-- Aug 19, 2013 2:20:52 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210808,'Y','N','N',0,'N',7,'N',16,'N','N','Y','e59adeb1-4235-41d5-a0e6-720d44ba00a1','N','Created','Date this record was created','The Created field indicates the date that this record was created.','Created','N',TO_TIMESTAMP('2013-08-19 14:20:52','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:52','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',245,'N')
;
-- Aug 19, 2013 2:20:52 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210808 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:52 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN Created TIMESTAMP NOT NULL
;
-- Aug 19, 2013 2:20:53 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210809,110,'Y','N','N',0,'N',22,'N',18,'N','N','Y','50d2d00f-76e9-412f-ae58-da8204f7f12a','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',TO_TIMESTAMP('2013-08-19 14:20:52','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:52','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',246,'N')
;
-- Aug 19, 2013 2:20:53 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210809 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:20:53 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN CreatedBy NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210810,'Y','N','N',0,'N',22,'N',29,'N','N','Y','7d69150f-57f8-4ee7-8f08-65ca9af2a62c','Y','Qty','Quantity','The Quantity indicates the number of a specific product or item for this document.','Quantity','Y',TO_TIMESTAMP('2013-08-19 14:20:53','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:20:53','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',526,'N')
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210810 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN Qty NUMERIC NOT NULL
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210811,'Y','N','N',0,'N',7,'N',16,'N','N','Y','b2ebea38-4227-416f-9ddb-7107811be05e','N','Updated','Date this record was updated','The Updated field indicates the date that this record was updated.','Updated','N',TO_TIMESTAMP('2013-08-19 14:21:08','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:21:08','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',607,'N')
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210811 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN Updated TIMESTAMP NOT NULL
;
-- Aug 19, 2013 2:21:09 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES ('Y',1,200104,210812,110,'Y','N','N',0,'N',22,'N',18,'N','N','Y','3d8627b7-e083-4d5d-a7a4-6557dca512b4','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',TO_TIMESTAMP('2013-08-19 14:21:08','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:21:08','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',608,'N')
;
-- Aug 19, 2013 2:21:09 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210812 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:09 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN UpdatedBy NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:21:10 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',0,200104,210813,'Y','N','N',0,'Y',22,'N',30,'N','N','Y','b9a55455-cb48-42ff-b52b-5037a7deca75','N','C_OrderLandedCost_ID','Estimated Landed Cost','Y',TO_TIMESTAMP('2013-08-19 14:21:09','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:21:09','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202595,'N')
;
-- Aug 19, 2013 2:21:10 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210813 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:10 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN C_OrderLandedCost_ID NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',0,200104,210815,'Y','N','N',0,'N',10,'N',19,203,'N','N','Y','30a85b9a-2dba-4a25-9b46-8ac2b0671369','N','C_OrderLine_ID','Sales Order Line','The Sales Order Line is a unique identifier for a line in an order.','Sales Order Line','N',TO_TIMESTAMP('2013-08-19 14:21:10','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:21:10','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',561,'N')
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210815 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN C_OrderLine_ID NUMERIC(10) NOT NULL
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',1,200104,210816,'Y','N','N',0,'N',1,'N',20,'N','N','Y','f5aa9b00-359a-4a53-a5ab-521d57b77ff5','Y','IsActive','The record is active in the system','Y','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Active','N',TO_TIMESTAMP('2013-08-19 14:21:11','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:21:11','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',348,'N')
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210816 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:11 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL
;
-- Aug 19, 2013 2:21:12 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',1,200104,210817,'Y','N','N',0,'N',1,'N',20,'N','N','Y','7c8519a2-9f39-48bc-b3f4-97fd526a3783','Y','Processed','The document has been processed','N','The Processed checkbox indicates that a document has been processed.','Processed','Y',TO_TIMESTAMP('2013-08-19 14:21:11','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:21:11','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',1047,'N')
;
-- Aug 19, 2013 2:21:12 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210817 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:12 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_OrderLandedCostAllocation ADD COLUMN Processed CHAR(1) DEFAULT 'N' CHECK (Processed IN ('Y','N')) NOT NULL
;
-- Aug 19, 2013 2:21:13 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,AD_Table_ID,HasTree,IsInfoTab,IsReadOnly,IsInsertRecord,IsAdvancedTab,TabLevel,AD_Tab_UU,EntityType,Name,AD_Tab_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Client_ID) VALUES ('N','N','Y',181,80,'N','N',200104,'N','N','N','Y','N',2,'d91b0ef9-ff2a-4836-b9d8-7ea8ccb7c40c','D','Estimated Landed Cost Allocation',200110,0,TO_TIMESTAMP('2013-08-19 14:21:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:21:13','YYYY-MM-DD HH24:MI:SS'),100,'Y',0)
;
-- Aug 19, 2013 2:21:13 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, Help,CommitWarning,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Tab_Trl_UU ) SELECT l.AD_Language,t.AD_Tab_ID, t.Help,t.CommitWarning,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200110 AND NOT EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID)
;
-- Aug 19, 2013 2:21:14 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,36,'N','N',210807,0,'Y',202438,'N','D','C_OrderLandedCostAllocation_UU','e5af5151-1438-40b6-8d25-3ee3750149d6','N','N',100,0,TO_TIMESTAMP('2013-08-19 14:21:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:21:13','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:14 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202438 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:15 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,10,'N','N',210802,0,'Y',202439,'N','D','Estimated Landed Cost Allocation','bb7c5e71-68e0-444b-a03f-80d87dd35277','N','N',100,0,TO_TIMESTAMP('2013-08-19 14:21:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:21:14','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:15 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202439 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:15 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210803,10,'Y',202440,'N','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','D','Client/Tenant for this installation.','Client','821a8736-1e23-4570-9089-629391e3418d','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:21:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:21:15','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:15 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202440 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:16 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,IsAllowCopy,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210804,20,'Y',202441,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','D','Organizational entity within client','Organization','86fb439b-38c1-45cb-9052-ab93607f36b9','Y','N','Y',100,0,TO_TIMESTAMP('2013-08-19 14:21:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:21:15','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,4,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:16 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202441 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:17 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210813,30,'Y',202442,'N','D','Estimated Landed Cost','5984bc56-9945-4223-bcac-dc215d48e472','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:21:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:21:16','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:17 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202442 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:17 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,10,'N','N',210815,40,'N',202443,'N','The Purchase Order Line is a unique identifier for a line in an order.','D','Purchase Order Line','Purchase Order Line','d0f72770-0e17-40bd-be7c-a33e523fcbe0','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:21:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:21:17','YYYY-MM-DD HH24:MI:SS'),'Y','Y',10,1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:17 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202443 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:18 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210806,50,'Y',202444,'Y','D','Calculation Base','Base','61094f01-e51a-4a14-bb1d-c9e6de6e1e55','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:21:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:21:17','YYYY-MM-DD HH24:MI:SS'),'Y','Y',20,1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:18 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202444 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:19 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210810,60,'Y',202445,'Y','The Quantity indicates the number of a specific product or item for this document.','D','Quantity','Quantity','742c6628-ee79-475c-91e5-21cdbe4b12b2','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:21:18','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:21:18','YYYY-MM-DD HH24:MI:SS'),'Y','Y',30,1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:19 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202445 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:19 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES ('N',200110,22,'N','N',210805,70,'Y',202446,'Y','Amount','D','Amount','Amount','b67089e2-a8e5-473f-86d8-f2c50ed17ad9','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:21:19','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:21:19','YYYY-MM-DD HH24:MI:SS'),'Y','Y',40,1,'N',0,2,1,'N')
;
-- Aug 19, 2013 2:21:19 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202446 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:21:20 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'Y',0,760,210818,'N','N','N',0,'N',22,'N',30,'N','N','Y','ca6ad084-ba7f-4204-8ffc-2fbda8bcc41c','N','M_InOutLine_ID','Line on Shipment or Receipt document','The Shipment/Receipt Line indicates a unique line in a Shipment/Receipt document','Shipment/Receipt Line','N',TO_TIMESTAMP('2013-08-19 14:21:19','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-08-19 14:21:19','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',1026,'N')
;
-- Aug 19, 2013 2:21:20 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210818 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Aug 19, 2013 2:21:20 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
ALTER TABLE C_LandedCostAllocation ADD COLUMN M_InOutLine_ID NUMERIC(10) DEFAULT NULL
;
-- Aug 19, 2013 2:31:25 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_FieldGroup_ID,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES (0,'N',324,0,'N','N',210732,310,'Y',202467,'N','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.',200011,'D','Product Landed Cost Clearing Account','Landed Cost Clearing','d2f20ec0-e107-44d9-a88d-4099484eb213','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:31:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:31:10','YYYY-MM-DD HH24:MI:SS'),'Y','Y',320,1,'N',0,1,1,'N')
;
-- Aug 19, 2013 2:31:25 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202467 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:32:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=200, IsDisplayed='Y', XPosition=1, ColumnSpan=2,Updated=TO_TIMESTAMP('2013-08-19 14:32:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202467
;
-- Aug 19, 2013 2:32:08 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=210,Updated=TO_TIMESTAMP('2013-08-19 14:32:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3945
;
-- Aug 19, 2013 2:33:41 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES (0,'N',210,0,'N','N',210731,290,'Y',202469,'N','Account used for posting of estimated and actual landed cost amount. The balance on the clearing account should be zero and accounts for the timing difference between material receipt and landed cost invoice.','D','Product Landed Cost Clearing Account','Landed Cost Clearing','1d627daa-21d8-4bbe-9250-d069e2ea8971','Y','N',100,0,TO_TIMESTAMP('2013-08-19 14:33:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:33:20','YYYY-MM-DD HH24:MI:SS'),'Y','Y',290,1,'N',0,1,1,'N')
;
-- Aug 19, 2013 2:33:41 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202469 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Aug 19, 2013 2:34:00 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE AD_Field SET SeqNo=180, ColumnSpan=2,Updated=TO_TIMESTAMP('2013-08-19 14:34:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202469
;
-- Aug 19, 2013 2:58:23 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO C_ElementValue (IsSummary,PostEncumbrance,AccountSign,IsDocControlled,C_ElementValue_ID,PostStatistical,C_Element_ID,AccountType,PostActual,IsForeignCurrency,C_Currency_ID,IsBankAccount,PostBudget,C_BankAccount_ID,Name,Description,C_ElementValue_UU,Value,Updated,UpdatedBy,CreatedBy,AD_Client_ID,Created,IsActive,AD_Org_ID) VALUES ('N','Y','N','Y',200000,'Y',105,'E','Y','N',100,'N','Y',100,'Landed Cost Clearing','Account for Landed Cost Clearing','15b486d5-8ce6-42a1-9dbf-e111e77a1581','58900',TO_TIMESTAMP('2013-08-19 14:58:18','YYYY-MM-DD HH24:MI:SS'),100,100,11,TO_TIMESTAMP('2013-08-19 14:58:18','YYYY-MM-DD HH24:MI:SS'),'Y',0)
;
-- Aug 19, 2013 2:58:23 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO C_ElementValue_Trl (AD_Language,C_ElementValue_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_ElementValue_Trl_UU ) SELECT l.AD_Language,t.C_ElementValue_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, C_ElementValue t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_ElementValue_ID=200000 AND NOT EXISTS (SELECT * FROM C_ElementValue_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_ElementValue_ID=t.C_ElementValue_ID)
;
-- Aug 19, 2013 2:58:23 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO AD_TreeNode (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNode_UU) SELECT t.AD_Client_ID, 0, 'Y', statement_timestamp(), 100, statement_timestamp(), 100,t.AD_Tree_ID, 200000, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=11 AND t.IsActive='Y' AND EXISTS (SELECT * FROM C_Element ae WHERE ae.C_Element_ID=105 AND t.AD_Tree_ID=ae.AD_Tree_ID) AND NOT EXISTS (SELECT * FROM AD_TreeNode e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200000)
;
-- Aug 19, 2013 2:59:14 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
INSERT INTO C_ValidCombination (C_ValidCombination_ID,IsFullyQualified,Combination,C_AcctSchema_ID,Account_ID,Description,C_ValidCombination_UU,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Org_ID,AD_Client_ID) VALUES (200000,'Y','HQ-58900-_-_-_-_',101,200000,'HQ-Landed Cost Clearing-_-_-_-_','7a7e6f38-b914-471f-a23b-9ad79b853073','Y',TO_TIMESTAMP('2013-08-19 14:59:08','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-08-19 14:59:08','YYYY-MM-DD HH24:MI:SS'),100,11,11)
;
-- Aug 19, 2013 2:59:25 PM MYT
-- IDEMPIERE-1285 Estimated Landed Cost for PO
UPDATE C_AcctSchema_Default SET P_LandedCostClearing_Acct=200000,Updated=TO_TIMESTAMP('2013-08-19 14:59:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101
;
Update M_Product_Category_Acct Set P_LandedCostClearing_Acct=200000 WHERE P_LandedCostClearing_Acct IS NULL AND C_AcctSchema_ID=101 AND AD_Client_ID=11;
Update M_Product_Acct Set P_LandedCostClearing_Acct=200000 WHERE P_LandedCostClearing_Acct IS NULL AND C_AcctSchema_ID=101 AND AD_Client_ID=11;
SELECT register_migration_script('201308190830_IDEMPIERE-1285.sql') FROM dual
;

View File

@ -98,6 +98,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
.append(", P_TradeDiscountRec_Acct=").append(acct.getP_TradeDiscountRec_Acct())
.append(", P_TradeDiscountGrant_Acct=").append(acct.getP_TradeDiscountGrant_Acct())
.append(", P_RateVariance_Acct=").append(acct.getP_RateVariance_Acct())
.append(", P_LandedCostClearing_Acct=").append(acct.getP_LandedCostClearing_Acct())
.append(", Updated=SysDate, UpdatedBy=0 ")
.append("WHERE pa.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
.append(" AND EXISTS (SELECT * FROM M_Product_Category p ")
@ -113,13 +114,13 @@ public class AcctSchemaDefaultCopy extends SvrProcess
.append(" P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct,")
.append(" P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct, P_AverageCostVariance_Acct,")
.append(" P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct," )
.append(" P_RateVariance_Acct) ")
.append(" P_RateVariance_Acct, P_LandedCostClearing_Acct) ")
.append(" SELECT p.M_Product_Category_ID, acct.C_AcctSchema_ID,")
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
.append(" acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct,")
.append(" acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct,")
.append(" acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct,")
.append(" acct.P_RateVariance_Acct ")
.append(" acct.P_RateVariance_Acct, acct.P_LandedCostClearing_Acct ")
.append("FROM M_Product_Category p")
.append(" INNER JOIN C_AcctSchema_Default acct ON (p.AD_Client_ID=acct.AD_Client_ID) ")
.append("WHERE acct.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
@ -137,13 +138,13 @@ public class AcctSchemaDefaultCopy extends SvrProcess
.append(" P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct,")
.append(" P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct, P_AverageCostVariance_Acct,")
.append(" P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, ")
.append(" P_RateVariance_Acct) ")
.append(" P_RateVariance_Acct, P_LandedCostClearing_Acct) ")
.append("SELECT p.M_Product_ID, acct.C_AcctSchema_ID,")
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
.append(" acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct,")
.append(" acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct,")
.append(" acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct,")
.append(" acct.P_RateVariance_Acct ")
.append(" acct.P_RateVariance_Acct, acct.P_LandedCostClearing_Acct ")
.append("FROM M_Product p")
.append(" INNER JOIN M_Product_Category_Acct acct ON (acct.M_Product_Category_ID=p.M_Product_Category_ID)")
.append("WHERE acct.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)

View File

@ -76,11 +76,11 @@ public class ProductCategoryAcctCopy extends SvrProcess
.append("SET (P_Revenue_Acct,P_Expense_Acct,P_CostAdjustment_Acct,P_InventoryClearing_Acct,P_Asset_Acct,P_COGS_Acct,")
.append(" P_PurchasePriceVariance_Acct,P_InvoicePriceVariance_Acct,P_AverageCostVariance_Acct,")
.append(" P_TradeDiscountRec_Acct,P_TradeDiscountGrant_Acct,")
.append(" P_RateVariance_Acct)=")
.append(" P_RateVariance_Acct,P_LandedCostClearing_Acct)=")
.append(" (SELECT P_Revenue_Acct,P_Expense_Acct,P_CostAdjustment_Acct,P_InventoryClearing_Acct,P_Asset_Acct,P_COGS_Acct,")
.append(" P_PurchasePriceVariance_Acct,P_InvoicePriceVariance_Acct,P_AverageCostVariance_Acct,")
.append(" P_TradeDiscountRec_Acct,P_TradeDiscountGrant_Acct,")
.append(" P_RateVariance_Acct")
.append(" P_RateVariance_Acct,P_LandedCostClearing_Acct")
.append(" FROM M_Product_Category_Acct pca")
.append(" WHERE pca.M_Product_Category_ID=").append(p_M_Product_Category_ID)
.append(" AND pca.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
@ -99,13 +99,13 @@ public class ProductCategoryAcctCopy extends SvrProcess
.append(" P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct,")
.append(" P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct, P_AverageCostVariance_Acct,")
.append(" P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, ")
.append(" P_RateVariance_Acct) ")
.append(" P_RateVariance_Acct, P_LandedCostClearing_Acct) ")
.append("SELECT p.M_Product_ID, acct.C_AcctSchema_ID,")
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
.append(" acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct,")
.append(" acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct,")
.append(" acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct, ")
.append(" acct.P_RateVariance_Acct ")
.append(" acct.P_RateVariance_Acct, acct.P_LandedCostClearing_Acct ")
.append("FROM M_Product p")
.append(" INNER JOIN M_Product_Category_Acct acct ON (acct.M_Product_Category_ID=p.M_Product_Category_ID)")
.append("WHERE acct.C_AcctSchema_ID=").append(p_C_AcctSchema_ID) // #

View File

@ -17,12 +17,14 @@
package org.compiere.acct;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.logging.Level;
import org.compiere.model.I_M_InOutLine;
import org.compiere.model.I_M_RMALine;
import org.compiere.model.MOrderLandedCostAllocation;
import org.compiere.model.MTax;
import org.compiere.model.MCurrency;
import org.compiere.model.MAccount;
@ -395,15 +397,27 @@ public class Doc_InOut extends Doc
BigDecimal costs = null;
MProduct product = line.getProduct();
MOrderLine orderLine = null;
BigDecimal landedCost = BigDecimal.ZERO;
String costingMethod = product.getCostingMethod(as);
if (!isReversal(line))
{
int C_OrderLine_ID = line.getC_OrderLine_ID();
if (C_OrderLine_ID > 0)
{
MOrderLandedCostAllocation[] allocations = MOrderLandedCostAllocation.getOfOrderLine(C_OrderLine_ID, getTrxName());
for(MOrderLandedCostAllocation allocation : allocations)
{
BigDecimal totalAmt = allocation.getAmt();
BigDecimal totalQty = allocation.getQty();
BigDecimal amt = totalAmt.multiply(line.getQty()).divide(totalQty, RoundingMode.HALF_UP);
landedCost = landedCost.add(amt);
}
}
//get costing method for product
String costingMethod = product.getCostingMethod(as);
if (MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod) ||
MAcctSchema.COSTINGMETHOD_AverageInvoice.equals(costingMethod) ||
MAcctSchema.COSTINGMETHOD_LastPOPrice.equals(costingMethod) )
{
int C_OrderLine_ID = line.getC_OrderLine_ID();
// Low - check if c_orderline_id is valid
if (C_OrderLine_ID > 0)
{
@ -476,12 +490,14 @@ public class Doc_InOut extends Doc
}
// Elaine 2008/06/26
/*dr = fact.createLine(line, assets,
as.getC_Currency_ID(), costs, null);*/
BigDecimal drAsset = costs;
if (landedCost.signum() != 0 && (MAcctSchema.COSTINGMETHOD_AverageInvoice.equals(costingMethod)
|| MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod)))
{
drAsset = drAsset.add(landedCost);
}
dr = fact.createLine(line, assets,
C_Currency_ID, costs, null);
C_Currency_ID, drAsset, null);
//
if (dr == null)
{
@ -504,10 +520,6 @@ public class Doc_InOut extends Doc
}
// NotInvoicedReceipt CR
// Elaine 2008/06/26
/*cr = fact.createLine(line,
getAccount(Doc.ACCTTYPE_NotInvoicedReceipts, as),
as.getC_Currency_ID(), null, costs);*/
cr = fact.createLine(line,
getAccount(Doc.ACCTTYPE_NotInvoicedReceipts, as),
C_Currency_ID, null, costs);
@ -532,6 +544,38 @@ public class Doc_InOut extends Doc
return null;
}
}
if (!fact.isAcctBalanced())
{
if (isReversal(line))
{
dr = fact.createLine(line,
line.getAccount(ProductCost.ACCTTYPE_P_LandedCostClearing, as),
C_Currency_ID, Env.ONE, (BigDecimal)null);
if (!dr.updateReverseLine (MInOut.Table_ID,
m_Reversal_ID, line.getReversalLine_ID(),Env.ONE))
{
p_Error = "Original Receipt not posted yet";
return null;
}
}
else if (landedCost.signum() != 0)
{
cr = fact.createLine(line,
line.getAccount(ProductCost.ACCTTYPE_P_LandedCostClearing, as),
C_Currency_ID, null, landedCost);
//
if (cr == null)
{
p_Error = "CR not created: " + line;
log.log(Level.WARNING, p_Error);
return null;
}
cr.setM_Locator_ID(line.getM_Locator_ID());
cr.setLocationFromBPartner(getC_BPartner_Location_ID(), true); // from Loc
cr.setLocationFromLocator(line.getM_Locator_ID(), false); // to Loc
cr.setQty(line.getQty().negate());
}
}
}
} // Receipt
// *** Purchasing - return

View File

@ -25,6 +25,7 @@ import java.util.ArrayList;
import java.util.logging.Level;
import org.adempiere.exceptions.AverageCostingZeroQtyException;
import org.compiere.model.I_M_InOutLine;
import org.compiere.model.MAccount;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MClientInfo;
@ -34,6 +35,7 @@ import org.compiere.model.MCurrency;
import org.compiere.model.MInvoice;
import org.compiere.model.MInvoiceLine;
import org.compiere.model.MLandedCostAllocation;
import org.compiere.model.MOrderLandedCostAllocation;
import org.compiere.model.MTax;
import org.compiere.model.ProductCost;
import org.compiere.model.X_M_Cost;
@ -840,8 +842,17 @@ public class Doc_Invoice extends Doc
if (line.getDescription() != null)
desc += " - " + line.getDescription();
// Cost Detail - Convert to AcctCurrency
// Accounting
BigDecimal drAmt = null;
BigDecimal crAmt = null;
MAccount account = null;
ProductCost pc = new ProductCost (Env.getCtx(),
lca.getM_Product_ID(), lca.getM_AttributeSetInstance_ID(), getTrxName());
String costingMethod = pc.getProduct().getCostingMethod(as);
if (X_M_Cost.COSTINGMETHOD_AverageInvoice.equals(costingMethod) || X_M_Cost.COSTINGMETHOD_AveragePO.equals(costingMethod))
{
// Convert to AcctCurrency
BigDecimal allocationAmt = lca.getAmt();
if (getC_Currency_ID() != as.getC_Currency_ID())
allocationAmt = MConversionRate.convert(getCtx(), allocationAmt,
@ -850,8 +861,60 @@ public class Doc_Invoice extends Doc
getAD_Client_ID(), getAD_Org_ID());
if (allocationAmt.scale() > as.getCostingPrecision())
allocationAmt = allocationAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
BigDecimal estimatedAmt = BigDecimal.ZERO;
if (lca.getM_InOutLine_ID() > 0)
{
I_M_InOutLine iol = lca.getM_InOutLine();
if (iol.getC_OrderLine_ID() > 0)
{
MOrderLandedCostAllocation[] allocations = MOrderLandedCostAllocation.getOfOrderLine(iol.getC_OrderLine_ID(), getTrxName());
for(MOrderLandedCostAllocation allocation : allocations)
{
if (allocation.getC_OrderLandedCost().getM_CostElement_ID() != lca.getM_CostElement_ID())
continue;
BigDecimal amt = allocation.getAmt();
BigDecimal qty = allocation.getQty();
if (qty.compareTo(iol.getMovementQty()) != 0)
{
amt = amt.multiply(iol.getMovementQty()).divide(qty, BigDecimal.ROUND_HALF_UP);
}
estimatedAmt = estimatedAmt.add(amt);
}
}
}
BigDecimal costAdjustmentAmt = allocationAmt;
if (estimatedAmt.signum() > 0)
{
//get other allocation amt
StringBuilder sql = new StringBuilder("SELECT Sum(Amt) FROM C_LandedCostAllocation WHERE M_InOutLine_ID=? ")
.append("AND C_LandedCostAllocation_ID<>? ")
.append("AND M_CostElement_ID=? ")
.append("AND AD_Client_ID=? ");
BigDecimal otherAmt = DB.getSQLValueBD(getTrxName(), sql.toString(), lca.getM_InOutLine_ID(), lca.getC_LandedCostAllocation_ID(),
lca.getM_CostElement_ID(), lca.getAD_Client_ID());
if (otherAmt != null)
{
estimatedAmt = estimatedAmt.subtract(otherAmt);
if (allocationAmt.signum() < 0)
{
//add back since the sum above would include the original trx
estimatedAmt = estimatedAmt.add(allocationAmt.negate());
}
}
if (estimatedAmt.signum() > 0)
{
if (allocationAmt.signum() > 0)
costAdjustmentAmt = allocationAmt.subtract(estimatedAmt);
else if (allocationAmt.signum() < 0)
costAdjustmentAmt = allocationAmt.add(estimatedAmt);
}
}
if (!dr)
allocationAmt = allocationAmt.negate();
costAdjustmentAmt = costAdjustmentAmt.negate();
Trx trx = Trx.get(getTrxName(), false);
Savepoint savepoint = null;
@ -862,7 +925,7 @@ public class Doc_Invoice extends Doc
if (!MCostDetail.createInvoice(as, lca.getAD_Org_ID(),
lca.getM_Product_ID(), lca.getM_AttributeSetInstance_ID(),
C_InvoiceLine_ID, lca.getM_CostElement_ID(),
allocationAmt, lca.getQty(),
costAdjustmentAmt, lca.getQty(),
desc, getTrxName())) {
throw new RuntimeException("Failed to create cost detail record.");
}
@ -884,26 +947,59 @@ public class Doc_Invoice extends Doc
}
}
// Accounting
ProductCost pc = new ProductCost (Env.getCtx(),
lca.getM_Product_ID(), lca.getM_AttributeSetInstance_ID(), getTrxName());
BigDecimal drAmt = null;
BigDecimal crAmt = null;
boolean reversal = false;
if (allocationAmt.signum() < 0) //reversal
{
allocationAmt = allocationAmt.negate();
reversal = true;
}
if (allocationAmt.signum() > 0)
{
int compare = allocationAmt.compareTo(estimatedAmt);
if (compare > 0)
{
drAmt = dr ? (reversal ? null : estimatedAmt): (reversal ? estimatedAmt : null);
crAmt = dr ? (reversal ? estimatedAmt : null): (reversal ? null : estimatedAmt);
account = pc.getAccount(ProductCost.ACCTTYPE_P_LandedCostClearing, as);
FactLine fl = fact.createLine (line, account, getC_Currency_ID(), drAmt, crAmt);
fl.setDescription(desc);
fl.setM_Product_ID(lca.getM_Product_ID());
fl.setQty(line.getQty());
BigDecimal overAmt = allocationAmt.subtract(estimatedAmt);
drAmt = dr ? (reversal ? null : overAmt) : (reversal ? overAmt : null);
crAmt = dr ? (reversal ? overAmt : null) : (reversal ? null : overAmt);
account = zeroQty ? pc.getAccount(ProductCost.ACCTTYPE_P_AverageCostVariance, as) : pc.getAccount(ProductCost.ACCTTYPE_P_Asset, as);
fl = fact.createLine (line, account, getC_Currency_ID(), drAmt, crAmt);
fl.setDescription(desc);
fl.setM_Product_ID(lca.getM_Product_ID());
fl.setQty(line.getQty());
}
else if (compare < 0)
{
drAmt = dr ? (reversal ? null : allocationAmt) : (reversal ? allocationAmt : null);
crAmt = dr ? (reversal ? allocationAmt : null) : (reversal ? null : allocationAmt);
account = pc.getAccount(ProductCost.ACCTTYPE_P_LandedCostClearing, as);
FactLine fl = fact.createLine (line, account, getC_Currency_ID(), drAmt, crAmt);
fl.setDescription(desc);
fl.setM_Product_ID(lca.getM_Product_ID());
fl.setQty(line.getQty());
}
}
}
else
{
if (dr)
drAmt = lca.getAmt();
else
crAmt = lca.getAmt();
String costingMethod = pc.getProduct().getCostingMethod(as);
MAccount account = null;
if (X_M_Cost.COSTINGMETHOD_AverageInvoice.equals(costingMethod) || X_M_Cost.COSTINGMETHOD_AveragePO.equals(costingMethod)) {
account = zeroQty ? pc.getAccount(ProductCost.ACCTTYPE_P_AverageCostVariance, as) : pc.getAccount(ProductCost.ACCTTYPE_P_Asset, as);
} else {
account = pc.getAccount(ProductCost.ACCTTYPE_P_CostAdjustment, as);
}
FactLine fl = fact.createLine (line, account, getC_Currency_ID(), drAmt, crAmt);
fl.setDescription(desc);
fl.setM_Product_ID(lca.getM_Product_ID());
fl.setQty(line.getQty());
}
}
if (log.isLoggable(Level.CONFIG)) log.config("Created #" + lcas.length);

View File

@ -20,10 +20,15 @@ import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Savepoint;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.logging.Level;
import org.adempiere.exceptions.AverageCostingZeroQtyException;
import org.compiere.model.I_C_Order;
import org.compiere.model.I_C_OrderLine;
import org.compiere.model.MAccount;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MAcctSchemaElement;
@ -34,6 +39,7 @@ import org.compiere.model.MInOutLine;
import org.compiere.model.MInvoice;
import org.compiere.model.MInvoiceLine;
import org.compiere.model.MMatchInv;
import org.compiere.model.MOrderLandedCostAllocation;
import org.compiere.model.ProductCost;
import org.compiere.model.X_M_Cost;
import org.compiere.util.Env;
@ -238,14 +244,7 @@ public class Doc_MatchInv extends Doc
as.getC_Currency_ID(), null, LineNetAmt);
cr.setQty(getQty().multiply(multiplier).negate());
}
cr.setC_Activity_ID(m_invoiceLine.getC_Activity_ID());
cr.setC_Campaign_ID(m_invoiceLine.getC_Campaign_ID());
cr.setC_Project_ID(m_invoiceLine.getC_Project_ID());
cr.setC_ProjectPhase_ID(m_invoiceLine.getC_ProjectPhase_ID());
cr.setC_ProjectTask_ID(m_invoiceLine.getC_ProjectTask_ID());
cr.setC_UOM_ID(m_invoiceLine.getC_UOM_ID());
cr.setUser1_ID(m_invoiceLine.getUser1_ID());
cr.setUser2_ID(m_invoiceLine.getUser2_ID());
updateFactLine(cr);
//AZ Goodwill
//Desc: Source Not Balanced problem because Currency is Difference - PO=CNY but AP=USD
@ -315,15 +314,7 @@ public class Doc_MatchInv extends Doc
FactLine pv = fact.createLine(null,
m_pc.getAccount(ProductCost.ACCTTYPE_P_IPV, as),
as.getC_Currency_ID(), ipv);
pv.setC_Activity_ID(m_invoiceLine.getC_Activity_ID());
pv.setC_Campaign_ID(m_invoiceLine.getC_Campaign_ID());
pv.setC_Project_ID(m_invoiceLine.getC_Project_ID());
pv.setC_ProjectPhase_ID(m_invoiceLine.getC_ProjectPhase_ID());
pv.setC_ProjectTask_ID(m_invoiceLine.getC_ProjectTask_ID());
pv.setC_UOM_ID(m_invoiceLine.getC_UOM_ID());
pv.setUser1_ID(m_invoiceLine.getUser1_ID());
pv.setUser2_ID(m_invoiceLine.getUser2_ID());
pv.setM_Product_ID(m_invoiceLine.getM_Product_ID());
updateFactLine(pv);
MMatchInv matchInv = (MMatchInv)getPO();
Trx trx = Trx.get(getTrxName(), false);
@ -363,26 +354,10 @@ public class Doc_MatchInv extends Doc
FactLine line = fact.createLine(null,
m_pc.getAccount(ProductCost.ACCTTYPE_P_IPV, as),
as.getC_Currency_ID(), ipv.negate());
line.setC_Activity_ID(m_invoiceLine.getC_Activity_ID());
line.setC_Campaign_ID(m_invoiceLine.getC_Campaign_ID());
line.setC_Project_ID(m_invoiceLine.getC_Project_ID());
line.setC_ProjectPhase_ID(m_invoiceLine.getC_ProjectPhase_ID());
line.setC_ProjectTask_ID(m_invoiceLine.getC_ProjectTask_ID());
line.setC_UOM_ID(m_invoiceLine.getC_UOM_ID());
line.setUser1_ID(m_invoiceLine.getUser1_ID());
line.setUser2_ID(m_invoiceLine.getUser2_ID());
line.setM_Product_ID(m_invoiceLine.getM_Product_ID());
updateFactLine(line);
line = fact.createLine(null, account, as.getC_Currency_ID(), ipv);
line.setC_Activity_ID(m_invoiceLine.getC_Activity_ID());
line.setC_Campaign_ID(m_invoiceLine.getC_Campaign_ID());
line.setC_Project_ID(m_invoiceLine.getC_Project_ID());
line.setC_ProjectPhase_ID(m_invoiceLine.getC_ProjectPhase_ID());
line.setC_ProjectTask_ID(m_invoiceLine.getC_ProjectTask_ID());
line.setC_UOM_ID(m_invoiceLine.getC_UOM_ID());
line.setUser1_ID(m_invoiceLine.getUser1_ID());
line.setUser2_ID(m_invoiceLine.getUser2_ID());
line.setM_Product_ID(m_invoiceLine.getM_Product_ID());
updateFactLine(line);
}
}
@ -464,10 +439,79 @@ public class Doc_MatchInv extends Doc
{
return "Failed to create cost detail record";
}
Map<Integer, BigDecimal> landedCostMap = new LinkedHashMap<Integer, BigDecimal>();
I_C_OrderLine orderLine = m_receiptLine.getC_OrderLine();
if (orderLine == null)
return "";
int C_OrderLine_ID = orderLine.getC_OrderLine_ID();
MOrderLandedCostAllocation[] allocations = MOrderLandedCostAllocation.getOfOrderLine(C_OrderLine_ID, getTrxName());
for(MOrderLandedCostAllocation allocation : allocations)
{
BigDecimal totalAmt = allocation.getAmt();
BigDecimal totalQty = allocation.getQty();
BigDecimal amt = totalAmt.multiply(tQty).divide(totalQty, BigDecimal.ROUND_HALF_UP);
if (orderLine.getC_Currency_ID() != as.getC_Currency_ID())
{
I_C_Order order = orderLine.getC_Order();
Timestamp dateAcct = order.getDateAcct();
BigDecimal rate = MConversionRate.getRate(
order.getC_Currency_ID(), as.getC_Currency_ID(),
dateAcct, order.getC_ConversionType_ID(),
order.getAD_Client_ID(), order.getAD_Org_ID());
if (rate == null)
{
p_Error = "Purchase Order not convertible - " + as.getName();
return null;
}
amt = amt.multiply(rate);
if (amt.scale() > as.getCostingPrecision())
amt = amt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
}
int elementId = allocation.getC_OrderLandedCost().getM_CostElement_ID();
BigDecimal elementAmt = landedCostMap.get(elementId);
if (elementAmt == null)
{
elementAmt = amt;
}
else
{
elementAmt = elementAmt.add(amt);
}
landedCostMap.put(elementId, elementAmt);
}
for(Integer elementId : landedCostMap.keySet())
{
BigDecimal amt = landedCostMap.get(elementId);
if (!MCostDetail.createShipment(as, getAD_Org_ID(),
getM_Product_ID(), matchInv.getM_AttributeSetInstance_ID(),
m_receiptLine.getM_InOutLine_ID(), elementId,
amt, tQty, getDescription(), false, getTrxName()))
{
return "Failed to create cost detail record";
}
}
// end MZ
}
return "";
}
/**
* @param factLine
*/
protected void updateFactLine(FactLine factLine) {
factLine.setC_Activity_ID(m_invoiceLine.getC_Activity_ID());
factLine.setC_Campaign_ID(m_invoiceLine.getC_Campaign_ID());
factLine.setC_Project_ID(m_invoiceLine.getC_Project_ID());
factLine.setC_ProjectPhase_ID(m_invoiceLine.getC_ProjectPhase_ID());
factLine.setC_ProjectTask_ID(m_invoiceLine.getC_ProjectTask_ID());
factLine.setC_UOM_ID(m_invoiceLine.getC_UOM_ID());
factLine.setUser1_ID(m_invoiceLine.getUser1_ID());
factLine.setUser2_ID(m_invoiceLine.getUser2_ID());
factLine.setM_Product_ID(m_invoiceLine.getM_Product_ID());
factLine.setQty(getQty());
}
} // Doc_MatchInv

View File

@ -17,9 +17,12 @@
package org.compiere.acct;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.logging.Level;
import org.compiere.model.MAccount;
@ -32,6 +35,7 @@ import org.compiere.model.MInOut;
import org.compiere.model.MInOutLine;
import org.compiere.model.MMatchPO;
import org.compiere.model.MOrder;
import org.compiere.model.MOrderLandedCostAllocation;
import org.compiere.model.MOrderLine;
import org.compiere.model.MProduct;
import org.compiere.model.MTax;
@ -147,7 +151,22 @@ public class Doc_MatchPO extends Doc
// Purchase Order Line
BigDecimal poCost = m_oLine.getPriceCost();
if (poCost == null || poCost.signum() == 0)
{
poCost = m_oLine.getPriceActual();
// Goodwill: Correct included Tax
int C_Tax_ID = m_oLine.getC_Tax_ID();
if (m_oLine.isTaxIncluded() && C_Tax_ID != 0)
{
MTax tax = MTax.get(getCtx(), C_Tax_ID);
if (!tax.isZeroTax())
{
int stdPrecision = MCurrency.getStdPrecision(getCtx(), m_oLine.getC_Currency_ID());
BigDecimal costTax = tax.calculateTax(poCost, true, stdPrecision);
if (log.isLoggable(Level.FINE)) log.fine("Costs=" + poCost + " - Tax=" + costTax);
poCost = poCost.subtract(costTax);
}
} // correct included Tax
}
MInOutLine receiptLine = new MInOutLine (getCtx(), m_M_InOutLine_ID, getTrxName());
MInOut inOut = receiptLine.getParent();
@ -156,6 +175,48 @@ public class Doc_MatchPO extends Doc
// calculate po cost
poCost = poCost.multiply(getQty()); // Delivered so far
Map<Integer, BigDecimal> landedCostMap = new LinkedHashMap<Integer, BigDecimal>();
BigDecimal landedCost = BigDecimal.ZERO;
int C_OrderLine_ID = m_oLine.getC_OrderLine_ID();
MOrderLandedCostAllocation[] allocations = MOrderLandedCostAllocation.getOfOrderLine(C_OrderLine_ID, getTrxName());
for(MOrderLandedCostAllocation allocation : allocations)
{
BigDecimal totalAmt = allocation.getAmt();
BigDecimal totalQty = allocation.getQty();
BigDecimal amt = totalAmt.multiply(m_ioLine.getMovementQty()).divide(totalQty, RoundingMode.HALF_UP);
if (m_oLine.getC_Currency_ID() != as.getC_Currency_ID())
{
MOrder order = m_oLine.getParent();
Timestamp dateAcct = order.getDateAcct();
BigDecimal rate = MConversionRate.getRate(
order.getC_Currency_ID(), as.getC_Currency_ID(),
dateAcct, order.getC_ConversionType_ID(),
m_oLine.getAD_Client_ID(), m_oLine.getAD_Org_ID());
if (rate == null)
{
p_Error = "Purchase Order not convertible - " + as.getName();
return null;
}
amt = amt.multiply(rate);
if (amt.scale() > as.getCostingPrecision())
amt = amt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
}
amt = amt.divide(getQty(), RoundingMode.HALF_UP);
landedCost = landedCost.add(amt);
int elementId = allocation.getC_OrderLandedCost().getM_CostElement_ID();
BigDecimal elementAmt = landedCostMap.get(elementId);
if (elementAmt == null)
{
elementAmt = amt;
}
else
{
elementAmt = elementAmt.add(amt);
}
landedCostMap.put(elementId, elementAmt);
}
BigDecimal totalCost = poCost.add(landedCost);
// Different currency
if (m_oLine.getC_Currency_ID() != as.getC_Currency_ID())
{
@ -175,7 +236,7 @@ public class Doc_MatchPO extends Doc
poCost = poCost.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
}
String costingError = createMatchPOCostDetail(as);
String costingError = createMatchPOCostDetail(as, poCost, landedCostMap);
if (costingError != null && costingError.trim().length() > 0)
{
p_Error = costingError;
@ -200,7 +261,7 @@ public class Doc_MatchPO extends Doc
}
// Difference
BigDecimal difference = poCost.subtract(costs);
BigDecimal difference = totalCost.subtract(costs);
// Nothing to post
if (difference.signum() == 0)
{
@ -295,85 +356,20 @@ public class Doc_MatchPO extends Doc
}
// Elaine 2008/6/20
private String createMatchPOCostDetail(MAcctSchema as)
private String createMatchPOCostDetail(MAcctSchema as, BigDecimal poCost, Map<Integer, BigDecimal> landedCostMap)
{
if (m_ioLine != null && m_ioLine.getM_InOutLine_ID() > 0 &&
m_oLine != null && m_oLine.getC_OrderLine_ID() > 0)
{
MMatchPO mMatchPO = (MMatchPO) getPO();
// Purchase Order Line
BigDecimal poCost = m_oLine.getPriceCost();
if (poCost == null || poCost.signum() == 0)
{
poCost = m_oLine.getPriceActual();
// Goodwill: Correct included Tax
int C_Tax_ID = m_oLine.getC_Tax_ID();
if (m_oLine.isTaxIncluded() && C_Tax_ID != 0)
{
MTax tax = MTax.get(getCtx(), C_Tax_ID);
if (!tax.isZeroTax())
{
int stdPrecision = MCurrency.getStdPrecision(getCtx(), m_oLine.getC_Currency_ID());
BigDecimal costTax = tax.calculateTax(poCost, true, stdPrecision);
if (log.isLoggable(Level.FINE)) log.fine("Costs=" + poCost + " - Tax=" + costTax);
poCost = poCost.subtract(costTax);
}
} // correct included Tax
}
// Source from Doc_MatchPO.createFacts(MAcctSchema)
MInOut inOut = m_ioLine.getParent();
boolean isReturnTrx = inOut.getMovementType().equals(X_M_InOut.MOVEMENTTYPE_VendorReturns);
// Create PO Cost Detail Record first
// MZ Goodwill
// Create Cost Detail Matched PO using Total Amount and Total Qty based on OrderLine
MMatchPO[] mPO = MMatchPO.getOrderLine(getCtx(), m_oLine.getC_OrderLine_ID(), getTrxName());
BigDecimal tQty = Env.ZERO;
BigDecimal tAmt = Env.ZERO;
for (int i = 0 ; i < mPO.length ; i++)
{
if (mPO[i].getM_AttributeSetInstance_ID() == mMatchPO.getM_AttributeSetInstance_ID()
&& mPO[i].getM_MatchPO_ID() != mMatchPO.getM_MatchPO_ID())
{
BigDecimal qty = (isReturnTrx ? mPO[i].getQty().negate() : mPO[i].getQty());
tQty = tQty.add(qty);
tAmt = tAmt.add(poCost.multiply(qty));
}
}
poCost = poCost.multiply(getQty()); // Delivered so far
tAmt = tAmt.add(isReturnTrx ? poCost.negate() : poCost);
tQty = tQty.add(isReturnTrx ? getQty().negate() : getQty());
// Different currency
if (m_oLine.getC_Currency_ID() != as.getC_Currency_ID())
{
MOrder order = m_oLine.getParent();
Timestamp dateAcct = order.getDateAcct();
//get costing method for product
MProduct product = MProduct.get(getCtx(), getM_Product_ID());
String costingMethod = product.getCostingMethod(as);
if (MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod) ||
MAcctSchema.COSTINGMETHOD_LastPOPrice.equals(costingMethod) )
dateAcct = inOut.getDateAcct(); //Movement Date
//
BigDecimal rate = MConversionRate.getRate(
order.getC_Currency_ID(), as.getC_Currency_ID(),
dateAcct, order.getC_ConversionType_ID(),
m_oLine.getAD_Client_ID(), m_oLine.getAD_Org_ID());
if (rate == null)
{
return "Purchase Order not convertible - " + as.getName();
}
poCost = poCost.multiply(rate);
if (poCost.scale() > as.getCostingPrecision())
poCost = poCost.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
tAmt = tAmt.multiply(rate);
if (tAmt.scale() > as.getCostingPrecision())
tAmt = tAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
}
BigDecimal tAmt = isReturnTrx ? poCost.negate() : poCost;
BigDecimal tQty = isReturnTrx ? getQty().negate() : getQty();
// Set Total Amount and Total Quantity from Matched PO
if (!MCostDetail.createOrder(as, m_oLine.getAD_Org_ID(),
@ -384,6 +380,20 @@ public class Doc_MatchPO extends Doc
{
return "SaveError";
}
for(Integer elementId : landedCostMap.keySet())
{
BigDecimal amt = landedCostMap.get(elementId);
amt = amt.multiply(tQty);
if (!MCostDetail.createOrder(as, m_oLine.getAD_Org_ID(),
getM_Product_ID(), mMatchPO.getM_AttributeSetInstance_ID(),
m_oLine.getC_OrderLine_ID(), elementId,
amt, tQty, // Delivered
m_oLine.getDescription(), getTrxName()))
{
return "SaveError";
}
}
// end MZ
}
return "";

View File

@ -1140,6 +1140,8 @@ public final class FactLine extends X_Fact_Acct
setC_Tax_ID(fact.getC_Tax_ID());
// Org for cross charge
setAD_Org_ID (fact.getAD_Org_ID());
if (fact.getQty() != null)
setQty(fact.getQty().negate());
}
else
log.warning(new StringBuilder("Not Found (try later) ")

View File

@ -520,6 +520,21 @@ public interface I_C_AcctSchema_Default
public I_C_ValidCombination getPJ_WIP_A() throws RuntimeException;
/** Column name P_LandedCostClearing_Acct */
public static final String COLUMNNAME_P_LandedCostClearing_Acct = "P_LandedCostClearing_Acct";
/** Set Landed Cost Clearing.
* Product Landed Cost Clearing Account
*/
public void setP_LandedCostClearing_Acct (int P_LandedCostClearing_Acct);
/** Get Landed Cost Clearing.
* Product Landed Cost Clearing Account
*/
public int getP_LandedCostClearing_Acct();
public I_C_ValidCombination getP_LandedCostClearing_A() throws RuntimeException;
/** Column name P_PurchasePriceVariance_Acct */
public static final String COLUMNNAME_P_PurchasePriceVariance_Acct = "P_PurchasePriceVariance_Acct";

View File

@ -171,6 +171,21 @@ public interface I_C_LandedCostAllocation
public org.compiere.model.I_M_CostElement getM_CostElement() throws RuntimeException;
/** Column name M_InOutLine_ID */
public static final String COLUMNNAME_M_InOutLine_ID = "M_InOutLine_ID";
/** Set Shipment/Receipt Line.
* Line on Shipment or Receipt document
*/
public void setM_InOutLine_ID (int M_InOutLine_ID);
/** Get Shipment/Receipt Line.
* Line on Shipment or Receipt document
*/
public int getM_InOutLine_ID();
public org.compiere.model.I_M_InOutLine getM_InOutLine() throws RuntimeException;
/** Column name M_Product_ID */
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";

View File

@ -0,0 +1,209 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for C_OrderLandedCost
* @author iDempiere (generated)
* @version Release 1.0c
*/
public interface I_C_OrderLandedCost
{
/** TableName=C_OrderLandedCost */
public static final String Table_Name = "C_OrderLandedCost";
/** AD_Table_ID=1000000 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 1 - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(1);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
*/
public int getAD_Org_ID();
/** Column name Amt */
public static final String COLUMNNAME_Amt = "Amt";
/** Set Amount.
* Amount
*/
public void setAmt (BigDecimal Amt);
/** Get Amount.
* Amount
*/
public BigDecimal getAmt();
/** Column name C_Order_ID */
public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
/** Set Order.
* Order
*/
public void setC_Order_ID (int C_Order_ID);
/** Get Order.
* Order
*/
public int getC_Order_ID();
public org.compiere.model.I_C_Order getC_Order() throws RuntimeException;
/** Column name C_OrderLandedCost_ID */
public static final String COLUMNNAME_C_OrderLandedCost_ID = "C_OrderLandedCost_ID";
/** Set Estimated Landed Cost */
public void setC_OrderLandedCost_ID (int C_OrderLandedCost_ID);
/** Get Estimated Landed Cost */
public int getC_OrderLandedCost_ID();
/** Column name C_OrderLandedCost_UU */
public static final String COLUMNNAME_C_OrderLandedCost_UU = "C_OrderLandedCost_UU";
/** Set C_OrderLandedCost_UU */
public void setC_OrderLandedCost_UU (String C_OrderLandedCost_UU);
/** Get C_OrderLandedCost_UU */
public String getC_OrderLandedCost_UU();
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name LandedCostDistribution */
public static final String COLUMNNAME_LandedCostDistribution = "LandedCostDistribution";
/** Set Cost Distribution.
* Landed Cost Distribution
*/
public void setLandedCostDistribution (String LandedCostDistribution);
/** Get Cost Distribution.
* Landed Cost Distribution
*/
public String getLandedCostDistribution();
/** Column name M_CostElement_ID */
public static final String COLUMNNAME_M_CostElement_ID = "M_CostElement_ID";
/** Set Cost Element.
* Product Cost Element
*/
public void setM_CostElement_ID (int M_CostElement_ID);
/** Get Cost Element.
* Product Cost Element
*/
public int getM_CostElement_ID();
public org.compiere.model.I_M_CostElement getM_CostElement() throws RuntimeException;
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -0,0 +1,205 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for C_OrderLandedCostAllocation
* @author iDempiere (generated)
* @version Release 1.0c
*/
public interface I_C_OrderLandedCostAllocation
{
/** TableName=C_OrderLandedCostAllocation */
public static final String Table_Name = "C_OrderLandedCostAllocation";
/** AD_Table_ID=1000001 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 1 - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(1);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
*/
public int getAD_Org_ID();
/** Column name Amt */
public static final String COLUMNNAME_Amt = "Amt";
/** Set Amount.
* Amount
*/
public void setAmt (BigDecimal Amt);
/** Get Amount.
* Amount
*/
public BigDecimal getAmt();
/** Column name Base */
public static final String COLUMNNAME_Base = "Base";
/** Set Base.
* Calculation Base
*/
public void setBase (BigDecimal Base);
/** Get Base.
* Calculation Base
*/
public BigDecimal getBase();
/** Column name C_OrderLandedCostAllocation_ID */
public static final String COLUMNNAME_C_OrderLandedCostAllocation_ID = "C_OrderLandedCostAllocation_ID";
/** Set Estimated Landed Cost Allocation */
public void setC_OrderLandedCostAllocation_ID (int C_OrderLandedCostAllocation_ID);
/** Get Estimated Landed Cost Allocation */
public int getC_OrderLandedCostAllocation_ID();
/** Column name C_OrderLandedCostAllocation_UU */
public static final String COLUMNNAME_C_OrderLandedCostAllocation_UU = "C_OrderLandedCostAllocation_UU";
/** Set C_OrderLandedCostAllocation_UU */
public void setC_OrderLandedCostAllocation_UU (String C_OrderLandedCostAllocation_UU);
/** Get C_OrderLandedCostAllocation_UU */
public String getC_OrderLandedCostAllocation_UU();
/** Column name C_OrderLandedCost_ID */
public static final String COLUMNNAME_C_OrderLandedCost_ID = "C_OrderLandedCost_ID";
/** Set Estimated Landed Cost */
public void setC_OrderLandedCost_ID (int C_OrderLandedCost_ID);
/** Get Estimated Landed Cost */
public int getC_OrderLandedCost_ID();
public org.compiere.model.I_C_OrderLandedCost getC_OrderLandedCost() throws RuntimeException;
/** Column name C_OrderLine_ID */
public static final String COLUMNNAME_C_OrderLine_ID = "C_OrderLine_ID";
/** Set Purchase Order Line.
* Purchase Order Line
*/
public void setC_OrderLine_ID (int C_OrderLine_ID);
/** Get Purchase Order Line.
* Purchase Order Line
*/
public int getC_OrderLine_ID();
public org.compiere.model.I_C_OrderLine getC_OrderLine() throws RuntimeException;
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Qty */
public static final String COLUMNNAME_Qty = "Qty";
/** Set Quantity.
* Quantity
*/
public void setQty (BigDecimal Qty);
/** Get Quantity.
* Quantity
*/
public BigDecimal getQty();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -235,6 +235,21 @@ public interface I_M_Product_Acct
public I_C_ValidCombination getP_InvoicePriceVariance_A() throws RuntimeException;
/** Column name P_LandedCostClearing_Acct */
public static final String COLUMNNAME_P_LandedCostClearing_Acct = "P_LandedCostClearing_Acct";
/** Set Landed Cost Clearing.
* Product Landed Cost Clearing Account
*/
public void setP_LandedCostClearing_Acct (int P_LandedCostClearing_Acct);
/** Get Landed Cost Clearing.
* Product Landed Cost Clearing Account
*/
public int getP_LandedCostClearing_Acct();
public I_C_ValidCombination getP_LandedCostClearing_A() throws RuntimeException;
/** Column name P_PurchasePriceVariance_Acct */
public static final String COLUMNNAME_P_PurchasePriceVariance_Acct = "P_PurchasePriceVariance_Acct";

View File

@ -261,6 +261,21 @@ public interface I_M_Product_Category_Acct
public I_C_ValidCombination getP_InvoicePriceVariance_A() throws RuntimeException;
/** Column name P_LandedCostClearing_Acct */
public static final String COLUMNNAME_P_LandedCostClearing_Acct = "P_LandedCostClearing_Acct";
/** Set Landed Cost Clearing.
* Product Landed Cost Clearing Account
*/
public void setP_LandedCostClearing_Acct (int P_LandedCostClearing_Acct);
/** Get Landed Cost Clearing.
* Product Landed Cost Clearing Account
*/
public int getP_LandedCostClearing_Acct();
public I_C_ValidCombination getP_LandedCostClearing_A() throws RuntimeException;
/** Column name P_PurchasePriceVariance_Acct */
public static final String COLUMNNAME_P_PurchasePriceVariance_Acct = "P_PurchasePriceVariance_Acct";

View File

@ -79,16 +79,7 @@ public class MCostDetail extends X_M_CostDetail
BigDecimal Amt, BigDecimal Qty,
String Description, String trxName)
{
// Delete Unprocessed zero Differences
StringBuilder sql = new StringBuilder("DELETE M_CostDetail ")
.append("WHERE Processed='N' AND COALESCE(DeltaAmt,0)=0 AND COALESCE(DeltaQty,0)=0")
.append(" AND C_OrderLine_ID=").append(C_OrderLine_ID)
.append(" AND C_AcctSchema_ID =").append(as.getC_AcctSchema_ID())
.append(" AND M_AttributeSetInstance_ID=").append(M_AttributeSetInstance_ID);
int no = DB.executeUpdate(sql.toString(), trxName);
if (no != 0)
if (s_log.isLoggable(Level.CONFIG)) s_log.config("Deleted #" + no);
MCostDetail cd = get (as.getCtx(), "C_OrderLine_ID=?",
MCostDetail cd = get (as.getCtx(), "C_OrderLine_ID=? AND Coalesce(M_CostElement_ID,0)="+M_CostElement_ID,
C_OrderLine_ID, M_AttributeSetInstance_ID, as.getC_AcctSchema_ID(), trxName);
//
if (cd == null) // createNew
@ -100,11 +91,21 @@ public class MCostDetail extends X_M_CostDetail
cd.setC_OrderLine_ID (C_OrderLine_ID);
}
else
{
if (cd.isProcessed())
{
// MZ Goodwill
// set deltaAmt=Amt, deltaQty=qty, and set Cost Detail for Amt and Qty
cd.setDeltaAmt(Amt.subtract(cd.getAmt()));
cd.setDeltaQty(Qty.subtract(cd.getQty()));
}
else
{
cd.setDeltaAmt(BigDecimal.ZERO);
cd.setDeltaQty(BigDecimal.ZERO);
cd.setAmt(Amt);
cd.setQty(Qty);
}
if (cd.isDelta())
{
cd.setProcessed(false);
@ -112,7 +113,7 @@ public class MCostDetail extends X_M_CostDetail
cd.setQty(Qty);
}
// end MZ
else
else if (cd.isProcessed())
return true; // nothing to do
}
boolean ok = cd.save();
@ -146,17 +147,6 @@ public class MCostDetail extends X_M_CostDetail
BigDecimal Amt, BigDecimal Qty,
String Description, String trxName)
{
// Delete Unprocessed zero Differences
StringBuilder sql = new StringBuilder("DELETE M_CostDetail ")
.append("WHERE Processed='N' AND COALESCE(DeltaAmt,0)=0 AND COALESCE(DeltaQty,0)=0")
.append(" AND C_InvoiceLine_ID=").append(C_InvoiceLine_ID)
.append(" AND C_AcctSchema_ID =").append(as.getC_AcctSchema_ID())
.append(" AND M_AttributeSetInstance_ID=").append(M_AttributeSetInstance_ID)
.append(" AND Coalesce(M_CostElement_ID,0)=").append(M_CostElement_ID);
int no = DB.executeUpdate(sql.toString(), trxName);
if (no != 0)
if (s_log.isLoggable(Level.CONFIG)) s_log.config("Deleted #" + no);
MCostDetail cd = get (as.getCtx(), "C_InvoiceLine_ID=? AND Coalesce(M_CostElement_ID,0)="+M_CostElement_ID,
C_InvoiceLine_ID, M_AttributeSetInstance_ID, as.getC_AcctSchema_ID(), trxName);
//
@ -169,11 +159,21 @@ public class MCostDetail extends X_M_CostDetail
cd.setC_InvoiceLine_ID (C_InvoiceLine_ID);
}
else
{
if (cd.isProcessed())
{
// MZ Goodwill
// set deltaAmt=Amt, deltaQty=qty, and set Cost Detail for Amt and Qty
cd.setDeltaAmt(Amt.subtract(cd.getAmt()));
cd.setDeltaQty(Qty.subtract(cd.getQty()));
}
else
{
cd.setDeltaAmt(BigDecimal.ZERO);
cd.setDeltaQty(BigDecimal.ZERO);
cd.setAmt(Amt);
cd.setQty(Qty);
}
if (cd.isDelta())
{
cd.setProcessed(false);
@ -181,7 +181,7 @@ public class MCostDetail extends X_M_CostDetail
cd.setQty(Qty);
}
// end MZ
else
else if (cd.isProcessed())
return true; // nothing to do
}
boolean ok = cd.save();
@ -215,16 +215,7 @@ public class MCostDetail extends X_M_CostDetail
BigDecimal Amt, BigDecimal Qty,
String Description, boolean IsSOTrx, String trxName)
{
// Delete Unprocessed zero Differences
StringBuilder sql = new StringBuilder("DELETE M_CostDetail ")
.append("WHERE Processed='N' AND COALESCE(DeltaAmt,0)=0 AND COALESCE(DeltaQty,0)=0")
.append(" AND M_InOutLine_ID=").append(M_InOutLine_ID)
.append(" AND C_AcctSchema_ID =").append(as.getC_AcctSchema_ID())
.append(" AND M_AttributeSetInstance_ID=").append(M_AttributeSetInstance_ID);
int no = DB.executeUpdate(sql.toString(), trxName);
if (no != 0)
if (s_log.isLoggable(Level.CONFIG)) s_log.config("Deleted #" + no);
MCostDetail cd = get (as.getCtx(), "M_InOutLine_ID=?",
MCostDetail cd = get (as.getCtx(), "M_InOutLine_ID=? AND Coalesce(M_CostElement_ID,0)="+M_CostElement_ID,
M_InOutLine_ID, M_AttributeSetInstance_ID, as.getC_AcctSchema_ID(), trxName);
//
if (cd == null) // createNew
@ -237,11 +228,21 @@ public class MCostDetail extends X_M_CostDetail
cd.setIsSOTrx(IsSOTrx);
}
else
{
if (cd.isProcessed())
{
// MZ Goodwill
// set deltaAmt=Amt, deltaQty=qty, and set Cost Detail for Amt and Qty
cd.setDeltaAmt(Amt.subtract(cd.getAmt()));
cd.setDeltaQty(Qty.subtract(cd.getQty()));
}
else
{
cd.setDeltaAmt(BigDecimal.ZERO);
cd.setDeltaQty(BigDecimal.ZERO);
cd.setAmt(Amt);
cd.setQty(Qty);
}
if (cd.isDelta())
{
cd.setProcessed(false);
@ -249,7 +250,7 @@ public class MCostDetail extends X_M_CostDetail
cd.setQty(Qty);
}
// end MZ
else
else if (cd.isProcessed())
return true; // nothing to do
}
boolean ok = cd.save();
@ -282,16 +283,7 @@ public class MCostDetail extends X_M_CostDetail
BigDecimal Amt, BigDecimal Qty,
String Description, String trxName)
{
// Delete Unprocessed zero Differences
StringBuilder sql = new StringBuilder("DELETE M_CostDetail ")
.append("WHERE Processed='N' AND COALESCE(DeltaAmt,0)=0 AND COALESCE(DeltaQty,0)=0")
.append(" AND M_InventoryLine_ID=").append(M_InventoryLine_ID)
.append(" AND C_AcctSchema_ID =").append(as.getC_AcctSchema_ID())
.append(" AND M_AttributeSetInstance_ID=").append(M_AttributeSetInstance_ID);
int no = DB.executeUpdate(sql.toString(), trxName);
if (no != 0)
if (s_log.isLoggable(Level.CONFIG)) s_log.config("Deleted #" + no);
MCostDetail cd = get (as.getCtx(), "M_InventoryLine_ID=?",
MCostDetail cd = get (as.getCtx(), "M_InventoryLine_ID=? AND Coalesce(M_CostElement_ID,0)="+M_CostElement_ID,
M_InventoryLine_ID, M_AttributeSetInstance_ID, as.getC_AcctSchema_ID(), trxName);
//
if (cd == null) // createNew
@ -303,11 +295,21 @@ public class MCostDetail extends X_M_CostDetail
cd.setM_InventoryLine_ID(M_InventoryLine_ID);
}
else
{
if (cd.isProcessed())
{
// MZ Goodwill
// set deltaAmt=Amt, deltaQty=qty, and set Cost Detail for Amt and Qty
cd.setDeltaAmt(Amt.subtract(cd.getAmt()));
cd.setDeltaQty(Qty.subtract(cd.getQty()));
}
else
{
cd.setDeltaAmt(BigDecimal.ZERO);
cd.setDeltaQty(BigDecimal.ZERO);
cd.setAmt(Amt);
cd.setQty(Qty);
}
if (cd.isDelta())
{
cd.setProcessed(false);
@ -315,7 +317,7 @@ public class MCostDetail extends X_M_CostDetail
cd.setQty(Qty);
}
// end MZ
else
else if (cd.isProcessed())
return true; // nothing to do
}
boolean ok = cd.save();
@ -349,18 +351,8 @@ public class MCostDetail extends X_M_CostDetail
BigDecimal Amt, BigDecimal Qty, boolean from,
String Description, String trxName)
{
// Delete Unprocessed zero Differences
StringBuilder sql = new StringBuilder("DELETE M_CostDetail ")
.append("WHERE Processed='N' AND COALESCE(DeltaAmt,0)=0 AND COALESCE(DeltaQty,0)=0")
.append(" AND M_MovementLine_ID=").append(M_MovementLine_ID)
.append(" AND IsSOTrx=").append((from ? "'Y'" : "'N'"))
.append(" AND C_AcctSchema_ID =").append(as.getC_AcctSchema_ID())
.append(" AND M_AttributeSetInstance_ID=").append(M_AttributeSetInstance_ID);
int no = DB.executeUpdate(sql.toString(), trxName);
if (no != 0)
if (s_log.isLoggable(Level.CONFIG)) s_log.config("Deleted #" + no);
StringBuilder msget = new StringBuilder( "M_MovementLine_ID=? AND IsSOTrx=")
.append((from ? "'Y'" : "'N'"));
.append((from ? "'Y'" : "'N'")).append(" AND Coalesce(M_CostElement_ID,0)=").append(M_CostElement_ID);
MCostDetail cd = get (as.getCtx(),msget.toString(),
M_MovementLine_ID, M_AttributeSetInstance_ID, as.getC_AcctSchema_ID(), trxName);
//
@ -374,11 +366,21 @@ public class MCostDetail extends X_M_CostDetail
cd.setIsSOTrx(from);
}
else
{
if (cd.isProcessed())
{
// MZ Goodwill
// set deltaAmt=Amt, deltaQty=qty, and set Cost Detail for Amt and Qty
cd.setDeltaAmt(Amt.subtract(cd.getAmt()));
cd.setDeltaQty(Qty.subtract(cd.getQty()));
}
else
{
cd.setDeltaAmt(BigDecimal.ZERO);
cd.setDeltaQty(BigDecimal.ZERO);
cd.setAmt(Amt);
cd.setQty(Qty);
}
if (cd.isDelta())
{
cd.setProcessed(false);
@ -386,7 +388,7 @@ public class MCostDetail extends X_M_CostDetail
cd.setQty(Qty);
}
// end MZ
else
else if (cd.isProcessed())
return true; // nothing to do
}
boolean ok = cd.save();
@ -419,16 +421,7 @@ public class MCostDetail extends X_M_CostDetail
BigDecimal Amt, BigDecimal Qty,
String Description, String trxName)
{
// Delete Unprocessed zero Differences
StringBuilder sql = new StringBuilder("DELETE M_CostDetail ")
.append("WHERE Processed='N' AND COALESCE(DeltaAmt,0)=0 AND COALESCE(DeltaQty,0)=0")
.append(" AND M_ProductionLine_ID=").append(M_ProductionLine_ID)
.append(" AND C_AcctSchema_ID =").append(as.getC_AcctSchema_ID())
.append(" AND M_AttributeSetInstance_ID=").append(M_AttributeSetInstance_ID);
int no = DB.executeUpdate(sql.toString(), trxName);
if (no != 0)
if (s_log.isLoggable(Level.CONFIG)) s_log.config("Deleted #" + no);
MCostDetail cd = get (as.getCtx(), "M_ProductionLine_ID=?",
MCostDetail cd = get (as.getCtx(), "M_ProductionLine_ID=? AND Coalesce(M_CostElement_ID,0)="+M_CostElement_ID,
M_ProductionLine_ID, M_AttributeSetInstance_ID, as.getC_AcctSchema_ID(), trxName);
//
if (cd == null) // createNew
@ -440,11 +433,21 @@ public class MCostDetail extends X_M_CostDetail
cd.setM_ProductionLine_ID(M_ProductionLine_ID);
}
else
{
if (cd.isProcessed())
{
// MZ Goodwill
// set deltaAmt=Amt, deltaQty=qty, and set Cost Detail for Amt and Qty
cd.setDeltaAmt(Amt.subtract(cd.getAmt()));
cd.setDeltaQty(Qty.subtract(cd.getQty()));
}
else
{
cd.setDeltaAmt(BigDecimal.ZERO);
cd.setDeltaQty(BigDecimal.ZERO);
cd.setAmt(Amt);
cd.setQty(Qty);
}
if (cd.isDelta())
{
cd.setProcessed(false);
@ -452,7 +455,7 @@ public class MCostDetail extends X_M_CostDetail
cd.setQty(Qty);
}
// end MZ
else
else if (cd.isProcessed())
return true; // nothing to do
}
boolean ok = cd.save();
@ -483,17 +486,6 @@ public class MCostDetail extends X_M_CostDetail
BigDecimal Amt, BigDecimal Qty,
String Description, String trxName)
{
// Delete Unprocessed zero Differences
StringBuilder sql = new StringBuilder("DELETE M_CostDetail ")
.append("WHERE Processed='N' AND COALESCE(DeltaAmt,0)=0 AND COALESCE(DeltaQty,0)=0")
.append(" AND M_MatchInv_ID=").append(M_MatchInv_ID)
.append(" AND C_AcctSchema_ID =").append(as.getC_AcctSchema_ID())
.append(" AND M_AttributeSetInstance_ID=").append(M_AttributeSetInstance_ID)
.append(" AND Coalesce(M_CostElement_ID,0)=").append(M_CostElement_ID);
int no = DB.executeUpdate(sql.toString(), trxName);
if (no != 0)
if (s_log.isLoggable(Level.CONFIG)) s_log.config("Deleted #" + no);
MCostDetail cd = get (as.getCtx(), "M_MatchInv_ID=? AND Coalesce(M_CostElement_ID,0)="+M_CostElement_ID,
M_MatchInv_ID, M_AttributeSetInstance_ID, as.getC_AcctSchema_ID(), trxName);
//
@ -506,16 +498,26 @@ public class MCostDetail extends X_M_CostDetail
cd.setM_MatchInv_ID(M_MatchInv_ID);
}
else
{
if (cd.isProcessed())
{
cd.setDeltaAmt(Amt.subtract(cd.getAmt()));
cd.setDeltaQty(Qty.subtract(cd.getQty()));
}
else
{
cd.setDeltaAmt(BigDecimal.ZERO);
cd.setDeltaQty(BigDecimal.ZERO);
cd.setAmt(Amt);
cd.setQty(Qty);
}
if (cd.isDelta())
{
cd.setProcessed(false);
cd.setAmt(Amt);
cd.setQty(Qty);
}
else
else if (cd.isProcessed())
return true; // nothing to do
}
boolean ok = cd.save();
@ -938,13 +940,17 @@ public class MCostDetail extends X_M_CostDetail
}
// end MZ
//determine whether this is cost only adjustment entry
boolean costAdjustment = false;
//landed cost adjustment
if (this.getM_CostElement_ID() > 0 && this.getM_CostElement_ID() != ce.getM_CostElement_ID() && getC_InvoiceLine_ID() > 0)
if (this.getM_CostElement_ID() > 0 && this.getM_CostElement_ID() != ce.getM_CostElement_ID())
{
MCostElement thisCostElement = MCostElement.get(getCtx(), getM_CostElement_ID());
if (thisCostElement.getCostingMethod() == null && ce.getCostingMethod() != null)
{
qty = BigDecimal.ZERO;
costAdjustment = true;
}
}
int precision = as.getCostingPrecision();
BigDecimal price = amt;
@ -973,7 +979,7 @@ public class MCostDetail extends X_M_CostDetail
cost.setWeightedAverage(amt, qty);
if (log.isLoggable(Level.FINER)) log.finer("PO - AveragePO - " + cost);
}
else if (ce.isLastPOPrice())
else if (ce.isLastPOPrice() && !costAdjustment)
{
if(!isReturnTrx)
{
@ -988,7 +994,7 @@ public class MCostDetail extends X_M_CostDetail
cost.add(amt, qty);
if (log.isLoggable(Level.FINER)) log.finer("PO - LastPO - " + cost);
}
else if (ce.isStandardCosting())
else if (ce.isStandardCosting() && !costAdjustment)
{
// Update cost record only if it is zero
if (cost.getCurrentCostPrice().signum() == 0
@ -1090,7 +1096,13 @@ public class MCostDetail extends X_M_CostDetail
// else
// log.warning("Inv - " + ce + " - " + cost);
}
else if (getM_InOutLine_ID() != 0 && costAdjustment)
{
if (ce.isAverageInvoice())
{
cost.setWeightedAverage(amt, qty);
}
}
// *** Qty Adjustment Detail Record ***
else if (getM_InOutLine_ID() != 0 // AR Shipment Detail Record
|| getM_MovementLine_ID() != 0

View File

@ -1067,6 +1067,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
MInOutLine iol = (MInOutLine)list.get(i);
MLandedCostAllocation lca = new MLandedCostAllocation (this, lc.getM_CostElement_ID());
lca.setM_Product_ID(iol.getM_Product_ID());
lca.setM_InOutLine_ID(iol.getM_InOutLine_ID());
lca.setM_AttributeSetInstance_ID(iol.getM_AttributeSetInstance_ID());
BigDecimal base = iol.getBase(lc.getLandedCostDistribution());
lca.setBase(base);
@ -1101,6 +1102,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
MLandedCostAllocation lca = new MLandedCostAllocation (this, lc.getM_CostElement_ID());
lca.setM_Product_ID(iol.getM_Product_ID());
lca.setM_AttributeSetInstance_ID(iol.getM_AttributeSetInstance_ID());
lca.setM_InOutLine_ID(iol.getM_InOutLine_ID());
BigDecimal base = iol.getBase(lc.getLandedCostDistribution());
if (base.signum() == 0)
return "Base value is 0 - " + lc.getLandedCostDistribution();
@ -1191,6 +1193,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
MLandedCostAllocation lca = new MLandedCostAllocation (this, lcs[0].getM_CostElement_ID());
lca.setM_Product_ID(iol.getM_Product_ID());
lca.setM_AttributeSetInstance_ID(iol.getM_AttributeSetInstance_ID());
lca.setM_InOutLine_ID(iol.getM_InOutLine_ID());
BigDecimal base = iol.getBase(LandedCostDistribution);
lca.setBase(base);
// MZ Goodwill

View File

@ -1994,6 +1994,17 @@ public class MOrder extends X_C_Order implements DocAction
return DocAction.STATUS_Invalid;
}
//landed cost
if (!isSOTrx())
{
String error = landedCostAllocation();
if (!Util.isEmpty(error))
{
m_processMsg = error;
return DocAction.STATUS_Invalid;
}
}
// Set the definite document number after completed (if needed)
setDefiniteDocumentNo();
@ -2006,6 +2017,17 @@ public class MOrder extends X_C_Order implements DocAction
private String landedCostAllocation() {
MOrderLandedCost[] landedCosts = MOrderLandedCost.getOfOrder(getC_Order_ID(), get_TrxName());
for(MOrderLandedCost landedCost : landedCosts) {
String error = landedCost.distributeLandedCost();
if (!Util.isEmpty(error))
return error;
}
return "";
}
private String createPOSPayments() {
// Just for POS order with payment rule mixed

View File

@ -0,0 +1,159 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.Env;
import org.compiere.util.Util;
/**
* @author hengsin
*
*/
public class MOrderLandedCost extends X_C_OrderLandedCost {
/**
* generated serial id
*/
private static final long serialVersionUID = 2629138678703667123L;
/**
* @param ctx
* @param C_OrderLandedCost_ID
* @param trxName
*/
public MOrderLandedCost(Properties ctx, int C_OrderLandedCost_ID,
String trxName) {
super(ctx, C_OrderLandedCost_ID, trxName);
}
/**
* @param ctx
* @param rs
* @param trxName
*/
public MOrderLandedCost(Properties ctx, ResultSet rs, String trxName) {
super(ctx, rs, trxName);
}
/**
* Get allocation
* @param C_Order_ID
* @return lines
*/
public static MOrderLandedCost[] getOfOrder (int C_Order_ID, String trxName)
{
StringBuilder whereClause = new StringBuilder(COLUMNNAME_C_Order_ID).append("=?");
List<MOrderLandedCostAllocation> list = new Query(Env.getCtx(), I_C_OrderLandedCost.Table_Name, whereClause.toString(), trxName)
.setParameters(C_Order_ID)
.list();
return list.toArray(new MOrderLandedCost[list.size()]);
} // getLines
/**
* Get Lines of allocation
* @param whereClause starting with AND
* @return lines
*/
public MOrderLandedCostAllocation[] getLines (String whereClause)
{
StringBuilder whereClauseFinal = new StringBuilder(COLUMNNAME_C_OrderLandedCost_ID).append("=?");
if (!Util.isEmpty(whereClause))
whereClauseFinal.append(" ").append(whereClause);
List<MOrderLandedCostAllocation> list = new Query(getCtx(), I_C_OrderLandedCostAllocation.Table_Name, whereClauseFinal.toString(), get_TrxName())
.setParameters(getC_OrderLandedCost_ID())
.list();
return list.toArray(new MOrderLandedCostAllocation[list.size()]);
} // getLines
public String distributeLandedCost() {
MOrderLandedCostAllocation[] lines = getLines("");
if (lines.length == 1) {
MOrderLine orderLine = (MOrderLine) lines[0].getC_OrderLine();
BigDecimal base = orderLine.getBase(getLandedCostDistribution());
if (base.signum() == 0){
StringBuilder msgreturn = new StringBuilder("Total of Base values is 0 - ").append(getLandedCostDistribution());
return msgreturn.toString();
}
lines[0].setBase(base);
lines[0].setQty(orderLine.getQtyOrdered());
lines[0].setAmt(getAmt());
lines[0].saveEx();
} else if (lines.length > 1) {
// Calculate total & base
BigDecimal total = Env.ZERO;
for (MOrderLandedCostAllocation allocation : lines)
{
MOrderLine orderLine = (MOrderLine) allocation.getC_OrderLine();
total = total.add(orderLine.getBase(getLandedCostDistribution()));
}
if (total.signum() == 0){
StringBuilder msgreturn = new StringBuilder("Total of Base values is 0 - ").append(getLandedCostDistribution());
return msgreturn.toString();
}
// Create Allocations
for (MOrderLandedCostAllocation allocation : lines)
{
MOrderLine orderLine = (MOrderLine) allocation.getC_OrderLine();
BigDecimal base = orderLine.getBase(getLandedCostDistribution());
allocation.setBase(base);
allocation.setQty(orderLine.getQtyOrdered());
// end MZ
if (base.signum() != 0)
{
BigDecimal result = getAmt().multiply(base);
result = result.divide(total, BigDecimal.ROUND_HALF_UP);
allocation.setAmt(result.doubleValue(), orderLine.getParent().getC_Currency().getStdPrecision());
}
allocation.saveEx();
}
allocateLandedCostRounding(lines);
}
return "";
}
/**
* Allocate Landed Cost - Enforce Rounding
* @param lines
*/
private void allocateLandedCostRounding(MOrderLandedCostAllocation[] lines)
{
MOrderLandedCostAllocation largestAmtAllocation = null;
BigDecimal allocationAmt = Env.ZERO;
for (MOrderLandedCostAllocation allocation : lines)
{
if (largestAmtAllocation == null
|| allocation.getAmt().compareTo(largestAmtAllocation.getAmt()) > 0)
largestAmtAllocation = allocation;
allocationAmt = allocationAmt.add(allocation.getAmt());
}
BigDecimal difference = getAmt().subtract(allocationAmt);
if (difference.signum() != 0)
{
largestAmtAllocation.setAmt(largestAmtAllocation.getAmt().add(difference));
largestAmtAllocation.saveEx();
if (log.isLoggable(Level.CONFIG)) log.config("Difference=" + difference
+ ", C_OrderLandedCostAllocation_ID=" + largestAmtAllocation.getC_OrderLandedCostAllocation_ID()
+ ", Amt" + largestAmtAllocation.getAmt());
}
} // allocateLandedCostRounding
}

View File

@ -0,0 +1,83 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.List;
import java.util.Properties;
import org.compiere.util.Env;
/**
* @author hengsin
*
*/
public class MOrderLandedCostAllocation extends X_C_OrderLandedCostAllocation {
/**
* generated serial id
*/
private static final long serialVersionUID = -3876186097908624583L;
/**
* @param ctx
* @param C_OrderLandedCostAllocation_ID
* @param trxName
*/
public MOrderLandedCostAllocation(Properties ctx,
int C_OrderLandedCostAllocation_ID, String trxName) {
super(ctx, C_OrderLandedCostAllocation_ID, trxName);
}
/**
* @param ctx
* @param rs
* @param trxName
*/
public MOrderLandedCostAllocation(Properties ctx, ResultSet rs,
String trxName) {
super(ctx, rs, trxName);
}
/**
* Set Amt
* @param Amt amount
* @param precision precision
*/
public void setAmt (double Amt, int precision)
{
BigDecimal bd = BigDecimal.valueOf(Amt);
if (bd.scale() > precision)
bd = bd.setScale(precision, BigDecimal.ROUND_HALF_UP);
super.setAmt(bd);
} // setAmt
/**
* Get Lines of allocation
* @param whereClause starting with AND
* @return lines
*/
public static MOrderLandedCostAllocation[] getOfOrderLine(int C_OrderLine_ID, String trxName)
{
StringBuilder whereClause = new StringBuilder(COLUMNNAME_C_OrderLine_ID).append("=?");
List<MOrderLandedCostAllocation> list = new Query(Env.getCtx(), I_C_OrderLandedCostAllocation.Table_Name, whereClause.toString(), trxName)
.setParameters(C_OrderLine_ID)
.list();
return list.toArray(new MOrderLandedCostAllocation[list.size()]);
} // getLines
}

View File

@ -782,6 +782,46 @@ public class MOrderLine extends X_C_OrderLine
super.setQtyOrdered(QtyOrdered);
} // setQtyOrdered
/**
* Get Base value for Cost Distribution
* @param CostDistribution cost Distribution
* @return base number
*/
public BigDecimal getBase (String CostDistribution)
{
if (MLandedCost.LANDEDCOSTDISTRIBUTION_Costs.equals(CostDistribution))
{
return this.getQtyOrdered().multiply(getPriceActual()); // Actual delivery
}
else if (MLandedCost.LANDEDCOSTDISTRIBUTION_Line.equals(CostDistribution))
return Env.ONE;
else if (MLandedCost.LANDEDCOSTDISTRIBUTION_Quantity.equals(CostDistribution))
return getQtyOrdered();
else if (MLandedCost.LANDEDCOSTDISTRIBUTION_Volume.equals(CostDistribution))
{
MProduct product = getProduct();
if (product == null)
{
log.severe("No Product");
return Env.ZERO;
}
return getQtyOrdered().multiply(product.getVolume());
}
else if (MLandedCost.LANDEDCOSTDISTRIBUTION_Weight.equals(CostDistribution))
{
MProduct product = getProduct();
if (product == null)
{
log.severe("No Product");
return Env.ZERO;
}
return getQtyOrdered().multiply(product.getWeight());
}
//
log.severe("Invalid Criteria: " + CostDistribution);
return Env.ZERO;
} // getBase
/**************************************************************************
* Before Save
* @param newRecord

View File

@ -161,8 +161,10 @@ public class ProductCost
public static final int ACCTTYPE_P_Overhead = 21;
/** Outside Processing */
public static final int ACCTTYPE_P_Scrap = 22;
/** Outside Processing */
/** Average costing variance */
public static final int ACCTTYPE_P_AverageCostVariance = 23;
/** Landed cost clearing **/
public static final int ACCTTYPE_P_LandedCostClearing = 24;
/**
* Line Account from Product
@ -173,7 +175,7 @@ public class ProductCost
*/
public MAccount getAccount(int AcctType, MAcctSchema as)
{
if (AcctType < 1 || AcctType > 23)
if (AcctType < ACCTTYPE_P_Revenue || AcctType > ACCTTYPE_P_LandedCostClearing)
return null;
// No Product - get Default from Product Category
@ -187,7 +189,8 @@ public class ProductCost
+ "P_WIP_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct," // 11.12.13
+ "P_RateVariance_Acct,P_MixVariance_Acct,P_FloorStock_Acct," // 14.15.16
+ "P_CostOfProduction_Acct,P_Labor_Acct,P_Burden_Acct,P_OutsideProcessing_Acct," // 17.18,19,20
+ "P_Overhead_Acct,P_Scrap_Acct,P_AverageCostVariance_Acct " // 21,23
+ "P_Overhead_Acct,P_Scrap_Acct,P_AverageCostVariance_Acct," // 21,23
+ "P_LandedCostClearing_Acct " // 24
+ "FROM M_Product_Acct "
+ "WHERE M_Product_ID=? AND C_AcctSchema_ID=?";
//
@ -225,7 +228,7 @@ public class ProductCost
*/
public MAccount getAccountDefault (int AcctType, MAcctSchema as)
{
if (AcctType < 1 || AcctType > 23)
if (AcctType < ACCTTYPE_P_Revenue || AcctType > ACCTTYPE_P_LandedCostClearing)
return null;
String sql = "SELECT P_Revenue_Acct, P_Expense_Acct, P_Asset_Acct, P_Cogs_Acct, "
@ -235,7 +238,8 @@ public class ProductCost
+ "P_WIP_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct," // 11.12.13
+ "P_RateVariance_Acct,P_MixVariance_Acct,P_FloorStock_Acct," // 14.15.16
+ "P_CostOfProduction_Acct,P_Labor_Acct,P_Burden_Acct,P_OutsideProcessing_Acct," // 17.18,19,20
+ "P_Overhead_Acct,P_Scrap_Acct,P_AverageCostVariance_Acct " // 21,23
+ "P_Overhead_Acct,P_Scrap_Acct,P_AverageCostVariance_Acct," // 21,23
+ "P_LandedCostClearing_Acct " // 24
+ "FROM M_Product_Category pc, M_Product_Category_Acct pca "
+ "WHERE pc.M_Product_Category_ID=pca.M_Product_Category_ID"
+ " AND pca.C_AcctSchema_ID=? "

View File

@ -30,7 +30,7 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default
/**
*
*/
private static final long serialVersionUID = 20130626L;
private static final long serialVersionUID = 20130819L;
/** Standard Constructor */
public X_C_AcctSchema_Default (Properties ctx, int C_AcctSchema_Default_ID, String trxName)
@ -839,6 +839,31 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default
return ii.intValue();
}
public I_C_ValidCombination getP_LandedCostClearing_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)
.getPO(getP_LandedCostClearing_Acct(), get_TrxName()); }
/** Set Landed Cost Clearing.
@param P_LandedCostClearing_Acct
Product Landed Cost Clearing Account
*/
public void setP_LandedCostClearing_Acct (int P_LandedCostClearing_Acct)
{
set_Value (COLUMNNAME_P_LandedCostClearing_Acct, Integer.valueOf(P_LandedCostClearing_Acct));
}
/** Get Landed Cost Clearing.
@return Product Landed Cost Clearing Account
*/
public int getP_LandedCostClearing_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_P_LandedCostClearing_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_ValidCombination getP_PurchasePriceVariance_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)

View File

@ -32,7 +32,7 @@ public class X_C_LandedCostAllocation extends PO implements I_C_LandedCostAlloca
/**
*
*/
private static final long serialVersionUID = 20130626L;
private static final long serialVersionUID = 20130813L;
/** Standard Constructor */
public X_C_LandedCostAllocation (Properties ctx, int C_LandedCostAllocation_ID, String trxName)
@ -247,6 +247,34 @@ public class X_C_LandedCostAllocation extends PO implements I_C_LandedCostAlloca
return ii.intValue();
}
public org.compiere.model.I_M_InOutLine getM_InOutLine() throws RuntimeException
{
return (org.compiere.model.I_M_InOutLine)MTable.get(getCtx(), org.compiere.model.I_M_InOutLine.Table_Name)
.getPO(getM_InOutLine_ID(), get_TrxName()); }
/** Set Shipment/Receipt Line.
@param M_InOutLine_ID
Line on Shipment or Receipt document
*/
public void setM_InOutLine_ID (int M_InOutLine_ID)
{
if (M_InOutLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_InOutLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_InOutLine_ID, Integer.valueOf(M_InOutLine_ID));
}
/** Get Shipment/Receipt Line.
@return Line on Shipment or Receipt document
*/
public int getM_InOutLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_InOutLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
{
return (org.compiere.model.I_M_Product)MTable.get(getCtx(), org.compiere.model.I_M_Product.Table_Name)

View File

@ -0,0 +1,262 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.Env;
/** Generated Model for C_OrderLandedCost
* @author iDempiere (generated)
* @version Release 1.0c - $Id$ */
public class X_C_OrderLandedCost extends PO implements I_C_OrderLandedCost, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20130806L;
/** Standard Constructor */
public X_C_OrderLandedCost (Properties ctx, int C_OrderLandedCost_ID, String trxName)
{
super (ctx, C_OrderLandedCost_ID, trxName);
/** if (C_OrderLandedCost_ID == 0)
{
setAmt (Env.ZERO);
// 0
setC_Order_ID (0);
setC_OrderLandedCost_ID (0);
setLandedCostDistribution (null);
// Q
setM_CostElement_ID (0);
setProcessed (false);
// N
} */
}
/** Load Constructor */
public X_C_OrderLandedCost (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 1 - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_C_OrderLandedCost[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Amount.
@param Amt
Amount
*/
public void setAmt (BigDecimal Amt)
{
set_Value (COLUMNNAME_Amt, Amt);
}
/** Get Amount.
@return Amount
*/
public BigDecimal getAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Amt);
if (bd == null)
return Env.ZERO;
return bd;
}
public org.compiere.model.I_C_Order getC_Order() throws RuntimeException
{
return (org.compiere.model.I_C_Order)MTable.get(getCtx(), org.compiere.model.I_C_Order.Table_Name)
.getPO(getC_Order_ID(), get_TrxName()); }
/** Set Order.
@param C_Order_ID
Order
*/
public void setC_Order_ID (int C_Order_ID)
{
if (C_Order_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Order_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
}
/** Get Order.
@return Order
*/
public int getC_Order_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Estimated Landed Cost.
@param C_OrderLandedCost_ID Estimated Landed Cost */
public void setC_OrderLandedCost_ID (int C_OrderLandedCost_ID)
{
if (C_OrderLandedCost_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_OrderLandedCost_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_OrderLandedCost_ID, Integer.valueOf(C_OrderLandedCost_ID));
}
/** Get Estimated Landed Cost.
@return Estimated Landed Cost */
public int getC_OrderLandedCost_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLandedCost_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set C_OrderLandedCost_UU.
@param C_OrderLandedCost_UU C_OrderLandedCost_UU */
public void setC_OrderLandedCost_UU (String C_OrderLandedCost_UU)
{
set_Value (COLUMNNAME_C_OrderLandedCost_UU, C_OrderLandedCost_UU);
}
/** Get C_OrderLandedCost_UU.
@return C_OrderLandedCost_UU */
public String getC_OrderLandedCost_UU ()
{
return (String)get_Value(COLUMNNAME_C_OrderLandedCost_UU);
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** LandedCostDistribution AD_Reference_ID=339 */
public static final int LANDEDCOSTDISTRIBUTION_AD_Reference_ID=339;
/** Quantity = Q */
public static final String LANDEDCOSTDISTRIBUTION_Quantity = "Q";
/** Line = L */
public static final String LANDEDCOSTDISTRIBUTION_Line = "L";
/** Volume = V */
public static final String LANDEDCOSTDISTRIBUTION_Volume = "V";
/** Weight = W */
public static final String LANDEDCOSTDISTRIBUTION_Weight = "W";
/** Costs = C */
public static final String LANDEDCOSTDISTRIBUTION_Costs = "C";
/** Set Cost Distribution.
@param LandedCostDistribution
Landed Cost Distribution
*/
public void setLandedCostDistribution (String LandedCostDistribution)
{
set_Value (COLUMNNAME_LandedCostDistribution, LandedCostDistribution);
}
/** Get Cost Distribution.
@return Landed Cost Distribution
*/
public String getLandedCostDistribution ()
{
return (String)get_Value(COLUMNNAME_LandedCostDistribution);
}
public org.compiere.model.I_M_CostElement getM_CostElement() throws RuntimeException
{
return (org.compiere.model.I_M_CostElement)MTable.get(getCtx(), org.compiere.model.I_M_CostElement.Table_Name)
.getPO(getM_CostElement_ID(), get_TrxName()); }
/** Set Cost Element.
@param M_CostElement_ID
Product Cost Element
*/
public void setM_CostElement_ID (int M_CostElement_ID)
{
if (M_CostElement_ID < 1)
set_Value (COLUMNNAME_M_CostElement_ID, null);
else
set_Value (COLUMNNAME_M_CostElement_ID, Integer.valueOf(M_CostElement_ID));
}
/** Get Cost Element.
@return Product Cost Element
*/
public int getM_CostElement_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_CostElement_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Processed.
@param Processed
The document has been processed
*/
public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Processed.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
}

View File

@ -0,0 +1,251 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.Env;
/** Generated Model for C_OrderLandedCostAllocation
* @author iDempiere (generated)
* @version Release 1.0c - $Id$ */
public class X_C_OrderLandedCostAllocation extends PO implements I_C_OrderLandedCostAllocation, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20130806L;
/** Standard Constructor */
public X_C_OrderLandedCostAllocation (Properties ctx, int C_OrderLandedCostAllocation_ID, String trxName)
{
super (ctx, C_OrderLandedCostAllocation_ID, trxName);
/** if (C_OrderLandedCostAllocation_ID == 0)
{
setAmt (Env.ZERO);
setBase (Env.ZERO);
setC_OrderLandedCostAllocation_ID (0);
setC_OrderLandedCost_ID (0);
setC_OrderLine_ID (0);
setProcessed (false);
// N
setQty (Env.ZERO);
} */
}
/** Load Constructor */
public X_C_OrderLandedCostAllocation (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 1 - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_C_OrderLandedCostAllocation[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Amount.
@param Amt
Amount
*/
public void setAmt (BigDecimal Amt)
{
set_Value (COLUMNNAME_Amt, Amt);
}
/** Get Amount.
@return Amount
*/
public BigDecimal getAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Amt);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Base.
@param Base
Calculation Base
*/
public void setBase (BigDecimal Base)
{
set_Value (COLUMNNAME_Base, Base);
}
/** Get Base.
@return Calculation Base
*/
public BigDecimal getBase ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Base);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Estimated Landed Cost Allocation.
@param C_OrderLandedCostAllocation_ID Estimated Landed Cost Allocation */
public void setC_OrderLandedCostAllocation_ID (int C_OrderLandedCostAllocation_ID)
{
if (C_OrderLandedCostAllocation_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_OrderLandedCostAllocation_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_OrderLandedCostAllocation_ID, Integer.valueOf(C_OrderLandedCostAllocation_ID));
}
/** Get Estimated Landed Cost Allocation.
@return Estimated Landed Cost Allocation */
public int getC_OrderLandedCostAllocation_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLandedCostAllocation_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set C_OrderLandedCostAllocation_UU.
@param C_OrderLandedCostAllocation_UU C_OrderLandedCostAllocation_UU */
public void setC_OrderLandedCostAllocation_UU (String C_OrderLandedCostAllocation_UU)
{
set_Value (COLUMNNAME_C_OrderLandedCostAllocation_UU, C_OrderLandedCostAllocation_UU);
}
/** Get C_OrderLandedCostAllocation_UU.
@return C_OrderLandedCostAllocation_UU */
public String getC_OrderLandedCostAllocation_UU ()
{
return (String)get_Value(COLUMNNAME_C_OrderLandedCostAllocation_UU);
}
public org.compiere.model.I_C_OrderLandedCost getC_OrderLandedCost() throws RuntimeException
{
return (org.compiere.model.I_C_OrderLandedCost)MTable.get(getCtx(), org.compiere.model.I_C_OrderLandedCost.Table_Name)
.getPO(getC_OrderLandedCost_ID(), get_TrxName()); }
/** Set Estimated Landed Cost.
@param C_OrderLandedCost_ID Estimated Landed Cost */
public void setC_OrderLandedCost_ID (int C_OrderLandedCost_ID)
{
if (C_OrderLandedCost_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_OrderLandedCost_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_OrderLandedCost_ID, Integer.valueOf(C_OrderLandedCost_ID));
}
/** Get Estimated Landed Cost.
@return Estimated Landed Cost */
public int getC_OrderLandedCost_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLandedCost_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_C_OrderLine getC_OrderLine() throws RuntimeException
{
return (org.compiere.model.I_C_OrderLine)MTable.get(getCtx(), org.compiere.model.I_C_OrderLine.Table_Name)
.getPO(getC_OrderLine_ID(), get_TrxName()); }
/** Set Purchase Order Line.
@param C_OrderLine_ID
Purchase Order Line
*/
public void setC_OrderLine_ID (int C_OrderLine_ID)
{
if (C_OrderLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_OrderLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID));
}
/** Get Purchase Order Line.
@return Purchase Order Line
*/
public int getC_OrderLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Processed.
@param Processed
The document has been processed
*/
public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Processed.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Quantity.
@param Qty
Quantity
*/
public void setQty (BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
/** Get Quantity.
@return Quantity
*/
public BigDecimal getQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
if (bd == null)
return Env.ZERO;
return bd;
}
}

View File

@ -29,7 +29,7 @@ public class X_M_Product_Acct extends PO implements I_M_Product_Acct, I_Persiste
/**
*
*/
private static final long serialVersionUID = 20130626L;
private static final long serialVersionUID = 20130819L;
/** Standard Constructor */
public X_M_Product_Acct (Properties ctx, int M_Product_Acct_ID, String trxName)
@ -326,6 +326,31 @@ public class X_M_Product_Acct extends PO implements I_M_Product_Acct, I_Persiste
return ii.intValue();
}
public I_C_ValidCombination getP_LandedCostClearing_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)
.getPO(getP_LandedCostClearing_Acct(), get_TrxName()); }
/** Set Landed Cost Clearing.
@param P_LandedCostClearing_Acct
Product Landed Cost Clearing Account
*/
public void setP_LandedCostClearing_Acct (int P_LandedCostClearing_Acct)
{
set_Value (COLUMNNAME_P_LandedCostClearing_Acct, Integer.valueOf(P_LandedCostClearing_Acct));
}
/** Get Landed Cost Clearing.
@return Product Landed Cost Clearing Account
*/
public int getP_LandedCostClearing_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_P_LandedCostClearing_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_ValidCombination getP_PurchasePriceVariance_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)

View File

@ -29,7 +29,7 @@ public class X_M_Product_Category_Acct extends PO implements I_M_Product_Categor
/**
*
*/
private static final long serialVersionUID = 20130626L;
private static final long serialVersionUID = 20130819L;
/** Standard Constructor */
public X_M_Product_Category_Acct (Properties ctx, int M_Product_Category_Acct_ID, String trxName)
@ -390,6 +390,31 @@ public class X_M_Product_Category_Acct extends PO implements I_M_Product_Categor
return ii.intValue();
}
public I_C_ValidCombination getP_LandedCostClearing_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)
.getPO(getP_LandedCostClearing_Acct(), get_TrxName()); }
/** Set Landed Cost Clearing.
@param P_LandedCostClearing_Acct
Product Landed Cost Clearing Account
*/
public void setP_LandedCostClearing_Acct (int P_LandedCostClearing_Acct)
{
set_Value (COLUMNNAME_P_LandedCostClearing_Acct, Integer.valueOf(P_LandedCostClearing_Acct));
}
/** Get Landed Cost Clearing.
@return Product Landed Cost Clearing Account
*/
public int getP_LandedCostClearing_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_P_LandedCostClearing_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_ValidCombination getP_PurchasePriceVariance_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)

View File

@ -194,6 +194,7 @@
58600,"Rate Variance","Account for Rate Variance","Expense",,"Yes","No","",58,,,,,,,,,,
58700,"Mix Variance","Account for Mix Variance","Expense",,"Yes","No","",58,,,,,,,,,,
58800,"Average Cost Variance","Account for Average Cost Variance","Expense",,"Yes","No","P_AVERAGECOSTVARIANCE_ACCT",58,,,,,,,,,,
58900,"Landed Cost Clearing","Account for Landed Cost Clearing","Expense",,"Yes","No","P_LANDEDCOSTCLEARING_ACCT",58,,,,,,,,,,
59,"CoGs Discounts",,"Expense",,,"Yes",,5,,,,,59,"CoGS Discounts",2,,,
59100,"Trade discounts received","Received Trade Discounts (corrects Product expense)","Expense",,"Yes","No","P_TRADEDISCOUNTREC_ACCT",59,,,,,,,,,,
59200,"Payment discount revenue","Granted early payment discount from vendors","Expense",,"Yes","No","PAYDISCOUNT_REV_ACCT",59,,,,,,,,,,

1 [Account_Value] [Account_Name] [Account_Description] [Account_Type] [Account_Sign] [Account_Document] [Account_Summary] [Default_Account] [Account_Parent] [Balance Sheet] [Balance Sheet_Name] [US 1120 Balance Sheet] US 1120 Balance Sheet_Name [Profit & Loss] [Profit & Loss_Name] [US 1120 Income Statement] [US 1120 Income Statement_Name] [Cash Flow] [Cash Flow_Name]
194 58600 Rate Variance Account for Rate Variance Expense Yes No 58
195 58700 Mix Variance Account for Mix Variance Expense Yes No 58
196 58800 Average Cost Variance Account for Average Cost Variance Expense Yes No P_AVERAGECOSTVARIANCE_ACCT 58
197 58900 Landed Cost Clearing Account for Landed Cost Clearing Expense Yes No P_LANDEDCOSTCLEARING_ACCT 58
198 59 CoGs Discounts Expense Yes 5 59 CoGS Discounts 2
199 59100 Trade discounts received Received Trade Discounts (corrects Product expense) Expense Yes No P_TRADEDISCOUNTREC_ACCT 59
200 59200 Payment discount revenue Granted early payment discount from vendors Expense Yes No PAYDISCOUNT_REV_ACCT 59