IDEMPIERE-281 Extend Import Inventory to support also internal use
This commit is contained in:
parent
916b0dc1ec
commit
f55f7e0e66
|
@ -0,0 +1,252 @@
|
|||
-- May 28, 2012 9:45:40 PM COT
|
||||
-- IDEMPIERE-281 Extend Import Inventory to support also internal use
|
||||
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200187,572,'D',1.000000000000,'N','N','N',0,'N',60,'Y',10,'N','N',2098,'N','Y','N','Y','N','DocTypeName','Name of the Document Type','Document Type Name','Y',100,TO_DATE('2012-05-28 21:45:38','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-05-28 21:45:38','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:45:40 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200187 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:45:45 PM COT
|
||||
ALTER TABLE I_Inventory ADD DocTypeName NVARCHAR2(60) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:50:24 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200188,572,'D',1.000000000000,'N','N','N',0,'The Document Type determines document sequence and processing rules','N',22,'N',19,'N',209,'N',196,'N','Y','N','Y','N','C_DocType_ID','Document type or rules','Document Type','Y',100,TO_DATE('2012-05-28 21:50:24','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-05-28 21:50:24','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:50:24 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200188 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:50:27 PM COT
|
||||
ALTER TABLE I_Inventory ADD C_DocType_ID NUMBER(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:52:23 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200189,572,'D',1.000000000000,'N','N','N',0,'Quantity of product inventory used internally (positive if taken out - negative if returned)','N',22,'N',29,'N','N',2654,'N','Y','N','Y','N','QtyInternalUse','Internal Use Quantity removed from Inventory','Internal Use Qty','Y',100,TO_DATE('2012-05-28 21:52:22','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-05-28 21:52:22','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:52:23 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200189 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:52:25 PM COT
|
||||
ALTER TABLE I_Inventory ADD QtyInternalUse NUMBER DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:56:11 PM COT
|
||||
INSERT INTO AD_Field (SortNo,IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',20,'Y','N','N',200187,'N',250,'Y',481,200135,'N','D','Name of the Document Type','Document Type Name',100,0,'Y',TO_DATE('2012-05-28 21:56:09','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-05-28 21:56:09','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:56:11 PM COT
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200135 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:56:40 PM COT
|
||||
INSERT INTO AD_Field (SortNo,IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',14,'Y','Y','N',200188,'N',260,'Y',481,200136,'N','The Document Type determines document sequence and processing rules','D','Document type or rules','Document Type',100,0,'Y',TO_DATE('2012-05-28 21:56:40','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-05-28 21:56:40','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:56:40 PM COT
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200136 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:58:41 PM COT
|
||||
INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,AD_FieldGroup_ID,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',26,'Y','N','N',200189,'N',270,'Y',481,200137,'N','Quantity of product inventory used internally (positive if taken out - negative if returned)',102,'D','Internal Use Quantity removed from Inventory','Internal Use Qty',100,0,'Y',TO_DATE('2012-05-28 21:58:39','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-05-28 21:58:39','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:58:41 PM COT
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200137 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200135
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200136
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=8192
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=6701
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=6709
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=6702
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=6707
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=7064
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=6699
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=6704
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=6708
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=6710
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=6698
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=6711
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=6705
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=6703
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=200137
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=6706
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=58565
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=6697
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:56:49 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200190,572,'D',0,'N','N','N',0,'The Charge indicates a type of Charge (Handling, Shipping, Restocking)','N',10,'N',19,'N','N',968,'N','Y','N','Y','N','C_Charge_ID','Additional document charges','Charge','Y',100,TO_DATE('2012-05-28 22:56:48','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-05-28 22:56:48','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:56:49 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200190 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:56:52 PM COT
|
||||
ALTER TABLE I_Inventory ADD C_Charge_ID NUMBER(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:57:41 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200191,572,'D',0,'N','N','N',0,'N',60,'Y',10,'N','N',2096,'N','Y','N','Y','N','ChargeName','Name of the Charge','Charge Name','Y',100,TO_DATE('2012-05-28 22:57:41','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-05-28 22:57:41','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:57:41 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200191 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:57:44 PM COT
|
||||
ALTER TABLE I_Inventory ADD ChargeName NVARCHAR2(60) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:58:52 PM COT
|
||||
INSERT INTO AD_Field (SortNo,IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',20,'Y','N','N',200191,'N',280,'Y',481,200138,'N','D','Name of the Charge','Charge Name',100,0,'Y',TO_DATE('2012-05-28 22:58:51','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-05-28 22:58:51','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:58:52 PM COT
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200138 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:05 PM COT
|
||||
INSERT INTO AD_Field (SortNo,IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',14,'Y','Y','N',200190,'N',290,'Y',481,200139,'N','The Charge indicates a type of Charge (Handling, Shipping, Restocking)','D','Additional document charges','Charge',100,0,'Y',TO_DATE('2012-05-28 22:59:04','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-05-28 22:59:04','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:05 PM COT
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200139 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=200138
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=200139
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=6706
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=58565
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=6697
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:41:18 PM COT
|
||||
INSERT INTO AD_ImpFormat (Processing,AD_ImpFormat_ID,AD_Table_ID,FormatType,Description,Name,Updated,Created,CreatedBy,AD_Client_ID,UpdatedBy,IsActive,AD_Org_ID) VALUES ('N',200000,572,'C','Example Inventory for Garden World','Example Inventory',TO_DATE('2012-05-28 22:41:17','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-05-28 22:41:17','YYYY-MM-DD HH24:MI:SS'),100,11,100,'Y',0)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:49:35 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (10,0,'S',200000,1,200187,'.','N',200000,'Document Type Name ',TO_DATE('2012-05-28 22:49:34','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-05-28 22:49:34','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:51:35 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (20,0,'S',200001,2,8826,'.','N',200000,'Line Description',TO_DATE('2012-05-28 22:51:34','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-05-28 22:51:34','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:51:51 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (30,0,'S',200002,3,8824,'.','N',200000,'Product Value',TO_DATE('2012-05-28 22:51:50','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-05-28 22:51:50','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:52:35 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (40,0,'S',200003,4,8989,'.','N',200000,'Locator Value',TO_DATE('2012-05-28 22:52:35','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-05-28 22:52:35','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:02:56 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (50,0,'S',200004,5,200191,'.','N',200000,'Charge Name',TO_DATE('2012-05-28 23:02:55','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-05-28 23:02:55','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:03:15 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (60,0,'N',200005,0,8825,'.','N',200000,'Qty Book',TO_DATE('2012-05-28 23:03:15','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-05-28 23:03:15','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:03:19 PM COT
|
||||
UPDATE AD_ImpFormat_Row SET StartNo=6,Updated=TO_DATE('2012-05-28 23:03:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ImpFormat_Row_ID=200005
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:03:35 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (70,0,'N',200006,7,8823,'.','N',200000,'Qty Count',TO_DATE('2012-05-28 23:03:35','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-05-28 23:03:35','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:03:48 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (80,0,'N',200007,8,200189,'.','N',200000,'Qty Internal Use',TO_DATE('2012-05-28 23:03:47','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-05-28 23:03:47','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:39:52 PM COT
|
||||
-- IDEMPIERE-281 Extend Import Inventory to support also internal use
|
||||
UPDATE AD_Process_Para SET DefaultValue='@C_AcctSchema_ID@',Updated=TO_DATE('2012-05-28 23:39:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53375
|
||||
;
|
||||
|
||||
UPDATE AD_System
|
||||
SET LastMigrationScriptApplied='844-IDEMPIERE-281.sql'
|
||||
WHERE LastMigrationScriptApplied<'844-IDEMPIERE-281.sql'
|
||||
OR LastMigrationScriptApplied IS NULL
|
||||
;
|
||||
|
|
@ -0,0 +1,252 @@
|
|||
-- May 28, 2012 9:45:40 PM COT
|
||||
-- IDEMPIERE-281 Extend Import Inventory to support also internal use
|
||||
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200187,572,'D',1.000000000000,'N','N','N',0,'N',60,'Y',10,'N','N',2098,'N','Y','N','Y','N','DocTypeName','Name of the Document Type','Document Type Name','Y',100,TO_TIMESTAMP('2012-05-28 21:45:38','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-05-28 21:45:38','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:45:40 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200187 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:45:45 PM COT
|
||||
ALTER TABLE I_Inventory ADD COLUMN DocTypeName VARCHAR(60) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:50:24 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200188,572,'D',1.000000000000,'N','N','N',0,'The Document Type determines document sequence and processing rules','N',22,'N',19,'N',209,'N',196,'N','Y','N','Y','N','C_DocType_ID','Document type or rules','Document Type','Y',100,TO_TIMESTAMP('2012-05-28 21:50:24','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-05-28 21:50:24','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:50:24 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200188 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:50:27 PM COT
|
||||
ALTER TABLE I_Inventory ADD COLUMN C_DocType_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:52:23 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200189,572,'D',1.000000000000,'N','N','N',0,'Quantity of product inventory used internally (positive if taken out - negative if returned)','N',22,'N',29,'N','N',2654,'N','Y','N','Y','N','QtyInternalUse','Internal Use Quantity removed from Inventory','Internal Use Qty','Y',100,TO_TIMESTAMP('2012-05-28 21:52:22','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-05-28 21:52:22','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:52:23 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200189 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:52:25 PM COT
|
||||
ALTER TABLE I_Inventory ADD COLUMN QtyInternalUse NUMERIC DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:56:11 PM COT
|
||||
INSERT INTO AD_Field (SortNo,IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',20,'Y','N','N',200187,'N',250,'Y',481,200135,'N','D','Name of the Document Type','Document Type Name',100,0,'Y',TO_TIMESTAMP('2012-05-28 21:56:09','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-05-28 21:56:09','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:56:11 PM COT
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200135 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:56:40 PM COT
|
||||
INSERT INTO AD_Field (SortNo,IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',14,'Y','Y','N',200188,'N',260,'Y',481,200136,'N','The Document Type determines document sequence and processing rules','D','Document type or rules','Document Type',100,0,'Y',TO_TIMESTAMP('2012-05-28 21:56:40','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-05-28 21:56:40','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:56:40 PM COT
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200136 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:58:41 PM COT
|
||||
INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,AD_FieldGroup_ID,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',26,'Y','N','N',200189,'N',270,'Y',481,200137,'N','Quantity of product inventory used internally (positive if taken out - negative if returned)',102,'D','Internal Use Quantity removed from Inventory','Internal Use Qty',100,0,'Y',TO_TIMESTAMP('2012-05-28 21:58:39','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-05-28 21:58:39','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:58:41 PM COT
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200137 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200135
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200136
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=8192
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=6701
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=6709
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=6702
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=6707
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=7064
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=6699
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=6704
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=6708
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=6710
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=6698
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=6711
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=6705
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=6703
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=200137
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=6706
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=58565
|
||||
;
|
||||
|
||||
-- May 28, 2012 9:59:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=6697
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:56:49 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200190,572,'D',0,'N','N','N',0,'The Charge indicates a type of Charge (Handling, Shipping, Restocking)','N',10,'N',19,'N','N',968,'N','Y','N','Y','N','C_Charge_ID','Additional document charges','Charge','Y',100,TO_TIMESTAMP('2012-05-28 22:56:48','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-05-28 22:56:48','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:56:49 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200190 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:56:52 PM COT
|
||||
ALTER TABLE I_Inventory ADD COLUMN C_Charge_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:57:41 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200191,572,'D',0,'N','N','N',0,'N',60,'Y',10,'N','N',2096,'N','Y','N','Y','N','ChargeName','Name of the Charge','Charge Name','Y',100,TO_TIMESTAMP('2012-05-28 22:57:41','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-05-28 22:57:41','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:57:41 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200191 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:57:44 PM COT
|
||||
ALTER TABLE I_Inventory ADD COLUMN ChargeName VARCHAR(60) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:58:52 PM COT
|
||||
INSERT INTO AD_Field (SortNo,IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',20,'Y','N','N',200191,'N',280,'Y',481,200138,'N','D','Name of the Charge','Charge Name',100,0,'Y',TO_TIMESTAMP('2012-05-28 22:58:51','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-05-28 22:58:51','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:58:52 PM COT
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200138 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:05 PM COT
|
||||
INSERT INTO AD_Field (SortNo,IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',14,'Y','Y','N',200190,'N',290,'Y',481,200139,'N','The Charge indicates a type of Charge (Handling, Shipping, Restocking)','D','Additional document charges','Charge',100,0,'Y',TO_TIMESTAMP('2012-05-28 22:59:04','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-05-28 22:59:04','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:05 PM COT
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200139 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)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=200138
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=200139
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=6706
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=58565
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=6697
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:41:18 PM COT
|
||||
INSERT INTO AD_ImpFormat (Processing,AD_ImpFormat_ID,AD_Table_ID,FormatType,Description,Name,Updated,Created,CreatedBy,AD_Client_ID,UpdatedBy,IsActive,AD_Org_ID) VALUES ('N',200000,572,'C','Example Inventory for Garden World','Example Inventory',TO_TIMESTAMP('2012-05-28 22:41:17','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-05-28 22:41:17','YYYY-MM-DD HH24:MI:SS'),100,11,100,'Y',0)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:49:35 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (10,0,'S',200000,1,200187,'.','N',200000,'Document Type Name ',TO_TIMESTAMP('2012-05-28 22:49:34','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-05-28 22:49:34','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:51:35 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (20,0,'S',200001,2,8826,'.','N',200000,'Line Description',TO_TIMESTAMP('2012-05-28 22:51:34','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-05-28 22:51:34','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:51:51 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (30,0,'S',200002,3,8824,'.','N',200000,'Product Value',TO_TIMESTAMP('2012-05-28 22:51:50','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-05-28 22:51:50','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 10:52:35 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (40,0,'S',200003,4,8989,'.','N',200000,'Locator Value',TO_TIMESTAMP('2012-05-28 22:52:35','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-05-28 22:52:35','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:02:56 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (50,0,'S',200004,5,200191,'.','N',200000,'Charge Name',TO_TIMESTAMP('2012-05-28 23:02:55','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-05-28 23:02:55','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:03:15 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (60,0,'N',200005,0,8825,'.','N',200000,'Qty Book',TO_TIMESTAMP('2012-05-28 23:03:15','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-05-28 23:03:15','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:03:19 PM COT
|
||||
UPDATE AD_ImpFormat_Row SET StartNo=6,Updated=TO_TIMESTAMP('2012-05-28 23:03:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ImpFormat_Row_ID=200005
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:03:35 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (70,0,'N',200006,7,8823,'.','N',200000,'Qty Count',TO_TIMESTAMP('2012-05-28 23:03:35','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-05-28 23:03:35','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:03:48 PM COT
|
||||
INSERT INTO AD_ImpFormat_Row (SeqNo,EndNo,DataType,AD_ImpFormat_Row_ID,StartNo,AD_Column_ID,DecimalPoint,DivideBy100,AD_ImpFormat_ID,Name,Updated,AD_Org_ID,Created,CreatedBy,IsActive,AD_Client_ID,UpdatedBy) VALUES (80,0,'N',200007,8,200189,'.','N',200000,'Qty Internal Use',TO_TIMESTAMP('2012-05-28 23:03:47','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-05-28 23:03:47','YYYY-MM-DD HH24:MI:SS'),100,'Y',11,100)
|
||||
;
|
||||
|
||||
-- May 28, 2012 11:39:52 PM COT
|
||||
-- IDEMPIERE-281 Extend Import Inventory to support also internal use
|
||||
UPDATE AD_Process_Para SET DefaultValue='@C_AcctSchema_ID@',Updated=TO_TIMESTAMP('2012-05-28 23:39:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53375
|
||||
;
|
||||
|
||||
UPDATE AD_System
|
||||
SET LastMigrationScriptApplied='844-IDEMPIERE-281.sql'
|
||||
WHERE LastMigrationScriptApplied<'844-IDEMPIERE-281.sql'
|
||||
OR LastMigrationScriptApplied IS NULL
|
||||
;
|
||||
|
|
@ -38,6 +38,9 @@ import org.compiere.util.TimeUtil;
|
|||
*
|
||||
* @author Jorg Janke
|
||||
* @version $Id: ImportInventory.java,v 1.2 2006/07/30 00:51:01 jjanke Exp $
|
||||
*
|
||||
* Contributor:
|
||||
* Carlos Ruiz - globalqss - IDEMPIERE-281 Extend Import Inventory to support also internal use
|
||||
*/
|
||||
public class ImportInventory extends SvrProcess
|
||||
{
|
||||
|
@ -145,7 +148,7 @@ public class ImportInventory extends SvrProcess
|
|||
// Set Client, Org, Location, IsActive, Created/Updated
|
||||
sql = new StringBuffer ("UPDATE I_Inventory "
|
||||
+ "SET AD_Client_ID = COALESCE (AD_Client_ID,").append (p_AD_Client_ID).append ("),"
|
||||
+ " AD_Org_ID = COALESCE (AD_Org_ID,").append (p_AD_Org_ID).append ("),");
|
||||
+ " AD_Org_ID = DECODE (NVL(AD_Org_ID),0,").append (p_AD_Org_ID).append (",AD_Org_ID),");
|
||||
if (p_MovementDate != null)
|
||||
sql.append(" MovementDate = COALESCE (MovementDate,").append (DB.TO_DATE(p_MovementDate)).append ("),");
|
||||
sql.append(" IsActive = COALESCE (IsActive, 'Y'),"
|
||||
|
@ -169,8 +172,23 @@ public class ImportInventory extends SvrProcess
|
|||
if (no != 0)
|
||||
log.warning ("Invalid Org=" + no);
|
||||
|
||||
// Document Type
|
||||
sql = new StringBuffer ("UPDATE I_Inventory i "
|
||||
+ "SET C_DocType_ID=(SELECT d.C_DocType_ID FROM C_DocType d"
|
||||
+ " WHERE d.Name=i.DocTypeName AND d.DocBaseType='MMI' AND i.AD_Client_ID=d.AD_Client_ID) "
|
||||
+ "WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL"
|
||||
+ " AND I_IsImported<>'Y'").append (clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
log.fine("Set DocType=" + no);
|
||||
sql = new StringBuffer ("UPDATE I_Inventory i "
|
||||
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocType, ' "
|
||||
+ "WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL"
|
||||
+ " AND I_IsImported<>'Y'").append (clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
if (no != 0)
|
||||
log.warning ("Invalid DocType=" + no);
|
||||
|
||||
// Location
|
||||
// Locator
|
||||
sql = new StringBuffer ("UPDATE I_Inventory i "
|
||||
+ "SET M_Locator_ID=(SELECT MAX(M_Locator_ID) FROM M_Locator l"
|
||||
+ " WHERE i.LocatorValue=l.Value AND i.AD_Client_ID=l.AD_Client_ID) "
|
||||
|
@ -233,7 +251,7 @@ public class ImportInventory extends SvrProcess
|
|||
+ "WHERE M_Product_ID IS NULL AND UPC IS NOT NULL"
|
||||
+ " AND I_IsImported<>'Y'").append (clientCheck);
|
||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||
log.fine("Set Product from UPC=" + no);
|
||||
log.fine("Set Product from UPC=" + no);
|
||||
sql = new StringBuffer ("UPDATE I_Inventory "
|
||||
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Product, ' "
|
||||
+ "WHERE M_Product_ID IS NULL"
|
||||
|
@ -242,14 +260,47 @@ public class ImportInventory extends SvrProcess
|
|||
if (no != 0)
|
||||
log.warning ("No Product=" + no);
|
||||
|
||||
// No QtyCount
|
||||
// Charge
|
||||
sql = new StringBuffer ("UPDATE I_Inventory o "
|
||||
+ "SET C_Charge_ID=(SELECT C_Charge_ID FROM C_Charge p"
|
||||
+ " WHERE o.ChargeName=p.Name AND o.AD_Client_ID=p.AD_Client_ID) "
|
||||
+ "WHERE C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
log.fine("Set Charge=" + no);
|
||||
sql = new StringBuffer ("UPDATE I_Inventory "
|
||||
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Qty Count, ' "
|
||||
+ "WHERE QtyCount IS NULL"
|
||||
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' "
|
||||
+ "WHERE C_Charge_ID IS NULL AND (ChargeName IS NOT NULL)"
|
||||
+ " AND I_IsImported<>'Y'").append (clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
if (no != 0)
|
||||
log.warning ("Invalid Charge=" + no);
|
||||
|
||||
// No QtyCount or QtyInternalUse
|
||||
sql = new StringBuffer ("UPDATE I_Inventory "
|
||||
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Qty Count or Internal Use, ' "
|
||||
+ "WHERE QtyCount IS NULL AND QtyInternalUse IS NULL"
|
||||
+ " AND I_IsImported<>'Y'").append (clientCheck);
|
||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||
if (no != 0)
|
||||
log.warning ("No QtyCount=" + no);
|
||||
log.warning ("No QtyCount or QtyInternalUse=" + no);
|
||||
|
||||
// Excluding quantities
|
||||
sql = new StringBuffer ("UPDATE I_Inventory "
|
||||
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Excluding quantities, ' "
|
||||
+ "WHERE NVL(QtyInternalUse,0)<>0 AND (NVL(QtyCount,0)<>0 OR NVL(QtyBook,0)<>0) "
|
||||
+ " AND I_IsImported<>'Y'").append (clientCheck);
|
||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||
if (no != 0)
|
||||
log.warning ("Excluding quantities=" + no);
|
||||
|
||||
// Required charge for internal use
|
||||
sql = new StringBuffer ("UPDATE I_Inventory "
|
||||
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Required charge, ' "
|
||||
+ "WHERE NVL(QtyInternalUse,0)<>0 AND NVL(C_Charge_ID,0)=0 "
|
||||
+ " AND I_IsImported<>'Y'").append (clientCheck);
|
||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||
if (no != 0)
|
||||
log.warning ("Required charge=" + no);
|
||||
|
||||
commitEx();
|
||||
|
||||
|
@ -270,17 +321,24 @@ public class ImportInventory extends SvrProcess
|
|||
ResultSet rs = pstmt.executeQuery ();
|
||||
//
|
||||
int x_M_Warehouse_ID = -1;
|
||||
int x_C_DocType_ID = -1;
|
||||
Timestamp x_MovementDate = null;
|
||||
int x_isInternalUse = -1;
|
||||
while (rs.next())
|
||||
{
|
||||
X_I_Inventory imp = new X_I_Inventory (getCtx (), rs, get_TrxName());
|
||||
Timestamp MovementDate = TimeUtil.getDay(imp.getMovementDate());
|
||||
int isInternalUse = (imp.getQtyInternalUse().signum() != 0) ? 1 : 0;
|
||||
|
||||
if (inventory == null
|
||||
|| imp.getM_Warehouse_ID() != x_M_Warehouse_ID
|
||||
|| !MovementDate.equals(x_MovementDate))
|
||||
|| imp.getC_DocType_ID() != x_C_DocType_ID
|
||||
|| !MovementDate.equals(x_MovementDate)
|
||||
|| isInternalUse != x_isInternalUse)
|
||||
{
|
||||
inventory = new MInventory (getCtx(), 0, get_TrxName());
|
||||
if (imp.getC_DocType_ID() > 0)
|
||||
inventory.setC_DocType_ID(imp.getC_DocType_ID());
|
||||
inventory.setClientOrg(imp.getAD_Client_ID(), imp.getAD_Org_ID());
|
||||
inventory.setDescription("I " + imp.getM_Warehouse_ID() + " " + MovementDate);
|
||||
inventory.setM_Warehouse_ID(imp.getM_Warehouse_ID());
|
||||
|
@ -292,7 +350,9 @@ public class ImportInventory extends SvrProcess
|
|||
break;
|
||||
}
|
||||
x_M_Warehouse_ID = imp.getM_Warehouse_ID();
|
||||
x_C_DocType_ID = imp.getC_DocType_ID();
|
||||
x_MovementDate = MovementDate;
|
||||
x_isInternalUse = isInternalUse;
|
||||
noInsert++;
|
||||
}
|
||||
|
||||
|
@ -316,7 +376,13 @@ public class ImportInventory extends SvrProcess
|
|||
}
|
||||
MInventoryLine line = new MInventoryLine (inventory,
|
||||
imp.getM_Locator_ID(), imp.getM_Product_ID(), M_AttributeSetInstance_ID,
|
||||
imp.getQtyBook(), imp.getQtyCount());
|
||||
imp.getQtyBook(), imp.getQtyCount(), imp.getQtyInternalUse());
|
||||
line.setDescription(imp.getDescription());
|
||||
if (imp.getC_Charge_ID() > 0)
|
||||
line.setInventoryType(MInventoryLine.INVENTORYTYPE_ChargeAccount);
|
||||
else
|
||||
line.setInventoryType(MInventoryLine.INVENTORYTYPE_InventoryDifference);
|
||||
line.setC_Charge_ID(imp.getC_Charge_ID());
|
||||
if (line.save())
|
||||
{
|
||||
imp.setI_IsImported(true);
|
||||
|
|
|
@ -31,7 +31,7 @@ public interface I_I_Inventory
|
|||
public static final String Table_Name = "I_Inventory";
|
||||
|
||||
/** AD_Table_ID=572 */
|
||||
public static final int Table_ID = MTable.getTable_ID(Table_Name);
|
||||
public static final int Table_ID = 572;
|
||||
|
||||
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
|
@ -62,6 +62,49 @@ public interface I_I_Inventory
|
|||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name C_Charge_ID */
|
||||
public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
|
||||
|
||||
/** Set Charge.
|
||||
* Additional document charges
|
||||
*/
|
||||
public void setC_Charge_ID (int C_Charge_ID);
|
||||
|
||||
/** Get Charge.
|
||||
* Additional document charges
|
||||
*/
|
||||
public int getC_Charge_ID();
|
||||
|
||||
public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException;
|
||||
|
||||
/** Column name C_DocType_ID */
|
||||
public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
|
||||
|
||||
/** Set Document Type.
|
||||
* Document type or rules
|
||||
*/
|
||||
public void setC_DocType_ID (int C_DocType_ID);
|
||||
|
||||
/** Get Document Type.
|
||||
* Document type or rules
|
||||
*/
|
||||
public int getC_DocType_ID();
|
||||
|
||||
public org.compiere.model.I_C_DocType getC_DocType() throws RuntimeException;
|
||||
|
||||
/** Column name ChargeName */
|
||||
public static final String COLUMNNAME_ChargeName = "ChargeName";
|
||||
|
||||
/** Set Charge Name.
|
||||
* Name of the Charge
|
||||
*/
|
||||
public void setChargeName (String ChargeName);
|
||||
|
||||
/** Get Charge Name.
|
||||
* Name of the Charge
|
||||
*/
|
||||
public String getChargeName();
|
||||
|
||||
/** Column name Created */
|
||||
public static final String COLUMNNAME_Created = "Created";
|
||||
|
||||
|
@ -104,6 +147,19 @@ public interface I_I_Inventory
|
|||
*/
|
||||
public String getDescription();
|
||||
|
||||
/** Column name DocTypeName */
|
||||
public static final String COLUMNNAME_DocTypeName = "DocTypeName";
|
||||
|
||||
/** Set Document Type Name.
|
||||
* Name of the Document Type
|
||||
*/
|
||||
public void setDocTypeName (String DocTypeName);
|
||||
|
||||
/** Get Document Type Name.
|
||||
* Name of the Document Type
|
||||
*/
|
||||
public String getDocTypeName();
|
||||
|
||||
/** Column name I_ErrorMsg */
|
||||
public static final String COLUMNNAME_I_ErrorMsg = "I_ErrorMsg";
|
||||
|
||||
|
@ -130,6 +186,15 @@ public interface I_I_Inventory
|
|||
*/
|
||||
public int getI_Inventory_ID();
|
||||
|
||||
/** Column name I_Inventory_UU */
|
||||
public static final String COLUMNNAME_I_Inventory_UU = "I_Inventory_UU";
|
||||
|
||||
/** Set I_Inventory_UU */
|
||||
public void setI_Inventory_UU (String I_Inventory_UU);
|
||||
|
||||
/** Get I_Inventory_UU */
|
||||
public String getI_Inventory_UU();
|
||||
|
||||
/** Column name I_IsImported */
|
||||
public static final String COLUMNNAME_I_IsImported = "I_IsImported";
|
||||
|
||||
|
@ -195,7 +260,7 @@ public interface I_I_Inventory
|
|||
*/
|
||||
public int getM_Inventory_ID();
|
||||
|
||||
public I_M_Inventory getM_Inventory() throws RuntimeException;
|
||||
public org.compiere.model.I_M_Inventory getM_Inventory() throws RuntimeException;
|
||||
|
||||
/** Column name M_InventoryLine_ID */
|
||||
public static final String COLUMNNAME_M_InventoryLine_ID = "M_InventoryLine_ID";
|
||||
|
@ -210,7 +275,7 @@ public interface I_I_Inventory
|
|||
*/
|
||||
public int getM_InventoryLine_ID();
|
||||
|
||||
public I_M_InventoryLine getM_InventoryLine() throws RuntimeException;
|
||||
public org.compiere.model.I_M_InventoryLine getM_InventoryLine() throws RuntimeException;
|
||||
|
||||
/** Column name M_Locator_ID */
|
||||
public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID";
|
||||
|
@ -225,7 +290,7 @@ public interface I_I_Inventory
|
|||
*/
|
||||
public int getM_Locator_ID();
|
||||
|
||||
public I_M_Locator getM_Locator() throws RuntimeException;
|
||||
public org.compiere.model.I_M_Locator getM_Locator() throws RuntimeException;
|
||||
|
||||
/** Column name MovementDate */
|
||||
public static final String COLUMNNAME_MovementDate = "MovementDate";
|
||||
|
@ -253,7 +318,7 @@ public interface I_I_Inventory
|
|||
*/
|
||||
public int getM_Product_ID();
|
||||
|
||||
public I_M_Product getM_Product() throws RuntimeException;
|
||||
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException;
|
||||
|
||||
/** Column name M_Warehouse_ID */
|
||||
public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
|
||||
|
@ -268,7 +333,7 @@ public interface I_I_Inventory
|
|||
*/
|
||||
public int getM_Warehouse_ID();
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws RuntimeException;
|
||||
public org.compiere.model.I_M_Warehouse getM_Warehouse() throws RuntimeException;
|
||||
|
||||
/** Column name Processed */
|
||||
public static final String COLUMNNAME_Processed = "Processed";
|
||||
|
@ -318,6 +383,19 @@ public interface I_I_Inventory
|
|||
*/
|
||||
public BigDecimal getQtyCount();
|
||||
|
||||
/** Column name QtyInternalUse */
|
||||
public static final String COLUMNNAME_QtyInternalUse = "QtyInternalUse";
|
||||
|
||||
/** Set Internal Use Qty.
|
||||
* Internal Use Quantity removed from Inventory
|
||||
*/
|
||||
public void setQtyInternalUse (BigDecimal QtyInternalUse);
|
||||
|
||||
/** Get Internal Use Qty.
|
||||
* Internal Use Quantity removed from Inventory
|
||||
*/
|
||||
public BigDecimal getQtyInternalUse();
|
||||
|
||||
/** Column name SerNo */
|
||||
public static final String COLUMNNAME_SerNo = "SerNo";
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class MInventoryLine extends X_M_InventoryLine
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 5649152656460089476L;
|
||||
private static final long serialVersionUID = -3513145563716006099L;
|
||||
|
||||
/**
|
||||
* Get Inventory Line with parameters
|
||||
|
@ -103,10 +103,11 @@ public class MInventoryLine extends X_M_InventoryLine
|
|||
* @param M_AttributeSetInstance_ID instance
|
||||
* @param QtyBook book value
|
||||
* @param QtyCount count value
|
||||
* @param QtyInternalUse internal use value
|
||||
*/
|
||||
public MInventoryLine (MInventory inventory,
|
||||
int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID,
|
||||
BigDecimal QtyBook, BigDecimal QtyCount)
|
||||
BigDecimal QtyBook, BigDecimal QtyCount, BigDecimal QtyInternalUse)
|
||||
{
|
||||
this (inventory.getCtx(), 0, inventory.get_TrxName());
|
||||
if (inventory.get_ID() == 0)
|
||||
|
@ -122,9 +123,18 @@ public class MInventoryLine extends X_M_InventoryLine
|
|||
setQtyBook (QtyBook);
|
||||
if (QtyCount != null && QtyCount.signum() != 0)
|
||||
setQtyCount (QtyCount);
|
||||
if (QtyInternalUse != null && QtyInternalUse.signum() != 0)
|
||||
setQtyInternalUse (QtyInternalUse);
|
||||
m_isManualEntry = false;
|
||||
} // MInventoryLine
|
||||
|
||||
public MInventoryLine (MInventory inventory,
|
||||
int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID,
|
||||
BigDecimal QtyBook, BigDecimal QtyCount)
|
||||
{
|
||||
this(inventory, M_Locator_ID, M_Product_ID, M_AttributeSetInstance_ID, QtyBook, QtyCount, null);
|
||||
}
|
||||
|
||||
/** Manually created */
|
||||
private boolean m_isManualEntry = true;
|
||||
/** Parent */
|
||||
|
|
|
@ -33,7 +33,7 @@ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20100614L;
|
||||
private static final long serialVersionUID = 20120529L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_I_Inventory (Properties ctx, int I_Inventory_ID, String trxName)
|
||||
|
@ -74,6 +74,79 @@ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_Charge)MTable.get(getCtx(), org.compiere.model.I_C_Charge.Table_Name)
|
||||
.getPO(getC_Charge_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Charge.
|
||||
@param C_Charge_ID
|
||||
Additional document charges
|
||||
*/
|
||||
public void setC_Charge_ID (int C_Charge_ID)
|
||||
{
|
||||
if (C_Charge_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Charge_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID));
|
||||
}
|
||||
|
||||
/** Get Charge.
|
||||
@return Additional document charges
|
||||
*/
|
||||
public int getC_Charge_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_DocType getC_DocType() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_DocType)MTable.get(getCtx(), org.compiere.model.I_C_DocType.Table_Name)
|
||||
.getPO(getC_DocType_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Document Type.
|
||||
@param C_DocType_ID
|
||||
Document type or rules
|
||||
*/
|
||||
public void setC_DocType_ID (int C_DocType_ID)
|
||||
{
|
||||
if (C_DocType_ID < 0)
|
||||
set_Value (COLUMNNAME_C_DocType_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID));
|
||||
}
|
||||
|
||||
/** Get Document Type.
|
||||
@return Document type or rules
|
||||
*/
|
||||
public int getC_DocType_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Charge Name.
|
||||
@param ChargeName
|
||||
Name of the Charge
|
||||
*/
|
||||
public void setChargeName (String ChargeName)
|
||||
{
|
||||
set_Value (COLUMNNAME_ChargeName, ChargeName);
|
||||
}
|
||||
|
||||
/** Get Charge Name.
|
||||
@return Name of the Charge
|
||||
*/
|
||||
public String getChargeName ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_ChargeName);
|
||||
}
|
||||
|
||||
/** Set Current Cost Price.
|
||||
@param CurrentCostPrice
|
||||
The currently used cost price
|
||||
|
@ -111,6 +184,23 @@ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_Description);
|
||||
}
|
||||
|
||||
/** Set Document Type Name.
|
||||
@param DocTypeName
|
||||
Name of the Document Type
|
||||
*/
|
||||
public void setDocTypeName (String DocTypeName)
|
||||
{
|
||||
set_Value (COLUMNNAME_DocTypeName, DocTypeName);
|
||||
}
|
||||
|
||||
/** Get Document Type Name.
|
||||
@return Name of the Document Type
|
||||
*/
|
||||
public String getDocTypeName ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DocTypeName);
|
||||
}
|
||||
|
||||
/** Set Import Error Message.
|
||||
@param I_ErrorMsg
|
||||
Messages generated from import process
|
||||
|
@ -159,6 +249,20 @@ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent
|
|||
return new KeyNamePair(get_ID(), String.valueOf(getI_Inventory_ID()));
|
||||
}
|
||||
|
||||
/** Set I_Inventory_UU.
|
||||
@param I_Inventory_UU I_Inventory_UU */
|
||||
public void setI_Inventory_UU (String I_Inventory_UU)
|
||||
{
|
||||
set_Value (COLUMNNAME_I_Inventory_UU, I_Inventory_UU);
|
||||
}
|
||||
|
||||
/** Get I_Inventory_UU.
|
||||
@return I_Inventory_UU */
|
||||
public String getI_Inventory_UU ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_I_Inventory_UU);
|
||||
}
|
||||
|
||||
/** Set Imported.
|
||||
@param I_IsImported
|
||||
Has this import been processed
|
||||
|
@ -217,9 +321,9 @@ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_Lot);
|
||||
}
|
||||
|
||||
public I_M_Inventory getM_Inventory() throws RuntimeException
|
||||
public org.compiere.model.I_M_Inventory getM_Inventory() throws RuntimeException
|
||||
{
|
||||
return (I_M_Inventory)MTable.get(getCtx(), I_M_Inventory.Table_Name)
|
||||
return (org.compiere.model.I_M_Inventory)MTable.get(getCtx(), org.compiere.model.I_M_Inventory.Table_Name)
|
||||
.getPO(getM_Inventory_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Phys.Inventory.
|
||||
|
@ -245,9 +349,9 @@ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_InventoryLine getM_InventoryLine() throws RuntimeException
|
||||
public org.compiere.model.I_M_InventoryLine getM_InventoryLine() throws RuntimeException
|
||||
{
|
||||
return (I_M_InventoryLine)MTable.get(getCtx(), I_M_InventoryLine.Table_Name)
|
||||
return (org.compiere.model.I_M_InventoryLine)MTable.get(getCtx(), org.compiere.model.I_M_InventoryLine.Table_Name)
|
||||
.getPO(getM_InventoryLine_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Phys.Inventory Line.
|
||||
|
@ -273,9 +377,9 @@ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Locator getM_Locator() throws RuntimeException
|
||||
public org.compiere.model.I_M_Locator getM_Locator() throws RuntimeException
|
||||
{
|
||||
return (I_M_Locator)MTable.get(getCtx(), I_M_Locator.Table_Name)
|
||||
return (org.compiere.model.I_M_Locator)MTable.get(getCtx(), org.compiere.model.I_M_Locator.Table_Name)
|
||||
.getPO(getM_Locator_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Locator.
|
||||
|
@ -318,9 +422,9 @@ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent
|
|||
return (Timestamp)get_Value(COLUMNNAME_MovementDate);
|
||||
}
|
||||
|
||||
public I_M_Product getM_Product() throws RuntimeException
|
||||
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
|
||||
{
|
||||
return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name)
|
||||
return (org.compiere.model.I_M_Product)MTable.get(getCtx(), org.compiere.model.I_M_Product.Table_Name)
|
||||
.getPO(getM_Product_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Product.
|
||||
|
@ -346,9 +450,9 @@ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws RuntimeException
|
||||
public org.compiere.model.I_M_Warehouse getM_Warehouse() throws RuntimeException
|
||||
{
|
||||
return (I_M_Warehouse)MTable.get(getCtx(), I_M_Warehouse.Table_Name)
|
||||
return (org.compiere.model.I_M_Warehouse)MTable.get(getCtx(), org.compiere.model.I_M_Warehouse.Table_Name)
|
||||
.getPO(getM_Warehouse_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Warehouse.
|
||||
|
@ -459,6 +563,26 @@ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent
|
|||
return bd;
|
||||
}
|
||||
|
||||
/** Set Internal Use Qty.
|
||||
@param QtyInternalUse
|
||||
Internal Use Quantity removed from Inventory
|
||||
*/
|
||||
public void setQtyInternalUse (BigDecimal QtyInternalUse)
|
||||
{
|
||||
set_Value (COLUMNNAME_QtyInternalUse, QtyInternalUse);
|
||||
}
|
||||
|
||||
/** Get Internal Use Qty.
|
||||
@return Internal Use Quantity removed from Inventory
|
||||
*/
|
||||
public BigDecimal getQtyInternalUse ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyInternalUse);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Serial No.
|
||||
@param SerNo
|
||||
Product Serial Number
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
,Physical count for Oak,Oak,Default HQ Locator,,0,1,0
|
||||
,Physical count for Elm,Elm,Default HQ Locator,Commissions Paid,1,3,0
|
||||
Material Physical Inventory,Internal consumption of 1 chair,PChair,Default HQ Locator,Bank Charge,0,0,1
|
|
Loading…
Reference in New Issue