From 7246f49bab0014ea3eb3b09d5f85f97d97b13cb2 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 19 Aug 2013 21:27:04 +0800 Subject: [PATCH] IDEMPIERE-1285 Estimated Landed Cost for PO. --- .../oracle/201308190830_IDEMPIERE-1285.sql | 960 ++++++++++++++++++ .../201308190830_IDEMPIERE-1285.sql | 958 +++++++++++++++++ .../process/AcctSchemaDefaultCopy.java | 9 +- .../process/ProductCategoryAcctCopy.java | 8 +- .../src/org/compiere/acct/Doc_InOut.java | 74 +- .../src/org/compiere/acct/Doc_Invoice.java | 218 ++-- .../src/org/compiere/acct/Doc_MatchInv.java | 116 ++- .../src/org/compiere/acct/Doc_MatchPO.java | 152 +-- .../src/org/compiere/acct/FactLine.java | 2 + .../model/I_C_AcctSchema_Default.java | 15 + .../model/I_C_LandedCostAllocation.java | 15 + .../compiere/model/I_C_OrderLandedCost.java | 209 ++++ .../model/I_C_OrderLandedCostAllocation.java | 205 ++++ .../org/compiere/model/I_M_Product_Acct.java | 15 + .../model/I_M_Product_Category_Acct.java | 15 + .../src/org/compiere/model/MCostDetail.java | 238 ++--- .../src/org/compiere/model/MInvoiceLine.java | 3 + .../src/org/compiere/model/MOrder.java | 22 + .../org/compiere/model/MOrderLandedCost.java | 159 +++ .../model/MOrderLandedCostAllocation.java | 83 ++ .../src/org/compiere/model/MOrderLine.java | 40 + .../src/org/compiere/model/ProductCost.java | 16 +- .../model/X_C_AcctSchema_Default.java | 27 +- .../model/X_C_LandedCostAllocation.java | 30 +- .../compiere/model/X_C_OrderLandedCost.java | 262 +++++ .../model/X_C_OrderLandedCostAllocation.java | 251 +++++ .../org/compiere/model/X_M_Product_Acct.java | 27 +- .../model/X_M_Product_Category_Acct.java | 27 +- .../data/import/AccountingUS.csv | 1 + .../data/import/AccountingUS.xls | Bin 78336 -> 78848 bytes 30 files changed, 3843 insertions(+), 314 deletions(-) create mode 100644 migration/i1.0c-release/oracle/201308190830_IDEMPIERE-1285.sql create mode 100644 migration/i1.0c-release/postgresql/201308190830_IDEMPIERE-1285.sql create mode 100644 org.adempiere.base/src/org/compiere/model/I_C_OrderLandedCost.java create mode 100644 org.adempiere.base/src/org/compiere/model/I_C_OrderLandedCostAllocation.java create mode 100644 org.adempiere.base/src/org/compiere/model/MOrderLandedCost.java create mode 100644 org.adempiere.base/src/org/compiere/model/MOrderLandedCostAllocation.java create mode 100644 org.adempiere.base/src/org/compiere/model/X_C_OrderLandedCost.java create mode 100644 org.adempiere.base/src/org/compiere/model/X_C_OrderLandedCostAllocation.java diff --git a/migration/i1.0c-release/oracle/201308190830_IDEMPIERE-1285.sql b/migration/i1.0c-release/oracle/201308190830_IDEMPIERE-1285.sql new file mode 100644 index 0000000000..cdddc19a6f --- /dev/null +++ b/migration/i1.0c-release/oracle/201308190830_IDEMPIERE-1285.sql @@ -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 +; + diff --git a/migration/i1.0c-release/postgresql/201308190830_IDEMPIERE-1285.sql b/migration/i1.0c-release/postgresql/201308190830_IDEMPIERE-1285.sql new file mode 100644 index 0000000000..f2e2f9326f --- /dev/null +++ b/migration/i1.0c-release/postgresql/201308190830_IDEMPIERE-1285.sql @@ -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 +; + diff --git a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java index 73d4c234b4..939a65b57b 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java @@ -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) diff --git a/org.adempiere.base.process/src/org/compiere/process/ProductCategoryAcctCopy.java b/org.adempiere.base.process/src/org/compiere/process/ProductCategoryAcctCopy.java index c9dbfcd231..604f123718 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProductCategoryAcctCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProductCategoryAcctCopy.java @@ -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) // # diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java index fa79852c77..c9df91df06 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java @@ -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)) - { - //get costing method for product - String costingMethod = product.getCostingMethod(as); + { + 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 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) { @@ -457,7 +471,7 @@ public class Doc_InOut extends Doc log.log(Level.WARNING, p_Error); return null; } - } + } } else { @@ -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 diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java index 5017708be7..c0aff41f46 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java @@ -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,70 +842,164 @@ public class Doc_Invoice extends Doc if (line.getDescription() != null) desc += " - " + line.getDescription(); - // Cost Detail - Convert to AcctCurrency - - BigDecimal allocationAmt = lca.getAmt(); - if (getC_Currency_ID() != as.getC_Currency_ID()) - allocationAmt = MConversionRate.convert(getCtx(), allocationAmt, - getC_Currency_ID(), as.getC_Currency_ID(), - getDateAcct(), getC_ConversionType_ID(), - getAD_Client_ID(), getAD_Org_ID()); - if (allocationAmt.scale() > as.getCostingPrecision()) - allocationAmt = allocationAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP); - if (!dr) - allocationAmt = allocationAmt.negate(); - - Trx trx = Trx.get(getTrxName(), false); - Savepoint savepoint = null; - boolean zeroQty = false; - try { - savepoint = trx.setSavepoint(null); - - 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(), - desc, getTrxName())) { - throw new RuntimeException("Failed to create cost detail record."); - } - } catch (SQLException e) { - throw new RuntimeException(e.getLocalizedMessage(), e); - } catch (AverageCostingZeroQtyException e) { - zeroQty = true; - try { - trx.rollback(savepoint); - savepoint = null; - } catch (SQLException e1) { - throw new RuntimeException(e1.getLocalizedMessage(), e1); - } - } finally { - if (savepoint != null) { - try { - trx.releaseSavepoint(savepoint); - } catch (SQLException e) {} - } - } - - // Accounting - ProductCost pc = new ProductCost (Env.getCtx(), - lca.getM_Product_ID(), lca.getM_AttributeSetInstance_ID(), getTrxName()); + // Accounting BigDecimal drAmt = null; BigDecimal crAmt = null; - 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); - } + 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)) + { - FactLine fl = fact.createLine (line, account, getC_Currency_ID(), drAmt, crAmt); - fl.setDescription(desc); - fl.setM_Product_ID(lca.getM_Product_ID()); + // Convert to AcctCurrency + BigDecimal allocationAmt = lca.getAmt(); + if (getC_Currency_ID() != as.getC_Currency_ID()) + allocationAmt = MConversionRate.convert(getCtx(), allocationAmt, + getC_Currency_ID(), as.getC_Currency_ID(), + getDateAcct(), getC_ConversionType_ID(), + 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) + costAdjustmentAmt = costAdjustmentAmt.negate(); + + Trx trx = Trx.get(getTrxName(), false); + Savepoint savepoint = null; + boolean zeroQty = false; + try { + savepoint = trx.setSavepoint(null); + + if (!MCostDetail.createInvoice(as, lca.getAD_Org_ID(), + lca.getM_Product_ID(), lca.getM_AttributeSetInstance_ID(), + C_InvoiceLine_ID, lca.getM_CostElement_ID(), + costAdjustmentAmt, lca.getQty(), + desc, getTrxName())) { + throw new RuntimeException("Failed to create cost detail record."); + } + } catch (SQLException e) { + throw new RuntimeException(e.getLocalizedMessage(), e); + } catch (AverageCostingZeroQtyException e) { + zeroQty = true; + try { + trx.rollback(savepoint); + savepoint = null; + } catch (SQLException e1) { + throw new RuntimeException(e1.getLocalizedMessage(), e1); + } + } finally { + if (savepoint != null) { + try { + trx.releaseSavepoint(savepoint); + } catch (SQLException e) {} + } + } + + 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(); + 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); @@ -951,5 +1047,5 @@ public class Doc_Invoice extends Doc int no = DB.executeUpdate(sql.toString(), getTrxName()); if (log.isLoggable(Level.FINE)) log.fine("Updated=" + no); } // updateProductPO - + } // Doc_Invoice diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java b/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java index f1bd5733ef..b08a42bb2c 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java @@ -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 landedCostMap = new LinkedHashMap(); + 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 diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java index f62e68820d..d2087d1931 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java @@ -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 landedCostMap = new LinkedHashMap(); + 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,86 +356,21 @@ public class Doc_MatchPO extends Doc } // Elaine 2008/6/20 - private String createMatchPOCostDetail(MAcctSchema as) + private String createMatchPOCostDetail(MAcctSchema as, BigDecimal poCost, Map 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(), getM_Product_ID(), mMatchPO.getM_AttributeSetInstance_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 ""; diff --git a/org.adempiere.base/src/org/compiere/acct/FactLine.java b/org.adempiere.base/src/org/compiere/acct/FactLine.java index f7a50dcba8..5303c18fad 100644 --- a/org.adempiere.base/src/org/compiere/acct/FactLine.java +++ b/org.adempiere.base/src/org/compiere/acct/FactLine.java @@ -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) ") diff --git a/org.adempiere.base/src/org/compiere/model/I_C_AcctSchema_Default.java b/org.adempiere.base/src/org/compiere/model/I_C_AcctSchema_Default.java index 4491d0e919..f5a8964ae2 100644 --- a/org.adempiere.base/src/org/compiere/model/I_C_AcctSchema_Default.java +++ b/org.adempiere.base/src/org/compiere/model/I_C_AcctSchema_Default.java @@ -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"; diff --git a/org.adempiere.base/src/org/compiere/model/I_C_LandedCostAllocation.java b/org.adempiere.base/src/org/compiere/model/I_C_LandedCostAllocation.java index 1da5d400d6..6b18c5072d 100644 --- a/org.adempiere.base/src/org/compiere/model/I_C_LandedCostAllocation.java +++ b/org.adempiere.base/src/org/compiere/model/I_C_LandedCostAllocation.java @@ -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"; diff --git a/org.adempiere.base/src/org/compiere/model/I_C_OrderLandedCost.java b/org.adempiere.base/src/org/compiere/model/I_C_OrderLandedCost.java new file mode 100644 index 0000000000..98bdf65f45 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/I_C_OrderLandedCost.java @@ -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(); +} diff --git a/org.adempiere.base/src/org/compiere/model/I_C_OrderLandedCostAllocation.java b/org.adempiere.base/src/org/compiere/model/I_C_OrderLandedCostAllocation.java new file mode 100644 index 0000000000..1619854ce9 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/I_C_OrderLandedCostAllocation.java @@ -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(); +} diff --git a/org.adempiere.base/src/org/compiere/model/I_M_Product_Acct.java b/org.adempiere.base/src/org/compiere/model/I_M_Product_Acct.java index cb7d9dcd39..eb31ac59a6 100644 --- a/org.adempiere.base/src/org/compiere/model/I_M_Product_Acct.java +++ b/org.adempiere.base/src/org/compiere/model/I_M_Product_Acct.java @@ -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"; diff --git a/org.adempiere.base/src/org/compiere/model/I_M_Product_Category_Acct.java b/org.adempiere.base/src/org/compiere/model/I_M_Product_Category_Acct.java index 2dd0b67ab9..b460cc536a 100644 --- a/org.adempiere.base/src/org/compiere/model/I_M_Product_Category_Acct.java +++ b/org.adempiere.base/src/org/compiere/model/I_M_Product_Category_Acct.java @@ -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"; diff --git a/org.adempiere.base/src/org/compiere/model/MCostDetail.java b/org.adempiere.base/src/org/compiere/model/MCostDetail.java index 673d58b1e7..65ea16a607 100644 --- a/org.adempiere.base/src/org/compiere/model/MCostDetail.java +++ b/org.adempiere.base/src/org/compiere/model/MCostDetail.java @@ -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 @@ -101,10 +92,20 @@ public class MCostDetail extends X_M_CostDetail } else { - // 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())); + 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); // @@ -170,10 +160,20 @@ public class MCostDetail extends X_M_CostDetail } else { - // 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())); + 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 @@ -238,10 +229,20 @@ public class MCostDetail extends X_M_CostDetail } else { - // 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())); + 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 @@ -304,10 +296,20 @@ public class MCostDetail extends X_M_CostDetail } else { - // 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())); + 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); // @@ -375,10 +367,20 @@ public class MCostDetail extends X_M_CostDetail } else { - // 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())); + 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 @@ -441,10 +434,20 @@ public class MCostDetail extends X_M_CostDetail } else { - // 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())); + 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); // @@ -507,15 +499,25 @@ public class MCostDetail extends X_M_CostDetail } else { - cd.setDeltaAmt(Amt.subtract(cd.getAmt())); - cd.setDeltaQty(Qty.subtract(cd.getQty())); + 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,12 +940,16 @@ 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()) { - qty = BigDecimal.ZERO; - costAdjustment = true; + MCostElement thisCostElement = MCostElement.get(getCtx(), getM_CostElement_ID()); + if (thisCostElement.getCostingMethod() == null && ce.getCostingMethod() != null) + { + qty = BigDecimal.ZERO; + costAdjustment = true; + } } int precision = as.getCostingPrecision(); @@ -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 diff --git a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java index b087747a1e..63f8606794 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java @@ -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 diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index aa6eee8924..de89c62f9f 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -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 diff --git a/org.adempiere.base/src/org/compiere/model/MOrderLandedCost.java b/org.adempiere.base/src/org/compiere/model/MOrderLandedCost.java new file mode 100644 index 0000000000..a14e3e4303 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/MOrderLandedCost.java @@ -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 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 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 +} diff --git a/org.adempiere.base/src/org/compiere/model/MOrderLandedCostAllocation.java b/org.adempiere.base/src/org/compiere/model/MOrderLandedCostAllocation.java new file mode 100644 index 0000000000..b9b9ac0774 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/MOrderLandedCostAllocation.java @@ -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 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 +} diff --git a/org.adempiere.base/src/org/compiere/model/MOrderLine.java b/org.adempiere.base/src/org/compiere/model/MOrderLine.java index 561125ab46..5de4b4a944 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrderLine.java +++ b/org.adempiere.base/src/org/compiere/model/MOrderLine.java @@ -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 diff --git a/org.adempiere.base/src/org/compiere/model/ProductCost.java b/org.adempiere.base/src/org/compiere/model/ProductCost.java index 0d4fd9cd90..8195cbbb34 100644 --- a/org.adempiere.base/src/org/compiere/model/ProductCost.java +++ b/org.adempiere.base/src/org/compiere/model/ProductCost.java @@ -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 */ - public static final int ACCTTYPE_P_AverageCostVariance = 23; + /** 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=? " diff --git a/org.adempiere.base/src/org/compiere/model/X_C_AcctSchema_Default.java b/org.adempiere.base/src/org/compiere/model/X_C_AcctSchema_Default.java index 0a6f5829de..299d6dd041 100644 --- a/org.adempiere.base/src/org/compiere/model/X_C_AcctSchema_Default.java +++ b/org.adempiere.base/src/org/compiere/model/X_C_AcctSchema_Default.java @@ -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) diff --git a/org.adempiere.base/src/org/compiere/model/X_C_LandedCostAllocation.java b/org.adempiere.base/src/org/compiere/model/X_C_LandedCostAllocation.java index 8f893dc7e1..2797acde8f 100644 --- a/org.adempiere.base/src/org/compiere/model/X_C_LandedCostAllocation.java +++ b/org.adempiere.base/src/org/compiere/model/X_C_LandedCostAllocation.java @@ -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) diff --git a/org.adempiere.base/src/org/compiere/model/X_C_OrderLandedCost.java b/org.adempiere.base/src/org/compiere/model/X_C_OrderLandedCost.java new file mode 100644 index 0000000000..95e08b378d --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/X_C_OrderLandedCost.java @@ -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; + } +} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_C_OrderLandedCostAllocation.java b/org.adempiere.base/src/org/compiere/model/X_C_OrderLandedCostAllocation.java new file mode 100644 index 0000000000..c87ba59ff6 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/X_C_OrderLandedCostAllocation.java @@ -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; + } +} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_M_Product_Acct.java b/org.adempiere.base/src/org/compiere/model/X_M_Product_Acct.java index 646639c9ee..9493c0ce75 100644 --- a/org.adempiere.base/src/org/compiere/model/X_M_Product_Acct.java +++ b/org.adempiere.base/src/org/compiere/model/X_M_Product_Acct.java @@ -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) diff --git a/org.adempiere.base/src/org/compiere/model/X_M_Product_Category_Acct.java b/org.adempiere.base/src/org/compiere/model/X_M_Product_Category_Acct.java index 4229ea9ad8..b73ad7072c 100644 --- a/org.adempiere.base/src/org/compiere/model/X_M_Product_Category_Acct.java +++ b/org.adempiere.base/src/org/compiere/model/X_M_Product_Category_Acct.java @@ -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) diff --git a/org.adempiere.server-feature/data/import/AccountingUS.csv b/org.adempiere.server-feature/data/import/AccountingUS.csv index 6c45d08307..557c8bf036 100644 --- a/org.adempiere.server-feature/data/import/AccountingUS.csv +++ b/org.adempiere.server-feature/data/import/AccountingUS.csv @@ -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,,,,,,,,,, diff --git a/org.adempiere.server-feature/data/import/AccountingUS.xls b/org.adempiere.server-feature/data/import/AccountingUS.xls index 9e028bcd6c63052763b2c483c464582b7b7009d2..1eee075bec9d7e8bbd4d1b875a6e141e2ec3b854 100644 GIT binary patch delta 15261 zcmbVTd3@B>wZC_=kc1=yStcQ2k`UGeBoGiH0+R_wfu;}>V1`9WLV|@tkbq%l(5}z= zta2+qwf5Q4&A!@JKv8K+1%W_-O5+A73RogU9>Nq5+49ag_s*TUGkpAm@NtrR?)Plp zbMEq+8Q1+gdfn;hr-me1O#O6Y>}Q+CSn*p*5|(n&7GJ;R<*tb~o+(b)GqxN`%8cb1 z;$Myoc-_%Gqelk&4dX12vGD=@xAKm&G}c25O+!rgRD7+azuolr)AaXZ`g;fc{VV$W z0{y)yC4*<7Wu6VMPT@#R;XTE?^djyguTIe`J+E7svmA2fBxg=?<`n46DbSfypfjgH zXHJ36oC2LW1vnFj9GT*k^h};dHZnzzj3V9(T<3{-86Mtq%Z`laqOzAx#_STAd(NCi zk2Efw*Z9!X>L*wQHX^d6WHr6-P=Z#ymWNF^G1r4=L zpfQ>q&jg;7iM+Xsn(}T1>%my%>^GP zo?%4}jE1o-y%~EdiLt_B#=7)m?4?r1<|Ht7dJ<#5&J{ z^GCPL_q5c`jAvOOg&%Hbakg%3H~g6jDEwK+y(HTMe|J~10ImgO@nN#PEG85uo_Nz) z5N>P#Eo>b?nP_`+PI|X6i)}cwW#YEK+I%in^=uTo!4lXmVBF3sA#6Fa!RUTHiejbA zp+_;Sfu(~HiHwE0EIsN1dR2g2YeSoH%*8rj4o66Whn-W%-QdsbW7W#&ZWhJ7*W;JYz3TQV3 zR|^(VHxYCl-B=x)1OHM;6-(k`O+Od?x7YhHjy-^136O3yjn#26+b<+xEku}C#oxk^ zu<3dfN>~fz5hSbyvI!E_!jP~TD!vvX3@PF>Y_SYWzk(>(%P^^#%KTnPyoSwEN_#1( zWKcq~_Cm0A>;W~m52PMloqfnTdr(yTBRhMBB6puAcRTCJ_CWw1@#NfWUn^<)mDN_# zoUQz~8pUcgiq)#^VKG|K9{I;&wMG=HmGTOD!Mtj~%l1NoW3@sHgnjN}qy8u>u%9YW zD=OY{-BHU%s8IJ40d#xr!)?b#vJj+Tke6du8FV%gs)flgM@!v;SUnNK{$3y zwzs}4z5bJAbH&mfZYTQ0G~XdDze2o2h=)WQAkYgU4iO^jPtwLALVQOI+3C&=*!UMA z$`s;XgqX*fcz)-Yf#X@gP8*?$|19ma5o$if&Y@k}pa)Au?Av32jXJ<#JG4=D-&NVY zOWGZOk=pN)_5xA&b}*Co2$AxNM7&3ch2kwh1R{8!5Tg|0eL^&foLxa19}uEWAwD3) zBC#3}0UI9@V&x|3DysHOwm<)>)cu%bkBC?H1amk>)^{qzF+wzp;rVug6AHOSxz zz`NM|*Cksg2(ePc?sw&mr`3$>1{rd(^$K&6Fsnq0-3#{s82M-zdi1p$yJ@?zo3*%$aq*b=@j~B(bnq=P-hYz~o z3eom=DLq5d?<>~M7_6Pqtew&4ABJ^?PCN`5N7&IGc2x!00rtG?2g+WDap-geXz~%I z9R^Pw22ULkJarIHK{v?L4;4=x#M6U11mp=rK$S;g3bLkyQuco&`!BHzWVUyt>>SA+7iovw_VtIP>`RjUMAU<gH*Dv;`AMAPAlgggo;N5TX?l*Y% z8@&4?c=r?UK{v?zPqiC7?4Q!3ZfXvB_Zz(bNAm7JBD4PwW&ia0Hn;t;kEG}#iPnqC zHl!)#n3P^3sZbs+88lteG+i=ix1WE`WrL>6CQX+Onl2kO zU5=pXGSP(3719mT6m)|$J)`H4CY(c>E*ms`C23lJMrQvNWxqkZ@UGjQ|AmxYA($Un5JR;=R7O=)aWstAu|};jd~uhJMxH@+xtOX(5+*pmjg#!xqT>iQQdPQ?+DQ5vP{&1No!DG$AU*f`!ku%_5ZNVta~rHG6I zdtUZiJqm54D6XEgWg|uL&`0ekFdBS%i{jyr+EE;zN`r2&k&P_nYM8=Zr58?xmjZ(5M zB>P{{?_;;UFiYa%NcKn346-UEiznI3Vh_kxDp>-_{v;g7-1d!1)|F&`7ITle3tE*d zkz{{Sd?p(8NyPeyJ;!j1^ecQ4;a^esB#lR6l7MjeZUB;&L{&sWafH7;EJf)hgB35^ zq(`AuOb%3$$WF#0F3?+KvQfq4h$<#i6@zZDikra=KCvf5&zq0nc9?-Pb%3PSPN{7X z$3Fqe3Z$$X$zByhK6TrR2TECYlD#I@ed;dQIY`PxWAN>11G= zQc2elp-Q?@sB|h6a)yP%9S7c$QhE-s;$?r;qtHS*j6ylEP{FgzVHC;{Q78u$D(D6a zg>JA=j)+2Kzzp2tN6OSPD7C+-pfYr7+$LT-G1y*qmxN^!?C-*V!fkIGC1pKGwq2B+ z#7(Mhw3KF%^dHJ#R*1n^c=I!`No5(VWf5zb0J4UAFzhbMLN?f&&fe0aP}Z^otjSF( z8)?(+oo%p|9l=^Qu@-cLtf3oZEjxlWJOp4TzE39Elakz_g6he;2bu_bv?ulG#?SiS zeR8~nI|;s1!JX8AZ|hM&7rV)+8juP9XLOsYmKJiz!Y-wgW3ZZ|SN1?3dnyls;tmYc5=0>oZORNUnAgg=84YHbRu!`@0=fO<)5!_45 z+`+RoAB3UjC@S~Xz#y)Vi4)UKmG=vGP+(%{j4$M3$GlYW-YHka1*FJ?i{kdkcR_}S zVK%f!zME1KhG}nKcvpC6E)zqALyq9gm?j$`j~byxJn=a$y2rdy+KZ%n0g1)!Wwb{x z-5$M+_UJ|JftAAcK!QE=iWc&zJ@zSk`Cu>j9(=yp9{EOlZU@BkXWaIk%cQIy z$qtGRkQJ_wvi>Cdrx?{i7egf-K+<ZND;b`A>ftbUUe}n;CL~_IlLGa7#Bm-Z)Uc( zABY`aI3B>$yiJ8#Xrx{Up{}7y76!IeH45CVupbIJe$w);ilPuQXeJ`I!^abaqV%dW zeIU%i0rw+Wf`LT#dm{gAx!wO`DH}wx_eC?v9(!EM?jYF*qV?=JSgBR(rF1Y!KUDD! z*70JNgDKtycqGKQ1{>uXtm8tia8L38LUwc!*z~f)dK6l&A}p6re`Ho;At47z}lG#q(C znq*rKH+ULu@H9Mvr{Tm?&<*m0Zjh(p5j@=qGjLP>txWPxO7asG)SX;>`eliI z|G8DlMv?5_VkgMjUYD}FNp?!4_}%upH>GSe$=XGo-(BF}CS_wt_PNS_jKSs@WK-<) z<5jG9hs2L1{Aq904;!WQTwuk^&gfAn=dJ+fv=6wD@>%*? z>oPcZMR4vS&Vz1{b995f=rVc{?@*;M(_O?}e6efDRYYvQIIPh8QbGmbQq`9i0$)`4 zHpr4eChV8`In1|ODg#sBx|H852DVpo8b90*xy^|uFAeP%{*?z0U_xS|Tbh@P6RT43 z`5^rLo*7CeQZLsSZ|WfPm?Z4LyJY=JseT+Julevunq8KJVbiI9=unUr3`wF%6g4;?$w1wqh2a377@$ljacViDss>b78$)r zG%_6g22$Sy`ihr}T|FbSoK9J0tDvS+m3vz7m{8t3ze7T15X7k z^JZsfC;qoV{rxQd-cG)(0X>XjmJ!nf6qEm~%=-cI*VlR_n!_iv z=cMpK6875=!(9z6Qw6l#~nXP+ewhjbc&(^(y_nR7U9dgs4TSP6$x?3N| z@czTXFBtVW6?R!^Filt^VtKADi(8&pzBJ;^qQ)?AM=US8lfg{^Z{F|&%LKz}g5bk1 zMN7g|Cw1XNBLZ9oAiKJU1&l2ZQ``)S5rM4^1KHwuxz9t#6PB+AnD(;%s_Zqih#a7T z+hdKfJ=W+&gu7!6Eh2Mwtf7U22cNWz3kNOZ!l?<}9eva*SPr-p*yK}hEtPzL3Z$00 zu|SWo8!;?2Tx)b=t!@H2hqtpr(8HFfrIx^enNDIXcQCUWba|)EmLo6F=}( zVoI@|_EEHlNNhw8YghYT1Nee{Z?JOKV3e%E*!LQA$)p+l@DAC)f;2?zdks{+pc^b7 zdXeaeeQz!?Fe+X$Fqar8QbEn7@(r;rCh&4+oq{|>kf93l5J7URX@+3SKCd$meOaAV%PA78sC@V<{7m#q2a=XB2hz01@ z8lS}R;j+pu6&8|0U>z>h3K+{m9T|FGX!H&4J03O(UJ=;{R=n(P<+jmijYeZNH=<4X zNfR#TMlk9Ldt0-S`XOi<`vFa3KQx9eXCh@0k_iu^a4aI~PmgBP6`n+77~kswGm`Ov3wAxXrp7G2CWq-%;IFA@E>=PZd{7 z#bu;8UMVi4LQK%3&_XOjGxX*LX1>g5@nuARfV*Xo^Sx}Mwt^{t3r1@v0?l{^dY~O8 z&C9{PmsKd}a-#X$Fv7T(YnqpXGx^wu-*8`!G~+kii&ju7W8sVQ7}5$#WstTi;&>Lf6wwX}&=Tjx`Gwy#~O`$&C?Qui6^K11C{>Qe!U9QcS4)?0j zB@PiNbFp*E&pPrmP5D_T-*LwRVr1*IBdLf_QE2)seQs_$f8MH0;~D(0^_?_6vd11c zmNzCQoR7ncTr|AEmv`pyuIImR_3F(FvO7E9V&5a*|A2G58-19}*bb0ztJJ~!@(-;V z2k&oQQ{SBUCZ`%`mMQlJ+4ErT~wa;eV%;p=y zyyDxA_;ah?>2lj%tx6{_J1r`e#Y<+Joc!f5&)=1fZ|OPi_B|iX0ncB;?te;pzMjK7 z!#r>Q2G8-g<@u>RJ~U=F>@BK=kK}PH%;~gmaGG$tP7AET@ELlH)7F*Ul<7{&=P!hL zp7{-)p*?PMV}g$WcEf?T2DY{9)~4S4wJ@&_e1q4-+x6PRO6$ur`FiV)zWm8}y&+k< z`tmPqTbZ?~A1~^)l{|B{75*{ige{TnQlee-m&N<@PHRYi{?n}kcyx41#iC_-)$#l0b~i{Z)@$Q z+{$O`Z~Keg{=eD^SZQfX3yP2+0&&M85KWLkS)!nVfu8f;JKxM@{Cyti)5+X(&pq#Z z-gCbDE%UkVljwCHM?XFwZlf^&5`<8jZ+1GW+d9wO+R(8^ZhgLUtVgD+bfMWl%zzNrRFCW$!x+b>X!ZgpydE98)(@;%T|n*tr#s^F9{=<|EiFZKZkB@n_MU5x~+RE_f)A#QxfEE zHSy^r`I_nyNJ`!#+KDdYg@4j3I(QPqUNvz_lB~mLJ^QMZ?P)SW6>XoTCOw_du7R8r zw*GeeUp=*z;tUPiL?`ho)h-|=5TqVO(I|yRJ1`e5rij@DrRQR3E}7P?_3*k5qEe*L zXorZWQAcs7m?rKLcauPRK2A&zLx~qN#6*gVxmw{BRRq9`V`*`Mm?>t_{}M61o9sSO z{d5#ycN0OcC^rOm3lEJd+)7Yntydz-9>GZk4Ei2Qe1@1}V(y_JRbXAd@uFW6fxCEzBf?>HQyn+i@mJ5+I&w&Z5;x(8n8M9oMr;nSpn-1 zFj&JnHy+oa4mD(nxQ2BRHLOFrArwycE<)K+3wO>pyl(Xr$R|epUe~Q2b-UY;swYyq zQmkk_D#dlFCqlYPOsF1ZVL&}%grO$MdMG-b;;r?hb`tvlHq(IZ1K14p!asfe%0#hQ zvJXqDu%wfC9V;F)D_+NnnX21Peuk)7kct;Y5SY_ruzw2D!9 z)d8$Ze?hN00FOD!zbh2?AUsNq$3b|^RlnTjF9^ms1drlB=op9KF^_n&Scj@o<*Jl}*@;)~krO?WL(hh7O~@)kTs z7>~E$ajzPO@e%;X(-Jh)k-yaSJg>Qq>acj2+gc)SabMQZHs zP>lEBv0;mj@g6)DtKX7Guu|{CW4rNqA0GFscCU^1HX7Su*p{eSWc&F`I?@NQRjZw3 z+huJ3f^DhF-V?$2Y-1 zO4DtegHLQXD;lxlLG|W7AN3lq;9mO(K8?obBlxURzSqZlFa23_`53m<>Y3O5wLw*z zXjP@SNS}<_L>>XLhEVk=e4A{tcC{vJS8K9%wWf$&tqHqY2qnIjwl#)f;!W7aOI-?l zW?D;ge41#YGj8ZC)r=IkY}e^DBb{19w%OY4n%&*5+1l-zvD;k~85;To0+#+w2Rwm* z>r}fp{N9GYYuhKVJ)|bT;iEJ7B}4KgbXsqqPg=YGNlT}bmQE)volZvRbP_s+PmVfpt1*>C}R>%IkFsElAGPQI|tiiYTzN({fbHYJXr(c2PT#CmhR^*-OpRPpSN^BAEEns=pI60-G3NF(YpUA zIHUtpPqOakE!|t8Q|tRWg;u2SW3#T+(!JHyz17ma6}mGK*8Nkh`}z-bz)unICu&WD z-OUuj1z4%L=(q*LdGqdh;FeO~nTz0j*Y-xEJS~3yV z@++-n^;I44D+K(xy8JfxS0@v=4Vpadj>0u*vovY5G-2CRAQZfM&f!59%pYK+^;(t`?VZXOLS=%IR&#HNcxlZvW zSr1tQVv{=xuaifH-)VYe@UDjw_DH_d4Bn-9O;a7%il#CLgyO$`*_n90oiin2pUZRMo4@4L` z8u7d>CSWuI{#tGQz}Lkm61!=bcCh|NMg7a~9bs%Su>Dq5kgYIX`?ZJdcj`H^l^a_J z*#1|2O11}$ts`vzr$!&~dp8+dC)j?k6xr&Htut)TtB;QOvs;ZV7Pc2m%CW(e)$Jeh z4wPu@apV;ce{e_PRgAN$7-v;6&Z=TuL>1#u#SjWt@sEVUccyW=isAQ~TyByvU&|8@ z>Mt5n@j>d?Y2w{##aq>iN3|G`tK~(!O$9oh7x6ZmcwVXI9v$W_zClkWU~-Fk;i%uc ztFN|ofo-d5JL=Ca@2_o%u)So0BnC;TdB^%>HWq20B>4Qv_#{bwxbd=j=2&Wsew3k} zKbG&^FjzZxh4VIb{#dF?Ii5vD;RiL`hsiV(5Px<@;YCTdijr&Ug>ZhFBS2&n|P^G zTYluwl3s;Opx>JCFH!_q3l)hff%Dg#Du%;U!Tr#lSpX52g75uP6Fsko2(6f{)m0GSA|)2zs}2xamLwfJM+7P5>-7WoIn zE_W2JYL=yHmZfTzrD|4$s##Dqgu<%6LMW_i)--JH;oCwsP0_jO4xL0cl6cjS%C?fo zc2&)`RLzE}1gI7_W#V+0i!)#z&VW7fy%&F~(@pwxS%8^B*d{cO!kQwCUNWP>STzK; zz9-V)F$}ihu&q8ZiERZwVjBKXm+P8?jMfKqMmfl6x9a!_w{)(_tOvw@%^ih{-@_8W zhb4XwOZ*-Y;`e~~Aruy$QCR#QkuA-RbR|7kQ_Tg{AgNqeeD1kiOY&Su&Z{}$Jo;NH zdebL+<{`B`?kJR6El-ADHRM^j8)NEAY0i5P|X=j-y{VlJ%mabd-i zd|{PuU04;6wMH~NqSGos3U3&)1vuj!a7V$7iG?g6>TA#h1;H)KjQFCf7he!^hZIPD zvVV|5Fs}m2sRqjIpi9OA6?ZvvK4;()Gry+^6oSAZ16kXGbL2v+euZvi z#<>A8TOZXiZ$Qij_4Mg6-t~`ZTVL4TRAP5#i2C(M{X!^QKStpe?;m;i79pkTCpFa~P<_XcDspAw$`rXRUSvsB zM1*`uizOO>cpgW`8-RH4ns@`Gdi2aN?}n%J&}tC03Zbx8jKW$CiqvW_P0{7&uQk=dp!$I!HQ3T> zu&dQzORK@qiUC=xA&9r>H#*)B#QT?tH$e;A zQex>+V(C(1=~5D*O9^xdp|CED!lX;IE+fo=Sb{y^C{6OARATJ`!^lckhA-(9h9QMx zhU_p)uVJoU!z{gqK`$o4(8CeWTl%sNI2-|wtF!0nq1`rZ8v$FR^0m?x;a{}vM%X@5 zKOtM|c5S-}wvW}(R)2Q!PHnpxwkAXH<{&{e_EWy*8DZ=r$txh5-BGyaBQ4EGTAGiv zG#?qE`ABFULSfArg?n*iWH0hn16@hJs;T=x{e&Uq!~Xh-I|}ZvyuJCXUDfBRt><`C zJxS|WZ6CB}LTf$QJmh=ok*4fEl)Z%}`8ViMxS$Dq_Bbwb#`2|+ioKBTO{aMw*2w_8 z#;GM2lH~3DsiwKJg5q+F3C@!CGD$skAw_L!PW1ARycEA8>ZPUxm2fc{AOZcL zVv7DV6$EBnoTNTJk#N%}TI&;yyR|l>pv@_=agL*cWyKxID7WuM86{NC=Uu1y5ukdH z4&X3)1gZd`m707YH=%dxs?XFef4>| zcSF5iIvPvQsa{|By}7Sz+qYmlua=Q*%YJPe16!-wO}5el+I9Bu>#ZMVYq znVRz@?=T|`r82Sx#07Wcq0vQm6yEz~R_~V)<MkZXC#6HFU;-oKQ`d zONzM}$Dt?42&8c?62}@xnyiKWcAym>R(F4u?`ae2(XRrYT_31M8l^}T+ZOPYA5nAL zF!y*{el4>eZ^asqSR8c%C9dCUm;lW?5jHcK0LeSkh`lDdUK8OJYrH1HE6(sOCtj7J z)Z|ua|B;-D0iD<2R%Y9M|0Tkk(2{A6q@^iLZctbBl>~& z3c3aPNK0N@0nNRJa|JX{a7Ww_OpCLwu-c%)YJ&>YrVFiOJu8T$54q|Q?}aID6n?&# zXgnv?f=zCdW-|$7k_`ML9N`SlGEV|L6Pe^fbNERX*d*keXuu|6^T`&Tbec2 zWMI*g-u+koHw3SgCu2dfVRr`>lzyTY+<^rtPY#zi)>hI?rPvs&m8qnefJim8E3INy zT1R@NTTCWYiDGi$_|UD4IMORo*boXAmQnC>No7Q31E729q^27H-84fgfWmfjN8yDH zScMH(>IR@LQ((eVfRNjgp&_OKBHaX?0*DO9k#bDW+gh~CRJe3EE>q!>X+|5PW$!** z(5dL2EHX35R11>d0irjZ9AC7|+USvG$ycsky~_W8lB&vo9sav*V4-|YI(J3OiJsQe z&Wq79<4P(5srk&)SpZ7M- zU^AjJ$`h6ugTlnisbcB&+l~MeSvg zQ{7%B%4#fJ%8}&*i2r!?S(3*AOUwI}UDi`;Ff zik#^7H(Haa0-1aRUxi(W;kl8j+(xQ$p*eh&1vV4$THEP(GZC-A+1!yDX?=TboCRZ{ zBRkP{G7Dw>jv+S-n^2)iV>ZRA6wPLFx+(vqup7%@P~+Vkl=`pI+r=frLQ412i5E6j>4-q$Ew~OBVmay(Hv;V z6qxZ`K+H4{a{ zM!2K!c34Cb)w-{vE^=k!BW)4YYn_SCmlI5ex6?(SMprnP%UcX+Pgf1S7|=Hwu*HDB z$vGY`hsaeoq2?B#56_X#onG=>=RDz+nRu^t2@%v+fJ*@DGyY3( zZ8wTW+^W^Yp%M+tb*M%i{Km7|tpg`jjXG$r;59$jpgOV!wPfT&l8*zufQ!Ikxd_$a zMF5GV5Tf{go!(LiQEEsm4fYK7u%&KeE_D^>G?t<<8IMQF41UZ*fQA<*xw|?n6$n#v)VWlF@T<;udkM8-=AP zqY)EbPCP5cBEFAh*X0Bs5Mzz&a>#!hjadHWuKddhOy6?xTf@s)e!Mlj0!fdgca%BS z3Z(LF6Ke%j48~gFw#EvJ_zDo`BZA4TM7&ZHZzbZ5Gx1is@fd3*M{$lO%FN7LjQfLd z5BBJT+TH1vB>Rl6#4C5aZWZ#q-NamF<-5wwca@dzDmUNN;P;^cTn)hQm{_YVeygo4 zS0l@{Cd)O5(rBWrL6q?(${H)m8aE1aUo#S$@&s~avDR2YIk-*AfJS7p4yb8dz+Fj=O`GG}bEERoxthmvJd zyV0`qxfRaY6j_iwfga&JEcx>vbdpZM?}fsdm?3*Pv$ABaQoEF>Z8YTMNb{cPr?R2gK{q;oC2fgZl9YE_+3Fs;32dVP@Yk)M|*8@de zHxS*--bT;*htdny{X9-Wu1s;7(&UV5FtfiQx#;W0bmGz}x%N(4y4-OM5WhUj|GrMe zcGnN|iwyblH3$_N;A;_Lt{u$%JEB|l})*at~ zMX!8a&!Lnj`^xUl<9TxHH5hk(0|vd;bv+ooFLdrj%3XF+ddWXs19aCn0L5M}P*>-X z-ZD)-;rybv{BcKj19FD+k*7Q*(#g%2MLkMrU!~I_{rte+GHEx$qct{-lk||Sy;Gep zuf9w_^hGDms;a(k@zNZTMJs4SrT>o0N$D>OJBV?se*L>=_Dl6p^ssH~`peIx{He2S QfPC1KlfCWI02veYA0m159RL6T