Merge with 9588c6ccc43c675f7b186512072c248daa1a6f57

This commit is contained in:
Heng Sin Low 2012-08-22 18:41:04 +08:00
commit 724515c9c2
78 changed files with 21604 additions and 268 deletions

View File

@ -0,0 +1,73 @@
CREATE OR REPLACE
FUNCTION prodqtyordered
(
p_product_id NUMBER,
p_warehouse_id NUMBER
)
RETURN NUMBER
AS
v_Warehouse_ID NUMBER;
v_Quantity NUMBER := 99999; -- unlimited
v_IsBOM CHAR(1);
v_IsStocked CHAR(1);
v_ProductType CHAR(1);
v_ProductQty NUMBER;
v_StdPrecision INT;
BEGIN
-- Check Parameters
v_Warehouse_ID := p_Warehouse_ID;
IF (v_Warehouse_ID IS NULL) THEN
RETURN 0;
END IF;
-- DBMS_OUTPUT.PUT_LINE('Warehouse=' || v_Warehouse_ID);
-- Check, if product exists and if it is stocked
BEGIN
SELECT IsBOM,
ProductType,
IsStocked
INTO v_IsBOM,
v_ProductType,
v_IsStocked
FROM M_PRODUCT
WHERE M_Product_ID=p_Product_ID;
--
EXCEPTION -- not found
WHEN OTHERS THEN
RETURN 0;
END;
-- No reservation for non-stocked
IF (v_IsStocked='Y') THEN
-- Get ProductQty
SELECT COALESCE(SUM(MovementQty), 0)
INTO v_ProductQty
FROM M_ProductionLine p
WHERE M_Product_ID=p_Product_ID
AND MovementQty > 0
AND p.Processed = 'N'
AND EXISTS
(SELECT *
FROM M_LOCATOR l
WHERE p.M_Locator_ID=l.M_Locator_ID
AND l.M_Warehouse_ID=v_Warehouse_ID
);
--
RETURN v_ProductQty;
END IF;
-- Unlimited (e.g. only services)
IF (v_Quantity = 99999) THEN
RETURN 0;
END IF;
IF (v_Quantity > 0) THEN
-- Get Rounding Precision for Product
SELECT COALESCE(MAX(u.StdPrecision), 0)
INTO v_StdPrecision
FROM C_UOM u,
M_PRODUCT p
WHERE u.C_UOM_ID =p.C_UOM_ID
AND p.M_Product_ID=p_Product_ID;
--
RETURN ROUND (v_Quantity, v_StdPrecision);
END IF;
RETURN 0;
END;
/

View File

@ -0,0 +1,73 @@
CREATE OR REPLACE
FUNCTION prodqtyreserved
(
p_product_id NUMBER,
p_warehouse_id NUMBER
)
RETURN NUMBER
AS
v_Warehouse_ID NUMBER;
v_Quantity NUMBER := 99999; -- unlimited
v_IsBOM CHAR(1);
v_IsStocked CHAR(1);
v_ProductType CHAR(1);
v_ProductQty NUMBER;
v_StdPrecision INT;
BEGIN
-- Check Parameters
v_Warehouse_ID := p_Warehouse_ID;
IF (v_Warehouse_ID IS NULL) THEN
RETURN 0;
END IF;
-- DBMS_OUTPUT.PUT_LINE('Warehouse=' || v_Warehouse_ID);
-- Check, if product exists and if it is stocked
BEGIN
SELECT IsBOM,
ProductType,
IsStocked
INTO v_IsBOM,
v_ProductType,
v_IsStocked
FROM M_PRODUCT
WHERE M_Product_ID=p_Product_ID;
--
EXCEPTION -- not found
WHEN OTHERS THEN
RETURN 0;
END;
-- No reservation for non-stocked
IF (v_IsStocked='Y') THEN
-- Get ProductQty
SELECT -1*COALESCE(SUM(MovementQty), 0)
INTO v_ProductQty
FROM M_ProductionLine p
WHERE M_Product_ID=p_Product_ID
AND MovementQty < 0
AND p.Processed = 'N'
AND EXISTS
(SELECT *
FROM M_LOCATOR l
WHERE p.M_Locator_ID=l.M_Locator_ID
AND l.M_Warehouse_ID=v_Warehouse_ID
);
--
RETURN v_ProductQty;
END IF;
-- Unlimited (e.g. only services)
IF (v_Quantity = 99999) THEN
RETURN 0;
END IF;
IF (v_Quantity > 0) THEN
-- Get Rounding Precision for Product
SELECT COALESCE(MAX(u.StdPrecision), 0)
INTO v_StdPrecision
FROM C_UOM u,
M_PRODUCT p
WHERE u.C_UOM_ID =p.C_UOM_ID
AND p.M_Product_ID=p_Product_ID;
--
RETURN ROUND (v_Quantity, v_StdPrecision);
END IF;
RETURN 0;
END;
/

View File

@ -0,0 +1,63 @@
CREATE OR REPLACE FUNCTION prodqtyordered(p_product_id numeric, p_warehouse_id numeric)
RETURNS numeric AS
$BODY$
DECLARE
v_Warehouse_ID numeric;
v_Quantity numeric := 99999; -- unlimited
v_IsBOM CHAR(1);
v_IsStocked CHAR(1);
v_ProductType CHAR(1);
v_ProductQty numeric;
v_StdPrecision int;
BEGIN
-- Check Parameters
v_Warehouse_ID := p_Warehouse_ID;
IF (v_Warehouse_ID IS NULL) THEN
RETURN 0;
END IF;
-- DBMS_OUTPUT.PUT_LINE('Warehouse=' || v_Warehouse_ID);
-- Check, if product exists and if it is stocked
BEGIN
SELECT IsBOM, ProductType, IsStocked
INTO v_IsBOM, v_ProductType, v_IsStocked
FROM M_PRODUCT
WHERE M_Product_ID=p_Product_ID;
--
EXCEPTION -- not found
WHEN OTHERS THEN
RETURN 0;
END;
-- No reservation for non-stocked
IF (v_IsStocked='Y') THEN
-- Get ProductQty
SELECT COALESCE(SUM(MovementQty), 0)
INTO v_ProductQty
FROM M_ProductionLine p
WHERE M_Product_ID=p_Product_ID AND MovementQty > 0 AND p.Processed = 'N'
AND EXISTS (SELECT * FROM M_LOCATOR l WHERE p.M_Locator_ID=l.M_Locator_ID
AND l.M_Warehouse_ID=v_Warehouse_ID);
--
RETURN v_ProductQty;
END IF;
-- Unlimited (e.g. only services)
IF (v_Quantity = 99999) THEN
RETURN 0;
END IF;
IF (v_Quantity > 0) THEN
-- Get Rounding Precision for Product
SELECT COALESCE(MAX(u.StdPrecision), 0)
INTO v_StdPrecision
FROM C_UOM u, M_PRODUCT p
WHERE u.C_UOM_ID=p.C_UOM_ID AND p.M_Product_ID=p_Product_ID;
--
RETURN ROUND (v_Quantity, v_StdPrecision);
END IF;
RETURN 0;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;

View File

@ -0,0 +1,63 @@
CREATE OR REPLACE FUNCTION prodqtyreserved(p_product_id numeric, p_warehouse_id numeric)
RETURNS numeric AS
$BODY$
DECLARE
v_Warehouse_ID numeric;
v_Quantity numeric := 99999; -- unlimited
v_IsBOM CHAR(1);
v_IsStocked CHAR(1);
v_ProductType CHAR(1);
v_ProductQty numeric;
v_StdPrecision int;
BEGIN
-- Check Parameters
v_Warehouse_ID := p_Warehouse_ID;
IF (v_Warehouse_ID IS NULL) THEN
RETURN 0;
END IF;
-- DBMS_OUTPUT.PUT_LINE('Warehouse=' || v_Warehouse_ID);
-- Check, if product exists and if it is stocked
BEGIN
SELECT IsBOM, ProductType, IsStocked
INTO v_IsBOM, v_ProductType, v_IsStocked
FROM M_PRODUCT
WHERE M_Product_ID=p_Product_ID;
--
EXCEPTION -- not found
WHEN OTHERS THEN
RETURN 0;
END;
-- No reservation for non-stocked
IF (v_IsStocked='Y') THEN
-- Get ProductQty
SELECT -1*COALESCE(SUM(MovementQty), 0)
INTO v_ProductQty
FROM M_ProductionLine p
WHERE M_Product_ID=p_Product_ID AND MovementQty < 0 AND p.Processed = 'N'
AND EXISTS (SELECT * FROM M_LOCATOR l WHERE p.M_Locator_ID=l.M_Locator_ID
AND l.M_Warehouse_ID=v_Warehouse_ID);
--
RETURN v_ProductQty;
END IF;
-- Unlimited (e.g. only services)
IF (v_Quantity = 99999) THEN
RETURN 0;
END IF;
IF (v_Quantity > 0) THEN
-- Get Rounding Precision for Product
SELECT COALESCE(MAX(u.StdPrecision), 0)
INTO v_StdPrecision
FROM C_UOM u, M_PRODUCT p
WHERE u.C_UOM_ID=p.C_UOM_ID AND p.M_Product_ID=p_Product_ID;
--
RETURN ROUND (v_Quantity, v_StdPrecision);
END IF;
RETURN 0;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,60 @@
-- Aug 7, 2012 12:09:22 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200241,53243,0,29,249,'QtyBatchSize',TO_DATE('2012-08-07 12:09:20','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Qty Batch Size',0,TO_DATE('2012-08-07 12:09:20','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 7, 2012 12:24:48 PM CEST
-- Manufacturing Light phantom
ALTER TABLE M_Replenish ADD QtyBatchSize NUMBER DEFAULT NULL
;
-- Aug 7, 2012 12:10:25 PM CEST
-- Manufacturing Light phantom
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=200241 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 7, 2012 12:21:48 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,200241,200257,0,182,TO_DATE('2012-08-07 12:21:48','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Qty Batch Size',110,0,TO_DATE('2012-08-07 12:21:48','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 7, 2012 12:22:10 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,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=200257 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 7, 2012 12:24:48 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200242,2788,0,20,208,'IsPhantom',TO_DATE('2012-08-07 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,'N','D',1,'Y','Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','Phantom',0,TO_DATE('2012-08-07 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 7, 2012 12:24:48 PM CEST
-- Manufacturing Light phantom
ALTER TABLE M_Product ADD IsPhantom CHAR(1) DEFAULT 'N'
;
-- Aug 7, 2012 12:24:48 PM CEST
-- Manufacturing Light phantom
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=200242 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 7, 2012 12:25:44 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,200242,200258,0,53346,TO_DATE('2012-08-07 12:25:44','YYYY-MM-DD HH24:MI:SS'),100,'Phantom Component',1,'D','Phantom Component are not stored and produced with the product. This is an option to avoid maintaining an Engineering and Manufacturing Bill of Materials.','Y','Y','Y','N','N','N','N','Y','Phantom',205,0,TO_DATE('2012-08-07 12:25:44','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 7, 2012 12:25:55 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,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=200258 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 7, 2012 12:50:26 PM CEST
-- Manufacturing Light phantom
UPDATE AD_Field SET IsSameLine='N',Updated=TO_DATE('2012-08-07 12:50:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62007
;
UPDATE AD_System
SET LastMigrationScriptApplied='863_IDEMPIERE-246_Manufacturing_Light_phantom.sql'
WHERE LastMigrationScriptApplied<'863_IDEMPIERE-246_Manufacturing_Light_phantom.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,50 @@
-- Aug 6, 2012 11:54:27 AM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_ModelValidator SET IsActive='N',Updated=TO_DATE('2012-08-06 11:54:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ModelValidator_ID=50000
;
-- Aug 6, 2012 12:16:06 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET AD_Reference_ID=17, AD_Reference_Value_ID=319, ColumnName='IsKanban', EntityType='D', IsCentrallyMaintained='N', Name='Is Kanban',Updated=TO_DATE('2012-08-06 12:16:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53526
;
-- Aug 6, 2012 12:16:06 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para_Trl SET IsTranslated='N' WHERE AD_Process_Para_ID=53526
;
-- Aug 6, 2012 12:16:49 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_DATE('2012-08-06 12:16:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53527
;
-- Aug 6, 2012 12:17:10 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_DATE('2012-08-06 12:17:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53528
;
-- Aug 6, 2012 12:17:28 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_DATE('2012-08-06 12:17:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53525
;
-- Aug 6, 2012 12:17:49 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_DATE('2012-08-06 12:17:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53524
;
-- Aug 6, 2012 12:18:09 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_DATE('2012-08-06 12:18:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53523
;
-- Aug 6, 2012 12:20:29 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_DATE('2012-08-06 12:20:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53267
;
UPDATE AD_System
SET LastMigrationScriptApplied='864_IDEMPIERE-246_Manufacturing_Light_Kanban.sql'
WHERE LastMigrationScriptApplied<'864_IDEMPIERE-246_Manufacturing_Light_Kanban.sql'
OR LastMigrationScriptApplied IS NULL
;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,497 @@
-- Aug 16, 2012 4:41:38 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Table_ID,IsHighVolume,ImportTable,IsView,IsChangeLog,EntityType,CopyColumnsFromTable,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Name,AD_Client_ID,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Created) VALUES ('N','2',0,200012,'N','N','N','Y','D','N','L','627cd49d-d311-4b47-8a01-f99992edbcd0','Y','Y','AD_WizardProcess','Wizard Process',0,'Y',0,100,TO_DATE('2012-08-16 16:41:37','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-08-16 16:41:37','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 16, 2012 4:41:38 PM COT
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=200012 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 16, 2012 4:41:38 PM COT
INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,IncrementNo,AD_Sequence_UU,AD_Org_ID,AD_Client_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive) VALUES ('N',50000,'Y',1000000,1000000,'N','Y',200011,'Table AD_WizardProcess','AD_WizardProcess',1,'3f66868f-2837-4ee1-9475-f36e101240da',0,0,TO_DATE('2012-08-16 16:41:38','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-08-16 16:41:38','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;
-- Aug 16, 2012 4:46:00 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200306,'D','Y','N','N',0,'N',22,'N',19,'N',129,'N',102,'N','Y','2c70ff3d-e64a-49c5-abeb-86054ec9d28c','N','N','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',100,TO_DATE('2012-08-16 16:45:59','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:45:59','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:00 PM COT
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=200306 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 16, 2012 4:46:01 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200307,'D','Y','N','N',0,'N',22,'N',19,'N',104,'N',113,'N','Y','b8b33d75-938f-473d-8a28-c7bf2bab2b4c','N','N','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',100,TO_DATE('2012-08-16 16:46:01','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:01','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:01 PM COT
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=200307 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 16, 2012 4:46:01 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200308,'D','Y','N','N',0,'N',7,'N',16,'N','N',245,'N','Y','08e46e32-da39-46e6-8607-9aab1470d76e','N','N','N','Created','Date this record was created','The Created field indicates the date that this record was created.','Created','N',100,TO_DATE('2012-08-16 16:46:01','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:01','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:02 PM COT
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=200308 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 16, 2012 4:46:02 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200309,'D',110,'Y','N','N',0,'N',22,'N',18,'N','N',246,'N','Y','d4a465e3-103e-4aee-8f79-d273db5a37c7','N','N','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',100,TO_DATE('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:02 PM COT
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=200309 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 16, 2012 4:46:02 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200310,'D','N','N','N',0,'N',255,'Y',10,'N','N',275,'N','Y','d3e69713-bb88-418f-bc56-4d4dfc601bae','N','Y','N','Description','Optional short description of the record','A description is limited to 255 characters.','Description','Y',100,TO_DATE('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:02 PM COT
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=200310 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 16, 2012 4:46:03 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200311,'D','N','N','N',0,'N',2000,'N',14,'N','N',326,'N','Y','ea75b9e0-bfb4-48ae-917d-7d5037f2f038','N','Y','N','Help','Comment or Hint','The Help field contains a hint, comment or help about the use of this item.','Comment/Help','Y',100,TO_DATE('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:03 PM COT
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=200311 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 16, 2012 4:46:03 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200312,'D','Y','N','N',0,'N',1,'N',20,'N','N',348,'N','Y','b0f20af0-70b5-43db-8b69-060842f710f1','N','Y','N','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',100,TO_DATE('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:03 PM COT
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=200312 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 16, 2012 4:46:04 PM COT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_WizardProcess_ID',200092,'D','Wizard Process','Wizard Process','1eba27dc-0eab-4bd6-babc-6f02fd547439',0,TO_DATE('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 16, 2012 4:46:04 PM COT
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=200092 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 16, 2012 4:46:04 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200313,'D','Y','N','N',0,'N',22,'N',13,'N','Y',200092,'N','Y','a9b20d20-3d44-4aa3-a8fb-85f335c090ac','N','N','N','AD_WizardProcess_ID','Wizard Process','N',100,TO_DATE('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:05 PM COT
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=200313 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 16, 2012 4:46:05 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,200012,200314,'D','N','N','N','N',36,'N',10,'N','N',55044,'N','Y','b0acec5a-e325-40ab-97f2-8d69f1c8a872','N','Y','N','M_RMAType_UU','M_RMAType_UU','N',100,TO_DATE('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:05 PM COT
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=200314 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 16, 2012 4:46:05 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200315,'D','Y','N','Y',1,'N',60,'Y',10,'N','N',469,'N','Y','79f20c60-9c13-403a-bf9f-e31dca2c0bb3','N','Y','N','Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Name','Y',100,TO_DATE('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:05 PM COT
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=200315 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 16, 2012 4:46:06 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200316,'D','Y','N','N',0,'N',7,'N',16,'N','N',607,'N','Y','53214a14-26e9-4f6d-a177-be4a09395f61','N','N','N','Updated','Date this record was updated','The Updated field indicates the date that this record was updated.','Updated','N',100,TO_DATE('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:06 PM COT
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=200316 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 16, 2012 4:46:06 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200317,'D',110,'Y','N','N',0,'N',22,'N',18,'N','N',608,'N','Y','c9e90e19-7f6d-42da-ba22-695863800dad','N','N','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',100,TO_DATE('2012-08-16 16:46:06','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-16 16:46:06','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:06 PM COT
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=200317 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 16, 2012 4:47:33 PM COT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_WizardProcess_UU',200093,'D','AD_WizardProcess_UU','AD_WizardProcess_UU','07515fbf-92fa-4d3d-8cf7-77efb872944d',0,TO_DATE('2012-08-16 16:47:32','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-16 16:47:32','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 16, 2012 4:47:33 PM COT
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=200093 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 16, 2012 4:47:44 PM COT
UPDATE AD_Column SET AD_Element_ID=200093, ColumnName='AD_WizardProcess_UU', Description=NULL, Help=NULL, Name='AD_WizardProcess_UU',Updated=TO_DATE('2012-08-16 16:47:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200314
;
-- Aug 16, 2012 4:47:44 PM COT
UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200314
;
-- Aug 16, 2012 4:47:44 PM COT
UPDATE AD_Field SET Name='AD_WizardProcess_UU', Description=NULL, Help=NULL WHERE AD_Column_ID=200314 AND IsCentrallyMaintained='Y'
;
-- Aug 16, 2012 4:48:51 PM COT
UPDATE AD_Column SET IsIdentifier='N', SeqNo=0, IsParent='Y', FieldLength=10, AD_Reference_ID=30, AD_Element_ID=142, IsUpdateable='N', ColumnName='AD_WF_Node_ID', Description='Workflow Node (activity), step or process', Help='The Workflow Node indicates a unique step or process in a Workflow.', Name='Node',Updated=TO_DATE('2012-08-16 16:48:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200315
;
-- Aug 16, 2012 4:48:51 PM COT
UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200315
;
-- Aug 16, 2012 4:48:51 PM COT
UPDATE AD_Field SET Name='Node', Description='Workflow Node (activity), step or process', Help='The Workflow Node indicates a unique step or process in a Workflow.' WHERE AD_Column_ID=200315 AND IsCentrallyMaintained='Y'
;
-- Aug 16, 2012 4:49:35 PM COT
UPDATE AD_Column SET AD_Element_ID=1115, ColumnName='Note', Description='Optional additional user defined information', Help='The Note field allows for optional entry of user defined information regarding this record', Name='Note',Updated=TO_DATE('2012-08-16 16:49:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200311
;
-- Aug 16, 2012 4:49:35 PM COT
UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200311
;
-- Aug 16, 2012 4:49:35 PM COT
UPDATE AD_Field SET Name='Note', Description='Optional additional user defined information', Help='The Note field allows for optional entry of user defined information regarding this record' WHERE AD_Column_ID=200311 AND IsCentrallyMaintained='Y'
;
-- Aug 16, 2012 4:50:30 PM COT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('WizardStatus',200094,'D','Wizard Status','Wizard Status','06dab4e9-6080-40b5-a4a7-fa1d871ec058',0,TO_DATE('2012-08-16 16:50:29','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-16 16:50:29','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 16, 2012 4:50:30 PM COT
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=200094 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 16, 2012 4:53:33 PM COT
INSERT INTO AD_Reference (AD_Reference_ID,Name,EntityType,AD_Reference_UU,IsOrderByValue,ValidationType,AD_Client_ID,AD_Org_ID,CreatedBy,Updated,IsActive,Created,UpdatedBy) VALUES (200003,'AD_WizardProcess Status','D','2ecdcec7-e361-4926-a8f7-a2f72bfd12e5','N','L',0,0,100,TO_DATE('2012-08-16 16:53:27','YYYY-MM-DD HH24:MI:SS'),'Y',TO_DATE('2012-08-16 16:53:27','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 16, 2012 4:53:33 PM COT
INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Reference_Trl_UU ) SELECT l.AD_Language,t.AD_Reference_ID, t.Help,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_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=200003 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID)
;
-- Aug 16, 2012 4:55:01 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200008,200003,'D','New','dd3f4502-2914-44af-b66f-1620f64c50a3','N',TO_DATE('2012-08-16 16:55:00','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-08-16 16:55:00','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:01 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200008 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:55:11 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200009,200003,'D','Pending','00609fa8-5d40-4d42-ba37-b5919acdc782','P',TO_DATE('2012-08-16 16:55:11','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-08-16 16:55:11','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:11 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200009 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:55:23 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200010,200003,'D','Finished','9829c724-da26-4442-ba9d-2d93d6e7858f','F',TO_DATE('2012-08-16 16:55:22','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-08-16 16:55:22','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:23 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200010 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:55:34 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200011,200003,'D','In-Progress','c79db7f7-2646-483b-bb19-36164ffbabb9','I',TO_DATE('2012-08-16 16:55:33','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-08-16 16:55:33','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:34 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200011 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:55:45 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200012,200003,'D','Skipped','a3d49831-ba26-4f4b-91f4-24f44b09b812','S',TO_DATE('2012-08-16 16:55:44','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-08-16 16:55:44','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:45 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200012 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:55:54 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200013,200003,'D','Delayed','4e09d396-3fa6-461d-9cca-b2aede0c6e2a','D',TO_DATE('2012-08-16 16:55:53','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-08-16 16:55:53','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:54 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200013 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:56:29 PM COT
UPDATE AD_Column SET AD_Reference_Value_ID=200003, FieldLength=1, IsSelectionColumn='N', AD_Reference_ID=17, AD_Element_ID=200094, ColumnName='WizardStatus', Description=NULL, Help=NULL, Name='Wizard Status',Updated=TO_DATE('2012-08-16 16:56:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200310
;
-- Aug 16, 2012 4:56:29 PM COT
UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200310
;
-- Aug 16, 2012 4:56:29 PM COT
UPDATE AD_Field SET Name='Wizard Status', Description=NULL, Help=NULL WHERE AD_Column_ID=200310 AND IsCentrallyMaintained='Y'
;
-- Aug 16, 2012 4:57:28 PM COT
CREATE TABLE AD_WizardProcess (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AD_WF_Node_ID NUMBER(10) NOT NULL, AD_WizardProcess_ID NUMBER(10) NOT NULL, AD_WizardProcess_UU NVARCHAR2(36) DEFAULT NULL , Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Note NVARCHAR2(2000) DEFAULT NULL , Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, WizardStatus CHAR(1) DEFAULT NULL , CONSTRAINT AD_WizardProcess_Key PRIMARY KEY (AD_WizardProcess_ID))
;
create unique index AD_WizardProcess_uu_idx on AD_WizardProcess(AD_WizardProcess_UU);
-- Aug 16, 2012 5:41:16 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_Column SET FieldLength=0, AD_Reference_ID=36,Updated=TO_DATE('2012-08-16 17:41:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1206
;
-- Aug 16, 2012 5:41:20 PM COT
alter table AD_WF_Node add ( temp_column clob );
update AD_WF_Node set temp_column=Help, Help=null;
alter table AD_WF_Node drop column Help;
alter table AD_WF_Node rename column temp_column to Help;
-- Aug 16, 2012 5:42:15 PM COT
UPDATE AD_Column SET FieldLength=0, AD_Reference_ID=36,Updated=TO_DATE('2012-08-16 17:42:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=2290
;
-- Aug 16, 2012 5:42:18 PM COT
alter table AD_WF_Node_Trl add ( temp_column clob );
update AD_WF_Node_Trl set temp_column=Help, Help=null;
alter table AD_WF_Node_Trl drop column Help;
alter table AD_WF_Node_Trl rename column temp_column to Help;
-- Aug 16, 2012 6:47:08 PM COT
UPDATE AD_Column SET FieldLength=0, AD_Reference_ID=36,Updated=TO_DATE('2012-08-16 18:47:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=238
;
-- Aug 16, 2012 6:47:14 PM COT
alter table AD_Workflow add ( temp_column clob );
update AD_Workflow set temp_column=Help, Help=null;
alter table AD_Workflow drop column Help;
alter table AD_Workflow rename column temp_column to Help;
-- Aug 16, 2012 6:47:35 PM COT
UPDATE AD_Column SET FieldLength=0, AD_Reference_ID=36,Updated=TO_DATE('2012-08-16 18:47:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=316
;
-- Aug 16, 2012 6:47:38 PM COT
alter table AD_Workflow_Trl add ( temp_column clob );
update AD_Workflow_Trl set temp_column=Help, Help=null;
alter table AD_Workflow_Trl drop column Help;
alter table AD_Workflow_Trl rename column temp_column to Help;
-- Aug 17, 2012 4:05:21 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Form (AccessLevel,Classname,AD_Form_ID,IsBetaFunctionality,EntityType,AD_Form_UU,Name,AD_Org_ID,UpdatedBy,CreatedBy,Updated,Created,AD_Client_ID,IsActive) VALUES ('2','org.compiere.apps.form.VSetupWizard',200000,'N','D','7df89045-cd20-46e3-94fb-e0b80e4084f8','Setup Wizard',0,100,100,TO_DATE('2012-08-17 16:05:20','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-17 16:05:20','YYYY-MM-DD HH24:MI:SS'),0,'Y')
;
-- Aug 17, 2012 4:05:21 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Form_Trl (AD_Language,AD_Form_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Form_Trl_UU ) SELECT l.AD_Language,t.AD_Form_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_Form t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Form_ID=200000 AND NOT EXISTS (SELECT * FROM AD_Form_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Form_ID=t.AD_Form_ID)
;
-- Aug 17, 2012 4:05:37 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Menu (AD_Menu_ID,IsSummary,IsSOTrx,IsReadOnly,AD_Form_ID,EntityType,IsCentrallyMaintained,Name,Action,AD_Menu_UU,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Org_ID,Created,UpdatedBy) VALUES (200009,'N','N','N',200000,'D','Y','Setup Wizard','X','b733d9bd-95b2-4192-9668-59702307f624','Y',0,100,TO_DATE('2012-08-17 16:05:37','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-08-17 16:05:37','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 17, 2012 4:05:37 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Menu_Trl_UU ) SELECT l.AD_Language,t.AD_Menu_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, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200009 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID)
;
-- Aug 17, 2012 4:05:37 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 100, SysDate, 100,t.AD_Tree_ID, 200009, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200009)
;
-- Aug 17, 2012 4:05:44 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_Preference SET Value='Y',Updated=TO_DATE('2012-08-17 16:05:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Preference_ID=1000009
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=218
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=153
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=263
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=166
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=203
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53242
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=236
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=183
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=160
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=278
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=345
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53014
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53108
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=261
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53202
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=225
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200009
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=148
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=529
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=397
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=532
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53084
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53083
;
-- Aug 17, 2012 4:06:48 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_Preference SET Value='N',Updated=TO_DATE('2012-08-17 16:06:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Preference_ID=1000009
;
-- Aug 17, 2012 4:07:33 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200014,328,'D','Wizard','f1ffc07b-f822-4659-bdd7-e8dde31acac5','W',TO_DATE('2012-08-17 16:07:32','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-08-17 16:07:32','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 17, 2012 4:07:33 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200014 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 17, 2012 5:04:14 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Properties',200013,'D','d9f0db1a-5655-466c-8961-c1424b0ff275','Properties','Y',TO_DATE('2012-08-17 17:04:13','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-08-17 17:04:13','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 17, 2012 5:04:14 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200013 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Aug 20, 2012 3:51:46 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','{0} tasks completed from {1} ({2}% advance)',200014,'D','60c03fae-3b77-4307-8454-64690aacc517','SetupWizardProgress','Y',TO_DATE('2012-08-20 15:51:45','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-08-20 15:51:45','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 20, 2012 3:51:46 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200014 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Set initial workflows on the wizard
UPDATE AD_Workflow SET WorkflowType='W', Priority=1 WHERE AD_Workflow_ID=104; -- Initial Client Setup Review
UPDATE AD_Workflow SET WorkflowType='W', Priority=2 WHERE AD_Workflow_ID=106; -- Business Partner Setup
UPDATE AD_Workflow SET WorkflowType='W', Priority=3 WHERE AD_Workflow_ID=107; -- Product Setup
UPDATE AD_Workflow SET WorkflowType='W', Priority=4 WHERE AD_Workflow_ID=111; -- Sales Setup
UPDATE AD_Workflow SET WorkflowType='W', Priority=5 WHERE AD_Workflow_ID=108; -- Price List Setup
UPDATE AD_Workflow SET WorkflowType='W', Priority=6 WHERE AD_Workflow_ID=110; -- Tax Setup
UPDATE AD_System
SET LastMigrationScriptApplied='878_IDEMPIERE-393.sql'
WHERE LastMigrationScriptApplied<'878_IDEMPIERE-393.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,175 @@
-- Aug 10, 2012 1:37:19 PM CEST
-- Manufacturing Light
INSERT INTO AD_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value) VALUES (0,0,200006,'3','N',TO_DATE('2012-08-10 13:37:16','YYYY-MM-DD HH24:MI:SS'),100,'Create Production Header and Plan for single ordered product','U','Y','N','N','N','N','OrderLineCreateProduction','Y',0,0,TO_DATE('2012-08-10 13:37:16','YYYY-MM-DD HH24:MI:SS'),100,'10000000')
;
-- Aug 10, 2012 1:37:19 PM CEST
-- Manufacturing Light
INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=200006 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID)
;
-- Aug 10, 2012 1:37:43 PM CEST
-- Manufacturing Light
UPDATE AD_Process SET Classname='org.compiere.process.OrderLineCreateProduction',Updated=TO_DATE('2012-08-10 13:37:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200006
;
-- Aug 10, 2012 1:40:28 PM CEST
-- Manufacturing Light
UPDATE AD_Process SET Name='OrderLine Create Production', Value='C_OrderLine_CreateProduction',Updated=TO_DATE('2012-08-10 13:40:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200006
;
-- Aug 10, 2012 1:40:28 PM CEST
-- Manufacturing Light
UPDATE AD_Process_Trl SET IsTranslated='N' WHERE AD_Process_ID=200006
;
-- Aug 10, 2012 1:43:51 PM CEST
-- Manufacturing Light
INSERT INTO AD_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value) VALUES (0,0,200007,'3','org.compiere.process.OrderLineCreateShipment','N',TO_DATE('2012-08-10 13:43:50','YYYY-MM-DD HH24:MI:SS'),100,'Create Shipment for single ordered product','U','Y','N','N','N','N','OrderLine Create Shipment','S',0,0,TO_DATE('2012-08-10 13:43:50','YYYY-MM-DD HH24:MI:SS'),100,'C_OrderLine_CreateShipment')
;
-- Aug 10, 2012 1:43:51 PM CEST
-- Manufacturing Light
INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=200007 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID)
;
-- Aug 10, 2012 1:44:01 PM CEST
-- Manufacturing Light
UPDATE AD_Process SET ShowHelp='S',Updated=TO_DATE('2012-08-10 13:44:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200006
;
-- Aug 10, 2012 1:49:23 PM CEST
-- Manufacturing Light
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,200079,0,'CreateProduction',TO_DATE('2012-08-10 13:49:22','YYYY-MM-DD HH24:MI:SS'),100,'U','Y','Create Production','Create Production',TO_DATE('2012-08-10 13:49:22','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 10, 2012 1:49:24 PM CEST
-- Manufacturing Light
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200079 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 10, 2012 1:50:36 PM CEST
-- Manufacturing Light
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200252,200079,0,200006,28,260,'CreateProduction',TO_DATE('2012-08-10 13:50:35','YYYY-MM-DD HH24:MI:SS'),100,'U',1,'Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Create Production',0,TO_DATE('2012-08-10 13:50:35','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 10, 2012 1:50:36 PM CEST
-- Manufacturing Light
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=200252 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 10, 2012 1:51:18 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET Description='Create Production Header and Plan for single ordered product', Help='Create Production Header and Plan for single ordered product.',Updated=TO_DATE('2012-08-10 13:51:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200252
;
-- Aug 10, 2012 1:51:18 PM CEST
-- Manufacturing Light
UPDATE AD_Field SET Name='Create Production', Description='Create Production Header and Plan for single ordered product', Help='Create Production Header and Plan for single ordered product.' WHERE AD_Column_ID=200252 AND IsCentrallyMaintained='Y'
;
-- Aug 10, 2012 1:51:58 PM CEST
-- Manufacturing Light
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,200080,0,'CreateShipment',TO_DATE('2012-08-10 13:51:58','YYYY-MM-DD HH24:MI:SS'),100,'U','Y','Create Shipment','Create Shipment',TO_DATE('2012-08-10 13:51:58','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 10, 2012 1:51:58 PM CEST
-- Manufacturing Light
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200080 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 10, 2012 1:52:37 PM CEST
-- Manufacturing Light
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200253,200080,0,200007,28,260,'CreateShipment',TO_DATE('2012-08-10 13:52:36','YYYY-MM-DD HH24:MI:SS'),100,'U',1,'Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Create Shipment',0,TO_DATE('2012-08-10 13:52:36','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 10, 2012 1:52:37 PM CEST
-- Manufacturing Light
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=200253 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 10, 2012 1:53:14 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET Description='Create Shipment for single ordered product', Help='Create Shipment for single ordered product',Updated=TO_DATE('2012-08-10 13:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200253
;
-- Aug 10, 2012 1:53:14 PM CEST
-- Manufacturing Light
UPDATE AD_Field SET Name='Create Shipment', Description='Create Shipment for single ordered product', Help='Create Shipment for single ordered product' WHERE AD_Column_ID=200253 AND IsCentrallyMaintained='Y'
;
-- Aug 10, 2012 1:53:30 PM CEST
-- Manufacturing Light
ALTER TABLE C_OrderLine ADD CreateShipment CHAR(1) DEFAULT NULL
;
-- Aug 10, 2012 1:53:58 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET DefaultValue='N',Updated=TO_DATE('2012-08-10 13:53:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200252
;
-- Aug 10, 2012 1:54:02 PM CEST
-- Manufacturing Light
ALTER TABLE C_OrderLine ADD CreateProduction CHAR(1) DEFAULT 'N'
;
-- Aug 10, 2012 1:54:21 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET DefaultValue='N',Updated=TO_DATE('2012-08-10 13:54:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200253
;
-- Aug 10, 2012 1:54:25 PM CEST
-- Manufacturing Light
ALTER TABLE C_OrderLine MODIFY CreateShipment CHAR(1) DEFAULT 'N'
;
-- Aug 10, 2012 1:56:53 PM CEST
-- Manufacturing Light
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,200252,200271,0,187,TO_DATE('2012-08-10 13:56:52','YYYY-MM-DD HH24:MI:SS'),100,1,'U','Y','Y','Y','N','N','N','N','N','Create Production',TO_DATE('2012-08-10 13:56:52','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 10, 2012 1:56:54 PM CEST
-- Manufacturing Light
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,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=200271 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 10, 2012 1:56:54 PM CEST
-- Manufacturing Light
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,200253,200272,0,187,TO_DATE('2012-08-10 13:56:54','YYYY-MM-DD HH24:MI:SS'),100,1,'U','Y','Y','Y','N','N','N','N','N','Create Shipment',TO_DATE('2012-08-10 13:56:54','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 10, 2012 1:56:54 PM CEST
-- Manufacturing Light
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,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=200272 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 10, 2012 1:57:34 PM CEST
-- Manufacturing Light
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2012-08-10 13:57:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200272
;
-- Aug 10, 2012 1:58:44 PM CEST
-- Manufacturing Light
UPDATE AD_Field SET DisplayLogic='@Processed@=Y',Updated=TO_DATE('2012-08-10 13:58:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200271
;
-- Aug 10, 2012 1:58:50 PM CEST
-- Manufacturing Light
UPDATE AD_Field SET DisplayLogic='@Processed@=Y',Updated=TO_DATE('2012-08-10 13:58:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200272
;
-- Aug 10, 2012 2:01:33 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET IsAlwaysUpdateable='Y',Updated=TO_DATE('2012-08-10 14:01:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200252
;
-- Aug 10, 2012 2:01:37 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET IsAlwaysUpdateable='Y',Updated=TO_DATE('2012-08-10 14:01:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200253
;
UPDATE AD_System
SET LastMigrationScriptApplied='881_IDEMPIERE-246_Manufacturing_Light_OrderLine_Create_Prod_Ship.sql'
WHERE LastMigrationScriptApplied<'881_IDEMPIERE-246_Manufacturing_Light_OrderLine_Create_Prod_Ship.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,450 @@
-- Aug 15, 2012 10:00:16 AM CEST
-- Manufacturing Light
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:00:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53015
;
-- Aug 15, 2012 10:01:58 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:01:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53016
;
-- Aug 15, 2012 10:02:18 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:02:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=536
;
-- Aug 15, 2012 10:02:23 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:02:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=533
;
-- Aug 15, 2012 10:02:29 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:02:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=320
;
-- Aug 15, 2012 10:02:46 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:02:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53128
;
-- Aug 15, 2012 10:02:48 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:02:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53022
;
-- Aug 15, 2012 10:02:51 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:02:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53023
;
-- Aug 15, 2012 10:03:34 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:03:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53024
;
-- Aug 15, 2012 10:03:37 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:03:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53025
;
-- Aug 15, 2012 10:03:58 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:03:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53032
;
-- Aug 15, 2012 10:04:04 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53033
;
-- Aug 15, 2012 10:04:06 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53180
;
-- Aug 15, 2012 10:04:08 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53182
;
-- Aug 15, 2012 10:04:11 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=478
;
-- Aug 15, 2012 10:04:14 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53183
;
-- Aug 15, 2012 10:04:21 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53035
;
-- Aug 15, 2012 10:04:24 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53036
;
-- Aug 15, 2012 10:04:27 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53037
;
-- Aug 15, 2012 10:04:29 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53038
;
-- Aug 15, 2012 10:04:40 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53257
;
-- Aug 15, 2012 10:04:45 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53042
;
-- Aug 15, 2012 10:04:50 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53043
;
-- Aug 15, 2012 10:04:53 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53047
;
-- Aug 15, 2012 10:04:55 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53045
;
-- Aug 15, 2012 10:04:58 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:04:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53046
;
-- Aug 15, 2012 10:05:02 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53044
;
-- Aug 15, 2012 10:05:06 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53048
;
-- Aug 15, 2012 10:05:09 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53050
;
-- Aug 15, 2012 10:05:11 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53049
;
-- Aug 15, 2012 10:05:14 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53051
;
-- Aug 15, 2012 10:05:17 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53052
;
-- Aug 15, 2012 10:05:20 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53053
;
-- Aug 15, 2012 10:05:22 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53054
;
-- Aug 15, 2012 10:05:26 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53056
;
-- Aug 15, 2012 10:05:29 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53057
;
-- Aug 15, 2012 10:05:31 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53058
;
-- Aug 15, 2012 10:05:49 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53062
;
-- Aug 15, 2012 10:05:52 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53063
;
-- Aug 15, 2012 10:05:54 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53064
;
-- Aug 15, 2012 10:05:58 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:05:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53065
;
-- Aug 15, 2012 10:06:05 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53066
;
-- Aug 15, 2012 10:06:07 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53067
;
-- Aug 15, 2012 10:06:09 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53088
;
-- Aug 15, 2012 10:06:13 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53068
;
-- Aug 15, 2012 10:06:16 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53185
;
-- Aug 15, 2012 10:06:18 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=445
;
-- Aug 15, 2012 10:06:21 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=472
;
-- Aug 15, 2012 10:06:23 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53184
;
-- Aug 15, 2012 10:06:40 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53072
;
-- Aug 15, 2012 10:06:42 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53129
;
-- Aug 15, 2012 10:06:50 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53074
;
-- Aug 15, 2012 10:06:53 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53199
;
-- Aug 15, 2012 10:06:55 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53075
;
-- Aug 15, 2012 10:06:58 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:06:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53076
;
-- Aug 15, 2012 10:07:00 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:07:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53078
;
-- Aug 15, 2012 10:07:07 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:07:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53079
;
-- Aug 15, 2012 10:07:13 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:07:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53081
;
-- Aug 15, 2012 10:07:16 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:07:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53198
;
-- Aug 15, 2012 10:07:22 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:07:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53082
;
-- Aug 15, 2012 10:10:07 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:10:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53014
;
-- Aug 15, 2012 10:10:15 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:10:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53029
;
-- Aug 15, 2012 10:10:22 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:10:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53071
;
-- Aug 15, 2012 10:10:35 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53017
;
-- Aug 15, 2012 10:10:40 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:10:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53018
;
-- Aug 15, 2012 10:10:46 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:10:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53019
;
-- Aug 15, 2012 10:10:51 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:10:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53021
;
-- Aug 15, 2012 10:10:54 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:10:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53020
;
-- Aug 15, 2012 10:11:07 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:11:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53026
;
-- Aug 15, 2012 10:11:10 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:11:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53027
;
-- Aug 15, 2012 10:11:14 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:11:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53028
;
-- Aug 15, 2012 10:11:23 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:11:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53030
;
-- Aug 15, 2012 10:11:26 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:11:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53031
;
-- Aug 15, 2012 10:11:41 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:11:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53181
;
-- Aug 15, 2012 10:11:45 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:11:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53034
;
-- Aug 15, 2012 10:11:56 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:11:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53039
;
-- Aug 15, 2012 10:11:59 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53040
;
-- Aug 15, 2012 10:12:03 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:12:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53224
;
-- Aug 15, 2012 10:12:09 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:12:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53041
;
-- Aug 15, 2012 10:12:39 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:12:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53055
;
-- Aug 15, 2012 10:12:52 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:12:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53059
;
-- Aug 15, 2012 10:12:56 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:12:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53060
;
-- Aug 15, 2012 10:12:59 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:12:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=194
;
-- Aug 15, 2012 10:13:06 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:13:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53061
;
-- Aug 15, 2012 10:13:27 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:13:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53069
;
-- Aug 15, 2012 10:13:31 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:13:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53070
;
-- Aug 15, 2012 10:13:35 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:13:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53188
;
-- Aug 15, 2012 10:13:40 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:13:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=484
;
-- Aug 15, 2012 10:13:50 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2012-08-15 10:13:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53073
;
UPDATE AD_System
SET LastMigrationScriptApplied='882_IDEMPIERE-246_Manufacturing_Light_Menu_deact_Libero.sql'
WHERE LastMigrationScriptApplied<'882_IDEMPIERE-246_Manufacturing_Light_Menu_deact_Libero.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,20 @@
-- Aug 7, 2012 1:45:03 PM CEST
-- Manufacturing Light fixes
INSERT INTO AD_PrintFormatItem (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_PrintFormatItem_ID,AD_PrintFormat_ID,ArcDiameter,Created,CreatedBy,FieldAlignmentType,ImageIsAttached,IsActive,IsAveraged,IsCentrallyMaintained,IsCounted,IsDeviationCalc,IsFilledRectangle,IsFixedWidth,IsGroupBy,IsHeightOneLine,IsImageField,IsMaxCalc,IsMinCalc,IsNextLine,IsNextPage,IsOrderBy,IsPageBreak,IsPrinted,IsRelativePosition,IsRunningTotal,IsSetNLPosition,IsSummarized,IsSuppressNull,IsVarianceCalc,LineAlignmentType,LineWidth,MaxHeight,MaxWidth,Name,PrintAreaType,PrintFormatType,PrintName,SeqNo,ShapeType,SortNo,Updated,UpdatedBy,XPosition,XSpace,YPosition,YSpace) VALUES (0,59231,0,200012,200001,0,TO_DATE('2012-08-07 13:45:03','YYYY-MM-DD HH24:MI:SS'),100,'L','N','Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','X',1,0,0,'Copy From','C','F','Copy From',0,'N',0,TO_DATE('2012-08-07 13:45:03','YYYY-MM-DD HH24:MI:SS'),100,0,0,0,0)
;
-- Aug 7, 2012 1:45:04 PM CEST
-- Manufacturing Light fixes
INSERT INTO AD_PrintFormatItem_Trl (AD_Language,AD_PrintFormatItem_ID,Name, PrintName,PrintNameSuffix, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_PrintFormatItem_ID,t.Name, t.PrintName,t.PrintNameSuffix, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_PrintFormatItem t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_PrintFormatItem_ID=200012 AND NOT EXISTS (SELECT * FROM AD_PrintFormatItem_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_PrintFormatItem_ID=t.AD_PrintFormatItem_ID)
;
-- Aug 7, 2012 1:45:04 PM CEST
-- Manufacturing Light fixes
UPDATE AD_PrintFormatItem_Trl trl SET PrintName = (SELECT e.PrintName FROM AD_Element_Trl e, AD_Column c WHERE e.AD_Language=trl.AD_Language AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=59231) WHERE AD_PrintFormatItem_ID = 200012 AND EXISTS (SELECT * FROM AD_Element_Trl e, AD_Column c WHERE e.AD_Language=trl.AD_Language AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=59231 AND trl.AD_PrintFormatItem_ID = 200012) AND EXISTS (SELECT * FROM AD_Client WHERE AD_Client_ID=trl.AD_Client_ID AND IsMultiLingualDocument='Y')
;
UPDATE AD_System
SET LastMigrationScriptApplied='883_IDEMPIERE-246_Manufacturing_Light_fixes.sql'
WHERE LastMigrationScriptApplied<'883_IDEMPIERE-246_Manufacturing_Light_fixes.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,455 @@
-- Aug 21, 2012 12:33:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Column SET AD_Process_ID=53229,Updated=TO_DATE('2012-08-21 12:33:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4712
;
-- Aug 21, 2012 12:34:01 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Tab SET IsActive='N',Updated=TO_DATE('2012-08-21 12:34:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53287
;
-- Aug 21, 2012 12:34:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Tab SET IsActive='N',Updated=TO_DATE('2012-08-21 12:34:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53286
;
-- Aug 21, 2012 12:34:08 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Tab SET IsActive='Y',Updated=TO_DATE('2012-08-21 12:34:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=317
;
-- Aug 21, 2012 12:35:09 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',317,1,'Y','N','N',62001,'N','Y',200289,'N','The Bill of Materials check box indicates if this product consists of a bill of materials.','U','Bill of Materials','Bill of Materials',100,0,'Y',TO_DATE('2012-08-21 12:35:08','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-21 12:35:08','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:35:09 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200289 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 21, 2012 12:35:09 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',317,10,'Y','N','N',62000,'N','Y',200290,'N','U','Part Type',100,0,'Y',TO_DATE('2012-08-21 12:35:09','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-21 12:35:09','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:35:09 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200290 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 21, 2012 12:35:10 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',317,22,'Y','N','N',61999,'N','Y',200291,'N','A search key allows you a fast method of finding a particular record.
If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_<TableName>", where TableName is the actual name of the table (e.g. C_Order).','U','Search key for the record in the format required - must be unique','Search Key',100,0,'Y',TO_DATE('2012-08-21 12:35:09','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-21 12:35:09','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:35:10 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200291 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 21, 2012 12:35:10 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',317,10,'Y','N','N',62002,'N','Y',200292,'N','Standard (plan) costs.','U','Standard Costs','Standard Cost',100,0,'Y',TO_DATE('2012-08-21 12:35:10','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-21 12:35:10','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:35:10 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200292 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 21, 2012 12:35:11 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',317,10,'Y','N','N',62003,'N','Y',200293,'N','Current cumulative amount for calculating the standard cost difference based on (actual) invoice price','U','Standard Cost Invoice Amount Sum (internal)','Std Cost Amount Sum',100,0,'Y',TO_DATE('2012-08-21 12:35:10','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-21 12:35:10','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:35:11 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200293 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 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=3751
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=3752
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=3753
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=3755
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=3812
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=3754
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=3758
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=6557
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=3756
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=3757
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200290
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200291
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200289
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=200292
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=200293
;
-- Aug 21, 2012 12:36:29 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2012-08-21 12:36:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200291
;
-- Aug 21, 2012 12:37:09 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2012-08-21 12:37:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200293
;
-- Aug 21, 2012 12:37:10 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET IsAllowCopy='N',Updated=TO_DATE('2012-08-21 12:37:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59831
;
-- Aug 21, 2012 12:37:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Tab SET DisplayLogic='@IsBOM@=''Y''',Updated=TO_DATE('2012-08-21 12:37:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=317
;
-- Aug 21, 2012 12:38:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET IsReadOnly='N',Updated=TO_DATE('2012-08-21 12:38:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3743
;
-- Aug 21, 2012 12:40:48 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',180,1,'Y','N','N',61997,'N',540,'Y',200294,'N','D','This product is manufactured','Manufactured',100,0,'Y',TO_DATE('2012-08-21 12:40:47','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-21 12:40:47','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:40:48 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200294 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 21, 2012 12:41:05 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',180,1,'Y','Y','N',200242,'N',550,'Y',200295,'N','Phantom Component are not stored and produced with the product. This is an option to avild maintaining an Engineering and Manufacturing Bill of Materials.','D','Phantom Component','Phantom',100,0,'Y',TO_DATE('2012-08-21 12:41:04','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-21 12:41:04','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:41:05 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200295 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 21, 2012 12:41:22 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',180,1,'Y','N','N',61996,'N',560,'Y',200296,'N','D','This part is Kanban controlled','Kanban controlled',100,0,'Y',TO_DATE('2012-08-21 12:41:21','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-21 12:41:21','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:41:22 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200296 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 21, 2012 12:41:43 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',180,10,'Y','N','N',61995,'N',570,'Y',200297,'N','D','Part Type',100,0,'Y',TO_DATE('2012-08-21 12:41:43','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-21 12:41:43','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:41:43 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200297 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 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=200294
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=200295
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=200296
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=200297
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=7646
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=1319
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=1320
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=1321
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=1322
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=3743
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=3746
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=3747
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=3744
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=3745
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=1027
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=1028
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=1568
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=1569
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y' WHERE AD_Field_ID=5381
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=450,IsDisplayed='Y' WHERE AD_Field_ID=5383
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=460,IsDisplayed='Y' WHERE AD_Field_ID=9286
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=470,IsDisplayed='Y' WHERE AD_Field_ID=12418
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=480,IsDisplayed='Y' WHERE AD_Field_ID=5910
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=490,IsDisplayed='Y' WHERE AD_Field_ID=5911
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=500,IsDisplayed='Y' WHERE AD_Field_ID=6130
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=510,IsDisplayed='Y' WHERE AD_Field_ID=8307
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=520,IsDisplayed='Y' WHERE AD_Field_ID=6343
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=530,IsDisplayed='Y' WHERE AD_Field_ID=6344
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=540,IsDisplayed='Y' WHERE AD_Field_ID=8608
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=550,IsDisplayed='Y' WHERE AD_Field_ID=8613
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=560,IsDisplayed='Y' WHERE AD_Field_ID=52015
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=570,IsDisplayed='Y' WHERE AD_Field_ID=52016
;
-- GardenWorld seed BOMs
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200001, 11, 0, 'Y', TO_DATE('2003-01-21 20:05:55','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2009-02-17 17:20:59','YYYY-MM-DD HH24:MI:SS'), 100, 30, 145, 135, 1, '1 table, 4 Chairs and 1 Sun Screen', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200002, 11, 0, 'Y', TO_DATE('2003-01-21 20:05:20','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2003-12-30 18:18:34','YYYY-MM-DD HH24:MI:SS'), 100, 10, 145, 134, 1, '1 table, 4 Chairs and 1 Sun Screen', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200003, 11, 0, 'Y', TO_DATE('2003-01-21 20:05:46','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2003-12-30 18:19:08','YYYY-MM-DD HH24:MI:SS'), 100, 20, 145, 133, 4, '1 table, 4 Chairs and 1 Sun Screen', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200004, 11, 0, 'Y', TO_DATE('2008-09-22 14:45:22','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 14:45:22','YYYY-MM-DD HH24:MI:SS'), 100, 10, 133, 50004, 1, 'Nice Chair for outdoors', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200005, 11, 0, 'Y', TO_DATE('2008-09-22 14:46:01','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 14:46:01','YYYY-MM-DD HH24:MI:SS'), 100, 20, 133, 50005, 1, 'Nice Chair for outdoors', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200006, 11, 0, 'Y', TO_DATE('2008-09-22 15:21:09','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 15:21:09','YYYY-MM-DD HH24:MI:SS'), 100, 30, 50001, 50003, 650, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200007, 11, 0, 'Y', TO_DATE('2008-09-22 15:20:01','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 15:21:30','YYYY-MM-DD HH24:MI:SS'), 100, 20, 50001, 50002, 8, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200008, 11, 0, 'Y', TO_DATE('2008-09-22 15:16:14','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 15:21:33','YYYY-MM-DD HH24:MI:SS'), 100, 10, 50001, 50015, 2, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200009, 11, 0, 'Y', TO_DATE('2008-09-22 14:55:46','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 15:21:48','YYYY-MM-DD HH24:MI:SS'), 100, 10, 50000, 50016, 2, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200010, 11, 0, 'Y', TO_DATE('2008-09-22 14:56:13','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 15:21:51','YYYY-MM-DD HH24:MI:SS'), 100, 20, 50000, 50002, 8, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200011, 11, 0, 'Y', TO_DATE('2008-09-22 15:00:48','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 15:22:00','YYYY-MM-DD HH24:MI:SS'), 100, 30, 50000, 50003, 500, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200012, 11, 0, 'Y', TO_DATE('2008-09-22 16:06:55','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 16:06:55','YYYY-MM-DD HH24:MI:SS'), 100, 20, 136, 50013, 1, '50 # Bag of Lawn Fertilizer', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200013, 11, 0, 'Y', TO_DATE('2008-09-22 16:05:35','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 16:08:19','YYYY-MM-DD HH24:MI:SS'), 100, 10, 136, 50008, 50, '50 # Bag of Lawn Fertilizer', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200014, 11, 0, 'Y', TO_DATE('2008-09-22 16:09:35','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 16:09:35','YYYY-MM-DD HH24:MI:SS'), 100, 10, 50007, 50008, 70, '70 # Bag of Lawn Fertilizer', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200015, 11, 0, 'Y', TO_DATE('2008-09-22 16:10:47','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 16:10:47','YYYY-MM-DD HH24:MI:SS'), 100, 20, 50007, 50014, 1, '70 # Bag of Lawn Fertilizer', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200016, 11, 0, 'Y', TO_DATE('2008-09-22 16:58:21','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 16:58:21','YYYY-MM-DD HH24:MI:SS'), 100, 10, 50008, 50010, 0, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200017, 11, 0, 'Y', TO_DATE('2008-09-22 16:59:05','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 16:59:05','YYYY-MM-DD HH24:MI:SS'), 100, 20, 50008, 50009, 0, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200018, 11, 0, 'Y', TO_DATE('2008-09-22 16:59:58','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 17:28:14','YYYY-MM-DD HH24:MI:SS'), 100, 30, 50008, 50012, 0, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200019, 11, 0, 'Y', TO_DATE('2008-09-22 17:06:47','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-09-22 17:28:19','YYYY-MM-DD HH24:MI:SS'), 100, 40, 50008, 50017, 0, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200020, 11, 0, 'Y', TO_DATE('2008-09-22 14:49:24','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2009-01-08 20:21:42','YYYY-MM-DD HH24:MI:SS'), 100, 30, 133, 50000, 1, 'Nice Chair for outdoors', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200021, 11, 0, 'Y', TO_DATE('2008-09-22 14:50:11','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2009-01-08 20:21:45','YYYY-MM-DD HH24:MI:SS'), 100, 40, 133, 50001, 1, 'Nice Chair for outdoors', 'P');
-- in case BOMs are configured
INSERT
INTO m_product_bom
(
m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description,
bomtype
)
SELECT nextidfunc(320, 'N'), l.ad_client_id, l.ad_org_id, l.isactive, l.created, l.createdby, l.updated, l.updatedby, l.line, b.m_product_id, l.m_product_id, l.qtybom, b.description,
cast(decode(l.componenttype,'OP','O','CO','P','PH','P','PK','P','VA',(case when l.feature in ('1','2','3','4','5','6','7','8','9') then cast(l.feature as char) else 'O' end),'P') as char)
from pp_product_bom b join pp_product_bomline l on b.pp_product_bom_id=l.pp_product_bom_id
where b.bomtype='A' and b.bomuse='M' and not exists (select 1 from m_product_bom b1 where b1.m_product_id=b.m_product_id and b1.m_productbom_id=l.m_product_id)
and b.pp_product_bom_id>999999;
update m_product set isphantom='Y' where m_product_id in (select m_product_id from pp_product_bomline where componenttype='PH');
UPDATE AD_System
SET LastMigrationScriptApplied='884_IDEMPIERE-246.sql'
WHERE LastMigrationScriptApplied<'884_IDEMPIERE-246.sql'
OR LastMigrationScriptApplied IS NULL
;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,60 @@
-- Aug 7, 2012 12:09:22 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200241,53243,0,29,249,'QtyBatchSize',TO_TIMESTAMP('2012-08-07 12:09:20','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Qty Batch Size',0,TO_TIMESTAMP('2012-08-07 12:09:20','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 7, 2012 12:24:48 PM CEST
-- Manufacturing Light phantom
ALTER TABLE M_Replenish ADD QtyBatchSize NUMERIC DEFAULT NULL
;
-- Aug 7, 2012 12:10:25 PM CEST
-- Manufacturing Light phantom
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=200241 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 7, 2012 12:21:48 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,200241,200257,0,182,TO_TIMESTAMP('2012-08-07 12:21:48','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Qty Batch Size',110,0,TO_TIMESTAMP('2012-08-07 12:21:48','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 7, 2012 12:22:10 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,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=200257 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 7, 2012 12:24:48 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200242,2788,0,20,208,'IsPhantom',TO_TIMESTAMP('2012-08-07 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,'N','D',1,'Y','Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','Phantom',0,TO_TIMESTAMP('2012-08-07 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 7, 2012 12:24:48 PM CEST
-- Manufacturing Light phantom
ALTER TABLE M_Product ADD IsPhantom CHAR(1) DEFAULT 'N'
;
-- Aug 7, 2012 12:24:48 PM CEST
-- Manufacturing Light phantom
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=200242 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 7, 2012 12:25:44 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,200242,200258,0,53346,TO_TIMESTAMP('2012-08-07 12:25:44','YYYY-MM-DD HH24:MI:SS'),100,'Phantom Component',1,'D','Phantom Component are not stored and produced with the product. This is an option to avoid maintaining an Engineering and Manufacturing Bill of Materials.','Y','Y','Y','N','N','N','N','Y','Phantom',205,0,TO_TIMESTAMP('2012-08-07 12:25:44','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 7, 2012 12:25:55 PM CEST
-- Manufacturing Light phantom
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,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=200258 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 7, 2012 12:50:26 PM CEST
-- Manufacturing Light phantom
UPDATE AD_Field SET IsSameLine='N',Updated=TO_TIMESTAMP('2012-08-07 12:50:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62007
;
UPDATE AD_System
SET LastMigrationScriptApplied='863_IDEMPIERE-246_Manufacturing_Light_phantom.sql'
WHERE LastMigrationScriptApplied<'863_IDEMPIERE-246_Manufacturing_Light_phantom.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,50 @@
-- Aug 6, 2012 11:54:27 AM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_ModelValidator SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-06 11:54:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ModelValidator_ID=50000
;
-- Aug 6, 2012 12:16:06 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET AD_Reference_ID=17, AD_Reference_Value_ID=319, ColumnName='IsKanban', EntityType='D', IsCentrallyMaintained='N', Name='Is Kanban',Updated=TO_TIMESTAMP('2012-08-06 12:16:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53526
;
-- Aug 6, 2012 12:16:06 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para_Trl SET IsTranslated='N' WHERE AD_Process_Para_ID=53526
;
-- Aug 6, 2012 12:16:49 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-06 12:16:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53527
;
-- Aug 6, 2012 12:17:10 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-06 12:17:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53528
;
-- Aug 6, 2012 12:17:28 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-06 12:17:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53525
;
-- Aug 6, 2012 12:17:49 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-06 12:17:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53524
;
-- Aug 6, 2012 12:18:09 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-06 12:18:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53523
;
-- Aug 6, 2012 12:20:29 PM CEST
-- IDEMPIERE-246 Manufacturing Light
UPDATE AD_Process_Para SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-06 12:20:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53267
;
UPDATE AD_System
SET LastMigrationScriptApplied='864_IDEMPIERE-246_Manufacturing_Light_Kanban.sql'
WHERE LastMigrationScriptApplied<'864_IDEMPIERE-246_Manufacturing_Light_Kanban.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,477 @@
-- Aug 16, 2012 4:41:38 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Table_ID,IsHighVolume,ImportTable,IsView,IsChangeLog,EntityType,CopyColumnsFromTable,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Name,AD_Client_ID,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Created) VALUES ('N','2',0,200012,'N','N','N','Y','D','N','L','627cd49d-d311-4b47-8a01-f99992edbcd0','Y','Y','AD_WizardProcess','Wizard Process',0,'Y',0,100,TO_TIMESTAMP('2012-08-16 16:41:37','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-08-16 16:41:37','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 16, 2012 4:41:38 PM COT
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=200012 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 16, 2012 4:41:38 PM COT
INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,IncrementNo,AD_Sequence_UU,AD_Org_ID,AD_Client_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive) VALUES ('N',50000,'Y',1000000,1000000,'N','Y',200011,'Table AD_WizardProcess','AD_WizardProcess',1,'3f66868f-2837-4ee1-9475-f36e101240da',0,0,TO_TIMESTAMP('2012-08-16 16:41:38','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-08-16 16:41:38','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;
-- Aug 16, 2012 4:46:00 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200306,'D','Y','N','N',0,'N',22,'N',19,'N',129,'N',102,'N','Y','2c70ff3d-e64a-49c5-abeb-86054ec9d28c','N','N','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',100,TO_TIMESTAMP('2012-08-16 16:45:59','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:45:59','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:00 PM COT
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=200306 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 16, 2012 4:46:01 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200307,'D','Y','N','N',0,'N',22,'N',19,'N',104,'N',113,'N','Y','b8b33d75-938f-473d-8a28-c7bf2bab2b4c','N','N','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',100,TO_TIMESTAMP('2012-08-16 16:46:01','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:01','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:01 PM COT
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=200307 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 16, 2012 4:46:01 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200308,'D','Y','N','N',0,'N',7,'N',16,'N','N',245,'N','Y','08e46e32-da39-46e6-8607-9aab1470d76e','N','N','N','Created','Date this record was created','The Created field indicates the date that this record was created.','Created','N',100,TO_TIMESTAMP('2012-08-16 16:46:01','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:01','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:02 PM COT
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=200308 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 16, 2012 4:46:02 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200309,'D',110,'Y','N','N',0,'N',22,'N',18,'N','N',246,'N','Y','d4a465e3-103e-4aee-8f79-d273db5a37c7','N','N','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',100,TO_TIMESTAMP('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:02 PM COT
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=200309 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 16, 2012 4:46:02 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200310,'D','N','N','N',0,'N',255,'Y',10,'N','N',275,'N','Y','d3e69713-bb88-418f-bc56-4d4dfc601bae','N','Y','N','Description','Optional short description of the record','A description is limited to 255 characters.','Description','Y',100,TO_TIMESTAMP('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:02 PM COT
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=200310 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 16, 2012 4:46:03 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200311,'D','N','N','N',0,'N',2000,'N',14,'N','N',326,'N','Y','ea75b9e0-bfb4-48ae-917d-7d5037f2f038','N','Y','N','Help','Comment or Hint','The Help field contains a hint, comment or help about the use of this item.','Comment/Help','Y',100,TO_TIMESTAMP('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:02','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:03 PM COT
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=200311 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 16, 2012 4:46:03 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200312,'D','Y','N','N',0,'N',1,'N',20,'N','N',348,'N','Y','b0f20af0-70b5-43db-8b69-060842f710f1','N','Y','N','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',100,TO_TIMESTAMP('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:03 PM COT
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=200312 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 16, 2012 4:46:04 PM COT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_WizardProcess_ID',200092,'D','Wizard Process','Wizard Process','1eba27dc-0eab-4bd6-babc-6f02fd547439',0,TO_TIMESTAMP('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 16, 2012 4:46:04 PM COT
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=200092 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 16, 2012 4:46:04 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200313,'D','Y','N','N',0,'N',22,'N',13,'N','Y',200092,'N','Y','a9b20d20-3d44-4aa3-a8fb-85f335c090ac','N','N','N','AD_WizardProcess_ID','Wizard Process','N',100,TO_TIMESTAMP('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:03','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:05 PM COT
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=200313 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 16, 2012 4:46:05 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,200012,200314,'D','N','N','N','N',36,'N',10,'N','N',55044,'N','Y','b0acec5a-e325-40ab-97f2-8d69f1c8a872','N','Y','N','M_RMAType_UU','M_RMAType_UU','N',100,TO_TIMESTAMP('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:05 PM COT
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=200314 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 16, 2012 4:46:05 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200315,'D','Y','N','Y',1,'N',60,'Y',10,'N','N',469,'N','Y','79f20c60-9c13-403a-bf9f-e31dca2c0bb3','N','Y','N','Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Name','Y',100,TO_TIMESTAMP('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:05 PM COT
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=200315 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 16, 2012 4:46:06 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200316,'D','Y','N','N',0,'N',7,'N',16,'N','N',607,'N','Y','53214a14-26e9-4f6d-a177-be4a09395f61','N','N','N','Updated','Date this record was updated','The Updated field indicates the date that this record was updated.','Updated','N',100,TO_TIMESTAMP('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:06 PM COT
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=200316 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 16, 2012 4:46:06 PM COT
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1,200012,200317,'D',110,'Y','N','N',0,'N',22,'N',18,'N','N',608,'N','Y','c9e90e19-7f6d-42da-ba22-695863800dad','N','N','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',100,TO_TIMESTAMP('2012-08-16 16:46:06','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-16 16:46:06','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 16, 2012 4:46:06 PM COT
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=200317 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 16, 2012 4:47:33 PM COT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_WizardProcess_UU',200093,'D','AD_WizardProcess_UU','AD_WizardProcess_UU','07515fbf-92fa-4d3d-8cf7-77efb872944d',0,TO_TIMESTAMP('2012-08-16 16:47:32','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-16 16:47:32','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 16, 2012 4:47:33 PM COT
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=200093 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 16, 2012 4:47:44 PM COT
UPDATE AD_Column SET AD_Element_ID=200093, ColumnName='AD_WizardProcess_UU', Description=NULL, Help=NULL, Name='AD_WizardProcess_UU',Updated=TO_TIMESTAMP('2012-08-16 16:47:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200314
;
-- Aug 16, 2012 4:47:44 PM COT
UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200314
;
-- Aug 16, 2012 4:47:44 PM COT
UPDATE AD_Field SET Name='AD_WizardProcess_UU', Description=NULL, Help=NULL WHERE AD_Column_ID=200314 AND IsCentrallyMaintained='Y'
;
-- Aug 16, 2012 4:48:51 PM COT
UPDATE AD_Column SET IsIdentifier='N', SeqNo=0, IsParent='Y', FieldLength=10, AD_Reference_ID=30, AD_Element_ID=142, IsUpdateable='N', ColumnName='AD_WF_Node_ID', Description='Workflow Node (activity), step or process', Help='The Workflow Node indicates a unique step or process in a Workflow.', Name='Node',Updated=TO_TIMESTAMP('2012-08-16 16:48:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200315
;
-- Aug 16, 2012 4:48:51 PM COT
UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200315
;
-- Aug 16, 2012 4:48:51 PM COT
UPDATE AD_Field SET Name='Node', Description='Workflow Node (activity), step or process', Help='The Workflow Node indicates a unique step or process in a Workflow.' WHERE AD_Column_ID=200315 AND IsCentrallyMaintained='Y'
;
-- Aug 16, 2012 4:49:35 PM COT
UPDATE AD_Column SET AD_Element_ID=1115, ColumnName='Note', Description='Optional additional user defined information', Help='The Note field allows for optional entry of user defined information regarding this record', Name='Note',Updated=TO_TIMESTAMP('2012-08-16 16:49:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200311
;
-- Aug 16, 2012 4:49:35 PM COT
UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200311
;
-- Aug 16, 2012 4:49:35 PM COT
UPDATE AD_Field SET Name='Note', Description='Optional additional user defined information', Help='The Note field allows for optional entry of user defined information regarding this record' WHERE AD_Column_ID=200311 AND IsCentrallyMaintained='Y'
;
-- Aug 16, 2012 4:50:30 PM COT
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('WizardStatus',200094,'D','Wizard Status','Wizard Status','06dab4e9-6080-40b5-a4a7-fa1d871ec058',0,TO_TIMESTAMP('2012-08-16 16:50:29','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-16 16:50:29','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 16, 2012 4:50:30 PM COT
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=200094 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 16, 2012 4:53:33 PM COT
INSERT INTO AD_Reference (AD_Reference_ID,Name,EntityType,AD_Reference_UU,IsOrderByValue,ValidationType,AD_Client_ID,AD_Org_ID,CreatedBy,Updated,IsActive,Created,UpdatedBy) VALUES (200003,'AD_WizardProcess Status','D','2ecdcec7-e361-4926-a8f7-a2f72bfd12e5','N','L',0,0,100,TO_TIMESTAMP('2012-08-16 16:53:27','YYYY-MM-DD HH24:MI:SS'),'Y',TO_TIMESTAMP('2012-08-16 16:53:27','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 16, 2012 4:53:33 PM COT
INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Reference_Trl_UU ) SELECT l.AD_Language,t.AD_Reference_ID, t.Help,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_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=200003 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID)
;
-- Aug 16, 2012 4:55:01 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200008,200003,'D','New','dd3f4502-2914-44af-b66f-1620f64c50a3','N',TO_TIMESTAMP('2012-08-16 16:55:00','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-08-16 16:55:00','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:01 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200008 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:55:11 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200009,200003,'D','Pending','00609fa8-5d40-4d42-ba37-b5919acdc782','P',TO_TIMESTAMP('2012-08-16 16:55:11','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-08-16 16:55:11','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:11 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200009 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:55:23 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200010,200003,'D','Finished','9829c724-da26-4442-ba9d-2d93d6e7858f','F',TO_TIMESTAMP('2012-08-16 16:55:22','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-08-16 16:55:22','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:23 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200010 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:55:34 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200011,200003,'D','In-Progress','c79db7f7-2646-483b-bb19-36164ffbabb9','I',TO_TIMESTAMP('2012-08-16 16:55:33','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-08-16 16:55:33','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:34 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200011 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:55:45 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200012,200003,'D','Skipped','a3d49831-ba26-4f4b-91f4-24f44b09b812','S',TO_TIMESTAMP('2012-08-16 16:55:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-08-16 16:55:44','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:45 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200012 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:55:54 PM COT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200013,200003,'D','Delayed','4e09d396-3fa6-461d-9cca-b2aede0c6e2a','D',TO_TIMESTAMP('2012-08-16 16:55:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-08-16 16:55:53','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 16, 2012 4:55:54 PM COT
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200013 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 16, 2012 4:56:29 PM COT
UPDATE AD_Column SET AD_Reference_Value_ID=200003, FieldLength=1, IsSelectionColumn='N', AD_Reference_ID=17, AD_Element_ID=200094, ColumnName='WizardStatus', Description=NULL, Help=NULL, Name='Wizard Status',Updated=TO_TIMESTAMP('2012-08-16 16:56:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200310
;
-- Aug 16, 2012 4:56:29 PM COT
UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200310
;
-- Aug 16, 2012 4:56:29 PM COT
UPDATE AD_Field SET Name='Wizard Status', Description=NULL, Help=NULL WHERE AD_Column_ID=200310 AND IsCentrallyMaintained='Y'
;
-- Aug 16, 2012 4:57:28 PM COT
CREATE TABLE AD_WizardProcess (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_WF_Node_ID NUMERIC(10) NOT NULL, AD_WizardProcess_ID NUMERIC(10) NOT NULL, AD_WizardProcess_UU VARCHAR(36) DEFAULT NULL , Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Note VARCHAR(2000) DEFAULT NULL , Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, WizardStatus CHAR(1) DEFAULT NULL , CONSTRAINT AD_WizardProcess_Key PRIMARY KEY (AD_WizardProcess_ID))
;
create unique index AD_WizardProcess_uu_idx on AD_WizardProcess(AD_WizardProcess_UU);
-- Aug 16, 2012 5:41:16 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_Column SET FieldLength=0, AD_Reference_ID=36,Updated=TO_TIMESTAMP('2012-08-16 17:41:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1206
;
-- Aug 16, 2012 5:41:20 PM COT
INSERT INTO t_alter_column values('ad_wf_node','Help','TEXT',null,'NULL')
;
-- Aug 16, 2012 5:42:15 PM COT
UPDATE AD_Column SET FieldLength=0, AD_Reference_ID=36,Updated=TO_TIMESTAMP('2012-08-16 17:42:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=2290
;
-- Aug 16, 2012 5:42:18 PM COT
INSERT INTO t_alter_column values('ad_wf_node_trl','Help','TEXT',null,'NULL')
;
-- Aug 16, 2012 6:47:08 PM COT
UPDATE AD_Column SET FieldLength=0, AD_Reference_ID=36,Updated=TO_TIMESTAMP('2012-08-16 18:47:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=238
;
-- Aug 16, 2012 6:47:14 PM COT
INSERT INTO t_alter_column values('ad_workflow','Help','TEXT',null,'NULL')
;
-- Aug 16, 2012 6:47:35 PM COT
UPDATE AD_Column SET FieldLength=0, AD_Reference_ID=36,Updated=TO_TIMESTAMP('2012-08-16 18:47:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=316
;
-- Aug 16, 2012 6:47:38 PM COT
INSERT INTO t_alter_column values('ad_workflow_trl','Help','TEXT',null,'NULL')
;
-- Aug 17, 2012 4:05:21 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Form (AccessLevel,Classname,AD_Form_ID,IsBetaFunctionality,EntityType,AD_Form_UU,Name,AD_Org_ID,UpdatedBy,CreatedBy,Updated,Created,AD_Client_ID,IsActive) VALUES ('2','org.compiere.apps.form.VSetupWizard',200000,'N','D','7df89045-cd20-46e3-94fb-e0b80e4084f8','Setup Wizard',0,100,100,TO_TIMESTAMP('2012-08-17 16:05:20','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-17 16:05:20','YYYY-MM-DD HH24:MI:SS'),0,'Y')
;
-- Aug 17, 2012 4:05:21 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Form_Trl (AD_Language,AD_Form_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Form_Trl_UU ) SELECT l.AD_Language,t.AD_Form_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_Form t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Form_ID=200000 AND NOT EXISTS (SELECT * FROM AD_Form_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Form_ID=t.AD_Form_ID)
;
-- Aug 17, 2012 4:05:37 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Menu (AD_Menu_ID,IsSummary,IsSOTrx,IsReadOnly,AD_Form_ID,EntityType,IsCentrallyMaintained,Name,"action",AD_Menu_UU,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Org_ID,Created,UpdatedBy) VALUES (200009,'N','N','N',200000,'D','Y','Setup Wizard','X','b733d9bd-95b2-4192-9668-59702307f624','Y',0,100,TO_TIMESTAMP('2012-08-17 16:05:37','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-08-17 16:05:37','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 17, 2012 4:05:37 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Menu_Trl_UU ) SELECT l.AD_Language,t.AD_Menu_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, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200009 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID)
;
-- Aug 17, 2012 4:05:37 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', CURRENT_TIMESTAMP, 100, CURRENT_TIMESTAMP, 100,t.AD_Tree_ID, 200009, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200009)
;
-- Aug 17, 2012 4:05:44 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_Preference SET Value='Y',Updated=TO_TIMESTAMP('2012-08-17 16:05:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Preference_ID=1000009
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=218
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=153
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=263
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=166
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=203
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53242
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=236
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=183
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=160
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=278
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=10, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=345
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53014
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53108
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=261
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53202
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=225
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200009
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=148
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=529
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=397
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=532
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53084
;
-- Aug 17, 2012 4:06:01 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53083
;
-- Aug 17, 2012 4:06:48 PM COT
-- IDEMPIERE-393 Setup wizards
UPDATE AD_Preference SET Value='N',Updated=TO_TIMESTAMP('2012-08-17 16:06:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Preference_ID=1000009
;
-- Aug 17, 2012 4:07:33 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Ref_List (AD_Ref_List_ID,AD_Reference_ID,EntityType,Name,AD_Ref_List_UU,Value,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Org_ID,AD_Client_ID) VALUES (200014,328,'D','Wizard','f1ffc07b-f822-4659-bdd7-e8dde31acac5','W',TO_TIMESTAMP('2012-08-17 16:07:32','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-08-17 16:07:32','YYYY-MM-DD HH24:MI:SS'),100,'Y',0,0)
;
-- Aug 17, 2012 4:07:33 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Ref_List_Trl_UU ) SELECT l.AD_Language,t.AD_Ref_List_ID, 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_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=200014 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID)
;
-- Aug 17, 2012 5:04:14 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Properties',200013,'D','d9f0db1a-5655-466c-8961-c1424b0ff275','Properties','Y',TO_TIMESTAMP('2012-08-17 17:04:13','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-08-17 17:04:13','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 17, 2012 5:04:14 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200013 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Aug 20, 2012 3:51:46 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','{0} tasks completed from {1} ({2}% advance)',200014,'D','60c03fae-3b77-4307-8454-64690aacc517','SetupWizardProgress','Y',TO_TIMESTAMP('2012-08-20 15:51:45','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-08-20 15:51:45','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 20, 2012 3:51:46 PM COT
-- IDEMPIERE-393 Setup wizards
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200014 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Set initial workflows on the wizard
UPDATE AD_Workflow SET WorkflowType='W', Priority=1 WHERE AD_Workflow_ID=104; -- Initial Client Setup Review
UPDATE AD_Workflow SET WorkflowType='W', Priority=2 WHERE AD_Workflow_ID=106; -- Business Partner Setup
UPDATE AD_Workflow SET WorkflowType='W', Priority=3 WHERE AD_Workflow_ID=107; -- Product Setup
UPDATE AD_Workflow SET WorkflowType='W', Priority=4 WHERE AD_Workflow_ID=111; -- Sales Setup
UPDATE AD_Workflow SET WorkflowType='W', Priority=5 WHERE AD_Workflow_ID=108; -- Price List Setup
UPDATE AD_Workflow SET WorkflowType='W', Priority=6 WHERE AD_Workflow_ID=110; -- Tax Setup
UPDATE AD_System
SET LastMigrationScriptApplied='878_IDEMPIERE-393.sql'
WHERE LastMigrationScriptApplied<'878_IDEMPIERE-393.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,175 @@
-- Aug 10, 2012 1:37:19 PM CEST
-- Manufacturing Light
INSERT INTO AD_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value) VALUES (0,0,200006,'3','N',TO_TIMESTAMP('2012-08-10 13:37:16','YYYY-MM-DD HH24:MI:SS'),100,'Create Production Header and Plan for single ordered product','U','Y','N','N','N','N','OrderLineCreateProduction','Y',0,0,TO_TIMESTAMP('2012-08-10 13:37:16','YYYY-MM-DD HH24:MI:SS'),100,'10000000')
;
-- Aug 10, 2012 1:37:19 PM CEST
-- Manufacturing Light
INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=200006 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID)
;
-- Aug 10, 2012 1:37:43 PM CEST
-- Manufacturing Light
UPDATE AD_Process SET Classname='org.compiere.process.OrderLineCreateProduction',Updated=TO_TIMESTAMP('2012-08-10 13:37:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200006
;
-- Aug 10, 2012 1:40:28 PM CEST
-- Manufacturing Light
UPDATE AD_Process SET Name='OrderLine Create Production', Value='C_OrderLine_CreateProduction',Updated=TO_TIMESTAMP('2012-08-10 13:40:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200006
;
-- Aug 10, 2012 1:40:28 PM CEST
-- Manufacturing Light
UPDATE AD_Process_Trl SET IsTranslated='N' WHERE AD_Process_ID=200006
;
-- Aug 10, 2012 1:43:51 PM CEST
-- Manufacturing Light
INSERT INTO AD_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value) VALUES (0,0,200007,'3','org.compiere.process.OrderLineCreateShipment','N',TO_TIMESTAMP('2012-08-10 13:43:50','YYYY-MM-DD HH24:MI:SS'),100,'Create Shipment for single ordered product','U','Y','N','N','N','N','OrderLine Create Shipment','S',0,0,TO_TIMESTAMP('2012-08-10 13:43:50','YYYY-MM-DD HH24:MI:SS'),100,'C_OrderLine_CreateShipment')
;
-- Aug 10, 2012 1:43:51 PM CEST
-- Manufacturing Light
INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=200007 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID)
;
-- Aug 10, 2012 1:44:01 PM CEST
-- Manufacturing Light
UPDATE AD_Process SET ShowHelp='S',Updated=TO_TIMESTAMP('2012-08-10 13:44:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200006
;
-- Aug 10, 2012 1:49:23 PM CEST
-- Manufacturing Light
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,200079,0,'CreateProduction',TO_TIMESTAMP('2012-08-10 13:49:22','YYYY-MM-DD HH24:MI:SS'),100,'U','Y','Create Production','Create Production',TO_TIMESTAMP('2012-08-10 13:49:22','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 10, 2012 1:49:24 PM CEST
-- Manufacturing Light
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200079 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 10, 2012 1:50:36 PM CEST
-- Manufacturing Light
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200252,200079,0,200006,28,260,'CreateProduction',TO_TIMESTAMP('2012-08-10 13:50:35','YYYY-MM-DD HH24:MI:SS'),100,'U',1,'Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Create Production',0,TO_TIMESTAMP('2012-08-10 13:50:35','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 10, 2012 1:50:36 PM CEST
-- Manufacturing Light
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=200252 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 10, 2012 1:51:18 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET Description='Create Production Header and Plan for single ordered product', Help='Create Production Header and Plan for single ordered product.',Updated=TO_TIMESTAMP('2012-08-10 13:51:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200252
;
-- Aug 10, 2012 1:51:18 PM CEST
-- Manufacturing Light
UPDATE AD_Field SET Name='Create Production', Description='Create Production Header and Plan for single ordered product', Help='Create Production Header and Plan for single ordered product.' WHERE AD_Column_ID=200252 AND IsCentrallyMaintained='Y'
;
-- Aug 10, 2012 1:51:58 PM CEST
-- Manufacturing Light
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,200080,0,'CreateShipment',TO_TIMESTAMP('2012-08-10 13:51:58','YYYY-MM-DD HH24:MI:SS'),100,'U','Y','Create Shipment','Create Shipment',TO_TIMESTAMP('2012-08-10 13:51:58','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 10, 2012 1:51:58 PM CEST
-- Manufacturing Light
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200080 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 10, 2012 1:52:37 PM CEST
-- Manufacturing Light
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200253,200080,0,200007,28,260,'CreateShipment',TO_TIMESTAMP('2012-08-10 13:52:36','YYYY-MM-DD HH24:MI:SS'),100,'U',1,'Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Create Shipment',0,TO_TIMESTAMP('2012-08-10 13:52:36','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Aug 10, 2012 1:52:37 PM CEST
-- Manufacturing Light
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=200253 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 10, 2012 1:53:14 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET Description='Create Shipment for single ordered product', Help='Create Shipment for single ordered product',Updated=TO_TIMESTAMP('2012-08-10 13:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200253
;
-- Aug 10, 2012 1:53:14 PM CEST
-- Manufacturing Light
UPDATE AD_Field SET Name='Create Shipment', Description='Create Shipment for single ordered product', Help='Create Shipment for single ordered product' WHERE AD_Column_ID=200253 AND IsCentrallyMaintained='Y'
;
-- Aug 10, 2012 1:53:30 PM CEST
-- Manufacturing Light
ALTER TABLE C_OrderLine ADD COLUMN CreateShipment CHAR(1) DEFAULT NULL
;
-- Aug 10, 2012 1:53:58 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET DefaultValue='N',Updated=TO_TIMESTAMP('2012-08-10 13:53:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200252
;
-- Aug 10, 2012 1:54:02 PM CEST
-- Manufacturing Light
ALTER TABLE C_OrderLine ADD COLUMN CreateProduction CHAR(1) DEFAULT 'N'
;
-- Aug 10, 2012 1:54:21 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET DefaultValue='N',Updated=TO_TIMESTAMP('2012-08-10 13:54:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200253
;
-- Aug 10, 2012 1:54:25 PM CEST
-- Manufacturing Light
INSERT INTO t_alter_column values('c_orderline','CreateShipment','CHAR(1)',null,'N')
;
-- Aug 10, 2012 1:56:53 PM CEST
-- Manufacturing Light
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,200252,200271,0,187,TO_TIMESTAMP('2012-08-10 13:56:52','YYYY-MM-DD HH24:MI:SS'),100,1,'U','Y','Y','Y','N','N','N','N','N','Create Production',TO_TIMESTAMP('2012-08-10 13:56:52','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 10, 2012 1:56:54 PM CEST
-- Manufacturing Light
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,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=200271 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 10, 2012 1:56:54 PM CEST
-- Manufacturing Light
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,200253,200272,0,187,TO_TIMESTAMP('2012-08-10 13:56:54','YYYY-MM-DD HH24:MI:SS'),100,1,'U','Y','Y','Y','N','N','N','N','N','Create Shipment',TO_TIMESTAMP('2012-08-10 13:56:54','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Aug 10, 2012 1:56:54 PM CEST
-- Manufacturing Light
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,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=200272 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 10, 2012 1:57:34 PM CEST
-- Manufacturing Light
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2012-08-10 13:57:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200272
;
-- Aug 10, 2012 1:58:44 PM CEST
-- Manufacturing Light
UPDATE AD_Field SET DisplayLogic='@Processed@=Y',Updated=TO_TIMESTAMP('2012-08-10 13:58:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200271
;
-- Aug 10, 2012 1:58:50 PM CEST
-- Manufacturing Light
UPDATE AD_Field SET DisplayLogic='@Processed@=Y',Updated=TO_TIMESTAMP('2012-08-10 13:58:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200272
;
-- Aug 10, 2012 2:01:33 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET IsAlwaysUpdateable='Y',Updated=TO_TIMESTAMP('2012-08-10 14:01:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200252
;
-- Aug 10, 2012 2:01:37 PM CEST
-- Manufacturing Light
UPDATE AD_Column SET IsAlwaysUpdateable='Y',Updated=TO_TIMESTAMP('2012-08-10 14:01:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200253
;
UPDATE AD_System
SET LastMigrationScriptApplied='881_IDEMPIERE-246_Manufacturing_Light_OrderLine_Create_Prod_Ship.sql'
WHERE LastMigrationScriptApplied<'881_IDEMPIERE-246_Manufacturing_Light_OrderLine_Create_Prod_Ship.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,450 @@
-- Aug 15, 2012 10:00:16 AM CEST
-- Manufacturing Light
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:00:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53015
;
-- Aug 15, 2012 10:01:58 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:01:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53016
;
-- Aug 15, 2012 10:02:18 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:02:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=536
;
-- Aug 15, 2012 10:02:23 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:02:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=533
;
-- Aug 15, 2012 10:02:29 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:02:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=320
;
-- Aug 15, 2012 10:02:46 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:02:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53128
;
-- Aug 15, 2012 10:02:48 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:02:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53022
;
-- Aug 15, 2012 10:02:51 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:02:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53023
;
-- Aug 15, 2012 10:03:34 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:03:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53024
;
-- Aug 15, 2012 10:03:37 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:03:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53025
;
-- Aug 15, 2012 10:03:58 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:03:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53032
;
-- Aug 15, 2012 10:04:04 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53033
;
-- Aug 15, 2012 10:04:06 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53180
;
-- Aug 15, 2012 10:04:08 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53182
;
-- Aug 15, 2012 10:04:11 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=478
;
-- Aug 15, 2012 10:04:14 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53183
;
-- Aug 15, 2012 10:04:21 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53035
;
-- Aug 15, 2012 10:04:24 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53036
;
-- Aug 15, 2012 10:04:27 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53037
;
-- Aug 15, 2012 10:04:29 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53038
;
-- Aug 15, 2012 10:04:40 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53257
;
-- Aug 15, 2012 10:04:45 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53042
;
-- Aug 15, 2012 10:04:50 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53043
;
-- Aug 15, 2012 10:04:53 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53047
;
-- Aug 15, 2012 10:04:55 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53045
;
-- Aug 15, 2012 10:04:58 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:04:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53046
;
-- Aug 15, 2012 10:05:02 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53044
;
-- Aug 15, 2012 10:05:06 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53048
;
-- Aug 15, 2012 10:05:09 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53050
;
-- Aug 15, 2012 10:05:11 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53049
;
-- Aug 15, 2012 10:05:14 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53051
;
-- Aug 15, 2012 10:05:17 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53052
;
-- Aug 15, 2012 10:05:20 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53053
;
-- Aug 15, 2012 10:05:22 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53054
;
-- Aug 15, 2012 10:05:26 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53056
;
-- Aug 15, 2012 10:05:29 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53057
;
-- Aug 15, 2012 10:05:31 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53058
;
-- Aug 15, 2012 10:05:49 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53062
;
-- Aug 15, 2012 10:05:52 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53063
;
-- Aug 15, 2012 10:05:54 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53064
;
-- Aug 15, 2012 10:05:58 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:05:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53065
;
-- Aug 15, 2012 10:06:05 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53066
;
-- Aug 15, 2012 10:06:07 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53067
;
-- Aug 15, 2012 10:06:09 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53088
;
-- Aug 15, 2012 10:06:13 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53068
;
-- Aug 15, 2012 10:06:16 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53185
;
-- Aug 15, 2012 10:06:18 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=445
;
-- Aug 15, 2012 10:06:21 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=472
;
-- Aug 15, 2012 10:06:23 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53184
;
-- Aug 15, 2012 10:06:40 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53072
;
-- Aug 15, 2012 10:06:42 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53129
;
-- Aug 15, 2012 10:06:50 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53074
;
-- Aug 15, 2012 10:06:53 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53199
;
-- Aug 15, 2012 10:06:55 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53075
;
-- Aug 15, 2012 10:06:58 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:06:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53076
;
-- Aug 15, 2012 10:07:00 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:07:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53078
;
-- Aug 15, 2012 10:07:07 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:07:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53079
;
-- Aug 15, 2012 10:07:13 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:07:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53081
;
-- Aug 15, 2012 10:07:16 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:07:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53198
;
-- Aug 15, 2012 10:07:22 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:07:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53082
;
-- Aug 15, 2012 10:10:07 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:10:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53014
;
-- Aug 15, 2012 10:10:15 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:10:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53029
;
-- Aug 15, 2012 10:10:22 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:10:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53071
;
-- Aug 15, 2012 10:10:35 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53017
;
-- Aug 15, 2012 10:10:40 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:10:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53018
;
-- Aug 15, 2012 10:10:46 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:10:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53019
;
-- Aug 15, 2012 10:10:51 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:10:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53021
;
-- Aug 15, 2012 10:10:54 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:10:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53020
;
-- Aug 15, 2012 10:11:07 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:11:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53026
;
-- Aug 15, 2012 10:11:10 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:11:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53027
;
-- Aug 15, 2012 10:11:14 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:11:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53028
;
-- Aug 15, 2012 10:11:23 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:11:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53030
;
-- Aug 15, 2012 10:11:26 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:11:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53031
;
-- Aug 15, 2012 10:11:41 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:11:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53181
;
-- Aug 15, 2012 10:11:45 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:11:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53034
;
-- Aug 15, 2012 10:11:56 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:11:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53039
;
-- Aug 15, 2012 10:11:59 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53040
;
-- Aug 15, 2012 10:12:03 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:12:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53224
;
-- Aug 15, 2012 10:12:09 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:12:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53041
;
-- Aug 15, 2012 10:12:39 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:12:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53055
;
-- Aug 15, 2012 10:12:52 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:12:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53059
;
-- Aug 15, 2012 10:12:56 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:12:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53060
;
-- Aug 15, 2012 10:12:59 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:12:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=194
;
-- Aug 15, 2012 10:13:06 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:13:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53061
;
-- Aug 15, 2012 10:13:27 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:13:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53069
;
-- Aug 15, 2012 10:13:31 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:13:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53070
;
-- Aug 15, 2012 10:13:35 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:13:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53188
;
-- Aug 15, 2012 10:13:40 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:13:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=484
;
-- Aug 15, 2012 10:13:50 AM CEST
-- Manufacturing Light - Deactivate Libero entries in Menu
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-15 10:13:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53073
;
UPDATE AD_System
SET LastMigrationScriptApplied='882_IDEMPIERE-246_Manufacturing_Light_Menu_deact_Libero.sql'
WHERE LastMigrationScriptApplied<'882_IDEMPIERE-246_Manufacturing_Light_Menu_deact_Libero.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,21 @@
-- Aug 7, 2012 1:45:03 PM CEST
-- Manufacturing Light fixes
INSERT INTO AD_PrintFormatItem (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_PrintFormatItem_ID,AD_PrintFormat_ID,ArcDiameter,Created,CreatedBy,FieldAlignmentType,ImageIsAttached,IsActive,IsAveraged,IsCentrallyMaintained,IsCounted,IsDeviationCalc,IsFilledRectangle,IsFixedWidth,IsGroupBy,IsHeightOneLine,IsImageField,IsMaxCalc,IsMinCalc,IsNextLine,IsNextPage,IsOrderBy,IsPageBreak,IsPrinted,IsRelativePosition,IsRunningTotal,IsSetNLPosition,IsSummarized,IsSuppressNull,IsVarianceCalc,LineAlignmentType,LineWidth,MaxHeight,MaxWidth,Name,PrintAreaType,PrintFormatType,PrintName,SeqNo,ShapeType,SortNo,Updated,UpdatedBy,XPosition,XSpace,YPosition,YSpace) VALUES (0,59231,0,200012,200001,0,TO_TIMESTAMP('2012-08-07 13:45:03','YYYY-MM-DD HH24:MI:SS'),100,'L','N','Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','X',1,0,0,'Copy From','C','F','Copy From',0,'N',0,TO_TIMESTAMP('2012-08-07 13:45:03','YYYY-MM-DD HH24:MI:SS'),100,0,0,0,0)
;
-- Aug 7, 2012 1:45:04 PM CEST
-- Manufacturing Light fixes
INSERT INTO AD_PrintFormatItem_Trl (AD_Language,AD_PrintFormatItem_ID,Name, PrintName,PrintNameSuffix, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_PrintFormatItem_ID,t.Name, t.PrintName,t.PrintNameSuffix, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_PrintFormatItem t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_PrintFormatItem_ID=200012 AND NOT EXISTS (SELECT * FROM AD_PrintFormatItem_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_PrintFormatItem_ID=t.AD_PrintFormatItem_ID)
;
-- Aug 7, 2012 1:45:04 PM CEST
-- Manufacturing Light fixes
UPDATE AD_PrintFormatItem_Trl SET PrintName = (SELECT e.PrintName FROM AD_Element_Trl e, AD_Column c WHERE e.AD_Language=AD_PrintFormatItem_Trl.AD_Language AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=59231) WHERE AD_PrintFormatItem_ID = 200012 AND EXISTS (SELECT * FROM AD_Element_Trl e, AD_Column c WHERE e.AD_Language=AD_PrintFormatItem_Trl.AD_Language AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=59231 AND AD_PrintFormatItem_Trl.AD_PrintFormatItem_ID = 200012) AND EXISTS (SELECT * FROM AD_Client WHERE AD_Client_ID=AD_PrintFormatItem_Trl.AD_Client_ID AND IsMultiLingualDocument='Y')
;
UPDATE AD_System
SET LastMigrationScriptApplied='883_IDEMPIERE-246_Manufacturing_Light_fixes.sql'
WHERE LastMigrationScriptApplied<'883_IDEMPIERE-246_Manufacturing_Light_fixes.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,452 @@
-- Aug 21, 2012 12:33:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Column SET AD_Process_ID=53229,Updated=TO_TIMESTAMP('2012-08-21 12:33:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4712
;
-- Aug 21, 2012 12:34:01 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Tab SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-21 12:34:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53287
;
-- Aug 21, 2012 12:34:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Tab SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-21 12:34:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53286
;
-- Aug 21, 2012 12:34:08 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Tab SET IsActive='Y',Updated=TO_TIMESTAMP('2012-08-21 12:34:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=317
;
-- Aug 21, 2012 12:35:09 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',317,1,'Y','N','N',62001,'N','Y',200289,'N','The Bill of Materials check box indicates if this product consists of a bill of materials.','U','Bill of Materials','Bill of Materials',100,0,'Y',TO_TIMESTAMP('2012-08-21 12:35:08','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-21 12:35:08','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:35:09 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200289 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 21, 2012 12:35:09 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',317,10,'Y','N','N',62000,'N','Y',200290,'N','U','Part Type',100,0,'Y',TO_TIMESTAMP('2012-08-21 12:35:09','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-21 12:35:09','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:35:09 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200290 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 21, 2012 12:35:10 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',317,22,'Y','N','N',61999,'N','Y',200291,'N','A search key allows you a fast method of finding a particular record.
If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_<TableName>", where TableName is the actual name of the table (e.g. C_Order).','U','Search key for the record in the format required - must be unique','Search Key',100,0,'Y',TO_TIMESTAMP('2012-08-21 12:35:09','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-21 12:35:09','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:35:10 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200291 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 21, 2012 12:35:10 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',317,10,'Y','N','N',62002,'N','Y',200292,'N','Standard (plan) costs.','U','Standard Costs','Standard Cost',100,0,'Y',TO_TIMESTAMP('2012-08-21 12:35:10','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-21 12:35:10','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:35:10 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200292 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 21, 2012 12:35:11 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',317,10,'Y','N','N',62003,'N','Y',200293,'N','Current cumulative amount for calculating the standard cost difference based on (actual) invoice price','U','Standard Cost Invoice Amount Sum (internal)','Std Cost Amount Sum',100,0,'Y',TO_TIMESTAMP('2012-08-21 12:35:10','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-21 12:35:10','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:35:11 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200293 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 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=3751
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=3752
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=3753
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=3755
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=3812
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=3754
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=3758
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=6557
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=3756
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=3757
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200290
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200291
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200289
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=200292
;
-- Aug 21, 2012 12:35:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=200293
;
-- Aug 21, 2012 12:36:29 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2012-08-21 12:36:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200291
;
-- Aug 21, 2012 12:37:09 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2012-08-21 12:37:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200293
;
-- Aug 21, 2012 12:37:10 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-08-21 12:37:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=59831
;
-- Aug 21, 2012 12:37:37 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Tab SET DisplayLogic='@IsBOM@=''Y''',Updated=TO_TIMESTAMP('2012-08-21 12:37:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=317
;
-- Aug 21, 2012 12:38:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET IsReadOnly='N',Updated=TO_TIMESTAMP('2012-08-21 12:38:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3743
;
-- Aug 21, 2012 12:40:48 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',180,1,'Y','N','N',61997,'N',540,'Y',200294,'N','D','This product is manufactured','Manufactured',100,0,'Y',TO_TIMESTAMP('2012-08-21 12:40:47','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-21 12:40:47','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:40:48 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200294 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 21, 2012 12:41:05 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',180,1,'Y','Y','N',200242,'N',550,'Y',200295,'N','Phantom Component are not stored and produced with the product. This is an option to avild maintaining an Engineering and Manufacturing Bill of Materials.','D','Phantom Component','Phantom',100,0,'Y',TO_TIMESTAMP('2012-08-21 12:41:04','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-21 12:41:04','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:41:05 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200295 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 21, 2012 12:41:22 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',180,1,'Y','N','N',61996,'N',560,'Y',200296,'N','D','This part is Kanban controlled','Kanban controlled',100,0,'Y',TO_TIMESTAMP('2012-08-21 12:41:21','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-21 12:41:21','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:41:22 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200296 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 21, 2012 12:41:43 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES (0,'N',180,10,'Y','N','N',61995,'N',570,'Y',200297,'N','D','Part Type',100,0,'Y',TO_TIMESTAMP('2012-08-21 12:41:43','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-21 12:41:43','YYYY-MM-DD HH24:MI:SS'))
;
-- Aug 21, 2012 12:41:43 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
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=200297 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 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=200294
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=200295
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=200296
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=200297
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=7646
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=1319
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=1320
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=1321
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=1322
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=3743
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=3746
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=3747
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=3744
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=3745
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=1027
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=1028
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=1568
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=1569
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y' WHERE AD_Field_ID=5381
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=450,IsDisplayed='Y' WHERE AD_Field_ID=5383
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=460,IsDisplayed='Y' WHERE AD_Field_ID=9286
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=470,IsDisplayed='Y' WHERE AD_Field_ID=12418
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=480,IsDisplayed='Y' WHERE AD_Field_ID=5910
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=490,IsDisplayed='Y' WHERE AD_Field_ID=5911
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=500,IsDisplayed='Y' WHERE AD_Field_ID=6130
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=510,IsDisplayed='Y' WHERE AD_Field_ID=8307
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=520,IsDisplayed='Y' WHERE AD_Field_ID=6343
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=530,IsDisplayed='Y' WHERE AD_Field_ID=6344
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=540,IsDisplayed='Y' WHERE AD_Field_ID=8608
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=550,IsDisplayed='Y' WHERE AD_Field_ID=8613
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=560,IsDisplayed='Y' WHERE AD_Field_ID=52015
;
-- Aug 21, 2012 12:43:03 PM COT
-- IDEMPIERE-246 Integrate Manufacturing Light
UPDATE AD_Field SET SeqNo=570,IsDisplayed='Y' WHERE AD_Field_ID=52016
;
-- GardenWorld seed BOMs
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200001, 11, 0, 'Y', TO_TIMESTAMP('2003-01-21 20:05:55','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2009-02-17 17:20:59','YYYY-MM-DD HH24:MI:SS'), 100, 30, 145, 135, 1, '1 table, 4 Chairs and 1 Sun Screen', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200002, 11, 0, 'Y', TO_TIMESTAMP('2003-01-21 20:05:20','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2003-12-30 18:18:34','YYYY-MM-DD HH24:MI:SS'), 100, 10, 145, 134, 1, '1 table, 4 Chairs and 1 Sun Screen', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200003, 11, 0, 'Y', TO_TIMESTAMP('2003-01-21 20:05:46','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2003-12-30 18:19:08','YYYY-MM-DD HH24:MI:SS'), 100, 20, 145, 133, 4, '1 table, 4 Chairs and 1 Sun Screen', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200004, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 14:45:22','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 14:45:22','YYYY-MM-DD HH24:MI:SS'), 100, 10, 133, 50004, 1, 'Nice Chair for outdoors', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200005, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 14:46:01','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 14:46:01','YYYY-MM-DD HH24:MI:SS'), 100, 20, 133, 50005, 1, 'Nice Chair for outdoors', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200006, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 15:21:09','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 15:21:09','YYYY-MM-DD HH24:MI:SS'), 100, 30, 50001, 50003, 650, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200007, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 15:20:01','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 15:21:30','YYYY-MM-DD HH24:MI:SS'), 100, 20, 50001, 50002, 8, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200008, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 15:16:14','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 15:21:33','YYYY-MM-DD HH24:MI:SS'), 100, 10, 50001, 50015, 2, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200009, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 14:55:46','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 15:21:48','YYYY-MM-DD HH24:MI:SS'), 100, 10, 50000, 50016, 2, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200010, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 14:56:13','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 15:21:51','YYYY-MM-DD HH24:MI:SS'), 100, 20, 50000, 50002, 8, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200011, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 15:00:48','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 15:22:00','YYYY-MM-DD HH24:MI:SS'), 100, 30, 50000, 50003, 500, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200012, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 16:06:55','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 16:06:55','YYYY-MM-DD HH24:MI:SS'), 100, 20, 136, 50013, 1, '50 # Bag of Lawn Fertilizer', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200013, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 16:05:35','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 16:08:19','YYYY-MM-DD HH24:MI:SS'), 100, 10, 136, 50008, 50, '50 # Bag of Lawn Fertilizer', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200014, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 16:09:35','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 16:09:35','YYYY-MM-DD HH24:MI:SS'), 100, 10, 50007, 50008, 70, '70 # Bag of Lawn Fertilizer', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200015, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 16:10:47','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 16:10:47','YYYY-MM-DD HH24:MI:SS'), 100, 20, 50007, 50014, 1, '70 # Bag of Lawn Fertilizer', 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200016, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 16:58:21','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 16:58:21','YYYY-MM-DD HH24:MI:SS'), 100, 10, 50008, 50010, 0, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200017, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 16:59:05','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 16:59:05','YYYY-MM-DD HH24:MI:SS'), 100, 20, 50008, 50009, 0, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200018, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 16:59:58','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 17:28:14','YYYY-MM-DD HH24:MI:SS'), 100, 30, 50008, 50012, 0, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200019, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 17:06:47','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-09-22 17:28:19','YYYY-MM-DD HH24:MI:SS'), 100, 40, 50008, 50017, 0, NULL, 'P');
INSERT INTO m_product_bom(m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description, bomtype)
VALUES(200020, 11, 0, 'Y', TO_TIMESTAMP('2008-09-22 14:49:24','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2009-01-08 20:21:42','YYYY-MM-DD HH24:MI:SS'), 100, 30, 133, 50000, 1, 'Nice Chair for outdoors', 'P');
-- in case other BOMs are configured
INSERT
INTO m_product_bom
(
m_product_bom_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, line, m_product_id, m_productbom_id, bomqty, description,
bomtype
)
SELECT nextidfunc(320, 'N'), l.ad_client_id, l.ad_org_id, l.isactive, l.created, l.createdby, l.updated, l.updatedby, l.line, b.m_product_id, l.m_product_id, l.qtybom, b.description,
case l.componenttype when 'OP' then 'O' when 'CO' then 'P' when 'PH' then 'P' when 'PK' then 'P' when 'VA' then case when l.feature in ('1','2','3','4','5','6','7','8','9') then l.feature else 'O' end else 'P' end
from pp_product_bom b join pp_product_bomline l on b.pp_product_bom_id=l.pp_product_bom_id
where b.bomtype='A' and b.bomuse='M' and not exists (select 1 from m_product_bom b1 where b1.m_product_id=b.m_product_id and b1.m_productbom_id=l.m_product_id)
and b.pp_product_bom_id>999999;
update m_product set isphantom='Y' where m_product_id in (select m_product_id from pp_product_bomline where componenttype='PH');
UPDATE AD_System
SET LastMigrationScriptApplied='884_IDEMPIERE-246.sql'
WHERE LastMigrationScriptApplied<'884_IDEMPIERE-246.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -25,6 +25,8 @@ import org.compiere.util.Env;
*
* @author Jorg Janke
* @version $Id: CalloutProduction.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
*
* @contrib Paul Bowden (adaxa) set locator from product
*/
public class CalloutProduction extends CalloutEngine
{
@ -44,6 +46,7 @@ public class CalloutProduction extends CalloutEngine
Integer M_Product_ID = (Integer)value;
if (M_Product_ID == null || M_Product_ID.intValue() == 0)
return "";
// Set Attribute
if (Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_Product_ID") == M_Product_ID.intValue()
&& Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID") != 0)
@ -54,6 +57,14 @@ public class CalloutProduction extends CalloutEngine
{
mTab.setValue("M_AttributeSetInstance_ID", null);
}
MProduct product = MProduct.get(ctx, M_Product_ID);
if ( product != null )
{
if ( product.getM_Locator_ID() > 0)
mTab.setValue("M_Locator_ID", product.getM_Locator_ID());
}
return "";
} // product

View File

@ -0,0 +1,128 @@
package org.compiere.process;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.logging.Level;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import org.compiere.util.Env;
public class BOMFlagValidate extends SvrProcess {
/** Product Category */
private int p_M_Product_Category_ID = 0;
protected void prepare() {
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("M_Product_Category_ID"))
p_M_Product_Category_ID = para[i].getParameterAsInt();
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
}
@Override
protected String doIt() throws Exception {
flagNonBOMs();
flagBOMs();
return "BOM Flags set correctly";
}
private void flagNonBOMs() throws Exception
{
//Select Products where there's a BOM, and there are no lines
String sql = "SELECT NAME FROM M_PRODUCT WHERE ISBOM = 'Y' AND " +
"M_PRODUCT_ID NOT IN (SELECT M_PRODUCT_ID FROM M_PRODUCT_BOM ) AND ";
if (p_M_Product_Category_ID == 0)
sql += "AD_Client_ID= ?";
else
sql += "M_Product_Category_ID= ?";
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sql, null);
if (p_M_Product_Category_ID == 0)
pstmt.setInt (1, Env.getAD_Client_ID(getCtx()));
else
pstmt.setInt(1, p_M_Product_Category_ID);
ResultSet rs = pstmt.executeQuery ();
while (rs.next())
{
addLog(0, null, null, rs.getString(1) + "Has Been Flagged as NonBOM as it has no lines");
}
rs.close();
pstmt.close();
String update = "UPDATE M_Product SET ISBOM = 'N' WHERE ISBOM = 'Y' AND M_PRODUCT_ID NOT IN " +
"(SELECT M_PRODUCT_ID FROM M_PRODUCT_BOM ) AND ";
if (p_M_Product_Category_ID == 0)
update += "AD_Client_ID= ?";
else
update += "M_Product_Category_ID= ?";
pstmt = null;
pstmt = DB.prepareStatement (update, null);
if (p_M_Product_Category_ID == 0)
pstmt.setInt (1, Env.getAD_Client_ID(getCtx()));
else
pstmt.setInt(1, p_M_Product_Category_ID);
pstmt.executeUpdate();
pstmt.close();
}
private void flagBOMs() throws Exception
{
//Select Products where there's a BOM, and there are no lines
String sql = "SELECT NAME FROM M_PRODUCT WHERE ISBOM = 'N' AND " +
"M_PRODUCT_ID IN (SELECT M_PRODUCT_ID FROM M_PRODUCT_BOM ) AND ";
if (p_M_Product_Category_ID == 0)
sql += "AD_Client_ID= ?";
else
sql += "M_Product_Category_ID= ?";
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sql, null);
if (p_M_Product_Category_ID == 0)
pstmt.setInt (1, Env.getAD_Client_ID(getCtx()));
else
pstmt.setInt(1, p_M_Product_Category_ID);
ResultSet rs = pstmt.executeQuery ();
while (rs.next())
{
addLog(0, null, null, rs.getString(1) + "Has Been Flagged as BOM as it has BOM lines");
}
rs.close();
pstmt.close();
String update = "UPDATE M_Product SET ISBOM = 'Y' WHERE ISBOM = 'N' AND M_PRODUCT_ID IN " +
"(SELECT M_PRODUCT_ID FROM M_PRODUCT_BOM ) AND ";
if (p_M_Product_Category_ID == 0)
update += "AD_Client_ID= ?";
else
update += "M_Product_Category_ID= ?";
pstmt = null;
pstmt = DB.prepareStatement (update, null);
if (p_M_Product_Category_ID == 0)
pstmt.setInt (1, Env.getAD_Client_ID(getCtx()));
else
pstmt.setInt(1, p_M_Product_Category_ID);
pstmt.executeUpdate();
pstmt.close();
}
}

View File

@ -0,0 +1,233 @@
/******************************************************************************
* Product: Compiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 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.process;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import org.compiere.model.*;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.*;
/**
* Validate BOM
*
* @author Jorg Janke
* @version $Id: BOMVerify.java,v 1.1 2007/07/23 05:34:35 mfuggle Exp $
*/
public class BOMVerify extends SvrProcess
{
/** The Product */
private int p_M_Product_ID = 0;
/** Product Category */
private int p_M_Product_Category_ID = 0;
/** Re-Validate */
private boolean p_IsReValidate = false;
/** Product */
private MProduct m_product = null;
/** List of Products */
private ArrayList<MProduct> foundproducts = new ArrayList<MProduct>();
private ArrayList<MProduct> validproducts = new ArrayList<MProduct>();
private ArrayList<MProduct> invalidproducts = new ArrayList<MProduct>();
private ArrayList<MProduct> containinvalidproducts = new ArrayList<MProduct>();
private ArrayList<MProduct> checkedproducts = new ArrayList<MProduct>();
/**
* Prepare
*/
protected void prepare ()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("M_Product_ID"))
p_M_Product_ID = para[i].getParameterAsInt();
else if (name.equals("M_Product_Category_ID"))
p_M_Product_Category_ID = para[i].getParameterAsInt();
else if (name.equals("IsReValidate"))
p_IsReValidate = "Y".equals(para[i].getParameter());
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
if ( p_M_Product_ID == 0 )
p_M_Product_ID = getRecord_ID();
} // prepare
/**
* Process
* @return Info
* @throws Exception
*/
protected String doIt() throws Exception
{
if (p_M_Product_ID != 0)
{
log.info("M_Product_ID=" + p_M_Product_ID);
checkProduct(new MProduct(getCtx(), p_M_Product_ID, get_TrxName()));
return "Product Checked";
}
log.info("M_Product_Category_ID=" + p_M_Product_Category_ID
+ ", IsReValidate=" + p_IsReValidate);
//
int counter = 0;
PreparedStatement pstmt = null;
String sql = "SELECT M_Product_ID FROM M_Product "
+ "WHERE IsBOM='Y' AND ";
if (p_M_Product_Category_ID == 0)
sql += "AD_Client_ID=? ";
else
sql += "M_Product_Category_ID=? ";
if (!p_IsReValidate)
sql += "AND IsVerified<>'Y' ";
sql += "ORDER BY Name";
int AD_Client_ID = Env.getAD_Client_ID(getCtx());
try
{
pstmt = DB.prepareStatement (sql, null);
if (p_M_Product_Category_ID == 0)
pstmt.setInt (1, AD_Client_ID);
else
pstmt.setInt(1, p_M_Product_Category_ID);
ResultSet rs = pstmt.executeQuery ();
while (rs.next ())
{
p_M_Product_ID = rs.getInt(1); //ADAXA - validate the product retrieved from database
checkProduct(new MProduct(getCtx(), p_M_Product_ID, get_TrxName()));
counter++;
}
rs.close ();
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
log.log (Level.SEVERE, sql, e);
}
try
{
if (pstmt != null)
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
pstmt = null;
}
return "#" + counter;
} // doIt
private void checkProduct(MProduct product)
{
if (product.isBOM() && !checkedproducts.contains(product))
{
validateProduct(product);
}
}
/**
* Validate Product
* @param product product
* @return Info
*/
private boolean validateProduct (MProduct product)
{
if (!product.isBOM())
return false;
// Check Old Product BOM Structure
log.config(product.getName());
foundproducts.add(product);
MProductBOM[] productsBOMs = MProductBOM.getBOMLines(product);
boolean containsinvalid = false;
boolean invalid = false;
for (int i = 0; i < productsBOMs.length; i++)
{
MProductBOM productsBOM = productsBOMs[i];
MProduct pp = new MProduct(getCtx(), productsBOM.getM_ProductBOM_ID(), get_TrxName());
if (!pp.isBOM())
log.finer(pp.getName());
else
{
if (validproducts.contains(pp))
{
//Do nothing, no need to recheck
}
if (invalidproducts.contains(pp))
{
containsinvalid = true;
}
else if (foundproducts.contains(pp))
{
invalid = true;
addLog(0, null, null, product.getValue() + " recursively contains " + pp.getValue());
}
else
{
if (!validateProduct(pp))
{
containsinvalid = true;
}
}
}
}
checkedproducts.add(product);
foundproducts.remove(product);
if (invalid)
{
invalidproducts.add(product);
product.setIsVerified(false);
product.save();
return false;
}
else if (containsinvalid)
{
containinvalidproducts.add(product);
product.setIsVerified(false);
product.save();
return false;
}
else
{
validproducts.add(product);
product.setIsVerified(true);
product.save();
return true;
}
} // validateProduct
} // BOMValidate

View File

@ -0,0 +1,199 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* 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 *
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
* Contributor(s): Victor Perez www.e-evolution.com *
* Teo Sarca, www.arhipac.ro *
*****************************************************************************/
package org.compiere.process;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import org.adempiere.exceptions.FillMandatoryException;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MCost;
import org.compiere.model.MCostElement;
import org.compiere.model.MProduct;
import org.compiere.model.MProductBOM;
import org.compiere.model.Query;
import org.compiere.model.X_T_BOM_Indented;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.Env;
/**
* Cost Multi-Level BOM & Formula Review
*
* @author victor.perez@e-evolution.com
* @author Teo Sarca, www.arhipac.ro
*
* @author pbowden@adaxa.com modified for manufacturing light
*
*/
public class IndentedBOM extends SvrProcess
{
//
private int p_AD_Org_ID = 0;
private int p_C_AcctSchema_ID = 0;
private int p_M_Product_ID = 0;
private int p_M_CostElement_ID = 0;
private String p_CostingMethod = MCostElement.COSTINGMETHOD_StandardCosting;
//
private int m_LevelNo = 0;
private int m_SeqNo = 0;
private MAcctSchema m_as = null;
private BigDecimal m_currentCost = Env.ZERO;
private BigDecimal m_futureCost = Env.ZERO;
protected void prepare()
{
for (ProcessInfoParameter para : getParameter())
{
String name = para.getParameterName();
if (para.getParameter() == null)
;
else if (name.equals(MCost.COLUMNNAME_C_AcctSchema_ID))
{
p_C_AcctSchema_ID= para.getParameterAsInt();
m_as = MAcctSchema.get(getCtx(), p_C_AcctSchema_ID);
}
else if (name.equals(MCost.COLUMNNAME_M_CostElement_ID))
{
p_M_CostElement_ID = para.getParameterAsInt();
}
else if (name.equals(MCost.COLUMNNAME_M_Product_ID))
p_M_Product_ID = para.getParameterAsInt();
else
log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name);
}
} // prepare
/**
* Perform process.
*
* @return Message (clear text)
* @throws Exception
* if not successful
*/
protected String doIt() throws Exception
{
if (p_M_Product_ID == 0)
{
throw new FillMandatoryException("M_Product_ID");
}
explodeProduct(p_M_Product_ID, Env.ONE, Env.ONE);
//
return "";
} // doIt
/**
* Generate an Explosion for this product
* @param product
* @param isComponent component / header
*/
private llCost explodeProduct(int M_Product_ID, BigDecimal qty, BigDecimal accumQty)
{
MProduct product = MProduct.get(getCtx(), M_Product_ID);
X_T_BOM_Indented tboml = new X_T_BOM_Indented(getCtx(), 0, get_TrxName());
tboml.setAD_Org_ID(p_AD_Org_ID);
tboml.setC_AcctSchema_ID(p_C_AcctSchema_ID);
tboml.setAD_PInstance_ID(getAD_PInstance_ID());
tboml.setM_CostElement_ID(p_M_CostElement_ID);
tboml.setSel_Product_ID(product.get_ID());
tboml.setM_Product_ID(p_M_Product_ID);
tboml.setQtyBOM(qty);
tboml.setQty(accumQty);
//
tboml.setSeqNo(m_SeqNo);
tboml.setLevelNo(m_LevelNo);
String pad = "";
if (m_LevelNo > 0)
pad = String.format("%1$" + 4*1 + "s", "");
tboml.setLevels( (m_LevelNo > 0 ? ":" : "") + pad +" " + product.getValue());
//
// Set Costs:
MCost cost = MCost.get(product, 0, m_as, p_AD_Org_ID, p_M_CostElement_ID, get_TrxName());
tboml.setCurrentCostPrice(cost.getCurrentCostPrice());
tboml.setCost(cost.getCurrentCostPrice().multiply(accumQty));
tboml.setFutureCostPrice(cost.getFutureCostPrice());
tboml.setCostFuture(cost.getFutureCostPrice().multiply(accumQty));
m_SeqNo++;
BigDecimal llCost = Env.ZERO;
BigDecimal llFutureCost = Env.ZERO;
List<MProductBOM> list = getBOMs(product);
for (MProductBOM bom : list)
{
m_LevelNo++;
llCost ll = explodeProduct(bom.getM_ProductBOM_ID(), bom.getBOMQty(), accumQty.multiply(bom.getBOMQty()));
llCost = llCost.add(ll.currentCost.multiply(accumQty.multiply(bom.getBOMQty())));
llFutureCost = llFutureCost.add(ll.futureCost.multiply(accumQty.multiply(bom.getBOMQty())));
m_LevelNo--;
}
llCost retVal = new llCost();
if (list.size() == 0 )
{
tboml.setCurrentCostPriceLL(cost.getCurrentCostPrice());
tboml.setFutureCostPriceLL(cost.getFutureCostPrice());
//
retVal.currentCost = cost.getCurrentCostPrice();
retVal.futureCost = cost.getFutureCostPrice();
}
else
{
tboml.setCurrentCostPriceLL(llCost);
tboml.setFutureCostPriceLL(llFutureCost);
//
retVal.currentCost = llCost;
retVal.futureCost = llFutureCost;
}
tboml.saveEx();
return retVal;
}
/**
* Get BOMs for given product
* @param product
* @param isComponent
* @return list of MProductBOM
*/
private List<MProductBOM> getBOMs(MProduct product)
{
ArrayList<Object> params = new ArrayList<Object>();
StringBuffer whereClause = new StringBuffer();
whereClause.append(MProductBOM.COLUMNNAME_M_Product_ID).append("=?");
params.add(product.get_ID());
List<MProductBOM> list = new Query(getCtx(), MProductBOM.Table_Name, whereClause.toString(), null)
.setParameters(params)
.setOnlyActiveRecords(true)
.setOrderBy(MProductBOM.COLUMNNAME_Line)
.list();
return list;
}
private class llCost {
BigDecimal currentCost = Env.ZERO;
BigDecimal futureCost = Env.ZERO;
}
}

View File

@ -102,7 +102,7 @@ public class M_Production_Run extends SvrProcess {
for (X_M_ProductionPlan pp :lines)
{
if (!production.isCreated())
if (!"Y".equals(production.getIsCreated()) )
{
int line = 100;
int no = DB.executeUpdateEx("DELETE M_ProductionLine WHERE M_ProductionPlan_ID = ?", new Object[]{pp.getM_ProductionPlan_ID()},get_TrxName());
@ -184,9 +184,9 @@ public class M_Production_Run extends SvrProcess {
}
} // Production Plan
if(!production.isCreated())
if(!"Y".equals(production.getIsCreated()) )
{
production.setIsCreated(true);
production.setIsCreated("Y");
production.saveEx();
}
else

View File

@ -0,0 +1,137 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
* Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
* are Copyright (C) 1999-2005 Jorg Janke.
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________.
*
* Modified by Paul Bowden
* ADAXA
*****************************************************************************/
package org.compiere.process;
import java.sql.Timestamp;
import java.util.logging.Level;
import org.compiere.model.MDocType;
import org.compiere.model.MOrder;
import org.compiere.model.MOrderLine;
import org.compiere.model.MProduct;
import org.compiere.model.MProduction;
import org.compiere.model.MWarehouse;
import org.compiere.util.DB;
import org.compiere.util.Env;
/**
* Create (Generate) Invoice from Shipment
*
* @author Jorg Janke
* @version $Id: OrderLineCreateProduction.java,v 1.1 2007/07/23 05:34:35 mfuggle Exp $
*/
public class OrderLineCreateProduction extends SvrProcess
{
/** Shipment */
private int p_C_OrderLine_ID = 0;
private Timestamp p_MovementDate = null;
private boolean ignorePrevProduction = false;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
if (name.equals("MovementDate"))
p_MovementDate = (Timestamp) para[i].getParameter();
else if (name.equals("IgnorePrevProduction"))
ignorePrevProduction = "Y".equals(para[i].getParameter());
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
if (p_MovementDate == null)
p_MovementDate = Env.getContextAsDate(getCtx(), "#Date");
if ( p_MovementDate==null)
p_MovementDate = new Timestamp(System.currentTimeMillis());
p_C_OrderLine_ID = getRecord_ID();
} // prepare
/**
* Create Production Header and Plan for single ordered product
*
* @throws Exception
*/
protected String doIt () throws Exception
{
log.info("C_OrderLine_ID=" + p_C_OrderLine_ID );
if (p_C_OrderLine_ID == 0)
throw new IllegalArgumentException("No OrderLine");
//
MOrderLine line = new MOrderLine (getCtx(), p_C_OrderLine_ID, get_TrxName());
if (line.get_ID() == 0)
throw new IllegalArgumentException("Order line not found");
MOrder order = new MOrder (getCtx(), line.getC_Order_ID(), get_TrxName());
if (!MOrder.DOCSTATUS_Completed.equals(order.getDocStatus()))
throw new IllegalArgumentException("Order not completed");
MDocType doc = new MDocType(getCtx(), order.getC_DocType_ID(), get_TrxName());
if ( (line.getQtyOrdered().subtract(line.getQtyDelivered())).compareTo(Env.ZERO) <= 0 )
{
if (!doc.getDocSubTypeSO().equals("ON")) //Consignment and stock orders both have subtype of ON
{
return "Ordered quantity already shipped";
}
}
// If we don't ignore previous production, and there has been a previous one,
//throw an exception
if (!ignorePrevProduction)
{
String docNo = DB.getSQLValueString(get_TrxName(),
"SELECT max(DocumentNo) " +
"FROM M_Production WHERE C_OrderLine_ID = ?",
p_C_OrderLine_ID);
if (docNo != null)
{
throw new IllegalArgumentException("Production has already been created: " + docNo);
}
}
MProduction production = new MProduction( line );
MProduct product = new MProduct (getCtx(), line.getM_Product_ID(), get_TrxName());
production.setM_Product_ID(line.getM_Product_ID());
production.setProductionQty(line.getQtyOrdered().subtract(line.getQtyDelivered()));
production.setDatePromised(line.getDatePromised());
if ( product.getM_Locator_ID() > 0 )
production.setM_Locator_ID(product.getM_Locator_ID());
production.setC_OrderLine_ID(p_C_OrderLine_ID);
int locator = product.getM_Locator_ID();
if ( locator == 0 )
locator = MWarehouse.get(getCtx(), line.getM_Warehouse_ID()).getDefaultLocator().get_ID();
production.setM_Locator_ID(locator);
production.saveEx();
production.createLines(false);
production.setIsCreated("Y");
production.saveEx();
return "Production created -- " + production.get_ValueAsString("DocumentNo");
} // OrderLineCreateShipment
} // OrderLineCreateShipment

View File

@ -0,0 +1,111 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
* Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
* are Copyright (C) 1999-2005 Jorg Janke.
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________.
*
* Modified by Paul Bowden
* ADAXA
*****************************************************************************/
package org.compiere.process;
import java.sql.Timestamp;
import java.util.logging.Level;
import org.compiere.model.MInOut;
import org.compiere.model.MInOutLine;
import org.compiere.model.MOrder;
import org.compiere.model.MOrderLine;
import org.compiere.util.DB;
import org.compiere.util.Env;
/**
* Create (Generate) Invoice from Shipment
*
* @author Jorg Janke
* @version $Id: OrderLineCreateShipment.java,v 1.1 2007/07/23 05:34:35 mfuggle Exp $
*/
public class OrderLineCreateShipment extends SvrProcess
{
/** Shipment */
private int p_C_OrderLine_ID = 0;
private Timestamp p_MovementDate = null;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
if (name.equals("MovementDate"))
p_MovementDate = (Timestamp) para[i].getParameter();
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
if (p_MovementDate == null)
p_MovementDate = Env.getContextAsDate(getCtx(), "#Date");
if ( p_MovementDate==null)
p_MovementDate = new Timestamp(System.currentTimeMillis());
p_C_OrderLine_ID = getRecord_ID();
} // prepare
/**
* Create Invoice.
* @return document no
* @throws Exception
*/
protected String doIt () throws Exception
{
log.info("C_OrderLine_ID=" + p_C_OrderLine_ID );
if (p_C_OrderLine_ID == 0)
throw new IllegalArgumentException("No OrderLine");
//
MOrderLine line = new MOrderLine (getCtx(), p_C_OrderLine_ID, get_TrxName());
if (line.get_ID() == 0)
throw new IllegalArgumentException("Order line not found");
MOrder order = new MOrder (getCtx(), line.getC_Order_ID(), get_TrxName());
if (!MOrder.DOCSTATUS_Completed.equals(order.getDocStatus()))
throw new IllegalArgumentException("Order not completed");
if ( (line.getQtyOrdered().subtract(line.getQtyDelivered())).compareTo(Env.ZERO) <= 0 )
return "Ordered quantity already shipped";
int C_DocTypeShipment_ID = DB.getSQLValue(get_TrxName(),
"SELECT C_DocTypeShipment_ID FROM C_DocType WHERE C_DocType_ID=?",
order.getC_DocType_ID());
MInOut shipment = new MInOut (order, C_DocTypeShipment_ID, p_MovementDate);
shipment.setM_Warehouse_ID(line.getM_Warehouse_ID());
shipment.setMovementDate(line.getDatePromised());
if (!shipment.save())
throw new IllegalArgumentException("Cannot save shipment header");
MInOutLine sline = new MInOutLine( shipment );
sline.setOrderLine(line, 0, line.getQtyReserved());
//sline.setDatePromised(line.getDatePromised());
sline.setQtyEntered(line.getQtyReserved());
sline.setC_UOM_ID(line.getC_UOM_ID());
sline.setQty(line.getQtyReserved());
sline.setM_Warehouse_ID(line.getM_Warehouse_ID());
if (!sline.save())
throw new IllegalArgumentException("Cannot save Shipment Line");
return shipment.getDocumentNo();
} // OrderLineCreateShipment
} // OrderLineCreateShipment

View File

@ -0,0 +1,124 @@
package org.compiere.process;
import java.math.BigDecimal;
import java.util.logging.Level;
import org.compiere.model.MProduction;
import org.compiere.util.AdempiereUserError;
import org.compiere.util.DB;
/**
*
* Process to create production lines based on the plans
* defined for a particular production header
* @author Paul Bowden
*
*/
public class ProductionCreate extends SvrProcess {
private int p_M_Production_ID=0;
private MProduction m_production = null;
private boolean mustBeStocked = false; //not used
private boolean recreate = false;
private BigDecimal newQty = null;
//private int p_M_Locator_ID=0;
protected void prepare() {
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if ("Recreate".equals(name))
recreate = "Y".equals(para[i].getParameter());
else if ("ProductionQty".equals(name))
newQty = (BigDecimal) para[i].getParameter();
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
p_M_Production_ID = getRecord_ID();
m_production = new MProduction(getCtx(), p_M_Production_ID, get_TrxName());
} //prepare
@Override
protected String doIt() throws Exception {
if ( m_production.get_ID() == 0 )
throw new AdempiereUserError("Could not load production header");
if ( m_production.isProcessed() )
return "Already processed";
return createLines();
}
private boolean costsOK(int M_Product_ID) throws AdempiereUserError {
// Warning will not work if non-standard costing is used
String sql = "SELECT ABS(((cc.currentcostprice-(SELECT SUM(c.currentcostprice*bom.bomqty)"
+ " FROM m_cost c"
+ " INNER JOIN m_product_bom bom ON (c.m_product_id=bom.m_productbom_id)"
+ " WHERE bom.m_product_id = pp.m_product_id)"
+ " )/cc.currentcostprice))"
+ " FROM m_product pp"
+ " INNER JOIN m_cost cc on (cc.m_product_id=pp.m_product_id)"
+ " INNER JOIN m_costelement ce ON (cc.m_costelement_id=ce.m_costelement_id)"
+ " WHERE cc.currentcostprice > 0 AND pp.M_Product_ID = ?"
+ " AND ce.costingmethod='S'";
BigDecimal costPercentageDiff = DB.getSQLValueBD(get_TrxName(), sql, M_Product_ID);
if (costPercentageDiff == null)
{
throw new AdempiereUserError("Could not retrieve costs");
}
if ( (costPercentageDiff.compareTo(new BigDecimal("0.005")))< 0 )
return true;
return false;
}
protected String createLines() throws Exception {
int created = 0;
isBom(m_production.getM_Product_ID());
if (!costsOK(m_production.getM_Product_ID()))
throw new AdempiereUserError("Excessive difference in standard costs");
if (!recreate && "true".equalsIgnoreCase(m_production.get_ValueAsString("IsCreated")))
throw new AdempiereUserError("Production already created.");
if (newQty != null )
m_production.setProductionQty(newQty);
m_production.deleteLines(get_TrxName());
created = m_production.createLines(mustBeStocked);
if ( created == 0 )
{return "Failed to create production lines"; }
m_production.setIsCreated("Y");
m_production.save(get_TrxName());
return created + " production lines were created";
}
protected void isBom(int M_Product_ID) throws Exception
{
String bom = DB.getSQLValueString(get_TrxName(), "SELECT isbom FROM M_Product WHERE M_Product_ID = ?", M_Product_ID);
if ("N".compareTo(bom) == 0)
{
throw new AdempiereUserError ("Attempt to create product line for Non Bill Of Materials");
}
int materials = DB.getSQLValue(get_TrxName(), "SELECT count(M_Product_BOM_ID) FROM M_Product_BOM WHERE M_Product_ID = ?", M_Product_ID);
if (materials == 0)
{
throw new AdempiereUserError ("Attempt to create product line for Bill Of Materials with no BOM Products");
}
}
}

View File

@ -0,0 +1,96 @@
package org.compiere.process;
import java.sql.Timestamp;
import java.util.logging.Level;
import org.compiere.model.MProduction;
import org.compiere.model.MProductionLine;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.AdempiereSystemError;
import org.compiere.util.AdempiereUserError;
/**
*
* Process to create production lines based on the plans
* defined for a particular production header
* @author Paul Bowden
*
*/
public class ProductionProcess extends SvrProcess {
private int p_M_Production_ID=0;
private Timestamp p_MovementDate = null;
private MProduction m_production = null;
private boolean mustBeStocked = false; //not used
private boolean recreate = false;
private boolean issued = false;
//private int p_M_Locator_ID=0;
protected void prepare() {
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
// log.fine("prepare - " + para[i]);
if (para[i].getParameter() == null)
;
else if (name.equals("MovementDate"))
p_MovementDate = (Timestamp)para[i].getParameter();
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
p_M_Production_ID = getRecord_ID();
m_production = new MProduction(getCtx(), p_M_Production_ID, get_TrxName());
} //prepare
@Override
protected String doIt() throws Exception {
if ( m_production.get_ID() == 0 )
throw new AdempiereUserError("Could not load production header");
if ( m_production.getIsCreated().equals("N") )
return "Not created";
if ( m_production.isProcessed() )
return "Already processed";
return processLines();
}
protected String processLines() throws Exception {
int processed = 0;
m_production.setMovementDate(p_MovementDate);
MProductionLine[] lines = m_production.getLines();
StringBuffer errors = new StringBuffer();
for ( int i = 0; i<lines.length; i++) {
errors.append( lines[i].createTransactions(m_production.getMovementDate(), mustBeStocked) );
//TODO error handling
lines[i].setProcessed( true );
lines[i].save(get_TrxName());
processed++;
}
if ( errors.toString().compareTo("") != 0 ) {
log.log(Level.WARNING, errors.toString() );
throw new AdempiereSystemError(errors.toString());
}
m_production.setProcessed(true);
m_production.save(get_TrxName());
return processed + " production lines were processed";
}
}

View File

@ -0,0 +1,871 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 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 *
* Contributor(s): Chris Farley - northernbrewer *
*****************************************************************************/
package org.compiere.process;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import org.compiere.model.MBPartner;
import org.compiere.model.MClient;
import org.compiere.model.MDocType;
import org.compiere.model.MMovement;
import org.compiere.model.MMovementLine;
import org.compiere.model.MOrder;
import org.compiere.model.MOrderLine;
import org.compiere.model.MOrg;
import org.compiere.model.MProduct;
import org.compiere.model.MProduction;
import org.compiere.model.MProductionLine;
import org.compiere.model.MReplenish;
import org.compiere.model.MRequisition;
import org.compiere.model.MRequisitionLine;
import org.compiere.model.MStorage;
import org.compiere.model.MWarehouse;
import org.compiere.model.X_T_Replenish;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.AdempiereSystemError;
import org.compiere.util.AdempiereUserError;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.ReplenishInterface;
import org.compiere.util.Util;
import org.eevolution.model.MDDOrder;
import org.eevolution.model.MDDOrderLine;
/**
* Replenishment Report
*
* @author Jorg Janke
* @version $Id: ReplenishReport.java,v 1.2 2006/07/30 00:51:01 jjanke Exp $
*
* Carlos Ruiz globalqss - integrate bug fixing from Chris Farley
* [ 1619517 ] Replenish report fails when no records in m_storage
*/
public class ReplenishReportProduction extends SvrProcess
{
/** Warehouse */
private int p_M_Warehouse_ID = 0;
/** Optional BPartner */
private int p_C_BPartner_ID = 0;
/** Create (POO)Purchse Order or (POR)Requisition or (MMM)Movements */
private String p_ReplenishmentCreate = null;
/** Document Type */
private int p_C_DocType_ID = 0;
/** Return Info */
private String m_info = "";
private int p_M_Product_Category_ID = 0;
private String isKanban = null;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("M_Warehouse_ID"))
p_M_Warehouse_ID = para[i].getParameterAsInt();
else if (name.equals("C_BPartner_ID"))
p_C_BPartner_ID = para[i].getParameterAsInt();
else if (name.equals("M_Product_Category_ID"))
p_M_Product_Category_ID = para[i].getParameterAsInt();
else if (name.equals("IsKanban"))
isKanban = (String) para[i].getParameter();
else if (name.equals("ReplenishmentCreate"))
p_ReplenishmentCreate = (String)para[i].getParameter();
else if (name.equals("C_DocType_ID"))
p_C_DocType_ID = para[i].getParameterAsInt();
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
} // prepare
/**
* Perform process.
* @return Message
* @throws Exception if not successful
*/
protected String doIt() throws Exception
{
log.info("M_Warehouse_ID=" + p_M_Warehouse_ID
+ ", C_BPartner_ID=" + p_C_BPartner_ID
+ " - ReplenishmentCreate=" + p_ReplenishmentCreate
+ ", C_DocType_ID=" + p_C_DocType_ID);
if (p_ReplenishmentCreate != null && p_C_DocType_ID == 0 && !p_ReplenishmentCreate.equals("PRD"))
throw new AdempiereUserError("@FillMandatory@ @C_DocType_ID@");
MWarehouse wh = MWarehouse.get(getCtx(), p_M_Warehouse_ID);
if (wh.get_ID() == 0)
throw new AdempiereSystemError("@FillMandatory@ @M_Warehouse_ID@");
//
prepareTable();
fillTable(wh);
//
if (p_ReplenishmentCreate == null)
return "OK";
//
MDocType dt = MDocType.get(getCtx(), p_C_DocType_ID);
if (!p_ReplenishmentCreate.equals("PRD") && !dt.getDocBaseType().equals(p_ReplenishmentCreate) )
throw new AdempiereSystemError("@C_DocType_ID@=" + dt.getName() + " <> " + p_ReplenishmentCreate);
//
if (p_ReplenishmentCreate.equals("POO"))
createPO();
else if (p_ReplenishmentCreate.equals("POR"))
createRequisition();
else if (p_ReplenishmentCreate.equals("MMM"))
createMovements();
else if (p_ReplenishmentCreate.equals("DOO"))
createDO();
else if (p_ReplenishmentCreate.equals("PRD"))
createProduction();
return m_info;
} // doIt
/**
* Prepare/Check Replenishment Table
*/
private void prepareTable()
{
// Level_Max must be >= Level_Max
String sql = "UPDATE M_Replenish"
+ " SET Level_Max = Level_Min "
+ "WHERE Level_Max < Level_Min";
int no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Corrected Max_Level=" + no);
// Minimum Order should be 1
sql = "UPDATE M_Product_PO"
+ " SET Order_Min = 1 "
+ "WHERE Order_Min IS NULL OR Order_Min < 1";
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Corrected Order Min=" + no);
// Pack should be 1
sql = "UPDATE M_Product_PO"
+ " SET Order_Pack = 1 "
+ "WHERE Order_Pack IS NULL OR Order_Pack < 1";
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Corrected Order Pack=" + no);
// Set Current Vendor where only one vendor
sql = "UPDATE M_Product_PO p"
+ " SET IsCurrentVendor='Y' "
+ "WHERE IsCurrentVendor<>'Y'"
+ " AND EXISTS (SELECT pp.M_Product_ID FROM M_Product_PO pp "
+ "WHERE p.M_Product_ID=pp.M_Product_ID "
+ "GROUP BY pp.M_Product_ID "
+ "HAVING COUNT(*) = 1)";
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Corrected CurrentVendor(Y)=" + no);
// More then one current vendor
sql = "UPDATE M_Product_PO p"
+ " SET IsCurrentVendor='N' "
+ "WHERE IsCurrentVendor = 'Y'"
+ " AND EXISTS (SELECT pp.M_Product_ID FROM M_Product_PO pp "
+ "WHERE p.M_Product_ID=pp.M_Product_ID AND pp.IsCurrentVendor='Y' "
+ "GROUP BY pp.M_Product_ID "
+ "HAVING COUNT(*) > 1)";
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Corrected CurrentVendor(N)=" + no);
// Just to be sure
sql = "DELETE T_Replenish WHERE AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Delete Existing Temp=" + no);
} // prepareTable
/**
* Fill Table
* @param wh warehouse
*/
private void fillTable (MWarehouse wh) throws Exception
{
String sql = "INSERT INTO T_Replenish "
+ "(AD_PInstance_ID, M_Warehouse_ID, M_Product_ID, AD_Client_ID, AD_Org_ID,"
+ " ReplenishType, Level_Min, Level_Max,"
+ " C_BPartner_ID, Order_Min, Order_Pack, QtyToOrder, ReplenishmentCreate) "
+ "SELECT " + getAD_PInstance_ID()
+ ", r.M_Warehouse_ID, r.M_Product_ID, r.AD_Client_ID, r.AD_Org_ID,"
+ " r.ReplenishType, r.Level_Min, r.Level_Max,"
+ " po.C_BPartner_ID, po.Order_Min, po.Order_Pack, 0, ";
if (p_ReplenishmentCreate == null)
sql += "null";
else
sql += "'" + p_ReplenishmentCreate + "'";
sql += " FROM M_Replenish r"
+ " INNER JOIN M_Product_PO po ON (r.M_Product_ID=po.M_Product_ID) "
+ " INNER JOIN M_Product p ON (p.M_Product_ID=po.M_Product_ID) "
+ "WHERE po.IsCurrentVendor='Y'" // Only Current Vendor
+ " AND r.ReplenishType<>'0'"
+ " AND po.IsActive='Y' AND r.IsActive='Y'"
+ " AND r.M_Warehouse_ID=" + p_M_Warehouse_ID;
if (p_C_BPartner_ID != 0)
sql += " AND po.C_BPartner_ID=" + p_C_BPartner_ID;
if ( p_M_Product_Category_ID != 0 )
sql += " AND p.M_Product_Category_ID=" + p_M_Product_Category_ID;
if ( isKanban != null )
sql += " AND p.IsKanban = '" + isKanban + "' ";
int no = DB.executeUpdate(sql, get_TrxName());
log.finest(sql);
log.fine("Insert (1) #" + no);
if (p_C_BPartner_ID == 0)
{
sql = "INSERT INTO T_Replenish "
+ "(AD_PInstance_ID, M_Warehouse_ID, M_Product_ID, AD_Client_ID, AD_Org_ID,"
+ " ReplenishType, Level_Min, Level_Max,"
+ " C_BPartner_ID, Order_Min, Order_Pack, QtyToOrder, ReplenishmentCreate) "
+ "SELECT " + getAD_PInstance_ID()
+ ", r.M_Warehouse_ID, r.M_Product_ID, r.AD_Client_ID, r.AD_Org_ID,"
+ " r.ReplenishType, r.Level_Min, r.Level_Max,"
+ " 0, 1, 1, 0, ";
if (p_ReplenishmentCreate == null)
sql += "null";
else
sql += "'" + p_ReplenishmentCreate + "'";
sql += " FROM M_Replenish r "
+ " INNER JOIN M_Product p ON (p.M_Product_ID=r.M_Product_ID) "
+ "WHERE r.ReplenishType<>'0' AND r.IsActive='Y'"
+ " AND r.M_Warehouse_ID=" + p_M_Warehouse_ID
+ " AND NOT EXISTS (SELECT * FROM T_Replenish t "
+ "WHERE r.M_Product_ID=t.M_Product_ID"
+ " AND AD_PInstance_ID=" + getAD_PInstance_ID() + ")";
if ( p_M_Product_Category_ID != 0 )
sql += " AND p.M_Product_Category_ID=" + p_M_Product_Category_ID;
if ( isKanban != null )
sql += " AND p.IsKanban = '" + isKanban + "' ";
no = DB.executeUpdate(sql, get_TrxName());
log.fine("Insert (BP) #" + no);
}
sql = "UPDATE T_Replenish t SET "
+ "QtyOnHand = (SELECT COALESCE(SUM(QtyOnHand),0) FROM M_Storage s, M_Locator l WHERE t.M_Product_ID=s.M_Product_ID"
+ " AND l.M_Locator_ID=s.M_Locator_ID AND l.M_Warehouse_ID=t.M_Warehouse_ID),"
+ "QtyReserved = (SELECT COALESCE(SUM(QtyReserved),0) FROM M_Storage s, M_Locator l WHERE t.M_Product_ID=s.M_Product_ID"
+ " AND l.M_Locator_ID=s.M_Locator_ID AND l.M_Warehouse_ID=t.M_Warehouse_ID),"
+ "QtyOrdered = (SELECT COALESCE(SUM(QtyOrdered),0) FROM M_Storage s, M_Locator l WHERE t.M_Product_ID=s.M_Product_ID"
+ " AND l.M_Locator_ID=s.M_Locator_ID AND l.M_Warehouse_ID=t.M_Warehouse_ID)";
if (p_C_DocType_ID != 0)
sql += ", C_DocType_ID=" + p_C_DocType_ID;
sql += " WHERE AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Update #" + no);
// add production lines
sql = "UPDATE T_Replenish t SET "
+ "QtyReserved = QtyReserved - COALESCE((SELECT COALESCE(SUM(MovementQty),0) FROM M_ProductionLine p, M_Locator l WHERE t.M_Product_ID=p.M_Product_ID"
+ " AND l.M_Locator_ID=p.M_Locator_ID AND l.M_Warehouse_ID=t.M_Warehouse_ID AND MovementQty < 0 AND p.Processed = 'N'),0),"
+ "QtyOrdered = QtyOrdered + COALESCE((SELECT COALESCE(SUM(MovementQty),0) FROM M_ProductionLine p, M_Locator l WHERE t.M_Product_ID=p.M_Product_ID"
+ " AND l.M_Locator_ID=p.M_Locator_ID AND l.M_Warehouse_ID=t.M_Warehouse_ID AND MovementQty > 0 AND p.Processed = 'N'),0)";
if (p_C_DocType_ID != 0)
sql += ", C_DocType_ID=" + p_C_DocType_ID;
sql += " WHERE AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Update #" + no);
// Delete inactive products and replenishments
sql = "DELETE T_Replenish r "
+ "WHERE (EXISTS (SELECT * FROM M_Product p "
+ "WHERE p.M_Product_ID=r.M_Product_ID AND p.IsActive='N')"
+ " OR EXISTS (SELECT * FROM M_Replenish rr "
+ " WHERE rr.M_Product_ID=r.M_Product_ID AND rr.IsActive='N'"
+ " AND rr.M_Warehouse_ID=" + p_M_Warehouse_ID + " ))"
+ " AND AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Delete Inactive=" + no);
// Ensure Data consistency
sql = "UPDATE T_Replenish SET QtyOnHand = 0 WHERE QtyOnHand IS NULL";
no = DB.executeUpdate(sql, get_TrxName());
sql = "UPDATE T_Replenish SET QtyReserved = 0 WHERE QtyReserved IS NULL";
no = DB.executeUpdate(sql, get_TrxName());
sql = "UPDATE T_Replenish SET QtyOrdered = 0 WHERE QtyOrdered IS NULL";
no = DB.executeUpdate(sql, get_TrxName());
// Set Minimum / Maximum Maintain Level
// X_M_Replenish.REPLENISHTYPE_ReorderBelowMinimumLevel
sql = "UPDATE T_Replenish"
+ " SET QtyToOrder = CASE WHEN QtyOnHand - QtyReserved + QtyOrdered <= Level_Min "
+ " THEN Level_Max - QtyOnHand + QtyReserved - QtyOrdered "
+ " ELSE 0 END "
+ "WHERE ReplenishType='1'"
+ " AND AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Update Type-1=" + no);
//
// X_M_Replenish.REPLENISHTYPE_MaintainMaximumLevel
sql = "UPDATE T_Replenish"
+ " SET QtyToOrder = Level_Max - QtyOnHand + QtyReserved - QtyOrdered "
+ "WHERE ReplenishType='2'"
+ " AND AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Update Type-2=" + no);
// Minimum Order Quantity
sql = "UPDATE T_Replenish"
+ " SET QtyToOrder = Order_Min "
+ "WHERE QtyToOrder < Order_Min"
+ " AND QtyToOrder > 0"
+ " AND AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Set MinOrderQty=" + no);
// Even dividable by Pack
sql = "UPDATE T_Replenish"
+ " SET QtyToOrder = QtyToOrder - MOD(QtyToOrder, Order_Pack) + Order_Pack "
+ "WHERE MOD(QtyToOrder, Order_Pack) <> 0"
+ " AND QtyToOrder > 0"
+ " AND AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Set OrderPackQty=" + no);
// Source from other warehouse
if (wh.getM_WarehouseSource_ID() != 0)
{
sql = "UPDATE T_Replenish"
+ " SET M_WarehouseSource_ID=" + wh.getM_WarehouseSource_ID()
+ " WHERE AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Set Source Warehouse=" + no);
}
// Check Source Warehouse
sql = "UPDATE T_Replenish"
+ " SET M_WarehouseSource_ID = NULL "
+ "WHERE M_Warehouse_ID=M_WarehouseSource_ID"
+ " AND AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Set same Source Warehouse=" + no);
// Custom Replenishment
String className = wh.getReplenishmentClass();
if (className != null && className.length() > 0)
{
// Get Replenishment Class
ReplenishInterface custom = null;
try
{
Class<?> clazz = Class.forName(className);
custom = (ReplenishInterface)clazz.newInstance();
}
catch (Exception e)
{
throw new AdempiereUserError("No custom Replenishment class "
+ className + " - " + e.toString());
}
X_T_Replenish[] replenishs = getReplenish("ReplenishType='9'");
for (int i = 0; i < replenishs.length; i++)
{
X_T_Replenish replenish = replenishs[i];
if (replenish.getReplenishType().equals(X_T_Replenish.REPLENISHTYPE_Custom))
{
BigDecimal qto = null;
try
{
qto = custom.getQtyToOrder(wh, replenish);
}
catch (Exception e)
{
log.log(Level.SEVERE, custom.toString(), e);
}
if (qto == null)
qto = Env.ZERO;
replenish.setQtyToOrder(qto);
replenish.save();
}
}
}
// Delete rows where nothing to order
sql = "DELETE T_Replenish "
+ "WHERE QtyToOrder < 1"
+ " AND AD_PInstance_ID=" + getAD_PInstance_ID();
no = DB.executeUpdate(sql, get_TrxName());
if (no != 0)
log.fine("Delete No QtyToOrder=" + no);
} // fillTable
/**
* Create PO's
*/
private void createPO()
{
int noOrders = 0;
String info = "";
//
MOrder order = null;
MWarehouse wh = null;
X_T_Replenish[] replenishs = getReplenish("M_WarehouseSource_ID IS NULL AND C_BPartner_ID > 0");
for (int i = 0; i < replenishs.length; i++)
{
X_T_Replenish replenish = replenishs[i];
if (wh == null || wh.getM_Warehouse_ID() != replenish.getM_Warehouse_ID())
wh = MWarehouse.get(getCtx(), replenish.getM_Warehouse_ID());
//
if (order == null
|| order.getC_BPartner_ID() != replenish.getC_BPartner_ID()
|| order.getM_Warehouse_ID() != replenish.getM_Warehouse_ID())
{
order = new MOrder(getCtx(), 0, get_TrxName());
order.setIsSOTrx(false);
order.setC_DocTypeTarget_ID(p_C_DocType_ID);
MBPartner bp = new MBPartner(getCtx(), replenish.getC_BPartner_ID(), get_TrxName());
order.setBPartner(bp);
order.setSalesRep_ID(getAD_User_ID());
order.setDescription(Msg.getMsg(getCtx(), "Replenishment"));
// Set Org/WH
order.setAD_Org_ID(wh.getAD_Org_ID());
order.setM_Warehouse_ID(wh.getM_Warehouse_ID());
if (!order.save())
return;
log.fine(order.toString());
noOrders++;
info += " - " + order.getDocumentNo();
}
MOrderLine line = new MOrderLine (order);
line.setM_Product_ID(replenish.getM_Product_ID());
line.setQty(replenish.getQtyToOrder());
line.setPrice();
line.save();
}
m_info = "#" + noOrders + info;
log.info(m_info);
} // createPO
/**
* Create Requisition
*/
private void createRequisition()
{
int noReqs = 0;
String info = "";
//
MRequisition requisition = null;
MWarehouse wh = null;
X_T_Replenish[] replenishs = getReplenish("M_WarehouseSource_ID IS NULL AND C_BPartner_ID > 0");
for (int i = 0; i < replenishs.length; i++)
{
X_T_Replenish replenish = replenishs[i];
if (wh == null || wh.getM_Warehouse_ID() != replenish.getM_Warehouse_ID())
wh = MWarehouse.get(getCtx(), replenish.getM_Warehouse_ID());
//
if (requisition == null
|| requisition.getM_Warehouse_ID() != replenish.getM_Warehouse_ID())
{
requisition = new MRequisition (getCtx(), 0, get_TrxName());
requisition.setAD_User_ID (getAD_User_ID());
requisition.setC_DocType_ID(p_C_DocType_ID);
requisition.setDescription(Msg.getMsg(getCtx(), "Replenishment"));
// Set Org/WH
requisition.setAD_Org_ID(wh.getAD_Org_ID());
requisition.setM_Warehouse_ID(wh.getM_Warehouse_ID());
if (!requisition.save())
return;
log.fine(requisition.toString());
noReqs++;
info += " - " + requisition.getDocumentNo();
}
//
MRequisitionLine line = new MRequisitionLine(requisition);
line.setM_Product_ID(replenish.getM_Product_ID());
line.setC_BPartner_ID(replenish.getC_BPartner_ID());
line.setQty(replenish.getQtyToOrder());
line.setPrice();
line.save();
}
m_info = "#" + noReqs + info;
log.info(m_info);
} // createRequisition
/**
* Create Inventory Movements
*/
private void createMovements()
{
int noMoves = 0;
String info = "";
//
MClient client = null;
MMovement move = null;
int M_Warehouse_ID = 0;
int M_WarehouseSource_ID = 0;
MWarehouse whSource = null;
MWarehouse wh = null;
X_T_Replenish[] replenishs = getReplenish("M_WarehouseSource_ID IS NOT NULL AND C_BPartner_ID > 0");
for (int i = 0; i < replenishs.length; i++)
{
X_T_Replenish replenish = replenishs[i];
if (whSource == null || whSource.getM_WarehouseSource_ID() != replenish.getM_WarehouseSource_ID())
whSource = MWarehouse.get(getCtx(), replenish.getM_WarehouseSource_ID());
if (wh == null || wh.getM_Warehouse_ID() != replenish.getM_Warehouse_ID())
wh = MWarehouse.get(getCtx(), replenish.getM_Warehouse_ID());
if (client == null || client.getAD_Client_ID() != whSource.getAD_Client_ID())
client = MClient.get(getCtx(), whSource.getAD_Client_ID());
//
if (move == null
|| M_WarehouseSource_ID != replenish.getM_WarehouseSource_ID()
|| M_Warehouse_ID != replenish.getM_Warehouse_ID())
{
M_WarehouseSource_ID = replenish.getM_WarehouseSource_ID();
M_Warehouse_ID = replenish.getM_Warehouse_ID();
move = new MMovement (getCtx(), 0, get_TrxName());
move.setC_DocType_ID(p_C_DocType_ID);
move.setDescription(Msg.getMsg(getCtx(), "Replenishment")
+ ": " + whSource.getName() + "->" + wh.getName());
// Set Org
move.setAD_Org_ID(whSource.getAD_Org_ID());
if (!move.save())
return;
log.fine(move.toString());
noMoves++;
info += " - " + move.getDocumentNo();
}
// To
int M_LocatorTo_ID = wh.getDefaultLocator().getM_Locator_ID();
// From: Look-up Storage
MProduct product = MProduct.get(getCtx(), replenish.getM_Product_ID());
String MMPolicy = product.getMMPolicy();
MStorage[] storages = MStorage.getWarehouse(getCtx(),
whSource.getM_Warehouse_ID(), replenish.getM_Product_ID(), 0, 0,
true, null,
MClient.MMPOLICY_FiFo.equals(MMPolicy), get_TrxName());
//
BigDecimal target = replenish.getQtyToOrder();
for (int j = 0; j < storages.length; j++)
{
MStorage storage = storages[j];
if (storage.getQtyOnHand().signum() <= 0)
continue;
BigDecimal moveQty = target;
if (storage.getQtyOnHand().compareTo(moveQty) < 0)
moveQty = storage.getQtyOnHand();
//
MMovementLine line = new MMovementLine(move);
line.setM_Product_ID(replenish.getM_Product_ID());
line.setMovementQty(moveQty);
if (replenish.getQtyToOrder().compareTo(moveQty) != 0)
line.setDescription("Total: " + replenish.getQtyToOrder());
line.setM_Locator_ID(storage.getM_Locator_ID()); // from
line.setM_AttributeSetInstance_ID(storage.getM_AttributeSetInstance_ID());
line.setM_LocatorTo_ID(M_LocatorTo_ID); // to
line.setM_AttributeSetInstanceTo_ID(storage.getM_AttributeSetInstance_ID());
line.save();
//
target = target.subtract(moveQty);
if (target.signum() == 0)
break;
}
}
if (replenishs.length == 0)
{
m_info = "No Source Warehouse";
log.warning(m_info);
}
else
{
m_info = "#" + noMoves + info;
log.info(m_info);
}
} // Create Inventory Movements
/**
* Create Distribution Order
*/
private void createDO() throws Exception
{
int noMoves = 0;
String info = "";
//
MClient client = null;
MDDOrder order = null;
int M_Warehouse_ID = 0;
int M_WarehouseSource_ID = 0;
MWarehouse whSource = null;
MWarehouse wh = null;
X_T_Replenish[] replenishs = getReplenish("M_WarehouseSource_ID IS NOT NULL");
for (X_T_Replenish replenish:replenishs)
{
if (whSource == null || whSource.getM_WarehouseSource_ID() != replenish.getM_WarehouseSource_ID())
whSource = MWarehouse.get(getCtx(), replenish.getM_WarehouseSource_ID());
if (wh == null || wh.getM_Warehouse_ID() != replenish.getM_Warehouse_ID())
wh = MWarehouse.get(getCtx(), replenish.getM_Warehouse_ID());
if (client == null || client.getAD_Client_ID() != whSource.getAD_Client_ID())
client = MClient.get(getCtx(), whSource.getAD_Client_ID());
//
if (order == null
|| M_WarehouseSource_ID != replenish.getM_WarehouseSource_ID()
|| M_Warehouse_ID != replenish.getM_Warehouse_ID())
{
M_WarehouseSource_ID = replenish.getM_WarehouseSource_ID();
M_Warehouse_ID = replenish.getM_Warehouse_ID();
order = new MDDOrder (getCtx(), 0, get_TrxName());
order.setC_DocType_ID(p_C_DocType_ID);
order.setDescription(Msg.getMsg(getCtx(), "Replenishment")
+ ": " + whSource.getName() + "->" + wh.getName());
// Set Org
order.setAD_Org_ID(whSource.getAD_Org_ID());
// Set Org Trx
MOrg orgTrx = MOrg.get(getCtx(), wh.getAD_Org_ID());
order.setAD_OrgTrx_ID(orgTrx.getAD_Org_ID());
int C_BPartner_ID = orgTrx.getLinkedC_BPartner_ID(get_TrxName());
if (C_BPartner_ID==0)
throw new AdempiereUserError(Msg.translate(getCtx(), "C_BPartner_ID")+ " @FillMandatory@ ");
MBPartner bp = new MBPartner(getCtx(),C_BPartner_ID,get_TrxName());
// Set BPartner Link to Org
order.setBPartner(bp);
order.setDateOrdered(new Timestamp(System.currentTimeMillis()));
//order.setDatePromised(DatePromised);
order.setDeliveryRule(MDDOrder.DELIVERYRULE_Availability);
order.setDeliveryViaRule(MDDOrder.DELIVERYVIARULE_Delivery);
order.setPriorityRule(MDDOrder.PRIORITYRULE_Medium);
order.setIsInDispute(false);
order.setIsApproved(false);
order.setIsDropShip(false);
order.setIsDelivered(false);
order.setIsInTransit(false);
order.setIsPrinted(false);
order.setIsSelected(false);
order.setIsSOTrx(false);
// Warehouse in Transit
MWarehouse[] whsInTransit = MWarehouse.getForOrg(getCtx(), whSource.getAD_Org_ID());
for (MWarehouse whInTransit:whsInTransit)
{
if(whInTransit.isInTransit())
order.setM_Warehouse_ID(whInTransit.getM_Warehouse_ID());
}
if (order.getM_Warehouse_ID()==0)
throw new AdempiereUserError("Warehouse inTransit is @FillMandatory@ ");
if (!order.save())
return;
log.fine(order.toString());
noMoves++;
info += " - " + order.getDocumentNo();
}
// To
int M_LocatorTo_ID = wh.getDefaultLocator().getM_Locator_ID();
int M_Locator_ID = whSource.getDefaultLocator().getM_Locator_ID();
if(M_LocatorTo_ID == 0 || M_Locator_ID==0)
throw new AdempiereUserError(Msg.translate(getCtx(), "M_Locator_ID")+" @FillMandatory@ ");
// From: Look-up Storage
/*MProduct product = MProduct.get(getCtx(), replenish.getM_Product_ID());
MProductCategory pc = MProductCategory.get(getCtx(), product.getM_Product_Category_ID());
String MMPolicy = pc.getMMPolicy();
if (MMPolicy == null || MMPolicy.length() == 0)
MMPolicy = client.getMMPolicy();
//
MStorage[] storages = MStorage.getWarehouse(getCtx(),
whSource.getM_Warehouse_ID(), replenish.getM_Product_ID(), 0, 0,
true, null,
MClient.MMPOLICY_FiFo.equals(MMPolicy), get_TrxName());
BigDecimal target = replenish.getQtyToOrder();
for (int j = 0; j < storages.length; j++)
{
MStorage storage = storages[j];
if (storage.getQtyOnHand().signum() <= 0)
continue;
BigDecimal moveQty = target;
if (storage.getQtyOnHand().compareTo(moveQty) < 0)
moveQty = storage.getQtyOnHand();
//
MDDOrderLine line = new MDDOrderLine(order);
line.setM_Product_ID(replenish.getM_Product_ID());
line.setQtyEntered(moveQty);
if (replenish.getQtyToOrder().compareTo(moveQty) != 0)
line.setDescription("Total: " + replenish.getQtyToOrder());
line.setM_Locator_ID(storage.getM_Locator_ID()); // from
line.setM_AttributeSetInstance_ID(storage.getM_AttributeSetInstance_ID());
line.setM_LocatorTo_ID(M_LocatorTo_ID); // to
line.setM_AttributeSetInstanceTo_ID(storage.getM_AttributeSetInstance_ID());
line.setIsInvoiced(false);
line.save();
//
target = target.subtract(moveQty);
if (target.signum() == 0)
break;
}*/
MDDOrderLine line = new MDDOrderLine(order);
line.setM_Product_ID(replenish.getM_Product_ID());
line.setQty(replenish.getQtyToOrder());
if (replenish.getQtyToOrder().compareTo(replenish.getQtyToOrder()) != 0)
line.setDescription("Total: " + replenish.getQtyToOrder());
line.setM_Locator_ID(M_Locator_ID); // from
line.setM_AttributeSetInstance_ID(0);
line.setM_LocatorTo_ID(M_LocatorTo_ID); // to
line.setM_AttributeSetInstanceTo_ID(0);
line.setIsInvoiced(false);
line.save();
}
if (replenishs.length == 0)
{
m_info = "No Source Warehouse";
log.warning(m_info);
}
else
{
m_info = "#" + noMoves + info;
log.info(m_info);
}
} // create Distribution Order
/**
* Create Production
*/
private void createProduction()
{
int noProds = 0;
String info = "";
//
MProduction production = null;
MWarehouse wh = null;
X_T_Replenish[] replenishs = getReplenish("M_WarehouseSource_ID IS NULL " +
"AND EXISTS (SELECT * FROM M_Product p WHERE p.M_Product_ID=T_Replenish.M_Product_ID " +
"AND p.IsBOM='Y' AND p.IsManufactured='Y') ");
for (int i = 0; i < replenishs.length; i++)
{
X_T_Replenish replenish = replenishs[i];
if (wh == null || wh.getM_Warehouse_ID() != replenish.getM_Warehouse_ID())
wh = MWarehouse.get(getCtx(), replenish.getM_Warehouse_ID());
BigDecimal batchQty = null;
for (MReplenish rep : MReplenish.getForProduct(getCtx(), replenish.getM_Product_ID(), get_TrxName()))
{
if ( rep.getM_Warehouse_ID() == replenish.getM_Warehouse_ID())
batchQty = rep.getQtyBatchSize();
}
BigDecimal qtyToProduce = replenish.getQtyToOrder();
while ( qtyToProduce.compareTo(Env.ZERO) > 0)
{
BigDecimal qty = qtyToProduce;
if ( batchQty != null && batchQty.compareTo(Env.ZERO) > 0 && qtyToProduce.compareTo(batchQty) > 0)
{
qty = batchQty;
qtyToProduce = qtyToProduce.subtract(batchQty);
}
else
{
qtyToProduce = Env.ZERO;
}
production = new MProduction (getCtx(), 0, get_TrxName());
production.setDescription(Msg.getMsg(getCtx(), "Replenishment"));
// Set Org/WH
production.setAD_Org_ID(wh.getAD_Org_ID());
production.setM_Locator_ID(wh.getDefaultLocator().get_ID());
production.setM_Product_ID(replenish.getM_Product_ID());
production.setProductionQty(qty);
production.setMovementDate(Env.getContextAsDate(getCtx(), "#Date"));
production.saveEx();
production.createLines(false);
production.setIsCreated("Y");
production.save(get_TrxName());
log.fine(production.toString());
noProds++;
info += " - " + production.getDocumentNo();
}
}
m_info = "#" + noProds + info;
log.info(m_info);
} // createRequisition
/**
* Get Replenish Records
* @return replenish
*/
private X_T_Replenish[] getReplenish (String where)
{
String sql = "SELECT * FROM T_Replenish "
+ "WHERE AD_PInstance_ID=? ";
if (where != null && where.length() > 0)
sql += " AND " + where;
sql += " ORDER BY M_Warehouse_ID, M_WarehouseSource_ID, C_BPartner_ID";
ArrayList<X_T_Replenish> list = new ArrayList<X_T_Replenish>();
PreparedStatement pstmt = null;
try
{
pstmt = DB.prepareStatement (sql, get_TrxName());
pstmt.setInt (1, getAD_PInstance_ID());
ResultSet rs = pstmt.executeQuery ();
while (rs.next ())
list.add (new X_T_Replenish (getCtx(), rs, get_TrxName()));
rs.close ();
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
log.log(Level.SEVERE, sql, e);
}
try
{
if (pstmt != null)
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
pstmt = null;
}
X_T_Replenish[] retValue = new X_T_Replenish[list.size ()];
list.toArray (retValue);
return retValue;
} // getReplenish
} // Replenish

View File

@ -0,0 +1,147 @@
package org.compiere.process;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.logging.Level;
import javax.sql.RowSet;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import org.compiere.util.Env;
public class RollUpCosts extends SvrProcess {
int category = 0;
int product_id = 0;
int client_id = 0;
int org_id = 0;
int user_id = 0;
int costelement_id = 0;
private HashSet<Integer> processed;
protected void prepare()
{
int chosen_id = 0;
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
// log.fine("prepare - " + para[i]);
if (para[i].getParameter() == null)
;
else if (name.equals("M_Product_Category_ID"))
category = para[i].getParameterAsInt();
else if (name.equals("M_Product_ID"))
chosen_id = para[i].getParameterAsInt();
else if (name.equals("M_CostElement_ID"))
costelement_id = para[i].getParameterAsInt();
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
product_id = getRecord_ID();
if (product_id == 0)
{
product_id = chosen_id;
}
}
protected String doIt() throws Exception
{
client_id = Env.getAD_Client_ID(getCtx());
org_id = Env.getAD_Org_ID(getCtx());
user_id = Env.getAD_User_ID(getCtx());
createView();
String result = rollUp();
deleteView();
return result;
}
protected String rollUp() throws Exception {
if (product_id != 0) //only for the product
{
rollUpCosts(product_id);
}
else if (category != 0) //roll up for all categories
{
String sql = "SELECT M_PRODUCT_ID FROM M_PRODUCT WHERE M_PRODUCT_CATEGORY_ID = " +
category + " AND AD_CLIENT_ID = " + Env.getAD_Client_ID(getCtx()) +
" AND M_PRODUCT_ID IN (SELECT M_PRODUCT_ID FROM M_PRODUCT_BOM)";
//System.err.println(sql);
RowSet results = DB.getRowSet(sql);
while (results.next())
{
rollUpCosts(results.getInt(1));
}
}
else //do it for all products
{
String sql = "SELECT M_PRODUCT_ID FROM M_PRODUCT WHERE AD_CLIENT_ID = " + Env.getAD_Client_ID(getCtx()) +
" AND M_PRODUCT_ID IN (SELECT M_PRODUCT_ID FROM M_PRODUCT_BOM)";
//System.err.println(sql);
RowSet results = DB.getRowSet(sql);
while (results.next())
{
rollUpCosts(results.getInt(1));
}
}
return "Roll Up Complete";
}
protected void createView() throws Exception
{
processed = new HashSet<Integer>();
}
protected void deleteView()
{
}
protected void rollUpCosts(int p_id) throws Exception
{
String sql = "SELECT M_ProductBOM_ID FROM M_Product_BOM WHERE M_Product_ID = " +
p_id + " AND AD_Client_ID = " + Env.getAD_Client_ID(getCtx());
//System.err.println(sql);
RowSet results = DB.getRowSet(sql);
while (results.next())
{
if ( !processed.contains(p_id)) {
rollUpCosts(results.getInt(1));
}
}
results.close();
//once the subproducts costs are accurate, calculate the costs for this product
String update = "UPDATE M_Cost set CurrentCostPrice = COALESCE((select Sum (b.BOMQty * c.currentcostprice)" +
" FROM M_Product_BOM b INNER JOIN M_Cost c ON (b.M_PRODUCTBOM_ID = c.M_Product_ID) " +
" WHERE b.M_Product_ID = " + p_id + " AND M_CostElement_ID = " + costelement_id + "),0)," +
" FutureCostPrice = COALESCE((select Sum (b.BOMQty * c.futurecostprice) FROM M_Product_BOM b " +
" INNER JOIN M_Cost c ON (b.M_PRODUCTBOM_ID = c.M_Product_ID) " +
" WHERE b.M_Product_ID = " + p_id + " AND M_CostElement_ID = " + costelement_id + "),0)" +
" WHERE M_Product_ID = " + p_id + " AND AD_Client_ID = " + Env.getAD_Client_ID(getCtx()) +
" AND M_CostElement_ID = " + costelement_id +
" AND M_PRODUCT_ID IN (SELECT M_PRODUCT_ID FROM M_PRODUCT_BOM)";;
//System.err.println(sql);
DB.executeUpdate(update, get_TrxName());
processed.add(p_id);
}
}

View File

@ -0,0 +1,51 @@
package org.compiere.process;
import java.sql.PreparedStatement;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
public class UniversalSubstitution extends SvrProcess {
int productId = 0;
int replacementId = 0;
@Override
protected void prepare() {
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (name.equals("M_Product_ID"))
productId = para[i].getParameterAsInt();
else if (name.equals("Substitute_ID"))
replacementId =para[i].getParameterAsInt();
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
}
@Override
protected String doIt() throws Exception {
if ( productId == 0 || replacementId == 0 )
throw new AdempiereException("Product and replacement product required");
String update = "UPDATE M_Product_BOM bb " +
"SET M_PRODUCTBOM_ID = ? " +
"WHERE bb.M_PRODUCTBOM_ID = ?";
PreparedStatement pstmt = DB.prepareStatement(update, get_TrxName());
pstmt.setInt(1, replacementId);
pstmt.setInt(2, productId);
int count = pstmt.executeUpdate();
return count + " BOM products updated";
}
}

View File

@ -0,0 +1,62 @@
/******************************************************************************
* Copyright (C) 2012 Carlos Ruiz *
* Copyright (C) 2012 Trek Global *
* Product: iDempiere ERP & CRM Smart Business Solution *
* 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. *
*****************************************************************************/
package org.adempiere.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.Query;
import org.compiere.model.X_AD_WizardProcess;
public class MWizardProcess extends X_AD_WizardProcess {
/**
*
*/
private static final long serialVersionUID = -7713151820360928310L;
public MWizardProcess(Properties ctx, int AD_WizardProcess_ID, String trxName) {
super(ctx, AD_WizardProcess_ID, trxName);
if (AD_WizardProcess_ID == 0)
{
setIsActive(true);
}
}
public MWizardProcess(Properties ctx, ResultSet rs, String trxName) {
super(ctx, rs, trxName);
}
/**
* Get the wizard notes for a node in the context client
*
* @param ctx
* @param AD_WF_Node_ID
* @param AD_Client_ID
* @param trxName
*/
public static MWizardProcess get(Properties ctx, int AD_WF_Node_ID, int AD_Client_ID) {
Query query = new Query(ctx, Table_Name, "AD_WF_Node_ID=? AND AD_Client_ID=?", null);
MWizardProcess wp = query.setParameters(new Object[]{AD_WF_Node_ID, AD_Client_ID}).first();
if (wp == null) {
wp = new MWizardProcess(ctx, 0, null);
wp.setAD_WF_Node_ID(AD_WF_Node_ID);
wp.setAD_Client_ID(AD_Client_ID);
}
return wp;
}
} // MWizardProcess

View File

@ -620,12 +620,12 @@ public class DocLine
} // isProductionBOM
/**
* Get Production Plan
* @return M_ProductionPlan_ID
* Get Production Header
* @return M_Production_ID
*/
public int getM_ProductionPlan_ID()
public int getM_Production_ID()
{
int index = p_po.get_ColumnIndex("M_ProductionPlan_ID");
int index = p_po.get_ColumnIndex("M_Production_ID");
if (index != -1)
{
Integer ii = (Integer)p_po.get_Value(index);
@ -633,7 +633,7 @@ public class DocLine
return ii.intValue();
}
return 0;
} // getM_ProductionPlan_ID
} // getM_Production_ID
/**
* Get Order Line Reference

View File

@ -23,7 +23,9 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.logging.Level;
import org.compiere.model.MAccount;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MAcctSchemaDefault;
import org.compiere.model.MCostDetail;
import org.compiere.model.ProductCost;
import org.compiere.model.X_M_Production;
@ -79,30 +81,16 @@ public class Doc_Production extends Doc
{
ArrayList<DocLine> list = new ArrayList<DocLine>();
// Production
// -- ProductionPlan
// -- -- ProductionLine - the real level
String sqlPP = "SELECT * FROM M_ProductionPlan pp "
+ "WHERE pp.M_Production_ID=? "
+ "ORDER BY pp.Line";
// -- ProductionLine - the real level
String sqlPL = "SELECT * FROM M_ProductionLine pl "
+ "WHERE pl.M_ProductionPlan_ID=? "
+ "WHERE pl.M_Production_ID=? "
+ "ORDER BY pl.Line";
try
{
PreparedStatement pstmtPP = DB.prepareStatement(sqlPP, getTrxName());
pstmtPP.setInt(1, get_ID());
ResultSet rsPP = pstmtPP.executeQuery();
//
while (rsPP.next())
{
int M_Product_ID = rsPP.getInt("M_Product_ID");
int M_ProductionPlan_ID = rsPP.getInt("M_ProductionPlan_ID");
//
try
{
PreparedStatement pstmtPL = DB.prepareStatement(sqlPL, getTrxName());
pstmtPL.setInt(1, M_ProductionPlan_ID);
pstmtPL.setInt(1,get_ID());
ResultSet rsPL = pstmtPL.executeQuery();
while (rsPL.next())
{
@ -115,7 +103,7 @@ public class Doc_Production extends Doc
DocLine docLine = new DocLine (line, this);
docLine.setQty (line.getMovementQty(), false);
// Identify finished BOM Product
docLine.setProductionBOM(line.getM_Product_ID() == M_Product_ID);
docLine.setProductionBOM(line.getM_Product_ID() == prod.getM_Product_ID());
//
log.fine(docLine.toString());
list.add (docLine);
@ -127,15 +115,7 @@ public class Doc_Production extends Doc
{
log.log(Level.SEVERE, sqlPL, ee);
}
}
rsPP.close();
pstmtPP.close();
}
catch (SQLException e)
{
log.log(Level.SEVERE, sqlPP, e);
}
// Return Array
DocLine[] dl = new DocLine[list.size()];
list.toArray(dl);
return dl;
@ -175,6 +155,7 @@ public class Doc_Production extends Doc
// Calculate Costs
BigDecimal costs = null;
/* adaxa-pb don't use cost details
// MZ Goodwill
// if Production CostDetail exist then get Cost from Cost Detail
MCostDetail cd = MCostDetail.get (as.getCtx(), "M_ProductionLine_ID=?",
@ -182,28 +163,48 @@ public class Doc_Production extends Doc
if (cd != null)
costs = cd.getAmt();
else
*/
{
if (line.isProductionBOM())
int variedHeader = 0;
BigDecimal variance = null;
costs = line.getProductCosts(as, line.getAD_Org_ID(), false);
if (line.isProductionBOM() && line.getM_Production_ID() != variedHeader )
{
// Get BOM Cost - Sum of individual lines
BigDecimal bomCost = Env.ZERO;
for (int ii = 0; ii < p_lines.length; ii++)
{
DocLine line0 = p_lines[ii];
if (line0.getM_ProductionPlan_ID() != line.getM_ProductionPlan_ID())
if (line0.getM_Production_ID() != line.getM_Production_ID())
continue;
//pb changed this 20/10/06
if (!line0.isProductionBOM())
bomCost = bomCost.add(line0.getProductCosts(as, line.getAD_Org_ID(), false));
bomCost = bomCost.add(line0.getProductCosts(as, line.getAD_Org_ID(), false).setScale(2,BigDecimal.ROUND_HALF_UP));
}
costs = bomCost.negate();
// [ 1965015 ] Posting not balanced when is producing more than 1 product - Globalqss 2008/06/26
X_M_ProductionPlan mpp = new X_M_ProductionPlan(getCtx(), line.getM_ProductionPlan_ID(), getTrxName());
if (line.getQty() != mpp.getProductionQty()) {
// if the line doesn't correspond with the whole qty produced then apply prorate
// costs = costs * line_qty / production_qty
costs = costs.multiply(line.getQty());
costs = costs.divide(mpp.getProductionQty(), as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
}
variance = (costs.setScale(2,BigDecimal.ROUND_HALF_UP)).subtract(bomCost.negate());
//TODO use currency precision instead of hardcoded 2
// get variance account
int validCombination = MAcctSchemaDefault.get(getCtx(),
as.get_ID()).getP_RateVariance_Acct();
MAccount base = MAccount.get(getCtx(), validCombination);
MAccount account = MAccount.get(getCtx(),as.getAD_Client_ID(),as.getAD_Org_ID(),
as.get_ID(), base.getAccount_ID(), 0,0,0,0,0,0,0,0,0,0,0,0,0,0);
//
// only post variance if it's not zero
if (variance.compareTo(new BigDecimal("0.00")) != 0)
{
//post variance
fl = fact.createLine(line,
account,
as.getC_Currency_ID(), variance.negate());
fl.setQty(Env.ZERO);
if (fl == null)
{
p_Error = "Couldn't post variance " + line.getLine() + " - " + line;
return null;
}
}
// costs = bomCost.negate();
}
else
costs = line.getProductCosts(as, line.getAD_Org_ID(), false);

View File

@ -31,7 +31,7 @@ public interface I_AD_WF_Node
public static final String Table_Name = "AD_WF_Node";
/** AD_Table_ID=129 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
public static final int Table_ID = 129;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
@ -75,7 +75,7 @@ public interface I_AD_WF_Node
*/
public int getAD_Column_ID();
public I_AD_Column getAD_Column() throws RuntimeException;
public org.compiere.model.I_AD_Column getAD_Column() throws RuntimeException;
/** Column name AD_Form_ID */
public static final String COLUMNNAME_AD_Form_ID = "AD_Form_ID";
@ -90,7 +90,7 @@ public interface I_AD_WF_Node
*/
public int getAD_Form_ID();
public I_AD_Form getAD_Form() throws RuntimeException;
public org.compiere.model.I_AD_Form getAD_Form() throws RuntimeException;
/** Column name AD_Image_ID */
public static final String COLUMNNAME_AD_Image_ID = "AD_Image_ID";
@ -105,7 +105,7 @@ public interface I_AD_WF_Node
*/
public int getAD_Image_ID();
public I_AD_Image getAD_Image() throws RuntimeException;
public org.compiere.model.I_AD_Image getAD_Image() throws RuntimeException;
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
@ -133,7 +133,7 @@ public interface I_AD_WF_Node
*/
public int getAD_Process_ID();
public I_AD_Process getAD_Process() throws RuntimeException;
public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException;
/** Column name AD_Task_ID */
public static final String COLUMNNAME_AD_Task_ID = "AD_Task_ID";
@ -148,7 +148,7 @@ public interface I_AD_WF_Node
*/
public int getAD_Task_ID();
public I_AD_Task getAD_Task() throws RuntimeException;
public org.compiere.model.I_AD_Task getAD_Task() throws RuntimeException;
/** Column name AD_WF_Block_ID */
public static final String COLUMNNAME_AD_WF_Block_ID = "AD_WF_Block_ID";
@ -163,7 +163,7 @@ public interface I_AD_WF_Node
*/
public int getAD_WF_Block_ID();
public I_AD_WF_Block getAD_WF_Block() throws RuntimeException;
public org.compiere.model.I_AD_WF_Block getAD_WF_Block() throws RuntimeException;
/** Column name AD_WF_Node_ID */
public static final String COLUMNNAME_AD_WF_Node_ID = "AD_WF_Node_ID";
@ -178,6 +178,15 @@ public interface I_AD_WF_Node
*/
public int getAD_WF_Node_ID();
/** Column name AD_WF_Node_UU */
public static final String COLUMNNAME_AD_WF_Node_UU = "AD_WF_Node_UU";
/** Set AD_WF_Node_UU */
public void setAD_WF_Node_UU (String AD_WF_Node_UU);
/** Get AD_WF_Node_UU */
public String getAD_WF_Node_UU();
/** Column name AD_WF_Responsible_ID */
public static final String COLUMNNAME_AD_WF_Responsible_ID = "AD_WF_Responsible_ID";
@ -191,7 +200,7 @@ public interface I_AD_WF_Node
*/
public int getAD_WF_Responsible_ID();
public I_AD_WF_Responsible getAD_WF_Responsible() throws RuntimeException;
public org.compiere.model.I_AD_WF_Responsible getAD_WF_Responsible() throws RuntimeException;
/** Column name AD_Window_ID */
public static final String COLUMNNAME_AD_Window_ID = "AD_Window_ID";
@ -206,7 +215,7 @@ public interface I_AD_WF_Node
*/
public int getAD_Window_ID();
public I_AD_Window getAD_Window() throws RuntimeException;
public org.compiere.model.I_AD_Window getAD_Window() throws RuntimeException;
/** Column name AD_Workflow_ID */
public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID";
@ -221,7 +230,7 @@ public interface I_AD_WF_Node
*/
public int getAD_Workflow_ID();
public I_AD_Workflow getAD_Workflow() throws RuntimeException;
public org.compiere.model.I_AD_Workflow getAD_Workflow() throws RuntimeException;
/** Column name AttributeName */
public static final String COLUMNNAME_AttributeName = "AttributeName";
@ -262,7 +271,7 @@ public interface I_AD_WF_Node
*/
public int getC_BPartner_ID();
public I_C_BPartner getC_BPartner() throws RuntimeException;
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException;
/** Column name Cost */
public static final String COLUMNNAME_Cost = "Cost";
@ -569,7 +578,7 @@ public interface I_AD_WF_Node
*/
public int getR_MailText_ID();
public I_R_MailText getR_MailText() throws RuntimeException;
public org.compiere.model.I_R_MailText getR_MailText() throws RuntimeException;
/** Column name SetupTime */
public static final String COLUMNNAME_SetupTime = "SetupTime";
@ -610,7 +619,7 @@ public interface I_AD_WF_Node
*/
public int getS_Resource_ID();
public I_S_Resource getS_Resource() throws RuntimeException;
public org.compiere.model.I_S_Resource getS_Resource() throws RuntimeException;
/** Column name StartMode */
public static final String COLUMNNAME_StartMode = "StartMode";
@ -745,7 +754,7 @@ public interface I_AD_WF_Node
*/
public int getWorkflow_ID();
public I_AD_Workflow getWorkflow() throws RuntimeException;
public org.compiere.model.I_AD_Workflow getWorkflow() throws RuntimeException;
/** Column name WorkingTime */
public static final String COLUMNNAME_WorkingTime = "WorkingTime";

View File

@ -0,0 +1,164 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 AD_WizardProcess
* @author Adempiere (generated)
* @version Release 3.6.0LTS
*/
public interface I_AD_WizardProcess
{
/** TableName=AD_WizardProcess */
public static final String Table_Name = "AD_WizardProcess";
/** AD_Table_ID=200012 */
public static final int Table_ID = 200012;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 2 - Client
*/
BigDecimal accessLevel = BigDecimal.valueOf(2);
/** 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 AD_WF_Node_ID */
public static final String COLUMNNAME_AD_WF_Node_ID = "AD_WF_Node_ID";
/** Set Node.
* Workflow Node (activity), step or process
*/
public void setAD_WF_Node_ID (int AD_WF_Node_ID);
/** Get Node.
* Workflow Node (activity), step or process
*/
public int getAD_WF_Node_ID();
public org.compiere.model.I_AD_WF_Node getAD_WF_Node() throws RuntimeException;
/** Column name AD_WizardProcess_ID */
public static final String COLUMNNAME_AD_WizardProcess_ID = "AD_WizardProcess_ID";
/** Set Wizard Process */
public void setAD_WizardProcess_ID (int AD_WizardProcess_ID);
/** Get Wizard Process */
public int getAD_WizardProcess_ID();
/** Column name AD_WizardProcess_UU */
public static final String COLUMNNAME_AD_WizardProcess_UU = "AD_WizardProcess_UU";
/** Set AD_WizardProcess_UU */
public void setAD_WizardProcess_UU (String AD_WizardProcess_UU);
/** Get AD_WizardProcess_UU */
public String getAD_WizardProcess_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 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 Note */
public static final String COLUMNNAME_Note = "Note";
/** Set Note.
* Optional additional user defined information
*/
public void setNote (String Note);
/** Get Note.
* Optional additional user defined information
*/
public String getNote();
/** 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();
/** Column name WizardStatus */
public static final String COLUMNNAME_WizardStatus = "WizardStatus";
/** Set Wizard Status */
public void setWizardStatus (String WizardStatus);
/** Get Wizard Status */
public String getWizardStatus();
}

View File

@ -31,7 +31,7 @@ public interface I_AD_Workflow
public static final String Table_Name = "AD_Workflow";
/** AD_Table_ID=117 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
public static final int Table_ID = 117;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
@ -88,7 +88,7 @@ public interface I_AD_Workflow
*/
public int getAD_Table_ID();
public I_AD_Table getAD_Table() throws RuntimeException;
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException;
/** Column name AD_WF_Node_ID */
public static final String COLUMNNAME_AD_WF_Node_ID = "AD_WF_Node_ID";
@ -103,7 +103,7 @@ public interface I_AD_Workflow
*/
public int getAD_WF_Node_ID();
public I_AD_WF_Node getAD_WF_Node() throws RuntimeException;
public org.compiere.model.I_AD_WF_Node getAD_WF_Node() throws RuntimeException;
/** Column name AD_WF_Responsible_ID */
public static final String COLUMNNAME_AD_WF_Responsible_ID = "AD_WF_Responsible_ID";
@ -118,7 +118,7 @@ public interface I_AD_Workflow
*/
public int getAD_WF_Responsible_ID();
public I_AD_WF_Responsible getAD_WF_Responsible() throws RuntimeException;
public org.compiere.model.I_AD_WF_Responsible getAD_WF_Responsible() throws RuntimeException;
/** Column name AD_Workflow_ID */
public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID";
@ -146,7 +146,16 @@ public interface I_AD_Workflow
*/
public int getAD_WorkflowProcessor_ID();
public I_AD_WorkflowProcessor getAD_WorkflowProcessor() throws RuntimeException;
public org.compiere.model.I_AD_WorkflowProcessor getAD_WorkflowProcessor() throws RuntimeException;
/** Column name AD_Workflow_UU */
public static final String COLUMNNAME_AD_Workflow_UU = "AD_Workflow_UU";
/** Set AD_Workflow_UU */
public void setAD_Workflow_UU (String AD_Workflow_UU);
/** Get AD_Workflow_UU */
public String getAD_Workflow_UU();
/** Column name Author */
public static final String COLUMNNAME_Author = "Author";
@ -466,7 +475,7 @@ public interface I_AD_Workflow
*/
public int getS_Resource_ID();
public I_S_Resource getS_Resource() throws RuntimeException;
public org.compiere.model.I_S_Resource getS_Resource() throws RuntimeException;
/** Column name UnitsCycles */
public static final String COLUMNNAME_UnitsCycles = "UnitsCycles";

View File

@ -0,0 +1,144 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 M_PartType
* @author Adempiere (generated)
* @version Release 3.6.0LTS
*/
public interface I_M_PartType
{
/** TableName=M_PartType */
public static final String Table_Name = "M_PartType";
/** AD_Table_ID=53334 */
public static final int Table_ID = 53334;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 3 - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(3);
/** 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 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 M_PartType_ID */
public static final String COLUMNNAME_M_PartType_ID = "M_PartType_ID";
/** Set Part Type */
public void setM_PartType_ID (int M_PartType_ID);
/** Get Part Type */
public int getM_PartType_ID();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -31,7 +31,7 @@ public interface I_M_Product
public static final String Table_Name = "M_Product";
/** AD_Table_ID=208 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
public static final int Table_ID = 208;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
@ -75,6 +75,32 @@ public interface I_M_Product
*/
public String getClassification();
/** Column name CopyFrom */
public static final String COLUMNNAME_CopyFrom = "CopyFrom";
/** Set Copy From.
* Copy From Record
*/
public void setCopyFrom (String CopyFrom);
/** Get Copy From.
* Copy From Record
*/
public String getCopyFrom();
/** Column name CostStandard */
public static final String COLUMNNAME_CostStandard = "CostStandard";
/** Set Standard Cost.
* Standard Costs
*/
public void setCostStandard (BigDecimal CostStandard);
/** Get Standard Cost.
* Standard Costs
*/
public BigDecimal getCostStandard();
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
@ -104,7 +130,7 @@ public interface I_M_Product
*/
public int getC_RevenueRecognition_ID();
public I_C_RevenueRecognition getC_RevenueRecognition() throws RuntimeException;
public org.compiere.model.I_C_RevenueRecognition getC_RevenueRecognition() throws RuntimeException;
/** Column name C_SubscriptionType_ID */
public static final String COLUMNNAME_C_SubscriptionType_ID = "C_SubscriptionType_ID";
@ -119,7 +145,7 @@ public interface I_M_Product
*/
public int getC_SubscriptionType_ID();
public I_C_SubscriptionType getC_SubscriptionType() throws RuntimeException;
public org.compiere.model.I_C_SubscriptionType getC_SubscriptionType() throws RuntimeException;
/** Column name C_TaxCategory_ID */
public static final String COLUMNNAME_C_TaxCategory_ID = "C_TaxCategory_ID";
@ -134,7 +160,7 @@ public interface I_M_Product
*/
public int getC_TaxCategory_ID();
public I_C_TaxCategory getC_TaxCategory() throws RuntimeException;
public org.compiere.model.I_C_TaxCategory getC_TaxCategory() throws RuntimeException;
/** Column name C_UOM_ID */
public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
@ -149,7 +175,7 @@ public interface I_M_Product
*/
public int getC_UOM_ID();
public I_C_UOM getC_UOM() throws RuntimeException;
public org.compiere.model.I_C_UOM getC_UOM() throws RuntimeException;
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
@ -351,6 +377,45 @@ public interface I_M_Product
*/
public boolean isInvoicePrintDetails();
/** Column name IsKanban */
public static final String COLUMNNAME_IsKanban = "IsKanban";
/** Set Kanban controlled.
* This part is Kanban controlled
*/
public void setIsKanban (boolean IsKanban);
/** Get Kanban controlled.
* This part is Kanban controlled
*/
public boolean isKanban();
/** Column name IsManufactured */
public static final String COLUMNNAME_IsManufactured = "IsManufactured";
/** Set Manufactured.
* This product is manufactured
*/
public void setIsManufactured (boolean IsManufactured);
/** Get Manufactured.
* This product is manufactured
*/
public boolean isManufactured();
/** Column name IsPhantom */
public static final String COLUMNNAME_IsPhantom = "IsPhantom";
/** Set Phantom.
* Phantom Component
*/
public void setIsPhantom (boolean IsPhantom);
/** Get Phantom.
* Phantom Component
*/
public boolean isPhantom();
/** Column name IsPickListPrintDetails */
public static final String COLUMNNAME_IsPickListPrintDetails = "IsPickListPrintDetails";
@ -481,7 +546,7 @@ public interface I_M_Product
*/
public int getM_AttributeSet_ID();
public I_M_AttributeSet getM_AttributeSet() throws RuntimeException;
public org.compiere.model.I_M_AttributeSet getM_AttributeSet() throws RuntimeException;
/** Column name M_AttributeSetInstance_ID */
public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID";
@ -511,7 +576,7 @@ public interface I_M_Product
*/
public int getM_FreightCategory_ID();
public I_M_FreightCategory getM_FreightCategory() throws RuntimeException;
public org.compiere.model.I_M_FreightCategory getM_FreightCategory() throws RuntimeException;
/** Column name M_Locator_ID */
public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID";
@ -528,6 +593,17 @@ public interface I_M_Product
public I_M_Locator getM_Locator() throws RuntimeException;
/** Column name M_PartType_ID */
public static final String COLUMNNAME_M_PartType_ID = "M_PartType_ID";
/** Set Part Type */
public void setM_PartType_ID (int M_PartType_ID);
/** Get Part Type */
public int getM_PartType_ID();
public I_M_PartType getM_PartType() throws RuntimeException;
/** Column name M_Product_Category_ID */
public static final String COLUMNNAME_M_Product_Category_ID = "M_Product_Category_ID";
@ -541,7 +617,7 @@ public interface I_M_Product
*/
public int getM_Product_Category_ID();
public I_M_Product_Category getM_Product_Category() throws RuntimeException;
public org.compiere.model.I_M_Product_Category getM_Product_Category() throws RuntimeException;
/** Column name M_Product_ID */
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
@ -556,6 +632,15 @@ public interface I_M_Product
*/
public int getM_Product_ID();
/** Column name M_Product_UU */
public static final String COLUMNNAME_M_Product_UU = "M_Product_UU";
/** Set M_Product_UU */
public void setM_Product_UU (String M_Product_UU);
/** Get M_Product_UU */
public String getM_Product_UU();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
@ -604,7 +689,7 @@ public interface I_M_Product
*/
public int getR_MailText_ID();
public I_R_MailText getR_MailText() throws RuntimeException;
public org.compiere.model.I_R_MailText getR_MailText() throws RuntimeException;
/** Column name SalesRep_ID */
public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID";
@ -619,7 +704,7 @@ public interface I_M_Product
*/
public int getSalesRep_ID();
public I_AD_User getSalesRep() throws RuntimeException;
public org.compiere.model.I_AD_User getSalesRep() throws RuntimeException;
/** Column name S_ExpenseType_ID */
public static final String COLUMNNAME_S_ExpenseType_ID = "S_ExpenseType_ID";
@ -634,7 +719,7 @@ public interface I_M_Product
*/
public int getS_ExpenseType_ID();
public I_S_ExpenseType getS_ExpenseType() throws RuntimeException;
public org.compiere.model.I_S_ExpenseType getS_ExpenseType() throws RuntimeException;
/** Column name ShelfDepth */
public static final String COLUMNNAME_ShelfDepth = "ShelfDepth";
@ -701,7 +786,7 @@ public interface I_M_Product
*/
public int getS_Resource_ID();
public I_S_Resource getS_Resource() throws RuntimeException;
public org.compiere.model.I_S_Resource getS_Resource() throws RuntimeException;
/** Column name UnitsPerPack */
public static final String COLUMNNAME_UnitsPerPack = "UnitsPerPack";

View File

@ -31,7 +31,7 @@ public interface I_M_Production
public static final String Table_Name = "M_Production";
/** AD_Table_ID=325 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
public static final int Table_ID = 325;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
@ -88,7 +88,22 @@ public interface I_M_Production
*/
public int getC_Activity_ID();
public I_C_Activity getC_Activity() throws RuntimeException;
public org.compiere.model.I_C_Activity getC_Activity() throws RuntimeException;
/** Column name C_BPartner_ID */
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
/** Set Business Partner .
* Identifies a Business Partner
*/
public void setC_BPartner_ID (int C_BPartner_ID);
/** Get Business Partner .
* Identifies a Business Partner
*/
public int getC_BPartner_ID();
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException;
/** Column name C_Campaign_ID */
public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
@ -103,7 +118,22 @@ public interface I_M_Production
*/
public int getC_Campaign_ID();
public I_C_Campaign getC_Campaign() throws RuntimeException;
public org.compiere.model.I_C_Campaign getC_Campaign() throws RuntimeException;
/** Column name C_OrderLine_ID */
public static final String COLUMNNAME_C_OrderLine_ID = "C_OrderLine_ID";
/** Set Sales Order Line.
* Sales Order Line
*/
public void setC_OrderLine_ID (int C_OrderLine_ID);
/** Get Sales Order Line.
* Sales Order Line
*/
public int getC_OrderLine_ID();
public org.compiere.model.I_C_OrderLine getC_OrderLine() throws RuntimeException;
/** Column name C_Project_ID */
public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
@ -118,7 +148,7 @@ public interface I_M_Production
*/
public int getC_Project_ID();
public I_C_Project getC_Project() throws RuntimeException;
public org.compiere.model.I_C_Project getC_Project() throws RuntimeException;
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
@ -136,6 +166,32 @@ public interface I_M_Production
*/
public int getCreatedBy();
/** Column name CreateFrom */
public static final String COLUMNNAME_CreateFrom = "CreateFrom";
/** Set Create lines from.
* Process which will generate a new document lines based on an existing document
*/
public void setCreateFrom (String CreateFrom);
/** Get Create lines from.
* Process which will generate a new document lines based on an existing document
*/
public String getCreateFrom();
/** Column name DatePromised */
public static final String COLUMNNAME_DatePromised = "DatePromised";
/** Set Date Promised.
* Date Order was promised
*/
public void setDatePromised (Timestamp DatePromised);
/** Get Date Promised.
* Date Order was promised
*/
public Timestamp getDatePromised();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
@ -149,6 +205,19 @@ public interface I_M_Production
*/
public String getDescription();
/** Column name DocumentNo */
public static final String COLUMNNAME_DocumentNo = "DocumentNo";
/** Set Document No.
* Document sequence number of the document
*/
public void setDocumentNo (String DocumentNo);
/** Get Document No.
* Document sequence number of the document
*/
public String getDocumentNo();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
@ -162,14 +231,42 @@ public interface I_M_Production
*/
public boolean isActive();
/** Column name IsComplete */
public static final String COLUMNNAME_IsComplete = "IsComplete";
/** Set Complete.
* It is complete
*/
public void setIsComplete (String IsComplete);
/** Get Complete.
* It is complete
*/
public String getIsComplete();
/** Column name IsCreated */
public static final String COLUMNNAME_IsCreated = "IsCreated";
/** Set Records created */
public void setIsCreated (boolean IsCreated);
public void setIsCreated (String IsCreated);
/** Get Records created */
public boolean isCreated();
public String getIsCreated();
/** Column name M_Locator_ID */
public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID";
/** Set Locator.
* Warehouse Locator
*/
public void setM_Locator_ID (int M_Locator_ID);
/** Get Locator.
* Warehouse Locator
*/
public int getM_Locator_ID();
public I_M_Locator getM_Locator() throws RuntimeException;
/** Column name MovementDate */
public static final String COLUMNNAME_MovementDate = "MovementDate";
@ -184,6 +281,21 @@ public interface I_M_Production
*/
public Timestamp getMovementDate();
/** Column name M_Product_ID */
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
/** Set Product.
* Product, Service, Item
*/
public void setM_Product_ID (int M_Product_ID);
/** Get Product.
* Product, Service, Item
*/
public int getM_Product_ID();
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException;
/** Column name M_Production_ID */
public static final String COLUMNNAME_M_Production_ID = "M_Production_ID";
@ -197,6 +309,15 @@ public interface I_M_Production
*/
public int getM_Production_ID();
/** Column name M_Production_UU */
public static final String COLUMNNAME_M_Production_UU = "M_Production_UU";
/** Set M_Production_UU */
public void setM_Production_UU (String M_Production_UU);
/** Get M_Production_UU */
public String getM_Production_UU();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
@ -258,6 +379,19 @@ public interface I_M_Production
/** Get Process Now */
public boolean isProcessing();
/** Column name ProductionQty */
public static final String COLUMNNAME_ProductionQty = "ProductionQty";
/** Set Production Quantity.
* Quantity of products to produce
*/
public void setProductionQty (BigDecimal ProductionQty);
/** Get Production Quantity.
* Quantity of products to produce
*/
public BigDecimal getProductionQty();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
@ -287,7 +421,7 @@ public interface I_M_Production
*/
public int getUser1_ID();
public I_C_ElementValue getUser1() throws RuntimeException;
public org.compiere.model.I_C_ElementValue getUser1() throws RuntimeException;
/** Column name User2_ID */
public static final String COLUMNNAME_User2_ID = "User2_ID";
@ -302,5 +436,5 @@ public interface I_M_Production
*/
public int getUser2_ID();
public I_C_ElementValue getUser2() throws RuntimeException;
public org.compiere.model.I_C_ElementValue getUser2() throws RuntimeException;
}

View File

@ -31,7 +31,7 @@ public interface I_M_ProductionLine
public static final String Table_Name = "M_ProductionLine";
/** AD_Table_ID=326 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
public static final int Table_ID = 326;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
@ -104,6 +104,19 @@ public interface I_M_ProductionLine
*/
public boolean isActive();
/** Column name IsEndProduct */
public static final String COLUMNNAME_IsEndProduct = "IsEndProduct";
/** Set End Product.
* End Product of production
*/
public void setIsEndProduct (boolean IsEndProduct);
/** Get End Product.
* End Product of production
*/
public boolean isEndProduct();
/** Column name Line */
public static final String COLUMNNAME_Line = "Line";
@ -173,7 +186,22 @@ public interface I_M_ProductionLine
*/
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_Production_ID */
public static final String COLUMNNAME_M_Production_ID = "M_Production_ID";
/** Set Production.
* Plan for producing a product
*/
public void setM_Production_ID (int M_Production_ID);
/** Get Production.
* Plan for producing a product
*/
public int getM_Production_ID();
public org.compiere.model.I_M_Production getM_Production() throws RuntimeException;
/** Column name M_ProductionLine_ID */
public static final String COLUMNNAME_M_ProductionLine_ID = "M_ProductionLine_ID";
@ -188,6 +216,15 @@ public interface I_M_ProductionLine
*/
public int getM_ProductionLine_ID();
/** Column name M_ProductionLine_UU */
public static final String COLUMNNAME_M_ProductionLine_UU = "M_ProductionLine_UU";
/** Set M_ProductionLine_UU */
public void setM_ProductionLine_UU (String M_ProductionLine_UU);
/** Get M_ProductionLine_UU */
public String getM_ProductionLine_UU();
/** Column name M_ProductionPlan_ID */
public static final String COLUMNNAME_M_ProductionPlan_ID = "M_ProductionPlan_ID";
@ -201,7 +238,20 @@ public interface I_M_ProductionLine
*/
public int getM_ProductionPlan_ID();
public I_M_ProductionPlan getM_ProductionPlan() throws RuntimeException;
public org.compiere.model.I_M_ProductionPlan getM_ProductionPlan() throws RuntimeException;
/** Column name PlannedQty */
public static final String COLUMNNAME_PlannedQty = "PlannedQty";
/** Set Planned Quantity.
* Planned quantity for this project
*/
public void setPlannedQty (BigDecimal PlannedQty);
/** Get Planned Quantity.
* Planned quantity for this project
*/
public BigDecimal getPlannedQty();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
@ -216,6 +266,41 @@ public interface I_M_ProductionLine
*/
public boolean isProcessed();
/** Column name ProductType */
public static final String COLUMNNAME_ProductType = "ProductType";
/** Set Product Type.
* Type of product
*/
public void setProductType (String ProductType);
/** Get Product Type.
* Type of product
*/
public String getProductType();
/** Column name QtyAvailable */
public static final String COLUMNNAME_QtyAvailable = "QtyAvailable";
/** Set Available Quantity.
* Available Quantity (On Hand - Reserved)
*/
public void setQtyAvailable (BigDecimal QtyAvailable);
/** Get Available Quantity.
* Available Quantity (On Hand - Reserved)
*/
public BigDecimal getQtyAvailable();
/** Column name QtyUsed */
public static final String COLUMNNAME_QtyUsed = "QtyUsed";
/** Set Quantity Used */
public void setQtyUsed (BigDecimal QtyUsed);
/** Get Quantity Used */
public BigDecimal getQtyUsed();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";

View File

@ -31,7 +31,7 @@ public interface I_M_ProductionLineMA
public static final String Table_Name = "M_ProductionLineMA";
/** AD_Table_ID=765 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
public static final int Table_ID = 765;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
@ -132,7 +132,16 @@ public interface I_M_ProductionLineMA
*/
public int getM_ProductionLine_ID();
public I_M_ProductionLine getM_ProductionLine() throws RuntimeException;
public org.compiere.model.I_M_ProductionLine getM_ProductionLine() throws RuntimeException;
/** Column name M_ProductionLineMA_UU */
public static final String COLUMNNAME_M_ProductionLineMA_UU = "M_ProductionLineMA_UU";
/** Set M_ProductionLineMA_UU */
public void setM_ProductionLineMA_UU (String M_ProductionLineMA_UU);
/** Get M_ProductionLineMA_UU */
public String getM_ProductionLineMA_UU();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";

View File

@ -31,7 +31,7 @@ public interface I_M_ProductionPlan
public static final String Table_Name = "M_ProductionPlan";
/** AD_Table_ID=385 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
public static final int Table_ID = 385;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
@ -145,7 +145,7 @@ public interface I_M_ProductionPlan
*/
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_Production_ID */
public static final String COLUMNNAME_M_Production_ID = "M_Production_ID";
@ -160,7 +160,7 @@ public interface I_M_ProductionPlan
*/
public int getM_Production_ID();
public I_M_Production getM_Production() throws RuntimeException;
public org.compiere.model.I_M_Production getM_Production() throws RuntimeException;
/** Column name M_ProductionPlan_ID */
public static final String COLUMNNAME_M_ProductionPlan_ID = "M_ProductionPlan_ID";
@ -175,6 +175,15 @@ public interface I_M_ProductionPlan
*/
public int getM_ProductionPlan_ID();
/** Column name M_ProductionPlan_UU */
public static final String COLUMNNAME_M_ProductionPlan_UU = "M_ProductionPlan_UU";
/** Set M_ProductionPlan_UU */
public void setM_ProductionPlan_UU (String M_ProductionPlan_UU);
/** Get M_ProductionPlan_UU */
public String getM_ProductionPlan_UU();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";

View File

@ -0,0 +1,157 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 M_QualityTest
* @author Adempiere (generated)
* @version Release 3.6.0LTS
*/
public interface I_M_QualityTest
{
/** TableName=M_QualityTest */
public static final String Table_Name = "M_QualityTest";
/** AD_Table_ID=1000004 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 3 - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(3);
/** 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 Organisation.
* Organisational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organisation.
* Organisational entity within client
*/
public int getAD_Org_ID();
/** 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 Help */
public static final String COLUMNNAME_Help = "Help";
/** Set Comment/Help.
* Comment or Hint
*/
public void setHelp (String Help);
/** Get Comment/Help.
* Comment or Hint
*/
public String getHelp();
/** 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 M_QualityTest_ID */
public static final String COLUMNNAME_M_QualityTest_ID = "M_QualityTest_ID";
/** Set Quality Test */
public void setM_QualityTest_ID (int M_QualityTest_ID);
/** Get Quality Test */
public int getM_QualityTest_ID();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -0,0 +1,201 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 M_QualityTestResult
* @author Adempiere (generated)
* @version Release 3.6.0LTS
*/
public interface I_M_QualityTestResult
{
/** TableName=M_QualityTestResult */
public static final String Table_Name = "M_QualityTestResult";
/** AD_Table_ID=1000006 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 3 - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(3);
/** 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 Organisation.
* Organisational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organisation.
* Organisational entity within client
*/
public int getAD_Org_ID();
/** 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 ExpectedResult */
public static final String COLUMNNAME_ExpectedResult = "ExpectedResult";
/** Set Expected Result */
public void setExpectedResult (String ExpectedResult);
/** Get Expected Result */
public String getExpectedResult();
/** 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 IsQCPass */
public static final String COLUMNNAME_IsQCPass = "IsQCPass";
/** Set QC Pass */
public void setIsQCPass (boolean IsQCPass);
/** Get QC Pass */
public boolean isQCPass();
/** Column name M_AttributeSetInstance_ID */
public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID";
/** Set Attribute Set Instance.
* Product Attribute Set Instance
*/
public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID);
/** Get Attribute Set Instance.
* Product Attribute Set Instance
*/
public int getM_AttributeSetInstance_ID();
public I_M_AttributeSetInstance getM_AttributeSetInstance() throws RuntimeException;
/** Column name M_QualityTest_ID */
public static final String COLUMNNAME_M_QualityTest_ID = "M_QualityTest_ID";
/** Set Quality Test */
public void setM_QualityTest_ID (int M_QualityTest_ID);
/** Get Quality Test */
public int getM_QualityTest_ID();
public I_M_QualityTest getM_QualityTest() throws RuntimeException;
/** Column name M_QualityTestResult_ID */
public static final String COLUMNNAME_M_QualityTestResult_ID = "M_QualityTestResult_ID";
/** Set Quality Test Result */
public void setM_QualityTestResult_ID (int M_QualityTestResult_ID);
/** Get Quality Test Result */
public int getM_QualityTestResult_ID();
/** 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 Result */
public static final String COLUMNNAME_Result = "Result";
/** Set Result.
* Result of the action taken
*/
public void setResult (String Result);
/** Get Result.
* Result of the action taken
*/
public String getResult();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -31,7 +31,7 @@ public interface I_M_Replenish
public static final String Table_Name = "M_Replenish";
/** AD_Table_ID=249 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
public static final int Table_ID = 249;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
@ -130,7 +130,7 @@ public interface I_M_Replenish
*/
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 M_Product_ID */
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
@ -145,7 +145,16 @@ public interface I_M_Replenish
*/
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_Replenish_UU */
public static final String COLUMNNAME_M_Replenish_UU = "M_Replenish_UU";
/** Set M_Replenish_UU */
public void setM_Replenish_UU (String M_Replenish_UU);
/** Get M_Replenish_UU */
public String getM_Replenish_UU();
/** Column name M_Warehouse_ID */
public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
@ -160,7 +169,7 @@ public interface I_M_Replenish
*/
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 M_WarehouseSource_ID */
public static final String COLUMNNAME_M_WarehouseSource_ID = "M_WarehouseSource_ID";
@ -175,7 +184,16 @@ public interface I_M_Replenish
*/
public int getM_WarehouseSource_ID();
public I_M_Warehouse getM_WarehouseSource() throws RuntimeException;
public org.compiere.model.I_M_Warehouse getM_WarehouseSource() throws RuntimeException;
/** Column name QtyBatchSize */
public static final String COLUMNNAME_QtyBatchSize = "QtyBatchSize";
/** Set Qty Batch Size */
public void setQtyBatchSize (BigDecimal QtyBatchSize);
/** Get Qty Batch Size */
public BigDecimal getQtyBatchSize();
/** Column name ReplenishType */
public static final String COLUMNNAME_ReplenishType = "ReplenishType";

View File

@ -0,0 +1,318 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 T_BOM_Indented
* @author Adempiere (generated)
* @version Release 3.6.0LTS
*/
public interface I_T_BOM_Indented
{
/** TableName=T_BOM_Indented */
public static final String Table_Name = "T_BOM_Indented";
/** AD_Table_ID=1000008 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 3 - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(3);
/** 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 Organisation.
* Organisational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organisation.
* Organisational entity within client
*/
public int getAD_Org_ID();
/** Column name AD_PInstance_ID */
public static final String COLUMNNAME_AD_PInstance_ID = "AD_PInstance_ID";
/** Set Process Instance.
* Instance of the process
*/
public void setAD_PInstance_ID (int AD_PInstance_ID);
/** Get Process Instance.
* Instance of the process
*/
public int getAD_PInstance_ID();
public I_AD_PInstance getAD_PInstance() throws RuntimeException;
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
public I_C_AcctSchema getC_AcctSchema() throws RuntimeException;
/** Column name Cost */
public static final String COLUMNNAME_Cost = "Cost";
/** Set Cost.
* Cost information
*/
public void setCost (BigDecimal Cost);
/** Get Cost.
* Cost information
*/
public BigDecimal getCost();
/** Column name CostFuture */
public static final String COLUMNNAME_CostFuture = "CostFuture";
/** Set Future Cost.
* Cost information
*/
public void setCostFuture (BigDecimal CostFuture);
/** Get Future Cost.
* Cost information
*/
public BigDecimal getCostFuture();
/** 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 CurrentCostPrice */
public static final String COLUMNNAME_CurrentCostPrice = "CurrentCostPrice";
/** Set Current Cost Price.
* The currently used cost price
*/
public void setCurrentCostPrice (BigDecimal CurrentCostPrice);
/** Get Current Cost Price.
* The currently used cost price
*/
public BigDecimal getCurrentCostPrice();
/** Column name CurrentCostPriceLL */
public static final String COLUMNNAME_CurrentCostPriceLL = "CurrentCostPriceLL";
/** Set Current Cost Price Lower Level.
* Current Price Lower Level Is the sum of the costs of the components of this product manufactured for this level.
*/
public void setCurrentCostPriceLL (BigDecimal CurrentCostPriceLL);
/** Get Current Cost Price Lower Level.
* Current Price Lower Level Is the sum of the costs of the components of this product manufactured for this level.
*/
public BigDecimal getCurrentCostPriceLL();
/** Column name FutureCostPrice */
public static final String COLUMNNAME_FutureCostPrice = "FutureCostPrice";
/** Set Future Cost Price */
public void setFutureCostPrice (BigDecimal FutureCostPrice);
/** Get Future Cost Price */
public BigDecimal getFutureCostPrice();
/** Column name FutureCostPriceLL */
public static final String COLUMNNAME_FutureCostPriceLL = "FutureCostPriceLL";
/** Set Future Cost Price Lower Level */
public void setFutureCostPriceLL (BigDecimal FutureCostPriceLL);
/** Get Future Cost Price Lower Level */
public BigDecimal getFutureCostPriceLL();
/** 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 LevelNo */
public static final String COLUMNNAME_LevelNo = "LevelNo";
/** Set Level no */
public void setLevelNo (int LevelNo);
/** Get Level no */
public int getLevelNo();
/** Column name Levels */
public static final String COLUMNNAME_Levels = "Levels";
/** Set Levels */
public void setLevels (String Levels);
/** Get Levels */
public String getLevels();
/** 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 I_M_CostElement getM_CostElement() throws RuntimeException;
/** Column name M_Product_ID */
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
/** Set Product.
* Product, Service, Item
*/
public void setM_Product_ID (int M_Product_ID);
/** Get Product.
* Product, Service, Item
*/
public int getM_Product_ID();
public I_M_Product getM_Product() throws RuntimeException;
/** 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 QtyBOM */
public static final String COLUMNNAME_QtyBOM = "QtyBOM";
/** Set Quantity.
* Indicate the Quantity use in this BOM
*/
public void setQtyBOM (BigDecimal QtyBOM);
/** Get Quantity.
* Indicate the Quantity use in this BOM
*/
public BigDecimal getQtyBOM();
/** Column name Sel_Product_ID */
public static final String COLUMNNAME_Sel_Product_ID = "Sel_Product_ID";
/** Set Selected Product */
public void setSel_Product_ID (int Sel_Product_ID);
/** Get Selected Product */
public int getSel_Product_ID();
public I_M_Product getSel_Product() throws RuntimeException;
/** Column name SeqNo */
public static final String COLUMNNAME_SeqNo = "SeqNo";
/** Set Sequence.
* Method of ordering records;
lowest number comes first
*/
public void setSeqNo (int SeqNo);
/** Get Sequence.
* Method of ordering records;
lowest number comes first
*/
public int getSeqNo();
/** Column name T_BOM_Indented_ID */
public static final String COLUMNNAME_T_BOM_Indented_ID = "T_BOM_Indented_ID";
/** Set Indented BOM Report */
public void setT_BOM_Indented_ID (int T_BOM_Indented_ID);
/** Get Indented BOM Report */
public int getT_BOM_Indented_ID();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -0,0 +1,316 @@
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MAttributeSetInstance;
import org.compiere.model.MOrderLine;
import org.compiere.model.MProduct;
import org.compiere.model.MStorage;
import org.compiere.model.X_M_Production;
import org.compiere.util.AdempiereUserError;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
public class MProduction extends X_M_Production {
/**
*
*/
/** Log */
private static CLogger m_log = CLogger.getCLogger (MProduction.class);
private static final long serialVersionUID = 1L;
private int lineno;
private int count;
public MProduction(Properties ctx, int M_Production_ID, String trxName) {
super(ctx, M_Production_ID, trxName);
}
public MProduction(Properties ctx, ResultSet rs, String trxName) {
super(ctx, rs, trxName);
}
public MProduction( MOrderLine line ) {
super( line.getCtx(), 0, line.get_TrxName());
setAD_Client_ID(line.getAD_Client_ID());
setAD_Org_ID(line.getAD_Org_ID());
setMovementDate( line.getDatePromised() );
}
public MProductionLine[] getLines() {
ArrayList<MProductionLine> list = new ArrayList<MProductionLine>();
String sql = "SELECT pl.M_ProductionLine_ID "
+ "FROM M_ProductionLine pl "
+ "WHERE pl.M_Production_ID = ?";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, get_TrxName());
pstmt.setInt(1, get_ID());
rs = pstmt.executeQuery();
while (rs.next())
list.add( new MProductionLine( getCtx(), rs.getInt(1), get_TrxName() ) );
rs.close();
pstmt.close();
pstmt = null;
}
catch (SQLException ex)
{
throw new AdempiereException("Unable to load production lines", ex);
}
finally
{
DB.close(rs, pstmt);
}
MProductionLine[] retValue = new MProductionLine[list.size()];
list.toArray(retValue);
return retValue;
}
public void deleteLines(String trxName) {
for (MProductionLine line : getLines())
{
line.deleteEx(true);
}
}// deleteLines
public int createLines(boolean mustBeStocked) {
lineno = 100;
count = 0;
// product to be produced
MProduct finishedProduct = new MProduct(getCtx(), getM_Product_ID(), get_TrxName());
MProductionLine line = new MProductionLine( this );
line.setLine( lineno );
line.setM_Product_ID( finishedProduct.get_ID() );
line.setM_Locator_ID( getM_Locator_ID() );
line.setMovementQty( getProductionQty());
line.setPlannedQty(getProductionQty());
line.save();
count++;
createLines(mustBeStocked, finishedProduct, getProductionQty());
return count;
}
private int createLines(boolean mustBeStocked, MProduct finishedProduct, BigDecimal requiredQty) {
int defaultLocator = 0;
MLocator finishedLocator = MLocator.get(getCtx(), getM_Locator_ID());
int M_Warehouse_ID = finishedLocator.getM_Warehouse_ID();
int asi = 0;
// products used in production
String sql = "SELECT M_ProductBom_ID, BOMQty" + " FROM M_Product_BOM"
+ " WHERE M_Product_ID=" + finishedProduct.getM_Product_ID() + " ORDER BY Line";
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
pstmt = DB.prepareStatement(sql, get_TrxName());
rs = pstmt.executeQuery();
while (rs.next()) {
lineno = lineno + 10;
int BOMProduct_ID = rs.getInt(1);
BigDecimal BOMQty = rs.getBigDecimal(2);
BigDecimal BOMMovementQty = BOMQty.multiply(requiredQty);
MProduct bomproduct = new MProduct(Env.getCtx(), BOMProduct_ID, get_TrxName());
if ( bomproduct.isBOM() && bomproduct.isPhantom() )
{
createLines(mustBeStocked, bomproduct, BOMMovementQty);
}
else
{
defaultLocator = bomproduct.getM_Locator_ID();
if ( defaultLocator == 0 )
defaultLocator = getM_Locator_ID();
if (!bomproduct.isStocked())
{
MProductionLine BOMLine = null;
BOMLine = new MProductionLine( this );
BOMLine.setLine( lineno );
BOMLine.setM_Product_ID( BOMProduct_ID );
BOMLine.setM_Locator_ID( defaultLocator );
BOMLine.setQtyUsed(BOMMovementQty );
BOMLine.setPlannedQty( BOMMovementQty );
BOMLine.save(get_TrxName());
lineno = lineno + 10;
count++;
}
else if (BOMMovementQty.signum() == 0)
{
MProductionLine BOMLine = null;
BOMLine = new MProductionLine( this );
BOMLine.setLine( lineno );
BOMLine.setM_Product_ID( BOMProduct_ID );
BOMLine.setM_Locator_ID( defaultLocator );
BOMLine.setQtyUsed( BOMMovementQty );
BOMLine.setPlannedQty( BOMMovementQty );
BOMLine.save(get_TrxName());
lineno = lineno + 10;
count++;
}
else
{
// BOM stock info
MStorage[] storages = null;
MProduct usedProduct = MProduct.get(getCtx(), BOMProduct_ID);
defaultLocator = usedProduct.getM_Locator_ID();
if ( defaultLocator == 0 )
defaultLocator = getM_Locator_ID();
if (usedProduct == null || usedProduct.get_ID() == 0)
return 0;
MClient client = MClient.get(getCtx());
MProductCategory pc = MProductCategory.get(getCtx(),
usedProduct.getM_Product_Category_ID());
String MMPolicy = pc.getMMPolicy();
if (MMPolicy == null || MMPolicy.length() == 0)
{
MMPolicy = client.getMMPolicy();
}
storages = MStorage.getWarehouse(getCtx(), M_Warehouse_ID, BOMProduct_ID, 0, null,
MProductCategory.MMPOLICY_FiFo.equals(MMPolicy), true, 0, get_TrxName());
MProductionLine BOMLine = null;
int prevLoc = -1;
int previousAttribSet = -1;
// Create lines from storage until qty is reached
for (int sl = 0; sl < storages.length; sl++) {
BigDecimal lineQty = storages[sl].getQtyOnHand();
if (lineQty.signum() != 0) {
if (lineQty.compareTo(BOMMovementQty) > 0)
lineQty = BOMMovementQty;
int loc = storages[sl].getM_Locator_ID();
int slASI = storages[sl].getM_AttributeSetInstance_ID();
int locAttribSet = new MAttributeSetInstance(getCtx(), asi,
get_TrxName()).getM_AttributeSet_ID();
// roll up costing attributes if in the same locator
if (locAttribSet == 0 && previousAttribSet == 0
&& prevLoc == loc) {
BOMLine.setQtyUsed(BOMLine.getQtyUsed()
.add(lineQty));
BOMLine.setPlannedQty(BOMLine.getQtyUsed());
BOMLine.save(get_TrxName());
}
// otherwise create new line
else {
BOMLine = new MProductionLine( this );
BOMLine.setLine( lineno );
BOMLine.setM_Product_ID( BOMProduct_ID );
BOMLine.setM_Locator_ID( loc );
BOMLine.setQtyUsed( lineQty);
BOMLine.setPlannedQty( lineQty);
if ( slASI != 0 && locAttribSet != 0 ) // ie non costing attribute
BOMLine.setM_AttributeSetInstance_ID(slASI);
BOMLine.save(get_TrxName());
lineno = lineno + 10;
count++;
}
prevLoc = loc;
previousAttribSet = locAttribSet;
// enough ?
BOMMovementQty = BOMMovementQty.subtract(lineQty);
if (BOMMovementQty.signum() == 0)
break;
}
} // for available storages
// fallback
if (BOMMovementQty.signum() != 0 ) {
if (!mustBeStocked)
{
// roll up costing attributes if in the same locator
if ( previousAttribSet == 0
&& prevLoc == defaultLocator) {
BOMLine.setQtyUsed(BOMLine.getQtyUsed()
.add(BOMMovementQty));
BOMLine.setPlannedQty(BOMLine.getQtyUsed());
BOMLine.save(get_TrxName());
}
// otherwise create new line
else {
BOMLine = new MProductionLine( this );
BOMLine.setLine( lineno );
BOMLine.setM_Product_ID( BOMProduct_ID );
BOMLine.setM_Locator_ID( defaultLocator );
BOMLine.setQtyUsed( BOMMovementQty);
BOMLine.setPlannedQty( BOMMovementQty);
BOMLine.save(get_TrxName());
lineno = lineno + 10;
count++;
}
}
else
{
throw new AdempiereUserError("Not enough stock of " + BOMProduct_ID);
}
}
}
}
} // for all bom products
} catch (Exception e) {
throw new AdempiereException("Failed to create production lines", e);
}
finally {
DB.close(rs, pstmt);
}
return count;
}
@Override
protected boolean beforeDelete() {
deleteLines(get_TrxName());
return true;
}
}

View File

@ -0,0 +1,322 @@
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.MAttributeSet;
import org.compiere.model.MAttributeSetInstance;
import org.compiere.model.MInventoryLineMA;
import org.compiere.model.MLocator;
import org.compiere.model.MProduct;
import org.compiere.model.MStorage;
import org.compiere.model.MTransaction;
import org.compiere.model.X_M_ProductionLine;
import org.compiere.util.DB;
import org.compiere.util.Env;
public class MProductionLine extends X_M_ProductionLine {
/**
*
*/
private static final long serialVersionUID = 1L;
private MProduction parent;
/**
* Standard Constructor
* @param ctx ctx
* @param M_ProductionLine_ID id
*/
public MProductionLine (Properties ctx, int M_ProductionLine_ID, String trxName)
{
super (ctx, M_ProductionLine_ID, trxName);
if (M_ProductionLine_ID == 0)
{
setLine (0); // @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM M_ProductionLine WHERE M_Production_ID=@M_Production_ID@
setM_AttributeSetInstance_ID (0);
setM_Locator_ID (0); // @M_Locator_ID@
setM_Product_ID (0);
setM_ProductionLine_ID (0);
setM_Production_ID (0);
setMovementQty (Env.ZERO);
setProcessed (false);
}
} // MProductionLine
public MProductionLine (Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
} // MProductionLine
/**
* Parent Constructor
* @param plan
*/
public MProductionLine( MProduction header ) {
super( header.getCtx(), 0, header.get_TrxName() );
setM_Production_ID( header.get_ID());
setAD_Client_ID(header.getAD_Client_ID());
setAD_Org_ID(header.getAD_Org_ID());
parent = header;
}
/**
*
* @param date
* @return "" for success, error string if failed
*/
public String createTransactions(Timestamp date, boolean mustBeStocked) {
// delete existing ASI records
int deleted = deleteMA();
log.log(Level.FINE, "Deleted " + deleted + " attribute records ");
MProduct prod = new MProduct(getCtx(), getM_Product_ID(), get_TrxName());
log.log(Level.FINE,"Loaded Product " + prod.toString());
if ( prod.getProductType().compareTo(MProduct.PRODUCTTYPE_Item ) != 0 ) {
// no need to do any movements
log.log(Level.FINE, "Production Line " + getLine() + " does not require stock movement");
return "";
}
StringBuffer errorString = new StringBuffer();
MAttributeSetInstance asi = new MAttributeSetInstance(getCtx(), getM_AttributeSetInstance_ID(), get_TrxName());
String asiString = asi.getDescription();
if ( asiString == null )
asiString = "";
log.log(Level.FINEST, "asi Description is: " + asiString);
// create transactions for finished goods
if ( getMovementQty().compareTo(Env.ZERO) > 0 ) {
MProductionLineMA lineMA = new MProductionLineMA( this,
asi.get_ID(), getMovementQty());
if ( !lineMA.save(get_TrxName()) ) {
log.log(Level.SEVERE, "Could not save MA for " + toString());
errorString.append("Could not save MA for " + toString() + "\n" );
}
MTransaction matTrx = new MTransaction (getCtx(), getAD_Org_ID(),
"P+",
getM_Locator_ID(), getM_Product_ID(), asi.get_ID(),
getMovementQty(), date, get_TrxName());
matTrx.setM_ProductionLine_ID(get_ID());
if ( !matTrx.save(get_TrxName()) ) {
log.log(Level.SEVERE, "Could not save transaction for " + toString());
errorString.append("Could not save transaction for " + toString() + "\n");
}
MStorage storage = MStorage.getCreate(getCtx(), getM_Locator_ID(),
getM_Product_ID(), asi.get_ID(), get_TrxName());
storage.changeQtyOnHand(getMovementQty(), true);
if ( !storage.save(get_TrxName()) ) {
log.log(Level.SEVERE, "Could not update storage for " + toString());
errorString.append("Could not save transaction for " + toString() + "\n");
}
log.log(Level.FINE, "Created finished goods line " + getLine());
return errorString.toString();
}
// create transactions and update stock used in production
MStorage[] storages = MStorage.getAll( getCtx(), getM_Product_ID(),
getM_Locator_ID(), get_TrxName());
MProductionLineMA lineMA = null;
MTransaction matTrx = null;
BigDecimal qtyToMove = getMovementQty().negate();
for (int sl = 0; sl < storages.length; sl++) {
BigDecimal lineQty = storages[sl].getQtyOnHand();
log.log(Level.FINE, "QtyAvailable " + lineQty );
if (lineQty.signum() > 0)
{
if (lineQty.compareTo(qtyToMove ) > 0)
lineQty = qtyToMove;
MAttributeSetInstance slASI = new MAttributeSetInstance(getCtx(),
storages[sl].getM_AttributeSetInstance_ID(),get_TrxName());
String slASIString = slASI.getDescription();
if (slASIString == null)
slASIString = "";
log.log(Level.FINEST,"slASI-Description =" + slASIString);
if ( slASIString.compareTo(asiString) == 0
|| asi.getM_AttributeSet_ID() == 0 )
//storage matches specified ASI or is a costing asi (inc. 0)
// This process will move negative stock on hand quantities
{
lineMA = MProductionLineMA.get(this,storages[sl].getM_AttributeSetInstance_ID());
lineMA.setMovementQty(lineMA.getMovementQty().add(lineQty.negate()));
if ( !lineMA.save(get_TrxName()) ) {
log.log(Level.SEVERE, "Could not save MA for " + toString());
errorString.append("Could not save MA for " + toString() + "\n" );
}
else
log.log(Level.FINE, "Saved MA for " + toString());
matTrx = new MTransaction (getCtx(), getAD_Org_ID(),
"P-",
getM_Locator_ID(), getM_Product_ID(), asi.get_ID(),
lineQty.negate(), date, get_TrxName());
matTrx.setM_ProductionLine_ID(get_ID());
if ( !matTrx.save(get_TrxName()) ) {
log.log(Level.SEVERE, "Could not save transaction for " + toString());
errorString.append("Could not save transaction for " + toString() + "\n");
}
else
log.log(Level.FINE, "Saved transaction for " + toString());
storages[sl].changeQtyOnHand(lineQty, false);
if ( !storages[sl].save(get_TrxName()) ) {
log.log(Level.SEVERE, "Could not update storage for " + toString());
errorString.append("Could not update storage for " + toString() + "\n");
}
qtyToMove = qtyToMove.subtract(lineQty);
log.log(Level.FINE, getLine() + " Qty moved = " + lineQty + ", Remaining = " + qtyToMove );
}
}
if ( qtyToMove.signum() == 0 )
break;
} // for available storages
if ( !( qtyToMove.signum() == 0) ) {
if (mustBeStocked)
{
MLocator loc = new MLocator(getCtx(), getM_Locator_ID(), get_TrxName());
errorString.append( "Insufficient qty on hand of " + prod.toString() + " at "
+ loc.toString() + "\n");
}
else
{
MStorage storage = MStorage.get(Env.getCtx(), getM_Locator_ID(), getM_Product_ID(), 0, get_TrxName());
if (storage == null)
{
storage = new MStorage(Env.getCtx(), 0, get_TrxName());
storage.setM_Locator_ID(getM_Locator_ID());
storage.setM_Product_ID(getM_Product_ID());
storage.setM_AttributeSetInstance_ID(0);
storage.save();
}
BigDecimal lineQty = qtyToMove;
MAttributeSetInstance slASI = new MAttributeSetInstance(getCtx(),
storage.getM_AttributeSetInstance_ID(),get_TrxName());
String slASIString = slASI.getDescription();
if (slASIString == null)
slASIString = "";
log.log(Level.FINEST,"slASI-Description =" + slASIString);
if ( slASIString.compareTo(asiString) == 0
|| asi.getM_AttributeSet_ID() == 0 )
//storage matches specified ASI or is a costing asi (inc. 0)
// This process will move negative stock on hand quantities
{
//lineMA = new MProductionLineMA( this,
// storage.getM_AttributeSetInstance_ID(),
// lineQty.negate());
lineMA = MProductionLineMA.get(this,storage.getM_AttributeSetInstance_ID());
lineMA.setMovementQty(lineMA.getMovementQty().add(lineQty.negate()));
if ( !lineMA.save(get_TrxName()) ) {
log.log(Level.SEVERE, "Could not save MA for " + toString());
errorString.append("Could not save MA for " + toString() + "\n" );
}
else
log.log(Level.FINE, "Saved MA for " + toString());
matTrx = new MTransaction (getCtx(), getAD_Org_ID(),
"P-",
getM_Locator_ID(), getM_Product_ID(), asi.get_ID(),
lineQty.negate(), date, get_TrxName());
matTrx.setM_ProductionLine_ID(get_ID());
if ( !matTrx.save(get_TrxName()) ) {
log.log(Level.SEVERE, "Could not save transaction for " + toString());
errorString.append("Could not save transaction for " + toString() + "\n");
}
else
log.log(Level.FINE, "Saved transaction for " + toString());
storage.changeQtyOnHand(lineQty, false);
if ( !storage.save(get_TrxName()) ) {
log.log(Level.SEVERE, "Could not update storage for " + toString());
errorString.append("Could not update storage for " + toString() + "\n");
}
qtyToMove = qtyToMove.subtract(lineQty);
log.log(Level.FINE, getLine() + " Qty moved = " + lineQty + ", Remaining = " + qtyToMove );
}
}
}
return errorString.toString();
}
private int deleteMA() {
String sql = "DELETE FROM M_ProductionLineMA WHERE M_ProductionLine_ID = " + get_ID();
int count = DB.executeUpdateEx( sql, get_TrxName() );
return count;
}
public String toString() {
if ( getM_Product_ID() == 0 )
return ("No product defined for production line " + getLine());
MProduct product = new MProduct(getCtx(),getM_Product_ID(), get_TrxName());
return ( "Production line:" + getLine() + " -- " + getMovementQty() + " of " + product.getValue());
}
@Override
protected boolean beforeSave(boolean newRecord) {
if (parent == null )
parent = new MProduction(getCtx(), getM_Production_ID(), get_TrxName());
if ( parent.getM_Product_ID() == getM_Product_ID() && parent.getProductionQty().signum() == getMovementQty().signum())
setIsEndProduct(true);
else
setIsEndProduct(false);
if ( isEndProduct() && getM_AttributeSetInstance_ID() != 0 )
{
String where = "M_QualityTest_ID IN (SELECT M_QualityTest_ID " +
"FROM M_Product_QualityTest WHERE M_Product_ID=?) " +
"AND M_QualityTest_ID NOT IN (SELECT M_QualityTest_ID " +
"FROM M_QualityTestResult WHERE M_AttributeSetInstance_ID=?)";
List<MQualityTest> tests = new Query(getCtx(), MQualityTest.Table_Name, where, get_TrxName())
.setOnlyActiveRecords(true).setParameters(getM_Product_ID(), getM_AttributeSetInstance_ID()).list();
// create quality control results
for (MQualityTest test : tests)
{
test.createResult(getM_AttributeSetInstance_ID());
}
}
if ( !isEndProduct() )
{
setMovementQty(getQtyUsed().negate());
}
return true;
}
@Override
protected boolean beforeDelete() {
deleteMA();
return true;
}
}

View File

@ -0,0 +1,60 @@
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.X_M_ProductionLineMA;
import org.compiere.util.Env;
public class MProductionLineMA extends X_M_ProductionLineMA {
/**
*
*/
private static final long serialVersionUID = 1L;
public MProductionLineMA(Properties ctx, int M_ProductionLineMA_ID,
String trxName) {
super(ctx, M_ProductionLineMA_ID, trxName);
// TODO Auto-generated constructor stub
}
public MProductionLineMA(Properties ctx, ResultSet rs, String trxName) {
super(ctx, rs, trxName);
// TODO Auto-generated constructor stub
}
/**
* Parent constructor
* @param parent
* @param asi
* @param qty
* @param ctx
* @param trxName
*/
public MProductionLineMA( MProductionLine parent, int asi, BigDecimal qty) {
super(parent.getCtx(),0,parent.get_TrxName());
setM_AttributeSetInstance_ID(asi);
setM_ProductionLine_ID(parent.get_ID());
setMovementQty(qty);
}
public static MProductionLineMA get( MProductionLine parent, int asi ) {
String where = " M_ProductionLine_ID = ? AND M_AttributeSetInstance_ID = ? ";
MProductionLineMA lineMA = MTable.get(parent.getCtx(), MProductionLineMA.Table_Name).createQuery(where, parent.get_TrxName())
.setParameters(parent.getM_ProductionLine_ID(), asi).firstOnly();
if (lineMA != null)
return lineMA;
else
return new MProductionLineMA( parent,
asi,
Env.ZERO);
}
}

View File

@ -0,0 +1,28 @@
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
public class MQualityTest extends X_M_QualityTest {
public MQualityTest(Properties ctx, int M_QualityTest_ID, String trxName) {
super(ctx, M_QualityTest_ID, trxName);
}
public MQualityTest(Properties ctx, ResultSet rs, String trxName) {
super(ctx, rs, trxName);
}
public MQualityTestResult createResult(int m_attributesetinstance_id)
{
MQualityTestResult result = new MQualityTestResult(getCtx(),0, get_TrxName());
result.setClientOrg(this);
result.setM_QualityTest_ID(getM_QualityTest_ID());
result.setM_AttributeSetInstance_ID(m_attributesetinstance_id);
result.setProcessed(false);
result.setIsQCPass(false);
result.saveEx();
return result;
}
}

View File

@ -0,0 +1,12 @@
package org.compiere.model;
import java.util.Properties;
public class MQualityTestResult extends X_M_QualityTestResult {
public MQualityTestResult(Properties ctx, int M_QualityTestResult_ID,
String trxName) {
super(ctx, M_QualityTestResult_ID, trxName);
}
}

View File

@ -37,6 +37,7 @@ public class SystemIDs
public final static int COLUMN_M_PRODUCT_M_ATTRIBUTESETINSTANCE_ID = 8418;
public final static int COLUMN_S_RESOURCE_S_RESOURCETYPE_ID = 6851;
public final static int COLUMN_S_RESOURCEASSIGNMENT_S_RESOURCE_ID = 6826;
public final static int COLUMN_WIZARDSTATUS = 200310;
public final static int COUNTRY_US = 100;
public final static int COUNTRY_JAPAN = 216;
@ -113,6 +114,7 @@ public class SystemIDs
public final static int REFERENCE_PAYMENTRULE = 195;
public final static int REFERENCE_POSTING_TYPE = 125;
public final static int REFERENCE_YESNO = 319;
public final static int REFERENCE_WIZARDSTATUS = 200003;
public final static int TABLE_AD_TABLE = 100;
public final static int TABLE_AD_WF_PROCESS = 645;

View File

@ -33,7 +33,7 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20100614L;
private static final long serialVersionUID = 20120817L;
/** Standard Constructor */
public X_AD_WF_Node (Properties ctx, int AD_WF_Node_ID, String trxName)
@ -136,9 +136,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return (String)get_Value(COLUMNNAME_Action);
}
public I_AD_Column getAD_Column() throws RuntimeException
public org.compiere.model.I_AD_Column getAD_Column() throws RuntimeException
{
return (I_AD_Column)MTable.get(getCtx(), I_AD_Column.Table_Name)
return (org.compiere.model.I_AD_Column)MTable.get(getCtx(), org.compiere.model.I_AD_Column.Table_Name)
.getPO(getAD_Column_ID(), get_TrxName()); }
/** Set Column.
@ -164,9 +164,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return ii.intValue();
}
public I_AD_Form getAD_Form() throws RuntimeException
public org.compiere.model.I_AD_Form getAD_Form() throws RuntimeException
{
return (I_AD_Form)MTable.get(getCtx(), I_AD_Form.Table_Name)
return (org.compiere.model.I_AD_Form)MTable.get(getCtx(), org.compiere.model.I_AD_Form.Table_Name)
.getPO(getAD_Form_ID(), get_TrxName()); }
/** Set Special Form.
@ -192,9 +192,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return ii.intValue();
}
public I_AD_Image getAD_Image() throws RuntimeException
public org.compiere.model.I_AD_Image getAD_Image() throws RuntimeException
{
return (I_AD_Image)MTable.get(getCtx(), I_AD_Image.Table_Name)
return (org.compiere.model.I_AD_Image)MTable.get(getCtx(), org.compiere.model.I_AD_Image.Table_Name)
.getPO(getAD_Image_ID(), get_TrxName()); }
/** Set Image.
@ -220,9 +220,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return ii.intValue();
}
public I_AD_Process getAD_Process() throws RuntimeException
public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException
{
return (I_AD_Process)MTable.get(getCtx(), I_AD_Process.Table_Name)
return (org.compiere.model.I_AD_Process)MTable.get(getCtx(), org.compiere.model.I_AD_Process.Table_Name)
.getPO(getAD_Process_ID(), get_TrxName()); }
/** Set Process.
@ -248,9 +248,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return ii.intValue();
}
public I_AD_Task getAD_Task() throws RuntimeException
public org.compiere.model.I_AD_Task getAD_Task() throws RuntimeException
{
return (I_AD_Task)MTable.get(getCtx(), I_AD_Task.Table_Name)
return (org.compiere.model.I_AD_Task)MTable.get(getCtx(), org.compiere.model.I_AD_Task.Table_Name)
.getPO(getAD_Task_ID(), get_TrxName()); }
/** Set OS Task.
@ -276,9 +276,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return ii.intValue();
}
public I_AD_WF_Block getAD_WF_Block() throws RuntimeException
public org.compiere.model.I_AD_WF_Block getAD_WF_Block() throws RuntimeException
{
return (I_AD_WF_Block)MTable.get(getCtx(), I_AD_WF_Block.Table_Name)
return (org.compiere.model.I_AD_WF_Block)MTable.get(getCtx(), org.compiere.model.I_AD_WF_Block.Table_Name)
.getPO(getAD_WF_Block_ID(), get_TrxName()); }
/** Set Workflow Block.
@ -327,9 +327,23 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return ii.intValue();
}
public I_AD_WF_Responsible getAD_WF_Responsible() throws RuntimeException
/** Set AD_WF_Node_UU.
@param AD_WF_Node_UU AD_WF_Node_UU */
public void setAD_WF_Node_UU (String AD_WF_Node_UU)
{
set_Value (COLUMNNAME_AD_WF_Node_UU, AD_WF_Node_UU);
}
/** Get AD_WF_Node_UU.
@return AD_WF_Node_UU */
public String getAD_WF_Node_UU ()
{
return (String)get_Value(COLUMNNAME_AD_WF_Node_UU);
}
public org.compiere.model.I_AD_WF_Responsible getAD_WF_Responsible() throws RuntimeException
{
return (I_AD_WF_Responsible)MTable.get(getCtx(), I_AD_WF_Responsible.Table_Name)
return (org.compiere.model.I_AD_WF_Responsible)MTable.get(getCtx(), org.compiere.model.I_AD_WF_Responsible.Table_Name)
.getPO(getAD_WF_Responsible_ID(), get_TrxName()); }
/** Set Workflow Responsible.
@ -355,9 +369,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return ii.intValue();
}
public I_AD_Window getAD_Window() throws RuntimeException
public org.compiere.model.I_AD_Window getAD_Window() throws RuntimeException
{
return (I_AD_Window)MTable.get(getCtx(), I_AD_Window.Table_Name)
return (org.compiere.model.I_AD_Window)MTable.get(getCtx(), org.compiere.model.I_AD_Window.Table_Name)
.getPO(getAD_Window_ID(), get_TrxName()); }
/** Set Window.
@ -383,9 +397,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return ii.intValue();
}
public I_AD_Workflow getAD_Workflow() throws RuntimeException
public org.compiere.model.I_AD_Workflow getAD_Workflow() throws RuntimeException
{
return (I_AD_Workflow)MTable.get(getCtx(), I_AD_Workflow.Table_Name)
return (org.compiere.model.I_AD_Workflow)MTable.get(getCtx(), org.compiere.model.I_AD_Workflow.Table_Name)
.getPO(getAD_Workflow_ID(), get_TrxName()); }
/** Set Workflow.
@ -445,9 +459,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return (String)get_Value(COLUMNNAME_AttributeValue);
}
public I_C_BPartner getC_BPartner() throws RuntimeException
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
{
return (I_C_BPartner)MTable.get(getCtx(), I_C_BPartner.Table_Name)
return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
.getPO(getC_BPartner_ID(), get_TrxName()); }
/** Set Business Partner .
@ -940,9 +954,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return ii.intValue();
}
public I_R_MailText getR_MailText() throws RuntimeException
public org.compiere.model.I_R_MailText getR_MailText() throws RuntimeException
{
return (I_R_MailText)MTable.get(getCtx(), I_R_MailText.Table_Name)
return (org.compiere.model.I_R_MailText)MTable.get(getCtx(), org.compiere.model.I_R_MailText.Table_Name)
.getPO(getR_MailText_ID(), get_TrxName()); }
/** Set Mail Template.
@ -1012,9 +1026,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return (String)get_Value(COLUMNNAME_SplitElement);
}
public I_S_Resource getS_Resource() throws RuntimeException
public org.compiere.model.I_S_Resource getS_Resource() throws RuntimeException
{
return (I_S_Resource)MTable.get(getCtx(), I_S_Resource.Table_Name)
return (org.compiere.model.I_S_Resource)MTable.get(getCtx(), org.compiere.model.I_S_Resource.Table_Name)
.getPO(getS_Resource_ID(), get_TrxName()); }
/** Set Resource.
@ -1199,9 +1213,9 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent
return ii.intValue();
}
public I_AD_Workflow getWorkflow() throws RuntimeException
public org.compiere.model.I_AD_Workflow getWorkflow() throws RuntimeException
{
return (I_AD_Workflow)MTable.get(getCtx(), I_AD_Workflow.Table_Name)
return (org.compiere.model.I_AD_Workflow)MTable.get(getCtx(), org.compiere.model.I_AD_Workflow.Table_Name)
.getPO(getWorkflow_ID(), get_TrxName()); }
/** Set Workflow.

View File

@ -0,0 +1,180 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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.sql.ResultSet;
import java.util.Properties;
/** Generated Model for AD_WizardProcess
* @author Adempiere (generated)
* @version Release 3.6.0LTS - $Id$ */
public class X_AD_WizardProcess extends PO implements I_AD_WizardProcess, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20120816L;
/** Standard Constructor */
public X_AD_WizardProcess (Properties ctx, int AD_WizardProcess_ID, String trxName)
{
super (ctx, AD_WizardProcess_ID, trxName);
/** if (AD_WizardProcess_ID == 0)
{
setAD_WF_Node_ID (0);
setAD_WizardProcess_ID (0);
} */
}
/** Load Constructor */
public X_AD_WizardProcess (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 2 - Client
*/
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_AD_WizardProcess[")
.append(get_ID()).append("]");
return sb.toString();
}
public org.compiere.model.I_AD_WF_Node getAD_WF_Node() throws RuntimeException
{
return (org.compiere.model.I_AD_WF_Node)MTable.get(getCtx(), org.compiere.model.I_AD_WF_Node.Table_Name)
.getPO(getAD_WF_Node_ID(), get_TrxName()); }
/** Set Node.
@param AD_WF_Node_ID
Workflow Node (activity), step or process
*/
public void setAD_WF_Node_ID (int AD_WF_Node_ID)
{
if (AD_WF_Node_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_WF_Node_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_WF_Node_ID, Integer.valueOf(AD_WF_Node_ID));
}
/** Get Node.
@return Workflow Node (activity), step or process
*/
public int getAD_WF_Node_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_WF_Node_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Wizard Process.
@param AD_WizardProcess_ID Wizard Process */
public void setAD_WizardProcess_ID (int AD_WizardProcess_ID)
{
if (AD_WizardProcess_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_WizardProcess_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_WizardProcess_ID, Integer.valueOf(AD_WizardProcess_ID));
}
/** Get Wizard Process.
@return Wizard Process */
public int getAD_WizardProcess_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_WizardProcess_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set AD_WizardProcess_UU.
@param AD_WizardProcess_UU AD_WizardProcess_UU */
public void setAD_WizardProcess_UU (String AD_WizardProcess_UU)
{
set_Value (COLUMNNAME_AD_WizardProcess_UU, AD_WizardProcess_UU);
}
/** Get AD_WizardProcess_UU.
@return AD_WizardProcess_UU */
public String getAD_WizardProcess_UU ()
{
return (String)get_Value(COLUMNNAME_AD_WizardProcess_UU);
}
/** Set Note.
@param Note
Optional additional user defined information
*/
public void setNote (String Note)
{
set_Value (COLUMNNAME_Note, Note);
}
/** Get Note.
@return Optional additional user defined information
*/
public String getNote ()
{
return (String)get_Value(COLUMNNAME_Note);
}
/** WizardStatus AD_Reference_ID=200003 */
public static final int WIZARDSTATUS_AD_Reference_ID=200003;
/** New = N */
public static final String WIZARDSTATUS_New = "N";
/** Pending = P */
public static final String WIZARDSTATUS_Pending = "P";
/** Finished = F */
public static final String WIZARDSTATUS_Finished = "F";
/** In-Progress = I */
public static final String WIZARDSTATUS_In_Progress = "I";
/** Skipped = S */
public static final String WIZARDSTATUS_Skipped = "S";
/** Delayed = D */
public static final String WIZARDSTATUS_Delayed = "D";
/** Set Wizard Status.
@param WizardStatus Wizard Status */
public void setWizardStatus (String WizardStatus)
{
set_Value (COLUMNNAME_WizardStatus, WizardStatus);
}
/** Get Wizard Status.
@return Wizard Status */
public String getWizardStatus ()
{
return (String)get_Value(COLUMNNAME_WizardStatus);
}
}

View File

@ -33,7 +33,7 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20100614L;
private static final long serialVersionUID = 20120817L;
/** Standard Constructor */
public X_AD_Workflow (Properties ctx, int AD_Workflow_ID, String trxName)
@ -124,9 +124,9 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent
return (String)get_Value(COLUMNNAME_AccessLevel);
}
public I_AD_Table getAD_Table() throws RuntimeException
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException
{
return (I_AD_Table)MTable.get(getCtx(), I_AD_Table.Table_Name)
return (org.compiere.model.I_AD_Table)MTable.get(getCtx(), org.compiere.model.I_AD_Table.Table_Name)
.getPO(getAD_Table_ID(), get_TrxName()); }
/** Set Table.
@ -152,9 +152,9 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent
return ii.intValue();
}
public I_AD_WF_Node getAD_WF_Node() throws RuntimeException
public org.compiere.model.I_AD_WF_Node getAD_WF_Node() throws RuntimeException
{
return (I_AD_WF_Node)MTable.get(getCtx(), I_AD_WF_Node.Table_Name)
return (org.compiere.model.I_AD_WF_Node)MTable.get(getCtx(), org.compiere.model.I_AD_WF_Node.Table_Name)
.getPO(getAD_WF_Node_ID(), get_TrxName()); }
/** Set Node.
@ -180,9 +180,9 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent
return ii.intValue();
}
public I_AD_WF_Responsible getAD_WF_Responsible() throws RuntimeException
public org.compiere.model.I_AD_WF_Responsible getAD_WF_Responsible() throws RuntimeException
{
return (I_AD_WF_Responsible)MTable.get(getCtx(), I_AD_WF_Responsible.Table_Name)
return (org.compiere.model.I_AD_WF_Responsible)MTable.get(getCtx(), org.compiere.model.I_AD_WF_Responsible.Table_Name)
.getPO(getAD_WF_Responsible_ID(), get_TrxName()); }
/** Set Workflow Responsible.
@ -231,9 +231,9 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent
return ii.intValue();
}
public I_AD_WorkflowProcessor getAD_WorkflowProcessor() throws RuntimeException
public org.compiere.model.I_AD_WorkflowProcessor getAD_WorkflowProcessor() throws RuntimeException
{
return (I_AD_WorkflowProcessor)MTable.get(getCtx(), I_AD_WorkflowProcessor.Table_Name)
return (org.compiere.model.I_AD_WorkflowProcessor)MTable.get(getCtx(), org.compiere.model.I_AD_WorkflowProcessor.Table_Name)
.getPO(getAD_WorkflowProcessor_ID(), get_TrxName()); }
/** Set Workflow Processor.
@ -259,6 +259,20 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent
return ii.intValue();
}
/** Set AD_Workflow_UU.
@param AD_Workflow_UU AD_Workflow_UU */
public void setAD_Workflow_UU (String AD_Workflow_UU)
{
set_Value (COLUMNNAME_AD_Workflow_UU, AD_Workflow_UU);
}
/** Get AD_Workflow_UU.
@return AD_Workflow_UU */
public String getAD_Workflow_UU ()
{
return (String)get_Value(COLUMNNAME_AD_Workflow_UU);
}
/** Set Author.
@param Author
Author/Creator of the Entity
@ -724,9 +738,9 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent
return ii.intValue();
}
public I_S_Resource getS_Resource() throws RuntimeException
public org.compiere.model.I_S_Resource getS_Resource() throws RuntimeException
{
return (I_S_Resource)MTable.get(getCtx(), I_S_Resource.Table_Name)
return (org.compiere.model.I_S_Resource)MTable.get(getCtx(), org.compiere.model.I_S_Resource.Table_Name)
.getPO(getS_Resource_ID(), get_TrxName()); }
/** Set Resource.
@ -889,6 +903,8 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent
public static final String WORKFLOWTYPE_Manufacturing = "M";
/** Quality = Q */
public static final String WORKFLOWTYPE_Quality = "Q";
/** Wizard = W */
public static final String WORKFLOWTYPE_Wizard = "W";
/** Set Workflow Type.
@param WorkflowType
Type of Workflow

View File

@ -0,0 +1,126 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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.sql.ResultSet;
import java.util.Properties;
/** Generated Model for M_PartType
* @author Adempiere (generated)
* @version Release 3.6.0LTS - $Id$ */
public class X_M_PartType extends PO implements I_M_PartType, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20120821L;
/** Standard Constructor */
public X_M_PartType (Properties ctx, int M_PartType_ID, String trxName)
{
super (ctx, M_PartType_ID, trxName);
/** if (M_PartType_ID == 0)
{
setM_PartType_ID (0);
setName (null);
} */
}
/** Load Constructor */
public X_M_PartType (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 3 - Client - 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_M_PartType[")
.append(get_ID()).append("]");
return sb.toString();
}
/** 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);
}
/** Set Part Type.
@param M_PartType_ID Part Type */
public void setM_PartType_ID (int M_PartType_ID)
{
if (M_PartType_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_PartType_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_PartType_ID, Integer.valueOf(M_PartType_ID));
}
/** Get Part Type.
@return Part Type */
public int getM_PartType_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_PartType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
}

View File

@ -33,7 +33,7 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20100614L;
private static final long serialVersionUID = 20120821L;
/** Standard Constructor */
public X_M_Product (Properties ctx, int M_Product_ID, String trxName)
@ -49,6 +49,12 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
setIsExcludeAutoDelivery (false);
// N
setIsInvoicePrintDetails (false);
setIsKanban (false);
// N
setIsManufactured (false);
// N
setIsPhantom (false);
// N
setIsPickListPrintDetails (false);
setIsPurchased (true);
// Y
@ -119,9 +125,45 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return (String)get_Value(COLUMNNAME_Classification);
}
public I_C_RevenueRecognition getC_RevenueRecognition() throws RuntimeException
/** Set Copy From.
@param CopyFrom
Copy From Record
*/
public void setCopyFrom (String CopyFrom)
{
set_Value (COLUMNNAME_CopyFrom, CopyFrom);
}
/** Get Copy From.
@return Copy From Record
*/
public String getCopyFrom ()
{
return (String)get_Value(COLUMNNAME_CopyFrom);
}
/** Set Standard Cost.
@param CostStandard
Standard Costs
*/
public void setCostStandard (BigDecimal CostStandard)
{
throw new IllegalArgumentException ("CostStandard is virtual column"); }
/** Get Standard Cost.
@return Standard Costs
*/
public BigDecimal getCostStandard ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostStandard);
if (bd == null)
return Env.ZERO;
return bd;
}
public org.compiere.model.I_C_RevenueRecognition getC_RevenueRecognition() throws RuntimeException
{
return (I_C_RevenueRecognition)MTable.get(getCtx(), I_C_RevenueRecognition.Table_Name)
return (org.compiere.model.I_C_RevenueRecognition)MTable.get(getCtx(), org.compiere.model.I_C_RevenueRecognition.Table_Name)
.getPO(getC_RevenueRecognition_ID(), get_TrxName()); }
/** Set Revenue Recognition.
@ -147,9 +189,9 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return ii.intValue();
}
public I_C_SubscriptionType getC_SubscriptionType() throws RuntimeException
public org.compiere.model.I_C_SubscriptionType getC_SubscriptionType() throws RuntimeException
{
return (I_C_SubscriptionType)MTable.get(getCtx(), I_C_SubscriptionType.Table_Name)
return (org.compiere.model.I_C_SubscriptionType)MTable.get(getCtx(), org.compiere.model.I_C_SubscriptionType.Table_Name)
.getPO(getC_SubscriptionType_ID(), get_TrxName()); }
/** Set Subscription Type.
@ -175,9 +217,9 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return ii.intValue();
}
public I_C_TaxCategory getC_TaxCategory() throws RuntimeException
public org.compiere.model.I_C_TaxCategory getC_TaxCategory() throws RuntimeException
{
return (I_C_TaxCategory)MTable.get(getCtx(), I_C_TaxCategory.Table_Name)
return (org.compiere.model.I_C_TaxCategory)MTable.get(getCtx(), org.compiere.model.I_C_TaxCategory.Table_Name)
.getPO(getC_TaxCategory_ID(), get_TrxName()); }
/** Set Tax Category.
@ -203,9 +245,9 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return ii.intValue();
}
public I_C_UOM getC_UOM() throws RuntimeException
public org.compiere.model.I_C_UOM getC_UOM() throws RuntimeException
{
return (I_C_UOM)MTable.get(getCtx(), I_C_UOM.Table_Name)
return (org.compiere.model.I_C_UOM)MTable.get(getCtx(), org.compiere.model.I_C_UOM.Table_Name)
.getPO(getC_UOM_ID(), get_TrxName()); }
/** Set UOM.
@ -521,6 +563,78 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return false;
}
/** Set Kanban controlled.
@param IsKanban
This part is Kanban controlled
*/
public void setIsKanban (boolean IsKanban)
{
set_Value (COLUMNNAME_IsKanban, Boolean.valueOf(IsKanban));
}
/** Get Kanban controlled.
@return This part is Kanban controlled
*/
public boolean isKanban ()
{
Object oo = get_Value(COLUMNNAME_IsKanban);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Manufactured.
@param IsManufactured
This product is manufactured
*/
public void setIsManufactured (boolean IsManufactured)
{
set_Value (COLUMNNAME_IsManufactured, Boolean.valueOf(IsManufactured));
}
/** Get Manufactured.
@return This product is manufactured
*/
public boolean isManufactured ()
{
Object oo = get_Value(COLUMNNAME_IsManufactured);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Phantom.
@param IsPhantom
Phantom Component
*/
public void setIsPhantom (boolean IsPhantom)
{
set_Value (COLUMNNAME_IsPhantom, Boolean.valueOf(IsPhantom));
}
/** Get Phantom.
@return Phantom Component
*/
public boolean isPhantom ()
{
Object oo = get_Value(COLUMNNAME_IsPhantom);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Print detail records on pick list.
@param IsPickListPrintDetails
Print detail BOM elements on the pick list
@ -733,9 +847,9 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return ii.intValue();
}
public I_M_AttributeSet getM_AttributeSet() throws RuntimeException
public org.compiere.model.I_M_AttributeSet getM_AttributeSet() throws RuntimeException
{
return (I_M_AttributeSet)MTable.get(getCtx(), I_M_AttributeSet.Table_Name)
return (org.compiere.model.I_M_AttributeSet)MTable.get(getCtx(), org.compiere.model.I_M_AttributeSet.Table_Name)
.getPO(getM_AttributeSet_ID(), get_TrxName()); }
/** Set Attribute Set.
@ -789,9 +903,9 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return ii.intValue();
}
public I_M_FreightCategory getM_FreightCategory() throws RuntimeException
public org.compiere.model.I_M_FreightCategory getM_FreightCategory() throws RuntimeException
{
return (I_M_FreightCategory)MTable.get(getCtx(), I_M_FreightCategory.Table_Name)
return (org.compiere.model.I_M_FreightCategory)MTable.get(getCtx(), org.compiere.model.I_M_FreightCategory.Table_Name)
.getPO(getM_FreightCategory_ID(), get_TrxName()); }
/** Set Freight Category.
@ -845,9 +959,34 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return ii.intValue();
}
public I_M_Product_Category getM_Product_Category() throws RuntimeException
public I_M_PartType getM_PartType() throws RuntimeException
{
return (I_M_Product_Category)MTable.get(getCtx(), I_M_Product_Category.Table_Name)
return (I_M_PartType)MTable.get(getCtx(), I_M_PartType.Table_Name)
.getPO(getM_PartType_ID(), get_TrxName()); }
/** Set Part Type.
@param M_PartType_ID Part Type */
public void setM_PartType_ID (int M_PartType_ID)
{
if (M_PartType_ID < 1)
set_Value (COLUMNNAME_M_PartType_ID, null);
else
set_Value (COLUMNNAME_M_PartType_ID, Integer.valueOf(M_PartType_ID));
}
/** Get Part Type.
@return Part Type */
public int getM_PartType_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_PartType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_M_Product_Category getM_Product_Category() throws RuntimeException
{
return (org.compiere.model.I_M_Product_Category)MTable.get(getCtx(), org.compiere.model.I_M_Product_Category.Table_Name)
.getPO(getM_Product_Category_ID(), get_TrxName()); }
/** Set Product Category.
@ -896,6 +1035,20 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return ii.intValue();
}
/** Set M_Product_UU.
@param M_Product_UU M_Product_UU */
public void setM_Product_UU (String M_Product_UU)
{
set_Value (COLUMNNAME_M_Product_UU, M_Product_UU);
}
/** Get M_Product_UU.
@return M_Product_UU */
public String getM_Product_UU ()
{
return (String)get_Value(COLUMNNAME_M_Product_UU);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
@ -964,9 +1117,9 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return (String)get_Value(COLUMNNAME_ProductType);
}
public I_R_MailText getR_MailText() throws RuntimeException
public org.compiere.model.I_R_MailText getR_MailText() throws RuntimeException
{
return (I_R_MailText)MTable.get(getCtx(), I_R_MailText.Table_Name)
return (org.compiere.model.I_R_MailText)MTable.get(getCtx(), org.compiere.model.I_R_MailText.Table_Name)
.getPO(getR_MailText_ID(), get_TrxName()); }
/** Set Mail Template.
@ -992,9 +1145,9 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return ii.intValue();
}
public I_AD_User getSalesRep() throws RuntimeException
public org.compiere.model.I_AD_User getSalesRep() throws RuntimeException
{
return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name)
return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
.getPO(getSalesRep_ID(), get_TrxName()); }
/** Set Sales Representative.
@ -1020,9 +1173,9 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return ii.intValue();
}
public I_S_ExpenseType getS_ExpenseType() throws RuntimeException
public org.compiere.model.I_S_ExpenseType getS_ExpenseType() throws RuntimeException
{
return (I_S_ExpenseType)MTable.get(getCtx(), I_S_ExpenseType.Table_Name)
return (org.compiere.model.I_S_ExpenseType)MTable.get(getCtx(), org.compiere.model.I_S_ExpenseType.Table_Name)
.getPO(getS_ExpenseType_ID(), get_TrxName()); }
/** Set Expense Type.
@ -1125,9 +1278,9 @@ public class X_M_Product extends PO implements I_M_Product, I_Persistent
return (String)get_Value(COLUMNNAME_SKU);
}
public I_S_Resource getS_Resource() throws RuntimeException
public org.compiere.model.I_S_Resource getS_Resource() throws RuntimeException
{
return (I_S_Resource)MTable.get(getCtx(), I_S_Resource.Table_Name)
return (org.compiere.model.I_S_Resource)MTable.get(getCtx(), org.compiere.model.I_S_Resource.Table_Name)
.getPO(getS_Resource_ID(), get_TrxName()); }
/** Set Resource.

View File

@ -33,7 +33,7 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20100614L;
private static final long serialVersionUID = 20120821L;
/** Standard Constructor */
public X_M_Production (Properties ctx, int M_Production_ID, String trxName)
@ -41,13 +41,18 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
super (ctx, M_Production_ID, trxName);
/** if (M_Production_ID == 0)
{
setIsCreated (false);
setDocumentNo (null);
setIsCreated (null);
// N
setM_Locator_ID (0);
setMovementDate (new Timestamp( System.currentTimeMillis() ));
// @#Date@
setM_Product_ID (0);
setM_Production_ID (0);
setName (null);
setPosted (false);
setProcessed (false);
setProductionQty (Env.ZERO);
// 0
} */
}
@ -102,9 +107,9 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return ii.intValue();
}
public I_C_Activity getC_Activity() throws RuntimeException
public org.compiere.model.I_C_Activity getC_Activity() throws RuntimeException
{
return (I_C_Activity)MTable.get(getCtx(), I_C_Activity.Table_Name)
return (org.compiere.model.I_C_Activity)MTable.get(getCtx(), org.compiere.model.I_C_Activity.Table_Name)
.getPO(getC_Activity_ID(), get_TrxName()); }
/** Set Activity.
@ -130,9 +135,33 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return ii.intValue();
}
public I_C_Campaign getC_Campaign() throws RuntimeException
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
{
return (I_C_Campaign)MTable.get(getCtx(), I_C_Campaign.Table_Name)
return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
.getPO(getC_BPartner_ID(), get_TrxName()); }
/** Set Business Partner .
@param C_BPartner_ID
Identifies a Business Partner
*/
public void setC_BPartner_ID (int C_BPartner_ID)
{
throw new IllegalArgumentException ("C_BPartner_ID is virtual column"); }
/** Get Business Partner .
@return Identifies a Business Partner
*/
public int getC_BPartner_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_C_Campaign getC_Campaign() throws RuntimeException
{
return (org.compiere.model.I_C_Campaign)MTable.get(getCtx(), org.compiere.model.I_C_Campaign.Table_Name)
.getPO(getC_Campaign_ID(), get_TrxName()); }
/** Set Campaign.
@ -158,9 +187,37 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return ii.intValue();
}
public I_C_Project getC_Project() throws RuntimeException
public org.compiere.model.I_C_OrderLine getC_OrderLine() throws RuntimeException
{
return (I_C_Project)MTable.get(getCtx(), I_C_Project.Table_Name)
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 Sales Order Line.
@param C_OrderLine_ID
Sales Order Line
*/
public void setC_OrderLine_ID (int C_OrderLine_ID)
{
if (C_OrderLine_ID < 1)
set_Value (COLUMNNAME_C_OrderLine_ID, null);
else
set_Value (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID));
}
/** Get Sales Order Line.
@return Sales Order Line
*/
public int getC_OrderLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_C_Project getC_Project() throws RuntimeException
{
return (org.compiere.model.I_C_Project)MTable.get(getCtx(), org.compiere.model.I_C_Project.Table_Name)
.getPO(getC_Project_ID(), get_TrxName()); }
/** Set Project.
@ -186,6 +243,40 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return ii.intValue();
}
/** Set Create lines from.
@param CreateFrom
Process which will generate a new document lines based on an existing document
*/
public void setCreateFrom (String CreateFrom)
{
set_Value (COLUMNNAME_CreateFrom, CreateFrom);
}
/** Get Create lines from.
@return Process which will generate a new document lines based on an existing document
*/
public String getCreateFrom ()
{
return (String)get_Value(COLUMNNAME_CreateFrom);
}
/** Set Date Promised.
@param DatePromised
Date Order was promised
*/
public void setDatePromised (Timestamp DatePromised)
{
set_Value (COLUMNNAME_DatePromised, DatePromised);
}
/** Get Date Promised.
@return Date Order was promised
*/
public Timestamp getDatePromised ()
{
return (Timestamp)get_Value(COLUMNNAME_DatePromised);
}
/** Set Description.
@param Description
Optional short description of the record
@ -203,25 +294,95 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Document No.
@param DocumentNo
Document sequence number of the document
*/
public void setDocumentNo (String DocumentNo)
{
set_ValueNoCheck (COLUMNNAME_DocumentNo, DocumentNo);
}
/** Get Document No.
@return Document sequence number of the document
*/
public String getDocumentNo ()
{
return (String)get_Value(COLUMNNAME_DocumentNo);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getDocumentNo());
}
/** Set Complete.
@param IsComplete
It is complete
*/
public void setIsComplete (String IsComplete)
{
set_Value (COLUMNNAME_IsComplete, IsComplete);
}
/** Get Complete.
@return It is complete
*/
public String getIsComplete ()
{
return (String)get_Value(COLUMNNAME_IsComplete);
}
/** IsCreated AD_Reference_ID=319 */
public static final int ISCREATED_AD_Reference_ID=319;
/** Yes = Y */
public static final String ISCREATED_Yes = "Y";
/** No = N */
public static final String ISCREATED_No = "N";
/** Set Records created.
@param IsCreated Records created */
public void setIsCreated (boolean IsCreated)
public void setIsCreated (String IsCreated)
{
set_ValueNoCheck (COLUMNNAME_IsCreated, Boolean.valueOf(IsCreated));
set_Value (COLUMNNAME_IsCreated, IsCreated);
}
/** Get Records created.
@return Records created */
public boolean isCreated ()
public String getIsCreated ()
{
Object oo = get_Value(COLUMNNAME_IsCreated);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
return (String)get_Value(COLUMNNAME_IsCreated);
}
public I_M_Locator getM_Locator() throws RuntimeException
{
return (I_M_Locator)MTable.get(getCtx(), I_M_Locator.Table_Name)
.getPO(getM_Locator_ID(), get_TrxName()); }
/** Set Locator.
@param M_Locator_ID
Warehouse Locator
*/
public void setM_Locator_ID (int M_Locator_ID)
{
if (M_Locator_ID < 1)
set_Value (COLUMNNAME_M_Locator_ID, null);
else
set_Value (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID));
}
/** Get Locator.
@return Warehouse Locator
*/
public int getM_Locator_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Locator_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Movement Date.
@ -241,6 +402,34 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return (Timestamp)get_Value(COLUMNNAME_MovementDate);
}
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)
.getPO(getM_Product_ID(), get_TrxName()); }
/** Set Product.
@param M_Product_ID
Product, Service, Item
*/
public void setM_Product_ID (int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
}
/** Get Product.
@return Product, Service, Item
*/
public int getM_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Production.
@param M_Production_ID
Plan for producing a product
@ -264,6 +453,20 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return ii.intValue();
}
/** Set M_Production_UU.
@param M_Production_UU M_Production_UU */
public void setM_Production_UU (String M_Production_UU)
{
set_Value (COLUMNNAME_M_Production_UU, M_Production_UU);
}
/** Get M_Production_UU.
@return M_Production_UU */
public String getM_Production_UU ()
{
return (String)get_Value(COLUMNNAME_M_Production_UU);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
@ -281,14 +484,6 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Posted.
@param Posted
Posting status
@ -378,9 +573,29 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return false;
}
public I_C_ElementValue getUser1() throws RuntimeException
/** Set Production Quantity.
@param ProductionQty
Quantity of products to produce
*/
public void setProductionQty (BigDecimal ProductionQty)
{
set_Value (COLUMNNAME_ProductionQty, ProductionQty);
}
/** Get Production Quantity.
@return Quantity of products to produce
*/
public BigDecimal getProductionQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProductionQty);
if (bd == null)
return Env.ZERO;
return bd;
}
public org.compiere.model.I_C_ElementValue getUser1() throws RuntimeException
{
return (I_C_ElementValue)MTable.get(getCtx(), I_C_ElementValue.Table_Name)
return (org.compiere.model.I_C_ElementValue)MTable.get(getCtx(), org.compiere.model.I_C_ElementValue.Table_Name)
.getPO(getUser1_ID(), get_TrxName()); }
/** Set User List 1.
@ -406,9 +621,9 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return ii.intValue();
}
public I_C_ElementValue getUser2() throws RuntimeException
public org.compiere.model.I_C_ElementValue getUser2() throws RuntimeException
{
return (I_C_ElementValue)MTable.get(getCtx(), I_C_ElementValue.Table_Name)
return (org.compiere.model.I_C_ElementValue)MTable.get(getCtx(), org.compiere.model.I_C_ElementValue.Table_Name)
.getPO(getUser2_ID(), get_TrxName()); }
/** Set User List 2.

View File

@ -32,7 +32,7 @@ public class X_M_ProductionLine extends PO implements I_M_ProductionLine, I_Pers
/**
*
*/
private static final long serialVersionUID = 20100614L;
private static final long serialVersionUID = 20120821L;
/** Standard Constructor */
public X_M_ProductionLine (Properties ctx, int M_ProductionLine_ID, String trxName)
@ -41,14 +41,14 @@ public class X_M_ProductionLine extends PO implements I_M_ProductionLine, I_Pers
/** if (M_ProductionLine_ID == 0)
{
setLine (0);
// @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM M_ProductionLine WHERE M_ProductionPlan_ID=@M_ProductionPlan_ID@
// @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM M_ProductionLine WHERE M_Production_ID=@M_Production_ID@
setM_AttributeSetInstance_ID (0);
setM_Locator_ID (0);
// @M_Locator_ID@
setMovementQty (Env.ZERO);
setM_Product_ID (0);
setM_Production_ID (0);
setM_ProductionLine_ID (0);
setM_ProductionPlan_ID (0);
setProcessed (false);
} */
}
@ -98,6 +98,30 @@ public class X_M_ProductionLine extends PO implements I_M_ProductionLine, I_Pers
return (String)get_Value(COLUMNNAME_Description);
}
/** Set End Product.
@param IsEndProduct
End Product of production
*/
public void setIsEndProduct (boolean IsEndProduct)
{
set_Value (COLUMNNAME_IsEndProduct, Boolean.valueOf(IsEndProduct));
}
/** Get End Product.
@return End Product of production
*/
public boolean isEndProduct ()
{
Object oo = get_Value(COLUMNNAME_IsEndProduct);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Line No.
@param Line
Unique line for this document
@ -118,14 +142,6 @@ public class X_M_ProductionLine extends PO implements I_M_ProductionLine, I_Pers
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getLine()));
}
public I_M_AttributeSetInstance getM_AttributeSetInstance() throws RuntimeException
{
return (I_M_AttributeSetInstance)MTable.get(getCtx(), I_M_AttributeSetInstance.Table_Name)
@ -202,9 +218,9 @@ public class X_M_ProductionLine extends PO implements I_M_ProductionLine, I_Pers
return bd;
}
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.
@ -230,6 +246,42 @@ public class X_M_ProductionLine extends PO implements I_M_ProductionLine, I_Pers
return ii.intValue();
}
public org.compiere.model.I_M_Production getM_Production() throws RuntimeException
{
return (org.compiere.model.I_M_Production)MTable.get(getCtx(), org.compiere.model.I_M_Production.Table_Name)
.getPO(getM_Production_ID(), get_TrxName()); }
/** Set Production.
@param M_Production_ID
Plan for producing a product
*/
public void setM_Production_ID (int M_Production_ID)
{
if (M_Production_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Production_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Production_ID, Integer.valueOf(M_Production_ID));
}
/** Get Production.
@return Plan for producing a product
*/
public int getM_Production_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Production_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getM_Production_ID()));
}
/** Set Production Line.
@param M_ProductionLine_ID
Document Line representing a production
@ -253,9 +305,23 @@ public class X_M_ProductionLine extends PO implements I_M_ProductionLine, I_Pers
return ii.intValue();
}
public I_M_ProductionPlan getM_ProductionPlan() throws RuntimeException
/** Set M_ProductionLine_UU.
@param M_ProductionLine_UU M_ProductionLine_UU */
public void setM_ProductionLine_UU (String M_ProductionLine_UU)
{
set_Value (COLUMNNAME_M_ProductionLine_UU, M_ProductionLine_UU);
}
/** Get M_ProductionLine_UU.
@return M_ProductionLine_UU */
public String getM_ProductionLine_UU ()
{
return (String)get_Value(COLUMNNAME_M_ProductionLine_UU);
}
public org.compiere.model.I_M_ProductionPlan getM_ProductionPlan() throws RuntimeException
{
return (I_M_ProductionPlan)MTable.get(getCtx(), I_M_ProductionPlan.Table_Name)
return (org.compiere.model.I_M_ProductionPlan)MTable.get(getCtx(), org.compiere.model.I_M_ProductionPlan.Table_Name)
.getPO(getM_ProductionPlan_ID(), get_TrxName()); }
/** Set Production Plan.
@ -281,6 +347,26 @@ public class X_M_ProductionLine extends PO implements I_M_ProductionLine, I_Pers
return ii.intValue();
}
/** Set Planned Quantity.
@param PlannedQty
Planned quantity for this project
*/
public void setPlannedQty (BigDecimal PlannedQty)
{
set_Value (COLUMNNAME_PlannedQty, PlannedQty);
}
/** Get Planned Quantity.
@return Planned quantity for this project
*/
public BigDecimal getPlannedQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PlannedQty);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Processed.
@param Processed
The document has been processed
@ -304,4 +390,56 @@ public class X_M_ProductionLine extends PO implements I_M_ProductionLine, I_Pers
}
return false;
}
/** Set Product Type.
@param ProductType
Type of product
*/
public void setProductType (String ProductType)
{
throw new IllegalArgumentException ("ProductType is virtual column"); }
/** Get Product Type.
@return Type of product
*/
public String getProductType ()
{
return (String)get_Value(COLUMNNAME_ProductType);
}
/** Set Available Quantity.
@param QtyAvailable
Available Quantity (On Hand - Reserved)
*/
public void setQtyAvailable (BigDecimal QtyAvailable)
{
throw new IllegalArgumentException ("QtyAvailable is virtual column"); }
/** Get Available Quantity.
@return Available Quantity (On Hand - Reserved)
*/
public BigDecimal getQtyAvailable ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyAvailable);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Quantity Used.
@param QtyUsed Quantity Used */
public void setQtyUsed (BigDecimal QtyUsed)
{
set_Value (COLUMNNAME_QtyUsed, QtyUsed);
}
/** Get Quantity Used.
@return Quantity Used */
public BigDecimal getQtyUsed ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyUsed);
if (bd == null)
return Env.ZERO;
return bd;
}
}

View File

@ -32,7 +32,7 @@ public class X_M_ProductionLineMA extends PO implements I_M_ProductionLineMA, I_
/**
*
*/
private static final long serialVersionUID = 20100614L;
private static final long serialVersionUID = 20120821L;
/** Standard Constructor */
public X_M_ProductionLineMA (Properties ctx, int M_ProductionLineMA_ID, String trxName)
@ -122,9 +122,9 @@ public class X_M_ProductionLineMA extends PO implements I_M_ProductionLineMA, I_
return bd;
}
public I_M_ProductionLine getM_ProductionLine() throws RuntimeException
public org.compiere.model.I_M_ProductionLine getM_ProductionLine() throws RuntimeException
{
return (I_M_ProductionLine)MTable.get(getCtx(), I_M_ProductionLine.Table_Name)
return (org.compiere.model.I_M_ProductionLine)MTable.get(getCtx(), org.compiere.model.I_M_ProductionLine.Table_Name)
.getPO(getM_ProductionLine_ID(), get_TrxName()); }
/** Set Production Line.
@ -157,4 +157,18 @@ public class X_M_ProductionLineMA extends PO implements I_M_ProductionLineMA, I_
{
return new KeyNamePair(get_ID(), String.valueOf(getM_ProductionLine_ID()));
}
/** Set M_ProductionLineMA_UU.
@param M_ProductionLineMA_UU M_ProductionLineMA_UU */
public void setM_ProductionLineMA_UU (String M_ProductionLineMA_UU)
{
set_Value (COLUMNNAME_M_ProductionLineMA_UU, M_ProductionLineMA_UU);
}
/** Get M_ProductionLineMA_UU.
@return M_ProductionLineMA_UU */
public String getM_ProductionLineMA_UU ()
{
return (String)get_Value(COLUMNNAME_M_ProductionLineMA_UU);
}
}

View File

@ -32,7 +32,7 @@ public class X_M_ProductionPlan extends PO implements I_M_ProductionPlan, I_Pers
/**
*
*/
private static final long serialVersionUID = 20100614L;
private static final long serialVersionUID = 20120821L;
/** Standard Constructor */
public X_M_ProductionPlan (Properties ctx, int M_ProductionPlan_ID, String trxName)
@ -154,9 +154,9 @@ public class X_M_ProductionPlan extends PO implements I_M_ProductionPlan, I_Pers
return ii.intValue();
}
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.
@ -182,9 +182,9 @@ public class X_M_ProductionPlan extends PO implements I_M_ProductionPlan, I_Pers
return ii.intValue();
}
public I_M_Production getM_Production() throws RuntimeException
public org.compiere.model.I_M_Production getM_Production() throws RuntimeException
{
return (I_M_Production)MTable.get(getCtx(), I_M_Production.Table_Name)
return (org.compiere.model.I_M_Production)MTable.get(getCtx(), org.compiere.model.I_M_Production.Table_Name)
.getPO(getM_Production_ID(), get_TrxName()); }
/** Set Production.
@ -233,6 +233,20 @@ public class X_M_ProductionPlan extends PO implements I_M_ProductionPlan, I_Pers
return ii.intValue();
}
/** Set M_ProductionPlan_UU.
@param M_ProductionPlan_UU M_ProductionPlan_UU */
public void setM_ProductionPlan_UU (String M_ProductionPlan_UU)
{
set_Value (COLUMNNAME_M_ProductionPlan_UU, M_ProductionPlan_UU);
}
/** Get M_ProductionPlan_UU.
@return M_ProductionPlan_UU */
public String getM_ProductionPlan_UU ()
{
return (String)get_Value(COLUMNNAME_M_ProductionPlan_UU);
}
/** Set Processed.
@param Processed
The document has been processed

View File

@ -0,0 +1,152 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.KeyNamePair;
/** Generated Model for M_QualityTest
* @author Adempiere (generated)
* @version Release 3.6.0LTS - $Id$ */
public class X_M_QualityTest extends PO implements I_M_QualityTest, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20101207L;
/** Standard Constructor */
public X_M_QualityTest (Properties ctx, int M_QualityTest_ID, String trxName)
{
super (ctx, M_QualityTest_ID, trxName);
/** if (M_QualityTest_ID == 0)
{
setM_QualityTest_ID (0);
setName (null);
} */
}
/** Load Constructor */
public X_M_QualityTest (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 3 - Client - 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_M_QualityTest[")
.append(get_ID()).append("]");
return sb.toString();
}
/** 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);
}
/** Set Comment/Help.
@param Help
Comment or Hint
*/
public void setHelp (String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
/** Get Comment/Help.
@return Comment or Hint
*/
public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
/** Set Quality Test.
@param M_QualityTest_ID Quality Test */
public void setM_QualityTest_ID (int M_QualityTest_ID)
{
if (M_QualityTest_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_QualityTest_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_QualityTest_ID, Integer.valueOf(M_QualityTest_ID));
}
/** Get Quality Test.
@return Quality Test */
public int getM_QualityTest_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_QualityTest_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
}

View File

@ -0,0 +1,239 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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.sql.ResultSet;
import java.util.Properties;
/** Generated Model for M_QualityTestResult
* @author Adempiere (generated)
* @version Release 3.6.0LTS - $Id$ */
public class X_M_QualityTestResult extends PO implements I_M_QualityTestResult, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20101207L;
/** Standard Constructor */
public X_M_QualityTestResult (Properties ctx, int M_QualityTestResult_ID, String trxName)
{
super (ctx, M_QualityTestResult_ID, trxName);
/** if (M_QualityTestResult_ID == 0)
{
setM_AttributeSetInstance_ID (0);
setM_QualityTest_ID (0);
setM_QualityTestResult_ID (0);
setProcessed (false);
// N
} */
}
/** Load Constructor */
public X_M_QualityTestResult (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 3 - Client - 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_M_QualityTestResult[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
throw new IllegalArgumentException ("Description is virtual column"); }
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Expected Result.
@param ExpectedResult Expected Result */
public void setExpectedResult (String ExpectedResult)
{
throw new IllegalArgumentException ("ExpectedResult is virtual column"); }
/** Get Expected Result.
@return Expected Result */
public String getExpectedResult ()
{
return (String)get_Value(COLUMNNAME_ExpectedResult);
}
/** Set QC Pass.
@param IsQCPass QC Pass */
public void setIsQCPass (boolean IsQCPass)
{
set_Value (COLUMNNAME_IsQCPass, Boolean.valueOf(IsQCPass));
}
/** Get QC Pass.
@return QC Pass */
public boolean isQCPass ()
{
Object oo = get_Value(COLUMNNAME_IsQCPass);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
public I_M_AttributeSetInstance getM_AttributeSetInstance() throws RuntimeException
{
return (I_M_AttributeSetInstance)MTable.get(getCtx(), I_M_AttributeSetInstance.Table_Name)
.getPO(getM_AttributeSetInstance_ID(), get_TrxName()); }
/** Set Attribute Set Instance.
@param M_AttributeSetInstance_ID
Product Attribute Set Instance
*/
public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
{
if (M_AttributeSetInstance_ID < 0)
set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstance_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID));
}
/** Get Attribute Set Instance.
@return Product Attribute Set Instance
*/
public int getM_AttributeSetInstance_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_M_QualityTest getM_QualityTest() throws RuntimeException
{
return (I_M_QualityTest)MTable.get(getCtx(), I_M_QualityTest.Table_Name)
.getPO(getM_QualityTest_ID(), get_TrxName()); }
/** Set Quality Test.
@param M_QualityTest_ID Quality Test */
public void setM_QualityTest_ID (int M_QualityTest_ID)
{
if (M_QualityTest_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_QualityTest_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_QualityTest_ID, Integer.valueOf(M_QualityTest_ID));
}
/** Get Quality Test.
@return Quality Test */
public int getM_QualityTest_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_QualityTest_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Quality Test Result.
@param M_QualityTestResult_ID Quality Test Result */
public void setM_QualityTestResult_ID (int M_QualityTestResult_ID)
{
if (M_QualityTestResult_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_QualityTestResult_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_QualityTestResult_ID, Integer.valueOf(M_QualityTestResult_ID));
}
/** Get Quality Test Result.
@return Quality Test Result */
public int getM_QualityTestResult_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_QualityTestResult_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 Result.
@param Result
Result of the action taken
*/
public void setResult (String Result)
{
set_Value (COLUMNNAME_Result, Result);
}
/** Get Result.
@return Result of the action taken
*/
public String getResult ()
{
return (String)get_Value(COLUMNNAME_Result);
}
}

View File

@ -31,7 +31,7 @@ public class X_M_Replenish extends PO implements I_M_Replenish, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20100614L;
private static final long serialVersionUID = 20120821L;
/** Standard Constructor */
public X_M_Replenish (Properties ctx, int M_Replenish_ID, String trxName)
@ -115,9 +115,9 @@ public class X_M_Replenish extends PO implements I_M_Replenish, I_Persistent
return bd;
}
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.
@ -143,9 +143,9 @@ public class X_M_Replenish extends PO implements I_M_Replenish, I_Persistent
return ii.intValue();
}
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.
@ -171,9 +171,23 @@ public class X_M_Replenish extends PO implements I_M_Replenish, I_Persistent
return ii.intValue();
}
public I_M_Warehouse getM_Warehouse() throws RuntimeException
/** Set M_Replenish_UU.
@param M_Replenish_UU M_Replenish_UU */
public void setM_Replenish_UU (String M_Replenish_UU)
{
set_Value (COLUMNNAME_M_Replenish_UU, M_Replenish_UU);
}
/** Get M_Replenish_UU.
@return M_Replenish_UU */
public String getM_Replenish_UU ()
{
return (String)get_Value(COLUMNNAME_M_Replenish_UU);
}
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.
@ -199,9 +213,9 @@ public class X_M_Replenish extends PO implements I_M_Replenish, I_Persistent
return ii.intValue();
}
public I_M_Warehouse getM_WarehouseSource() throws RuntimeException
public org.compiere.model.I_M_Warehouse getM_WarehouseSource() 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_WarehouseSource_ID(), get_TrxName()); }
/** Set Source Warehouse.
@ -227,6 +241,23 @@ public class X_M_Replenish extends PO implements I_M_Replenish, I_Persistent
return ii.intValue();
}
/** Set Qty Batch Size.
@param QtyBatchSize Qty Batch Size */
public void setQtyBatchSize (BigDecimal QtyBatchSize)
{
set_Value (COLUMNNAME_QtyBatchSize, QtyBatchSize);
}
/** Get Qty Batch Size.
@return Qty Batch Size */
public BigDecimal getQtyBatchSize ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBatchSize);
if (bd == null)
return Env.ZERO;
return bd;
}
/** ReplenishType AD_Reference_ID=164 */
public static final int REPLENISHTYPE_AD_Reference_ID=164;
/** Maintain Maximum Level = 2 */

View File

@ -0,0 +1,435 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 T_BOM_Indented
* @author Adempiere (generated)
* @version Release 3.6.0LTS - $Id$ */
public class X_T_BOM_Indented extends PO implements I_T_BOM_Indented, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20101222L;
/** Standard Constructor */
public X_T_BOM_Indented (Properties ctx, int T_BOM_Indented_ID, String trxName)
{
super (ctx, T_BOM_Indented_ID, trxName);
/** if (T_BOM_Indented_ID == 0)
{
setT_BOM_Indented_ID (0);
} */
}
/** Load Constructor */
public X_T_BOM_Indented (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 3 - Client - 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_T_BOM_Indented[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_AD_PInstance getAD_PInstance() throws RuntimeException
{
return (I_AD_PInstance)MTable.get(getCtx(), I_AD_PInstance.Table_Name)
.getPO(getAD_PInstance_ID(), get_TrxName()); }
/** Set Process Instance.
@param AD_PInstance_ID
Instance of the process
*/
public void setAD_PInstance_ID (int AD_PInstance_ID)
{
if (AD_PInstance_ID < 1)
set_Value (COLUMNNAME_AD_PInstance_ID, null);
else
set_Value (COLUMNNAME_AD_PInstance_ID, Integer.valueOf(AD_PInstance_ID));
}
/** Get Process Instance.
@return Instance of the process
*/
public int getAD_PInstance_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_PInstance_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_AcctSchema getC_AcctSchema() throws RuntimeException
{
return (I_C_AcctSchema)MTable.get(getCtx(), I_C_AcctSchema.Table_Name)
.getPO(getC_AcctSchema_ID(), get_TrxName()); }
/** Set Accounting Schema.
@param C_AcctSchema_ID
Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID)
{
if (C_AcctSchema_ID < 1)
set_Value (COLUMNNAME_C_AcctSchema_ID, null);
else
set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID));
}
/** Get Accounting Schema.
@return Rules for accounting
*/
public int getC_AcctSchema_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Cost.
@param Cost
Cost information
*/
public void setCost (BigDecimal Cost)
{
set_Value (COLUMNNAME_Cost, Cost);
}
/** Get Cost.
@return Cost information
*/
public BigDecimal getCost ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Cost);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Future Cost.
@param CostFuture
Cost information
*/
public void setCostFuture (BigDecimal CostFuture)
{
set_Value (COLUMNNAME_CostFuture, CostFuture);
}
/** Get Future Cost.
@return Cost information
*/
public BigDecimal getCostFuture ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostFuture);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Current Cost Price.
@param CurrentCostPrice
The currently used cost price
*/
public void setCurrentCostPrice (BigDecimal CurrentCostPrice)
{
set_Value (COLUMNNAME_CurrentCostPrice, CurrentCostPrice);
}
/** Get Current Cost Price.
@return The currently used cost price
*/
public BigDecimal getCurrentCostPrice ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentCostPrice);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Current Cost Price Lower Level.
@param CurrentCostPriceLL
Current Price Lower Level Is the sum of the costs of the components of this product manufactured for this level.
*/
public void setCurrentCostPriceLL (BigDecimal CurrentCostPriceLL)
{
set_Value (COLUMNNAME_CurrentCostPriceLL, CurrentCostPriceLL);
}
/** Get Current Cost Price Lower Level.
@return Current Price Lower Level Is the sum of the costs of the components of this product manufactured for this level.
*/
public BigDecimal getCurrentCostPriceLL ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentCostPriceLL);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Future Cost Price.
@param FutureCostPrice Future Cost Price */
public void setFutureCostPrice (BigDecimal FutureCostPrice)
{
set_Value (COLUMNNAME_FutureCostPrice, FutureCostPrice);
}
/** Get Future Cost Price.
@return Future Cost Price */
public BigDecimal getFutureCostPrice ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_FutureCostPrice);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Future Cost Price Lower Level.
@param FutureCostPriceLL Future Cost Price Lower Level */
public void setFutureCostPriceLL (BigDecimal FutureCostPriceLL)
{
set_Value (COLUMNNAME_FutureCostPriceLL, FutureCostPriceLL);
}
/** Get Future Cost Price Lower Level.
@return Future Cost Price Lower Level */
public BigDecimal getFutureCostPriceLL ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_FutureCostPriceLL);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Level no.
@param LevelNo Level no */
public void setLevelNo (int LevelNo)
{
set_Value (COLUMNNAME_LevelNo, Integer.valueOf(LevelNo));
}
/** Get Level no.
@return Level no */
public int getLevelNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_LevelNo);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Levels.
@param Levels Levels */
public void setLevels (String Levels)
{
set_Value (COLUMNNAME_Levels, Levels);
}
/** Get Levels.
@return Levels */
public String getLevels ()
{
return (String)get_Value(COLUMNNAME_Levels);
}
public I_M_CostElement getM_CostElement() throws RuntimeException
{
return (I_M_CostElement)MTable.get(getCtx(), 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();
}
public I_M_Product getM_Product() throws RuntimeException
{
return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name)
.getPO(getM_Product_ID(), get_TrxName()); }
/** Set Product.
@param M_Product_ID
Product, Service, Item
*/
public void setM_Product_ID (int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
}
/** Get Product.
@return Product, Service, Item
*/
public int getM_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** 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;
}
/** Set Quantity.
@param QtyBOM
Indicate the Quantity use in this BOM
*/
public void setQtyBOM (BigDecimal QtyBOM)
{
set_Value (COLUMNNAME_QtyBOM, QtyBOM);
}
/** Get Quantity.
@return Indicate the Quantity use in this BOM
*/
public BigDecimal getQtyBOM ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBOM);
if (bd == null)
return Env.ZERO;
return bd;
}
public I_M_Product getSel_Product() throws RuntimeException
{
return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name)
.getPO(getSel_Product_ID(), get_TrxName()); }
/** Set Selected Product.
@param Sel_Product_ID Selected Product */
public void setSel_Product_ID (int Sel_Product_ID)
{
if (Sel_Product_ID < 1)
set_Value (COLUMNNAME_Sel_Product_ID, null);
else
set_Value (COLUMNNAME_Sel_Product_ID, Integer.valueOf(Sel_Product_ID));
}
/** Get Selected Product.
@return Selected Product */
public int getSel_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Sel_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes first
*/
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return Method of ordering records; lowest number comes first
*/
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Indented BOM Report.
@param T_BOM_Indented_ID Indented BOM Report */
public void setT_BOM_Indented_ID (int T_BOM_Indented_ID)
{
if (T_BOM_Indented_ID < 1)
set_ValueNoCheck (COLUMNNAME_T_BOM_Indented_ID, null);
else
set_ValueNoCheck (COLUMNNAME_T_BOM_Indented_ID, Integer.valueOf(T_BOM_Indented_ID));
}
/** Get Indented BOM Report.
@return Indented BOM Report */
public int getT_BOM_Indented_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_T_BOM_Indented_ID);
if (ii == null)
return 0;
return ii.intValue();
}
}

View File

@ -497,7 +497,7 @@ public class MWFNode extends X_AD_WF_Node
/**
* Get Workflow
* @return workflow
* @deprecated please use {@link #getAD_Window()}
* @deprecated please use {@link #getAD_Workflow()}
*/
public MWorkflow getWorkflow()
{

View File

@ -287,6 +287,12 @@ public class MWorkflow extends X_AD_Workflow
return retValue;
} // getNodes
public void reloadNodes() {
m_nodes = null;
loadNodes();
}
/**
* Get the first node
* @return array of next nodes
@ -965,4 +971,5 @@ public class MWorkflow extends X_AD_Workflow
return false;
return true;
}
} // MWorkflow_ID

View File

@ -0,0 +1,720 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 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.apps.form;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.math.BigDecimal;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;
import java.util.Vector;
import java.util.logging.Level;
import javax.swing.JCheckBox;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTree;
import javax.swing.SwingUtilities;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.table.DefaultTableModel;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreePath;
import org.adempiere.plaf.AdempierePLAF;
import org.compiere.apps.ADialog;
import org.compiere.apps.ConfirmPanel;
import org.compiere.apps.StatusBar;
import org.compiere.apps.form.FormFrame;
import org.compiere.apps.form.FormPanel;
import org.compiere.grid.ed.VLookup;
import org.compiere.minigrid.MiniTable;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
import org.compiere.model.MProduct;
import org.compiere.model.MProductBOM;
import org.compiere.model.MUOM;
import org.compiere.model.Query;
import org.compiere.swing.CCheckBox;
import org.compiere.swing.CLabel;
import org.compiere.swing.CMenuItem;
import org.compiere.swing.CPanel;
import org.compiere.swing.CTextField;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Language;
import org.compiere.util.Msg;
/**
* BOM Tree Maintenance
*
* @author Victor Perez,Sergio Ramazzinag
* @version $Id: VTreeMaintenance.java,v 1.1 2004/03/20 04:35:51 jjanke Exp $
*
* 4Layers - MODIFICATIONS --------------------------------------------------------
* 2005/04/12 Various improvements to the standard form (Sergio Ramazzina)
* 4Layers -------------------------------------------------------------------- end
*
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
* @author Paul Bowden, adaxa modified for manufacturing light
* @author Tony Snook, enhancements search, right-click bom, where-used
*
*/
public class VTreeBOM extends CPanel implements FormPanel, ActionListener, TreeSelectionListener
{
/**
*
*/
private static final long serialVersionUID = -4045195906352692040L;
/*****************************************************************************
* Mouse Listener for Popup Menu
*/
final class VTreeBOM_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VTreeBOM_mouseAdapter(VTreeBOM adaptee)
{
m_adaptee = adaptee;
}
private VTreeBOM m_adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
// Hide the popup if not right click - teo_sarca [ 1734802 ]
else
m_adaptee.popupMenu.setVisible(false);
} // mouse Clicked
} // VTreeBOM_mouseAdapter
/**
* Key Pressed
*/
class VTreeBOM_keyAdapter extends java.awt.event.KeyAdapter
{
VTreeBOM m_adaptee;
/**
* VTreePanel_keyAdapter
* @param adaptee
*/
VTreeBOM_keyAdapter(VTreeBOM adaptee)
{
m_adaptee = adaptee;
}
/**
* Key Pressed
* @param e
*/
public void keyPressed(KeyEvent e)
{
if (e.getKeyCode() == KeyEvent.VK_ENTER)
m_adaptee.keyPressed(e);
}
} // VTreeBOM_keyAdapter
/**
* Tree Maintenance
*/
/** Window No */
private int m_WindowNo = 0;
/** FormFrame */
private FormFrame m_frame;
/** Active Tree */
private myJTree m_tree;
private static CLogger log = CLogger.getCLogger(VTreeBOM.class);
private BorderLayout mainLayout = new BorderLayout ();
private CPanel northPanel = new CPanel ();
private FlowLayout northLayout = new FlowLayout (FlowLayout.RIGHT,20,5);
private CPanel southPanel = new CPanel();
private CPanel southPanel2 = new CPanel ();
private BorderLayout southLayout = new BorderLayout();
private FlowLayout southLayout2 = new FlowLayout ();
private CLabel labelProduct = new CLabel ();
private VLookup fieldProduct;
private CCheckBox implosion = new CCheckBox ();
private CLabel treeInfo = new CLabel ();
private CLabel spacer = new CLabel ();
//
private JSplitPane splitPane = new JSplitPane ();
private JScrollPane dataPane = new JScrollPane();
private JScrollPane treePane = new JScrollPane();
private CCheckBox treeExpand = new CCheckBox();
private CTextField treeSearch = new CTextField(10);
private CLabel treeSearchLabel = new CLabel();
private String m_search = "";
private Enumeration<?> m_nodeEn;
private DefaultMutableTreeNode m_selectedNode; // the selected model node
private int m_selected_id = 0;
private MouseListener mouseListener = new VTreeBOM_mouseAdapter(this);
private KeyListener keyListener = new VTreeBOM_keyAdapter(this);
private DefaultMutableTreeNode m_root = null;
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
protected StatusBar statusBar = new StatusBar();
private MiniTable tableBOM = new MiniTable();
private Vector<Vector<Object>> dataBOM = new Vector<Vector<Object>>();
private Vector<String> columnNames;
private final int DIVIDER_LOCATION = 300;
private boolean reload = false;
private Language language = Language.getLoginLanguage(); // Base Language
JPopupMenu popupMenu = new JPopupMenu();
private CMenuItem mBOM;
private CMenuItem mImplosion;
private MLookup m_fieldProduct;
public Properties getCtx() {
return Env.getCtx();
}
/**
* Initialize Panel
* @param WindowNo window
* @param frame frame
*/
public void init (int WindowNo, FormFrame frame)
{
m_WindowNo = WindowNo;
m_frame = frame;
log.info( "VTreeBOM.init - WinNo=" + m_WindowNo);
try
{
preInit();
jbInit ();
frame.getContentPane().add(this, BorderLayout.CENTER);
}
catch (Exception ex)
{
log.log(Level.SEVERE,"VTreeMaintenance.init", ex);
}
} // init
/**
* preInit() - Fill Tree Combo
*/
private void preInit() throws Exception
{
m_fieldProduct = MLookupFactory.get(getCtx(), m_WindowNo,
MColumn.getColumn_ID(MProduct.Table_Name, "M_Product_ID"),
DisplayType.Search, language, MProduct.COLUMNNAME_M_Product_ID, 0, false,
" M_Product.IsSummary = 'N'");
fieldProduct = new VLookup ("M_Product_ID", false, false, true, m_fieldProduct) {
private static final long serialVersionUID = 1L;
public void setValue(Object value) {
super.setValue(value);
}
};
implosion.addActionListener(this);
splitPane.add (dataPane, JSplitPane.RIGHT);
splitPane.add (treePane, JSplitPane.LEFT);
} // preInit
/**
* loadTableBOM
*
*
*/
private void loadTableBOM()
{
// Header Info
columnNames = new Vector<String>(10);
columnNames.add(Msg.getElement(getCtx(), "IsActive")); // 0
columnNames.add(Msg.getElement(getCtx(), "Line")); // 1
columnNames.add(Msg.getElement(getCtx(), "M_Product_ID")); // 2
columnNames.add(Msg.getElement(getCtx(), "C_UOM_ID")); // 3
columnNames.add(Msg.getElement(getCtx(), "QtyBOM")); // 4
DefaultTableModel model = new DefaultTableModel(dataBOM, columnNames);
tableBOM.setModel(model);
tableBOM.setColumnClass( 0, Boolean.class, true); // 0 IsActive
tableBOM.setColumnClass( 1, String.class,true); // 1 Line (as string)
tableBOM.setColumnClass( 2, KeyNamePair.class,true); // 2 M_Product_ID
tableBOM.setColumnClass( 3, KeyNamePair.class,true); // 3 C_UOM_ID
tableBOM.setColumnClass( 4, BigDecimal.class,true); // 4 QtyBOM
tableBOM.setMultiSelection(false);
tableBOM.autoSize();
} // loadTableBOM
/**
* jbInit
*
*/
private void jbInit ()
{
this.setLayout (mainLayout);
// 4Layers - Set initial window dimension
this.setPreferredSize(new Dimension(640, 480));
labelProduct.setText (Msg.getElement(getCtx(), "M_Product_ID"));
implosion.setText (Msg.getElement(getCtx(), "Implosion"));
treeInfo.setText ("Selected Product: ");
spacer.setText(" ");
northPanel.setLayout (northLayout);
northLayout.setAlignment (FlowLayout.LEFT);
//
this.add (northPanel, BorderLayout.NORTH);
northPanel.add (labelProduct, null);
northPanel.add (fieldProduct, null);
northPanel.add (implosion, null);
northPanel.add (spacer, null);
northPanel.add (spacer, null);
northPanel.add (treeInfo, null);
treeExpand.setText(Msg.getMsg(Env.getCtx(), "ExpandTree"));
treeExpand.setActionCommand("Expand");
treeExpand.addMouseListener(mouseListener);
treeExpand.addActionListener(this);
//
treeSearchLabel.setText(Msg.getMsg(Env.getCtx(), "TreeSearch") + " ");
treeSearchLabel.setLabelFor(treeSearch);
treeSearchLabel.setToolTipText(Msg.getMsg(Env.getCtx(), "TreeSearchText"));
treeSearch.setBackground(AdempierePLAF.getInfoBackground());
treeSearch.addKeyListener(keyListener);
this.add(southPanel, BorderLayout.SOUTH);
southPanel.setLayout(southLayout);
confirmPanel.addActionListener(this);
southPanel.add(confirmPanel, BorderLayout.SOUTH);
southPanel2.setLayout(southLayout2);
southLayout2.setAlignment (FlowLayout.LEFT);
southPanel.add(southPanel2, BorderLayout.NORTH);
southPanel2.add(treeExpand, null);//BorderLayout.EAST);
southPanel2.add(spacer, null);
southPanel2.add(treeSearchLabel, null);//BorderLayout.WEST);
southPanel2.add(treeSearch, null);//BorderLayout.CENTER);
this.add (splitPane, BorderLayout.CENTER);
// 4Layers - Set divider location
splitPane.setDividerLocation(DIVIDER_LOCATION);
mBOM = new CMenuItem(Msg.getMsg(Env.getCtx(), "BOM"), Env.getImageIcon("Detail16.gif"));
mBOM.addActionListener(this);
popupMenu.add(mBOM);
mImplosion = new CMenuItem(Msg.getMsg(Env.getCtx(), "Implosion"), Env.getImageIcon("Parent16.gif"));
mImplosion.addActionListener(this);
popupMenu.add(mImplosion);
} // jbInit
/**
* Enter Key
* @param e event
*/
protected void keyPressed(KeyEvent e)
{
// *** treeSearch ***
if (e.getSource() == treeSearch)
{
String search = treeSearch.getText();
boolean found = false;
// at the end - try from top
if (m_nodeEn != null && !m_nodeEn.hasMoreElements())
m_search = "";
// this is the first time
if (!search.equals(m_search))
{
// get enumeration of all nodes
m_nodeEn = m_root.preorderEnumeration();
m_search = search;
}
// search the nodes
while(!found && m_nodeEn != null && m_nodeEn.hasMoreElements())
{
DefaultMutableTreeNode nd = (DefaultMutableTreeNode)m_nodeEn.nextElement();
Vector <?> nodeInfo = (Vector <?>)(nd.getUserObject());
String uoName = ((KeyNamePair)nodeInfo.elementAt(2)).getName() ;
// compare in upper case
if (uoName.toUpperCase().indexOf(search.toUpperCase()) != -1)
{
found = true;
TreePath treePath = new TreePath(nd.getPath());
m_tree.setSelectionPath(treePath);
m_tree.makeVisible(treePath); // expand it
m_tree.scrollPathToVisible(treePath);
}
}
if (!found)
ADialog.beep();
} // treeSearch
} // keyPressed
/**
* Dispose
*/
public void dispose()
{
if (m_frame != null)
m_frame.dispose();
m_frame = null;
} // dispose
/**
* Action Listener
* @param e event
*/
public void actionPerformed (ActionEvent e)
{
if (e.getSource() == mBOM)
{
fieldProduct.setValue(m_selected_id);
if (implosion.isSelected())
implosion.doClick();
action_loadBOM();
}
if (e.getSource() == mImplosion)
{
fieldProduct.setValue(m_selected_id);
if (!implosion.isSelected())
implosion.doClick();
action_loadBOM();
}
if (e.getActionCommand().equals(ConfirmPanel.A_OK))
{
if(m_selected_id > 0 || getM_Product_ID() > 0) action_loadBOM();
}
if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL))
{
dispose();
}
else if (e.getSource() instanceof JCheckBox)
{
if (e.getActionCommand().equals("Expand"))
expandTree();
}
} // actionPerformed
/**
* Action: Fill Tree with all nodes
*/
private void action_loadBOM()
{
m_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
reload = false;
int M_Product_ID = getM_Product_ID();
if (M_Product_ID == 0)
return;
MProduct M_Product = MProduct.get(getCtx(), M_Product_ID);
treeInfo.setText ("Selected Product: "+M_Product.getValue());
Vector<Object> line = new Vector<Object>(10);
line.add( new Boolean(M_Product.isActive())); // 0 IsActive
line.add( new Integer(0).toString()); // 1 Line
KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getValue().concat("_").concat(M_Product.getName()));
line.add(pp); // 2 M_Product_ID
MUOM u = new MUOM(M_Product.getCtx(), M_Product.getC_UOM_ID(), M_Product.get_TrxName());
KeyNamePair uom = new KeyNamePair(u.get_ID(), u.getUOMSymbol());
line.add(uom); // 3 C_UOM_ID
line.add(Env.ONE); // 4 QtyBOM
DefaultMutableTreeNode parent = new DefaultMutableTreeNode(line);
m_root = (DefaultMutableTreeNode)parent.getRoot();
dataBOM.clear();
if (isImplosion())
{
for (MProductBOM bomline : getParentBOMs(M_Product_ID))
{
addParent(bomline, parent);
}
m_tree = new myJTree(parent);
m_tree.addMouseListener(mouseListener);
}
else
{
for (MProductBOM bom : getChildBOMs(M_Product_ID, true))
{
addChild(bom, parent);
}
m_tree = new myJTree(parent);
m_tree.addMouseListener(mouseListener);
}
m_tree.addTreeSelectionListener(this);
treePane.getViewport().add (m_tree, null);
loadTableBOM();
dataPane.getViewport().add(tableBOM, null);
splitPane.setDividerLocation(DIVIDER_LOCATION);
m_frame.setCursor(Cursor.getDefaultCursor());
} // action_loadBOM
private void action_reloadBOM()
{
m_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
reload = true;
int M_Product_ID = m_selected_id;
if (M_Product_ID == 0)
return;
MProduct M_Product = MProduct.get(getCtx(), M_Product_ID);
treeInfo.setText ("Selected Product: "+M_Product.getValue());
DefaultMutableTreeNode parent = new DefaultMutableTreeNode(productSummary(M_Product, false));
dataBOM.clear();
if (isImplosion())
{
for (MProductBOM bomline : getParentBOMs(M_Product_ID))
{
addParent(bomline, parent);
}
}
else
{
for (MProductBOM bom : getChildBOMs(M_Product_ID, true))
{
addChild(bom, parent);
}
}
loadTableBOM();
m_frame.setCursor(Cursor.getDefaultCursor());
} // action_reloadBOM
public void addChild(MProductBOM bomline, DefaultMutableTreeNode parent)
{
MProduct M_Product = MProduct.get(getCtx(), bomline.getM_ProductBOM_ID());
Vector<Object> line = new Vector<Object>(10);
line.add( new Boolean(bomline.isActive())); // 0 IsActive
line.add( new Integer(bomline.getLine()).toString()); // 1 Line
KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getValue().concat("_").concat(M_Product.getName()));
line.add(pp); // 2 M_Product_ID
MUOM u = new MUOM(M_Product.getCtx(), M_Product.getC_UOM_ID(), M_Product.get_TrxName());
KeyNamePair uom = new KeyNamePair(u.get_ID(), u.getUOMSymbol());
line.add(uom); // 3 C_UOM_ID
line.add((BigDecimal) ((bomline.getBOMQty()!=null) ? bomline.getBOMQty() : new BigDecimal(0))); // 4 QtyBOM
DefaultMutableTreeNode child = new DefaultMutableTreeNode(line);
parent.add(child);
if(m_selected_id == bomline.getM_Product_ID() || getM_Product_ID() == bomline.getM_Product_ID())
dataBOM.add(line);
if(reload) return;
for (MProductBOM bom : getChildBOMs(bomline.getM_ProductBOM_ID(), false))
{
addChild(bom, child);
}
}
public void addParent(MProductBOM bom, DefaultMutableTreeNode parent)
{
MProduct M_Product = MProduct.get(getCtx(), bom.getM_Product_ID());
Vector<Object> line = new Vector<Object>(10);
line.add( new Boolean(M_Product.isActive())); // 0 IsActive
line.add( new Integer(bom.getLine()).toString()); // 1 Line
KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getValue().concat("_").concat(M_Product.getName()));
line.add(pp); // 2 M_Product_ID
MUOM u = new MUOM(M_Product.getCtx(), M_Product.getC_UOM_ID(), M_Product.get_TrxName());
KeyNamePair uom = new KeyNamePair(u.get_ID(),u.getUOMSymbol());
line.add(uom); // 3 C_UOM_ID
line.add((BigDecimal) ((bom.getBOMQty()!=null) ? bom.getBOMQty() : new BigDecimal(0))); // 4 QtyBOM
if(m_selected_id == bom.getM_ProductBOM_ID() || getM_Product_ID() == bom.getM_ProductBOM_ID())
dataBOM.add(line);
DefaultMutableTreeNode child = new DefaultMutableTreeNode(line);
parent.add(child);
if(reload) return;
for (MProductBOM bomline : getParentBOMs(bom.getM_Product_ID()))
{
addParent(bomline, child);
}
}
public void valueChanged(TreeSelectionEvent event)
{
m_selectedNode = (DefaultMutableTreeNode)m_tree.getLastSelectedPathComponent();
/* if nothing is selected */
if (m_selectedNode == null) return;
Vector <?> nodeInfo = (Vector <?>)(m_selectedNode.getUserObject());
m_selected_id = ((KeyNamePair)nodeInfo.elementAt(2)).getKey() ;
action_reloadBOM();
}
/**
* Clicked on Expand All
*/
private void expandTree()
{
if (treeExpand.isSelected())
{
for (int row = 0; row < m_tree.getRowCount(); row++)
m_tree.expandRow(row);
}
else
{
// patch: 1654055 +jgubo Changed direction of collapsing the tree nodes
for (int row = m_tree.getRowCount(); row > 0; row--)
m_tree.collapseRow(row);
}
} // expandTree
public String productSummary(MProduct product, boolean isLeaf) {
MUOM uom = MUOM.get(getCtx(), product.getC_UOM_ID());
String value = product.getValue();
String name = product.get_Translation(MProduct.COLUMNNAME_Name);
//
StringBuffer sb = new StringBuffer(value);
if (name != null && !value.equals(name))
sb.append("_").append(product.getName());
sb.append(" [").append(uom.get_Translation(MUOM.COLUMNNAME_UOMSymbol)).append("]");
//
return sb.toString();
}
private boolean isImplosion() {
return implosion.isSelected();
}
private int getM_Product_ID() {
Integer Product = (Integer)fieldProduct.getValue();
if (Product == null)
return 0;
return Product.intValue();
}
private List<MProductBOM> getChildBOMs(int M_Product_ID, boolean onlyActiveRecords)
{
String filter = MProductBOM.COLUMNNAME_M_Product_ID+"=?"
+(onlyActiveRecords ? " AND IsActive='Y'" : "");
return new Query(getCtx(), MProductBOM.Table_Name, filter, null)
.setParameters(new Object[]{M_Product_ID})
.setOrderBy(MProductBOM.COLUMNNAME_Line)
.list();
}
private List<MProductBOM> getParentBOMs(int M_Product_ID)
{
String filter = MProductBOM.COLUMNNAME_M_ProductBOM_ID+"=?";
return new Query(getCtx(), MProductBOM.Table_Name, filter, null)
.setParameters(new Object[]{M_Product_ID})
.setOrderBy(MProductBOM.COLUMNNAME_M_Product_ID+","+MProductBOM.COLUMNNAME_Line)
.list();
}
} // VTreeBOM
/**************************************************************************
* myJTree - extends convertValueToText method of JTree
*/
class myJTree extends JTree
{
/**
*
*/
private static final long serialVersionUID = -5831338565562378100L;
public myJTree(DefaultMutableTreeNode parent) {
super(parent);
}
@Override
public String convertValueToText(Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
DefaultMutableTreeNode nd = (DefaultMutableTreeNode)value;
Vector <?> userObject = (Vector <?>)nd.getUserObject();
//Product
StringBuffer sb = new StringBuffer(((KeyNamePair)userObject.elementAt(2)).getName());
//UOM
sb.append(" ["+((KeyNamePair) userObject.elementAt(3)).getName().trim()+"]");
//BOMQty
BigDecimal BOMQty = (BigDecimal)(userObject.elementAt(4));
sb.append("x"+BOMQty.setScale(2, BigDecimal.ROUND_HALF_UP).stripTrailingZeros());
return sb.toString();
}
}

View File

@ -0,0 +1,454 @@
/******************************************************************************
* Copyright (C) 2012 Carlos Ruiz *
* Copyright (C) 2012 Trek Global *
* Product: iDempiere ERP & CRM Smart Business Solution *
* 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. *
*****************************************************************************/
package org.adempiere.webui.apps.form;
import static org.compiere.model.SystemIDs.COLUMN_WIZARDSTATUS;
import static org.compiere.model.SystemIDs.REFERENCE_WIZARDSTATUS;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import org.adempiere.model.MWizardProcess;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.compiere.apps.form.SetupWizard;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.wf.MWFNode;
import org.compiere.wf.MWorkflow;
import org.zkoss.util.media.AMedia;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Div;
import org.zkoss.zul.East;
import org.zkoss.zul.Iframe;
import org.zkoss.zul.North;
import org.zkoss.zul.Progressmeter;
import org.zkoss.zul.Space;
import org.zkoss.zul.Tree;
import org.zkoss.zul.Treecell;
import org.zkoss.zul.Treechildren;
import org.zkoss.zul.Treeitem;
import org.zkoss.zul.Treerow;
import org.zkoss.zul.West;
/**
* View for Setup Wizard
*
* @author Carlos Ruiz
*
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public class WSetupWizard extends SetupWizard implements IFormController, EventListener, ValueChangeListener
{
private CustomForm form = new CustomForm();
private Borderlayout mainLayout = new Borderlayout();
private Panel northPanel = new Panel();
private Progressmeter progressbar = new Progressmeter();
private Label progressLabel = new Label();
//
private Tree wfnodeTree;
private Label titleLabel = new Label();
private Iframe helpFrame = new Iframe();
private Label notesLabel = new Label(Msg.getElement(Env.getCtx(), MWizardProcess.COLUMNNAME_Note));
private Textbox notesField = new Textbox();
private Label statusLabel = new Label();
private WTableDirEditor statusField;
private Button bRefresh = new Button();
private Button bOK = new Button();
private Button bNext = new Button();
private ArrayList<Treeitem> nextItems = new ArrayList<Treeitem>();
private static final String WIZARD_LABEL_STYLE = "font-weight: bold";
private static final String NODE_LABEL_STYLE = "margin-left:20px";
public WSetupWizard()
{
try
{
preInit();
jbInit ();
LayoutUtils.sendDeferLayoutEvent(mainLayout, 100);
}
catch (Exception ex)
{
log.log(Level.SEVERE, "VTreeMaintenance.init", ex);
}
} // init
/**
* Fill Tree Combo
*/
private void preInit()
{
wfnodeTree = new Tree();
wfnodeTree.addEventListener(Events.ON_SELECT, this);
loadWizardNodes();
} // preInit
/**
* Load Wizard Nodes
*/
private void loadWizardNodes() {
Treechildren treeChildren = wfnodeTree.getTreechildren();
if (treeChildren == null)
{
treeChildren = new Treechildren();
wfnodeTree.appendChild(treeChildren);
wfnodeTree.setMultiple(false);
}
List<MWorkflow> wfwizards = getWfWizards();
for(MWorkflow wfwizard : wfwizards)
{
addWfEntry(wfwizard);
}
}
protected void addWfEntry(MWorkflow wfwizard) {
/* TODO: Color of workflow according to wizard status */
Treechildren treeChildren = wfnodeTree.getTreechildren();
Treeitem treeitemwf = new Treeitem();
treeChildren.appendChild(treeitemwf);
Label wizardLabel = new Label(wfwizard.getName(true));
wizardLabel.setStyle(WIZARD_LABEL_STYLE);
Div div = new Div();
div.setStyle("display:inline;");
div.appendChild(wizardLabel);
Treerow treerow = new Treerow();
treerow.setStyle("vertical-align:top;");
treeitemwf.appendChild(treerow);
treeitemwf.setOpen(false);
Treecell treecell = new Treecell();
treerow.appendChild(treecell);
treecell.appendChild(div);
nextItems.add(treeitemwf);
addNodes(wfwizard, treeitemwf);
treeitemwf.setAttribute("AD_Workflow_ID", wfwizard.getAD_Workflow_ID());
}
private void addNodes(MWorkflow wfwizard, Treeitem treeitemwf) {
MWFNode[] nodes = wfwizard.getNodes(true, Env.getAD_Client_ID(Env.getCtx()));
for (MWFNode node : nodes) {
addWfNode(node, treeitemwf);
}
}
private void addWfNode(MWFNode node, Treeitem treeitemwf) {
/* TODO: Color of node according to wizard status */
Label nodeLabel = new Label(node.getName(true));
nodeLabel.setStyle(NODE_LABEL_STYLE);
Div div = new Div();
div.setStyle("display:inline;");
div.appendChild(nodeLabel);
Treechildren treeChildren = treeitemwf.getTreechildren();
if (treeChildren == null)
{
treeChildren = new Treechildren();
treeitemwf.appendChild(treeChildren);
}
Treeitem childItem = new Treeitem();
treeChildren.appendChild(childItem);
Treerow treerow = new Treerow();
treerow.setStyle("vertical-align:top;");
childItem.appendChild(treerow);
Treecell treecell = new Treecell();
treerow.appendChild(treecell);
treecell.appendChild(div);
childItem.setAttribute("AD_WF_Node_ID", node.getAD_WF_Node_ID());
nextItems.add(childItem);
}
/**
* Static init
* @throws Exception
*/
private void jbInit () throws Exception
{
form.setWidth("99%");
form.setHeight("100%");
form.setStyle("position: absolute; padding: 0; margin: 0");
form.appendChild (mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
mainLayout.setStyle("position: absolute");
bRefresh.setImage("/images/Refresh24.png");
bRefresh.setTooltiptext(Msg.getMsg(Env.getCtx(), "Refresh"));
bRefresh.addEventListener(Events.ON_CLICK, this);
bOK.setImage("/images/Ok24.png");
bOK.setTooltiptext(Msg.getMsg(Env.getCtx(), "Update"));
bOK.addEventListener(Events.ON_CLICK, this);
bNext.setImage("/images/Detail24.png");
bNext.setTooltiptext(Msg.getMsg(Env.getCtx(), "Next"));
bNext.addEventListener(Events.ON_CLICK, this);
North north = new North();
mainLayout.appendChild(north);
north.appendChild(northPanel);
north.setHeight("38px");
//
northPanel.appendChild(progressbar);
progressbar.setWidth("100%");
northPanel.appendChild(progressLabel);
progressLabel.setWidth("100%");
progressLabel.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center; border:0; text-align: center; ");
refreshProgress();
statusLabel.setText(Msg.getElement(Env.getCtx(), "WizardStatus"));
MLookup wizardL = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), COLUMN_WIZARDSTATUS,
DisplayType.List, Env.getLanguage(Env.getCtx()), "WizardStatus", REFERENCE_WIZARDSTATUS,
false, "AD_Ref_List.Value IN ('D','S','I','F','P')");
statusField = new WTableDirEditor("WizardStatus", true, false, true,wizardL);
statusField.setValue(MWizardProcess.WIZARDSTATUS_Pending);
statusField.addValueChangeListener(this);
//
West west = new West();
mainLayout.appendChild(west);
west.appendChild(wfnodeTree);
west.setFlex(true);
west.setAutoscroll(true);
west.setWidth("30%");
Grid gridView = new Grid();
gridView.setStyle("margin:0; padding:0;");
gridView.makeNoStrip();
gridView.setOddRowSclass("even");
Rows rows = new Rows();
gridView.appendChild(rows);
Row row = new Row();
rows.appendChild(row);
row.setAlign("center");
row.appendChild(titleLabel);
titleLabel.setStyle("font-weight: bold; font-size: 14px");
row = new Row();
rows.appendChild(row);
row.appendChild(helpFrame);
helpFrame.setWidth("99%");
helpFrame.setHeight("90%");
helpFrame.setStyle("min-height:300px; border: 1px solid lightgray; margin:auto");
row = new Row();
rows.appendChild(row);
row.appendChild(notesLabel);
notesLabel.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.appendChild(notesField);
notesField.setRows(4);
notesField.setWidth("100%");
row = new Row();
rows.appendChild(row);
Div div = new Div();
div.appendChild(statusLabel);
div.appendChild(statusField.getComponent());
div.appendChild(new Space());
div.setAlign("right");
div.appendChild(bRefresh);
div.appendChild(bOK);
div.appendChild(bNext);
row.appendChild(div);
East east = new East();
mainLayout.appendChild(east);
east.appendChild(gridView);
east.setCollapsible(false);
east.setSplittable(true);
east.setWidth("70%");
setNotesPanelVisible(false);
} // jbInit
private void refreshProgress() {
int nodes = getNodesCnt();
int solved = getWizardCnt();
int percent = solved * 100;
if (nodes > 0)
percent = percent / nodes;
else
percent = 0;
Object[] args = new Object[] {solved, nodes, percent};
String msg = Msg.getMsg(Env.getCtx(), "SetupWizardProgress", args);
progressLabel.setText(msg);
progressbar.setValue(percent);
progressbar.setTooltiptext(msg);
}
/**
* Dispose
*/
public void dispose()
{
SessionManager.getAppDesktop().closeActiveWindow();
} // dispose
/**
* Action Listener
* @param e event
*/
public void onEvent (Event e)
{
if (e.getTarget() == wfnodeTree) {
onTreeSelection(e);
} else if (e.getTarget() == bRefresh) {
refresh();
showInRightPanel(0, m_node.getAD_WF_Node_ID());
} else if (e.getTarget() == bOK) {
save(notesField.getText(), (String) statusField.getValue());
showInRightPanel(0, m_node.getAD_WF_Node_ID());
refreshProgress();
} else if (e.getTarget() == bNext) {
navigateToNext();
}
} // actionPerformed
private void refresh() {
if (m_node != null) {
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), m_node.getAD_WF_Node_ID(), Env.getAD_Client_ID(Env.getCtx()));
notesField.setText(wp.getNote());
statusField.setValue(wp.getWizardStatus());
}
}
private void navigateToNext() {
if (m_node != null) {
save(notesField.getText(), (String) statusField.getValue());
refreshProgress();
}
Treeitem ti = wfnodeTree.getSelectedItem();
if (ti == null || nextItems.indexOf(ti)+1 == nextItems.size()) {
ti = nextItems.get(0);
wfnodeTree.setSelectedItem(ti);
showItem(ti);
} else {
int idx = nextItems.indexOf(ti);
Treeitem nextti = nextItems.get(idx+1);
wfnodeTree.setSelectedItem(nextti);
showItem(nextti);
}
}
/**
* Tree selection
* @param e event
*/
private void onTreeSelection (Event e)
{
Treeitem ti = wfnodeTree.getSelectedItem();
showItem(ti);
} // propertyChange
private void showItem(Treeitem ti) {
if (ti.getAttribute("AD_Workflow_ID") != null) {
ti.setOpen(true);
// MWorkflow
int wfid = (Integer) ti.getAttribute("AD_Workflow_ID");
showInRightPanel(wfid, 0);
} else if (ti.getAttribute("AD_WF_Node_ID") != null) {
// MWFNode
int nodeid = (Integer) ti.getAttribute("AD_WF_Node_ID");
showInRightPanel(0, nodeid);
}
}
private void showInRightPanel(int ad_workflow_id, int ad_wf_node_id) {
String title = null;
String help = null;
if (ad_wf_node_id > 0) {
MWFNode node = MWFNode.get(Env.getCtx(), ad_wf_node_id);
title = node.getName(true);
help = node.getHelp(true);
m_node = node;
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), ad_wf_node_id, Env.getAD_Client_ID(Env.getCtx()));
notesField.setText(wp.getNote());
statusField.setValue(wp.getWizardStatus());
setNotesPanelVisible(true);
} else {
MWorkflow wf = MWorkflow.get(Env.getCtx(), ad_workflow_id);
title = wf.getName(true);
help = wf.getHelp(true);
setNotesPanelVisible(false);
m_node = null;
}
titleLabel.setText(title);
if (help != null) {
AMedia media = new AMedia("Help", "html", "text/html", help.getBytes());
helpFrame.setContent(media);
helpFrame.invalidate();
} else {
helpFrame.setContent(null);
}
helpFrame.invalidate();
}
private void setNotesPanelVisible(boolean visible) {
notesLabel.setVisible(visible);
notesField.setVisible(visible);
bRefresh.setVisible(visible);
bOK.setVisible(visible);
statusLabel.setVisible(visible);
statusField.setVisible(visible);
}
public ADForm getForm()
{
return form;
}
@Override
public void valueChange(ValueChangeEvent e) {
log.info(e.getPropertyName() + "=" + e.getNewValue());
/* if (e.getPropertyName().equals("WizardStatus")) */
}
} // WSetupWizard

View File

@ -0,0 +1,564 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* 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 *
* Copyright (C) 2003-2010 e-Evolution,SC. All Rights Reserved. *
* Contributor(s): victor.perez@e-evolution.com, www.e-evolution.com *
*****************************************************************************/
package org.adempiere.webui.apps.form;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.Vector;
import java.util.logging.Level;
import org.adempiere.webui.component.Borderlayout;
import org.adempiere.webui.component.Checkbox;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridFactory;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.ListModelTable;
import org.adempiere.webui.component.ListboxFactory;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.SimpleTreeModel;
import org.adempiere.webui.component.WListbox;
import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.TreeUtils;
import org.compiere.apps.form.TreeBOM;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
import org.compiere.model.MProduct;
import org.compiere.model.MProductBOM;
import org.compiere.model.MUOM;
import org.compiere.model.Query;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Language;
import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Center;
import org.zkoss.zul.DefaultTreeModel;
import org.zkoss.zul.DefaultTreeNode;
import org.zkoss.zul.North;
import org.zkoss.zul.Separator;
import org.zkoss.zul.South;
import org.zkoss.zul.Space;
import org.zkoss.zul.Tree;
import org.zkoss.zul.Treecol;
import org.zkoss.zul.Treecols;
import org.zkoss.zul.Treeitem;
import org.zkoss.zul.West;
public class WTreeBOM extends TreeBOM implements IFormController, EventListener {
private static final String[] LISTENER_EVENTS = {Events.ON_CLICK, Events.ON_CHANGE, Events.ON_OK, Events.ON_SELECT, Events.ON_SELECTION, Events.ON_DOUBLE_CLICK};
private int m_WindowNo = 0;
private CustomForm m_frame = new CustomForm();
private Tree m_tree = new Tree();
private Borderlayout mainLayout = new Borderlayout();
private Panel northPanel = new Panel();
private Panel southPanel = new Panel();
private Label labelProduct = new Label();
private WSearchEditor fieldProduct;
private West west = new West();
private Checkbox implosion = new Checkbox ();
private Label treeInfo = new Label ();
private Panel dataPane = new Panel();
private Panel treePane = new Panel();
protected ArrayList<ValueChangeListener> listeners = new ArrayList<ValueChangeListener>();
private mySimpleTreeNode m_selectedNode; // the selected model node
private int m_selected_id = 0;
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
private WListbox tableBOM = ListboxFactory.newDataTable();
private Vector<Vector<Object>> dataBOM = new Vector<Vector<Object>>();
private Grid northLayout = GridFactory.newGridLayout();
private Grid southLayout = GridFactory.newGridLayout();
private mySimpleTreeNode m_root = null;
private boolean reload = false;
private Checkbox treeExpand = new Checkbox();
public WTreeBOM(){
try{
preInit();
jbInit ();
}
catch(Exception e)
{
log.log(Level.SEVERE, "VTreeBOM.init", e);
}
}
private void loadTableBOM()
{
// Header Info
Vector<String> columnNames = new Vector<String>();
columnNames.add(Msg.translate(Env.getCtx(), "IsActive")); // 0
columnNames.add(Msg.getElement(Env.getCtx(), "Line")); // 1
columnNames.add(Msg.getElement(Env.getCtx(), "M_Product_ID")); // 2
columnNames.add(Msg.getElement(Env.getCtx(), "C_UOM_ID")); // 3
columnNames.add(Msg.getElement(Env.getCtx(), "QtyBOM")); // 4
tableBOM.clear();
// Set Model
ListModelTable model = new ListModelTable(dataBOM);
tableBOM.setData(model, columnNames);
tableBOM.setColumnClass( 0, Boolean.class, true); // 0 IsActive
tableBOM.setColumnClass( 1, String.class,true); // 1 Line
tableBOM.setColumnClass( 2, KeyNamePair.class,true); // 2 M_Product_ID
tableBOM.setColumnClass( 3, KeyNamePair.class,true); // 3 C_UOM_ID
tableBOM.setColumnClass( 4, BigDecimal.class,true); // 4 QtyBOM
} // dynInit
private void preInit() throws Exception
{
Properties ctx = Env.getCtx();
Language language = Language.getLoginLanguage(); // Base Language
MLookup m_fieldProduct = MLookupFactory.get(ctx, m_WindowNo,
MColumn.getColumn_ID(MProduct.Table_Name, "M_Product_ID"),
DisplayType.Search, language, MProduct.COLUMNNAME_M_Product_ID, 0, false,
" M_Product.IsSummary = 'N'");
fieldProduct = new WSearchEditor("M_Product_ID", true, false, true, m_fieldProduct)
{
public void setValue(Object value) {
super.setValue(value);
this.fireValueChange(new ValueChangeEvent(this, this.getColumnName(), getValue(), value));
confirmPanel.getOKButton().setFocus(true);
}
};
implosion.addActionListener(this);
treeExpand.addActionListener(this);
}
private void jbInit()
{
m_frame.setWidth("99%");
m_frame.setHeight("100%");
m_frame.setStyle("position: absolute; padding: 0; margin: 0");
m_frame.appendChild (mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
mainLayout.setStyle("position: absolute");
northPanel.appendChild(northLayout);
southPanel.appendChild(southLayout);
labelProduct.setText (Msg.getElement(Env.getCtx(), "M_Product_ID"));
implosion.setText (Msg.getElement(Env.getCtx(), "Implosion"));
treeInfo.setText (Msg.getElement(Env.getCtx(), "Sel_Product_ID")+": ");
North north = new North();
north.appendChild(northPanel);
north.setHeight("6%");
northPanel.setWidth("100%");
mainLayout.appendChild(north);
Rows rows = northLayout.newRows();
Row north_row = rows.newRow();
north_row.appendChild(labelProduct.rightAlign());
north_row.appendChild(fieldProduct.getComponent());
north_row.appendChild(new Separator());
north_row.appendChild(implosion);
north_row.appendChild(new Space());
north_row.appendChild(new Separator());
north_row.appendChild(new Space());
north_row.appendChild(treeInfo);
treeExpand.setText(Msg.getMsg(Env.getCtx(), "ExpandTree"));
South south = new South();
south.appendChild(southPanel);
south.setHeight("10%");
southPanel.setWidth("100%");
mainLayout.appendChild(south);
Rows rows2 = southLayout.newRows();
Row south_row = rows2.newRow();
south_row.appendChild(treeExpand);
south_row.appendChild(new Space());
south_row.appendChild(new Separator());
south_row.appendChild(new Space());
south_row.appendChild(confirmPanel);
confirmPanel.addActionListener(this);
mainLayout.appendChild(west);
west.setSplittable(true);
west.appendChild(treePane);
treePane.appendChild(m_tree);
m_tree.setStyle("border: none;");
west.setWidth("33%");
west.setAutoscroll(true);
Center center = new Center();
mainLayout.appendChild(center);
center.appendChild(dataPane);
dataPane.appendChild(tableBOM);
center.setFlex(true);
center.setAutoscroll(true);
}
public void dispose()
{
SessionManager.getAppDesktop().closeActiveWindow();
} // dispose
@Override
public void onEvent(Event event) throws Exception {
if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
{
if(m_selected_id > 0 || getM_Product_ID() > 0) action_loadBOM();
}
if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
{
dispose();
}
if (event.getTarget().equals(treeExpand))
{
if (treeExpand.isChecked())
{
TreeUtils.expandAll(m_tree);
}
else
{
TreeUtils.collapseAll(m_tree);
}
}
// *** Tree ***
if (event.getTarget() instanceof Tree )
{
Treeitem ti = m_tree.getSelectedItem();
if (ti == null) {
// ADialog.beep();
// TODO: review what is this beep for - no zk6 equivalent
log.log(Level.WARNING, "WTreeBOM.onEvent treeItem=null");
}
else
{
mySimpleTreeNode tn = (mySimpleTreeNode)ti.getValue();
setSelectedNode(tn);
}
}
}
/**
* Set the selected node & initiate all listeners
* @param nd node
* @throws Exception
*/
private void setSelectedNode (mySimpleTreeNode nd) throws Exception
{
log.config("Node = " + nd);
m_selectedNode = nd;
if(m_selectedNode == null)
return;
Vector <?> nodeInfo = (Vector <?>)(m_selectedNode.getData());
m_selected_id = ((KeyNamePair)nodeInfo.elementAt(2)).getKey() ;
if(m_selected_id > 0)
action_reloadBOM();
} // setSelectedNode
private void action_loadBOM() throws Exception
{
reload = false;
int M_Product_ID = getM_Product_ID();
if (M_Product_ID == 0)
return;
MProduct product = MProduct.get(Env.getCtx(), M_Product_ID);
treeInfo.setText (Msg.getElement(Env.getCtx(), "Sel_Product_ID")+": "+product.getValue());
Vector<Object> line = new Vector<Object>(10);
line.add( new Boolean(product.isActive())); // 0 IsActive
line.add( new Integer(0).toString()); // 1 Line
KeyNamePair pp = new KeyNamePair(product.getM_Product_ID(),product.getValue().concat("_").concat(product.getName()));
line.add(pp); // 2 M_Product_ID
MUOM u = new MUOM(product.getCtx(), product.getC_UOM_ID(), product.get_TrxName());
KeyNamePair uom = new KeyNamePair(u.get_ID(),u.getUOMSymbol());
line.add(uom); // 3 C_UOM_ID
line.add((BigDecimal) (new BigDecimal(1)).setScale(4, BigDecimal.ROUND_HALF_UP).stripTrailingZeros()); // 4 QtyBOM
// dummy root node, as first node is not displayed in tree
mySimpleTreeNode parent = new mySimpleTreeNode("Root",new ArrayList<Object>());
//m_root = parent;
m_root = new mySimpleTreeNode((Vector<Object>)line,new ArrayList<Object>());
parent.getChildren().add(m_root);
dataBOM.clear();
if (isImplosion())
{
try{
m_tree.setModel(null);
}catch(Exception e)
{}
if (m_tree.getTreecols() != null)
m_tree.getTreecols().detach();
if (m_tree.getTreefoot() != null)
m_tree.getTreefoot().detach();
if (m_tree.getTreechildren() != null)
m_tree.getTreechildren().detach();
for (MProductBOM bomline : getParentBOMs(M_Product_ID))
{
addParent(bomline, m_root);
}
Treecols treeCols = new Treecols();
m_tree.appendChild(treeCols);
Treecol treeCol = new Treecol();
treeCols.appendChild(treeCol);
SimpleTreeModel model = new SimpleTreeModel(parent);
m_tree.setPageSize(-1);
m_tree.setTreeitemRenderer(model);
m_tree.setModel(model);
}
else
{
try{
m_tree.setModel(null);
}catch(Exception e)
{}
if (m_tree.getTreecols() != null)
m_tree.getTreecols().detach();
if (m_tree.getTreefoot() != null)
m_tree.getTreefoot().detach();
if (m_tree.getTreechildren() != null)
m_tree.getTreechildren().detach();
for (MProductBOM bom : getChildBOMs(M_Product_ID, true))
{
addChild(bom, m_root);
}
Treecols treeCols = new Treecols();
m_tree.appendChild(treeCols);
Treecol treeCol = new Treecol();
treeCols.appendChild(treeCol);
SimpleTreeModel model = new SimpleTreeModel(parent);
m_tree.setPageSize(-1);
m_tree.setTreeitemRenderer(model);
m_tree.setModel(model);
}
// TODO: check zk6 - was:
// int[] path = m_tree.getModel().getPath(parent, m_root);
int[] path = m_tree.getModel().getPath(m_root);
Treeitem ti = m_tree.renderItemByPath(path);
m_tree.setSelectedItem(ti);
ti.setOpen(true);
m_tree.addEventListener(Events.ON_SELECT, this);
loadTableBOM();
}
private void action_reloadBOM() throws Exception
{
reload = true;
int M_Product_ID = m_selected_id;
if (M_Product_ID == 0)
return;
MProduct product = MProduct.get(Env.getCtx(), M_Product_ID);
treeInfo.setText (Msg.getElement(Env.getCtx(), "Sel_Product_ID")+": "+product.getValue());
dataBOM.clear();
if (isImplosion())
{
for (MProductBOM bomline : getParentBOMs(M_Product_ID))
{
addParent(bomline, m_selectedNode);
}
}
else
{
for (MProductBOM bom : getChildBOMs(M_Product_ID, true))
{
addChild(bom, m_selectedNode);
}
}
loadTableBOM();
}
public void addChild(MProductBOM bomline, mySimpleTreeNode parent) throws Exception
{
MProduct M_Product = MProduct.get(getCtx(), bomline.getM_ProductBOM_ID());
Vector<Object> line = new Vector<Object>(10);
line.add( new Boolean(bomline.isActive())); // 0 IsActive
line.add( new Integer(bomline.getLine()).toString()); // 1 Line
KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getValue().concat("_").concat(M_Product.getName()));
line.add(pp); // 2 M_Product_ID
MUOM u = new MUOM(M_Product.getCtx(), M_Product.getC_UOM_ID(), M_Product.get_TrxName());
KeyNamePair uom = new KeyNamePair(u.get_ID(),u.getUOMSymbol());
line.add(uom); // 3 C_UOM_ID
line.add((BigDecimal) ((bomline.getBOMQty()!=null) ? bomline.getBOMQty() : new BigDecimal(0)).setScale(4, BigDecimal.ROUND_HALF_UP).stripTrailingZeros()); // 4 QtyBOM
mySimpleTreeNode child = new mySimpleTreeNode(line,new ArrayList<Object>());
parent.getChildren().add(child);
if(m_selected_id == bomline.getM_Product_ID() || getM_Product_ID() == bomline.getM_Product_ID())
dataBOM.add(line);
if(reload) return;
for (MProductBOM bom : getChildBOMs(bomline.getM_ProductBOM_ID(), false))
{
addChild(bom, child);
}
}
public void addParent(MProductBOM bom, mySimpleTreeNode parent) throws Exception
{
MProduct M_Product = MProduct.get(getCtx(), bom.getM_Product_ID());
Vector<Object> line = new Vector<Object>(10);
line.add( new Boolean(M_Product.isActive())); // 0 IsActive
line.add( new Integer(bom.getLine()).toString()); // 1 Line
KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getValue().concat("_").concat(M_Product.getName()));
line.add(pp); // 2 M_Product_ID
MUOM u = new MUOM(M_Product.getCtx(), M_Product.getC_UOM_ID(), M_Product.get_TrxName());
KeyNamePair uom = new KeyNamePair(u.get_ID(),u.getUOMSymbol());
line.add(uom); // 3 C_UOM_ID
line.add((BigDecimal) ((bom.getBOMQty()!=null) ? bom.getBOMQty() : new BigDecimal(0)).setScale(4, BigDecimal.ROUND_HALF_UP).stripTrailingZeros()); // 4 QtyBOM
if(m_selected_id == bom.getM_ProductBOM_ID() || getM_Product_ID() == bom.getM_ProductBOM_ID())
dataBOM.add(line);
mySimpleTreeNode child = new mySimpleTreeNode(line,new ArrayList<Object>());
parent.getChildren().add(child);
if(reload) return;
for (MProductBOM bomline : getParentBOMs(bom.getM_Product_ID()))
{
addParent(bomline, child);
}
}
private int getM_Product_ID() {
Integer Product = (Integer)fieldProduct.getValue();
if (Product == null)
return 0;
return Product.intValue();
}
private List<MProductBOM> getChildBOMs(int M_Product_ID, boolean onlyActiveRecords)
{
String filter = MProductBOM.COLUMNNAME_M_Product_ID+"=?"
+(onlyActiveRecords ? " AND IsActive='Y'" : "");
return new Query(getCtx(), MProductBOM.Table_Name, filter, null)
.setParameters(new Object[]{M_Product_ID})
.setOrderBy(MProductBOM.COLUMNNAME_Line)
.list();
}
private List<MProductBOM> getParentBOMs(int M_Product_ID)
{
String filter = MProductBOM.COLUMNNAME_M_ProductBOM_ID+"=?";
return new Query(getCtx(), MProductBOM.Table_Name, filter, null)
.setParameters(new Object[]{M_Product_ID})
.setOrderBy(MProductBOM.COLUMNNAME_M_Product_ID+","+MProductBOM.COLUMNNAME_Line)
.list()
;
}
private boolean isImplosion() {
return implosion.isSelected();
}
@Override
public ADForm getForm() {
return m_frame;
}
public String[] getEvents()
{
return LISTENER_EVENTS;
}
}
/**************************************************************************
* mySimpleTreeNode
* - Override toString method for display
*
*/
class mySimpleTreeNode extends DefaultTreeNode
{
public mySimpleTreeNode(Object data, List<Object> children) {
super(data, children);
}
@Override
public String toString(){
Vector <?> userObject = (Vector <?>)getData();
// Product
StringBuffer sb = new StringBuffer(((KeyNamePair)userObject.elementAt(2)).getName());
// UOM
sb.append(" ["+((KeyNamePair) userObject.elementAt(3)).getName().trim()+"]");
// BOMQty
BigDecimal BOMQty = (BigDecimal)(userObject.elementAt(4));
sb.append("x"+BOMQty.setScale(2, BigDecimal.ROUND_HALF_UP).stripTrailingZeros());
return sb.toString();
}
}

View File

@ -47,20 +47,19 @@ import org.zkoss.zhtml.Table;
import org.zkoss.zhtml.Td;
import org.zkoss.zhtml.Tr;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.SuspendNotAllowedException;
import org.zkoss.zk.ui.event.DropEvent;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Center;
import org.zkoss.zul.North;
import org.zkoss.zul.South;
import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox;
import org.zkoss.zul.Label;
import org.zkoss.zul.Menupopup;
import org.zkoss.zul.North;
import org.zkoss.zul.Separator;
import org.zkoss.zul.South;
import org.zkoss.zul.Space;
import org.zkoss.zul.Toolbarbutton;
import org.zkoss.zul.Vbox;
@ -72,12 +71,14 @@ import org.zkoss.zul.Vbox;
*/
public class WFEditor extends ADForm {
/**
*
*
*/
private static final long serialVersionUID = 6874950519612113345L;
private static final long serialVersionUID = 4293422396394778274L;
private Listbox workflowList;
private int m_workflowId = 0;
private Toolbarbutton zoomButton;
private Toolbarbutton refreshButton;
private Toolbarbutton newButton;
private Table table;
private Center center;
@ -108,14 +109,24 @@ public class WFEditor extends ADForm {
north.appendChild(toolbar);
toolbar.appendChild(workflowList);
workflowList.setStyle("margin-left: 10px; margin-top: 5px; margin-right:5px;");
// Zoom
zoomButton = new Toolbarbutton();
zoomButton.setImage("/images/Zoom16.png");
toolbar.appendChild(zoomButton);
zoomButton.addEventListener(Events.ON_CLICK, this);
zoomButton.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Zoom")));
// New Node
newButton = new Toolbarbutton();
newButton.setImage("/images/New16.png");
toolbar.appendChild(newButton);
newButton.addEventListener(Events.ON_CLICK, this);
newButton.setTooltiptext(Msg.getMsg(Env.getCtx(), "CreateNewNode"));
// Refresh
refreshButton = new Toolbarbutton();
refreshButton.setImage("/images/Refresh16.png");
toolbar.appendChild(refreshButton);
refreshButton.addEventListener(Events.ON_CLICK, this);
refreshButton.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh")));
north.setHeight("30px");
createTable();
@ -153,14 +164,20 @@ public class WFEditor extends ADForm {
ListItem item = workflowList.getSelectedItem();
KeyNamePair knp = item != null ? item.toKeyNamePair() : null;
if (knp != null && knp.getKey() > 0) {
load(knp.getKey());
load(knp.getKey(), true);
}
}
else if (event.getTarget() == zoomButton) {
zoom();
if (workflowList.getSelectedIndex() > 0)
zoom();
}
else if (event.getTarget() == refreshButton) {
if (workflowList.getSelectedIndex() > 0)
reload(m_workflowId, true);
}
else if (event.getTarget() == newButton) {
createNewNode();
if (workflowList.getSelectedIndex() > 0)
createNewNode();
}
else if (event.getTarget() instanceof WFPopupItem) {
WFPopupItem item = (WFPopupItem) event.getTarget();
@ -177,14 +194,14 @@ public class WFEditor extends ADForm {
widget.getModel().setXPosition(xPosition);
widget.getModel().setYPosition(yPosition);
widget.getModel().saveEx();
reload(m_workflowId);
reload(m_workflowId, true);
}
}
}
}
private void createNewNode() {
String nameLabel = Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Name"));
String nameLabel = Msg.getElement(Env.getCtx(), MWFNode.COLUMNNAME_Name);
String title = Msg.getMsg(Env.getCtx(), "CreateNewNode");
final Window w = new Window();
w.setTitle(title);
@ -224,26 +241,30 @@ public class WFEditor extends ADForm {
MWFNode node = new MWFNode(m_wf, name, name);
node.setClientOrg(AD_Client_ID, 0);
node.saveEx();
reload(m_wf.getAD_Workflow_ID());
}
reload(m_wf.getAD_Workflow_ID(), true);
}
}
});
w.doHighlighted();
}
void reload(int workflowId) {
void reload(int workflowId, boolean reread) {
center.removeChild(table);
createTable();
center.appendChild(table);
load(workflowId);
load(workflowId, reread);
}
private void load(int workflowId) {
private void load(int workflowId, boolean reread) {
// Get Workflow
m_wf = new MWorkflow (Env.getCtx(), workflowId, null);
m_wf = MWorkflow.get(Env.getCtx(), workflowId);
m_workflowId = workflowId;
nodeContainer = new WFNodeContainer();
nodeContainer.setWorkflow(m_wf);
if (reread) {
m_wf.reloadNodes();
}
// Add Nodes for Paint
MWFNode[] nodes = m_wf.getNodes(true, Env.getAD_Client_ID(Env.getCtx()));
@ -301,16 +322,14 @@ public class WFEditor extends ADForm {
image.setTooltiptext(node.getHelp(true));
}
image.setAttribute("AD_WF_Node_ID", node.getAD_WF_Node_ID());
if (node.getAD_Client_ID() == Env.getAD_Client_ID(Env.getCtx())) {
image.addEventListener(Events.ON_CLICK, new EventListener() {
public void onEvent(Event event) throws Exception {
showNodeMenu(event.getTarget());
}
});
image.setDraggable("WFNode");
imgStyle = imgStyle + ";cursor:pointer";
}
image.addEventListener(Events.ON_CLICK, new EventListener() {
public void onEvent(Event event) throws Exception {
showNodeMenu(event.getTarget());
}
});
image.setDraggable("WFNode");
imgStyle = imgStyle + ";cursor:pointer";
}
else
{
@ -352,28 +371,43 @@ public class WFEditor extends ADForm {
Menupopup popupMenu = new Menupopup();
if (node.getAD_Client_ID() == Env.getAD_Client_ID(Env.getCtx()))
{
// Zoom
addMenuItem(popupMenu, Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Zoom")), node, WFPopupItem.WFPOPUPITEM_ZOOM);
// Properties
addMenuItem(popupMenu, Msg.getMsg(Env.getCtx(), "Properties"), node, WFPopupItem.WFPOPUPITEM_PROPERTIES);
// Delete node
String title = Msg.getMsg(Env.getCtx(), "DeleteNode") +
": " + node.getName();
addMenuItem(popupMenu, title, node, -1);
addMenuItem(popupMenu, title, node, WFPopupItem.WFPOPUPITEM_DELETENODE);
}
MWFNode[] nodes = m_wf.getNodes(true, Env.getAD_Client_ID(Env.getCtx()));
MWFNodeNext[] lines = node.getTransitions(Env.getAD_Client_ID(Env.getCtx()));
// Add New Line
for (int n = 0; n < nodes.length; n++)
for (MWFNode nn : nodes)
{
MWFNode nn = nodes[n];
if (nn.getAD_WF_Node_ID() == node.getAD_WF_Node_ID())
continue; // same
if (nn.getAD_WF_Node_ID() == node.getAD_Workflow().getAD_WF_Node_ID())
continue; // don't add line to starting node
boolean found = false;
for (int i = 0; i < lines.length; i++)
for (MWFNodeNext line : lines)
{
MWFNodeNext line = lines[i];
if (nn.getAD_WF_Node_ID() == line.getAD_WF_Next_ID())
{
found = true;
found = true; // line already exists
break;
}
}
if (!found) {
// Check that inverse line doesn't exist
for (MWFNodeNext revline : nn.getTransitions(Env.getAD_Client_ID(Env.getCtx()))) {
if (node.getAD_WF_Node_ID() == revline.getAD_WF_Next_ID())
{
found = true; // inverse line already exists
break;
}
}
}
if (!found)
{
String title = Msg.getMsg(Env.getCtx(), "AddLine")
@ -382,9 +416,8 @@ public class WFEditor extends ADForm {
}
}
// Delete Lines
for (int i = 0; i < lines.length; i++)
for (MWFNodeNext line : lines)
{
MWFNodeNext line = lines[i];
if (line.getAD_Client_ID() != Env.getAD_Client_ID(Env.getCtx()))
continue;
MWFNode next = MWFNode.get(Env.getCtx(), line.getAD_WF_Next_ID());

View File

@ -1,17 +1,37 @@
package org.adempiere.webui.apps.wf;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
import org.compiere.model.MQuery;
import org.compiere.model.MTable;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.wf.MWFNode;
import org.compiere.wf.MWFNodeNext;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Hbox;
import org.zkoss.zul.Label;
import org.zkoss.zul.Menuitem;
import org.zkoss.zul.Separator;
import org.zkoss.zul.Space;
import org.zkoss.zul.Vbox;
public class WFPopupItem extends Menuitem {
/**
*
*
*/
private static final long serialVersionUID = 4634863991042969718L;
private static final long serialVersionUID = -8409752634782368108L;
public static final int WFPOPUPITEM_DELETENODE = -1;
public static final int WFPOPUPITEM_PROPERTIES = -2;
public static final int WFPOPUPITEM_ZOOM = -3;
private int m_AD_Workflow_ID;
private static final CLogger log = CLogger.getCLogger(WFPopupItem.class);
@ -39,6 +59,7 @@ public class WFPopupItem extends Menuitem {
{
super (title);
m_line = line;
m_AD_Workflow_ID = line.getAD_WF_Node().getAD_Workflow_ID();
} // WFPopupItem
/** The Node */
@ -61,23 +82,101 @@ public class WFPopupItem extends Menuitem {
newLine.setClientOrg(AD_Client_ID, 0);
newLine.saveEx();
log.info("Add Line to " + m_node + " -> " + newLine);
wfp.reload(m_AD_Workflow_ID);
wfp.reload(m_AD_Workflow_ID, true);
}
// Edit Properties
else if (m_node != null && m_AD_WF_NodeTo_ID == WFPOPUPITEM_PROPERTIES)
{
editNode(wfp);
}
// Zoom to Node
else if (m_node != null && m_AD_WF_NodeTo_ID == WFPOPUPITEM_ZOOM)
{
int AD_Window_ID = MTable.get(Env.getCtx(), MWFNode.Table_ID).getAD_Window_ID();
if (AD_Window_ID > 0) {
MQuery query = new MQuery();
query.setZoomColumnName("AD_WF_Node_ID");
//remove _ID to get table name
query.setZoomTableName("AD_WF_Node");
query.setZoomValue(m_node.getAD_WF_Node_ID());
query.addRestriction("AD_WF_Node_ID", MQuery.EQUAL, m_node.getAD_WF_Node_ID());
query.setRecordCount(1); // guess
AEnv.zoom(AD_Window_ID, query);
}
}
// Delete Node
else if (m_node != null && m_AD_WF_NodeTo_ID == -1)
else if (m_node != null && m_AD_WF_NodeTo_ID == WFPOPUPITEM_DELETENODE)
{
log.info("Delete Node: " + m_node);
m_node.delete(false);
wfp.reload(m_AD_Workflow_ID);
wfp.reload(m_AD_Workflow_ID, true);
}
// Delete Line
else if (m_line != null)
{
log.info("Delete Line: " + m_line);
m_line.delete(false);
wfp.reload(m_AD_Workflow_ID);
wfp.reload(m_AD_Workflow_ID, true);
}
else
log.warning("No Action??");
} // execute
private void editNode(final WFEditor wfp) {
String title = Msg.getMsg(Env.getCtx(), "Properties");
final Window w = new Window();
w.setTitle(title);
Vbox vbox = new Vbox();
w.appendChild(vbox);
vbox.appendChild(new Separator());
// Name
String labelName = Msg.getElement(Env.getCtx(), MWFNode.COLUMNNAME_Name);
Hbox hboxName = new Hbox();
hboxName.appendChild(new Label(labelName));
hboxName.appendChild(new Space());
final Textbox textName = new Textbox(m_node.getName());
hboxName.appendChild(textName);
vbox.appendChild(hboxName);
// Description
String labelDescription = Msg.getElement(Env.getCtx(), MWFNode.COLUMNNAME_Description);
Hbox hboxDescription = new Hbox();
hboxDescription.appendChild(new Label(labelDescription));
hboxDescription.appendChild(new Space());
final Textbox textDescription = new Textbox(m_node.getDescription());
hboxDescription.appendChild(textDescription);
vbox.appendChild(hboxDescription);
//
vbox.appendChild(new Separator());
final ConfirmPanel panel = new ConfirmPanel(true, false, false, false, false, false, false);
vbox.appendChild(panel);
panel.addActionListener(Events.ON_CLICK, new EventListener() {
public void onEvent(Event event) throws Exception {
if (event.getTarget() == panel.getButton(ConfirmPanel.A_CANCEL)) {
textName.setText("");
}
w.onClose();
}
});
w.setWidth("250px");
w.setBorder("normal");
w.setPage(this.getPage());
w.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
String name = textName.getText();
if (name != null && name.length() > 0)
{
m_node.setName(name);
m_node.setDescription(textDescription.getText());
m_node.saveEx();
wfp.reload(m_AD_Workflow_ID, false);
}
}
});
w.doHighlighted();
}
}

View File

@ -0,0 +1,97 @@
/******************************************************************************
* Copyright (C) 2012 Carlos Ruiz *
* Copyright (C) 2012 Trek Global *
* Product: iDempiere ERP & CRM Smart Business Solution *
* 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. *
*****************************************************************************/
package org.compiere.apps.form;
import java.util.List;
import org.adempiere.model.MWizardProcess;
import org.compiere.model.Query;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.wf.MWFNode;
import org.compiere.wf.MWorkflow;
/**
* Model for Setup Wizard
*
* @author Carlos Ruiz
*
*/
public class SetupWizard
{
/** Logger */
public static CLogger log = CLogger.getCLogger(SetupWizard.class);
public MWFNode m_node;
/**
* Get the number of workflow wizard nodes
*/
public int getNodesCnt() {
/* TODO: SaaS filter */
final String sql = "SELECT COUNT(1) " +
"FROM AD_Workflow w " +
"JOIN AD_WF_Node n ON (n.AD_Workflow_ID=w.AD_Workflow_ID) " +
"WHERE w.WorkflowType='W' " + // Wizard
"AND w.IsActive='Y' " +
"AND n.IsActive='Y'";
return DB.getSQLValue(null, sql);
}
/**
* Get the number of wizard nodes that has been finished or skipped by user
*/
public int getWizardCnt() {
/* TODO: SaaS filter */
final String sql = "SELECT COUNT(DISTINCT z.AD_WF_Node_ID) " +
"FROM AD_Workflow w " +
"JOIN AD_WF_Node n ON (n.AD_Workflow_ID=w.AD_Workflow_ID) " +
"JOIN AD_WizardProcess z ON (n.AD_WF_Node_ID=z.AD_WF_Node_ID) " +
"WHERE w.WorkflowType='W' " + // Wizard
"AND w.IsActive='Y' " +
"AND n.IsActive='Y' " +
"AND z.AD_Client_ID=" + Env.getAD_Client_ID(Env.getCtx()) +
" AND z.IsActive='Y' " +
"AND z.WizardStatus IN ('F','S')"; // Finished/Skipped
return DB.getSQLValue(null, sql);
}
public List<MWorkflow> getWfWizards() {
/* TODO: SaaS filter */
return new Query(Env.getCtx(), MWorkflow.Table_Name, "WorkflowType=? AND IsActive='Y' AND AD_Client_ID IN (0, ?)", null)
.setParameters(MWorkflow.WORKFLOWTYPE_Wizard, Env.getAD_Client_ID(Env.getCtx()))
.setOnlyActiveRecords(true)
.setOrderBy(MWorkflow.COLUMNNAME_Priority)
.list();
}
public void save(String note, String wizardStatus) {
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), m_node.getAD_WF_Node_ID(), Env.getAD_Client_ID(Env.getCtx()));
if (note != null && note.length() == 0)
note = null;
if (wizardStatus != null && wizardStatus.length() == 0)
wizardStatus = null;
if ((wp.getNote() == null && note != null) || (note != null && !note.equals(wp.getNote())))
wp.setNote(note);
if ((wp.getWizardStatus() == null && wizardStatus != null) || (wizardStatus != null && !wizardStatus.equals(wp.getWizardStatus())))
wp.setWizardStatus(wizardStatus);
if (wp.is_Changed())
wp.saveEx();
}
} // SetupWizard

View File

@ -0,0 +1,76 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* 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 *
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
* Contributor(s): Victor Perez www.e-evolution.com *
*****************************************************************************/
package org.compiere.apps.form;
import java.util.List;
import java.util.Properties;
import org.compiere.apps.form.TreeMaintenance;
import org.compiere.model.MProduct;
import org.compiere.model.MUOM;
import org.compiere.model.Query;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.eevolution.model.MPPProductBOM;
import org.eevolution.model.MPPProductBOMLine;
import org.eevolution.model.X_PP_Product_BOM;
public class TreeBOM {
public static CLogger log = CLogger.getCLogger(TreeMaintenance.class);
public Properties getCtx() {
return Env.getCtx();
}
/**
* get Product Summary
* @param product Product
* @param isLeaf is Leaf
* @return String
*/
public String productSummary(MProduct product, boolean isLeaf) {
MUOM uom = MUOM.get(getCtx(), product.getC_UOM_ID());
String value = product.getValue();
String name = product.get_Translation(MProduct.COLUMNNAME_Name);
//
StringBuffer sb = new StringBuffer(value);
if (name != null && !value.equals(name))
sb.append("_").append(product.getName());
sb.append(" [").append(uom.get_Translation(MUOM.COLUMNNAME_UOMSymbol)).append("]");
//
return sb.toString();
}
/**
* get Product Summary
* @param bom Product BOM
* @return String
*/
public String productSummary(MPPProductBOM bom) {
String value = bom.getValue();
String name = bom.get_Translation(MPPProductBOM.COLUMNNAME_Name);
//
StringBuffer sb = new StringBuffer(value);
if (name != null && !name.equals(value))
sb.append("_").append(name);
//
return sb.toString();
}
}