Fix problems in old migration scripts (found same problems on each migration)
This commit is contained in:
parent
92dc282c1c
commit
4627fb819f
|
@ -18,16 +18,6 @@ CREATE VIEW "RV_PP_PRODUCT_BOMLINE" ("SEQNO", "LEVELNO", "LEVELS", "AD_CLIENT_ID
|
||||||
LEFT JOIN pp_product_bomline bl ON t.pp_product_bomline_id = bl.pp_product_bomline_id
|
LEFT JOIN pp_product_bomline bl ON t.pp_product_bomline_id = bl.pp_product_bomline_id
|
||||||
ORDER BY t.seqno;
|
ORDER BY t.seqno;
|
||||||
|
|
||||||
-- May 12, 2008 1:58:58 PM EST
|
|
||||||
-- BF1949804 Broken Report - MultiLevel BOM & Formula Detail
|
|
||||||
DELETE FROM AD_Element_Trl WHERE AD_Element_ID=1000003
|
|
||||||
;
|
|
||||||
|
|
||||||
-- May 12, 2008 1:58:58 PM EST
|
|
||||||
-- BF1949804 Broken Report - MultiLevel BOM & Formula Detail
|
|
||||||
DELETE FROM AD_Element WHERE AD_Element_ID=1000003
|
|
||||||
;
|
|
||||||
|
|
||||||
-- May 12, 2008 2:01:04 PM EST
|
-- May 12, 2008 2:01:04 PM EST
|
||||||
-- BF1949804 Broken Report - MultiLevel BOM & Formula Detail
|
-- BF1949804 Broken Report - MultiLevel BOM & Formula Detail
|
||||||
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53466,0,'Implotion',TO_DATE('2008-05-12 14:01:03','YYYY-MM-DD HH24:MI:SS'),100,'Implosion of a Bill of Materials refers to finding all the BOM''''s in which a component is used.','EE01','Commonly called a Where-Used report.','Y','Implotion','Implosion',TO_DATE('2008-05-12 14:01:03','YYYY-MM-DD HH24:MI:SS'),100)
|
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53466,0,'Implotion',TO_DATE('2008-05-12 14:01:03','YYYY-MM-DD HH24:MI:SS'),100,'Implosion of a Bill of Materials refers to finding all the BOM''''s in which a component is used.','EE01','Commonly called a Where-Used report.','Y','Implotion','Implosion',TO_DATE('2008-05-12 14:01:03','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
|
|
@ -224,6 +224,16 @@ INSERT INTO AD_Ref_List (Created,CreatedBy,Updated,UpdatedBy,AD_Org_ID,AD_Ref_Li
|
||||||
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) 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 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=53239 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
|
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) 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 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=53239 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
-- Mar 23, 2008 8:42:23 PM CST
|
||||||
|
-- Human Resource & Payroll
|
||||||
|
INSERT INTO AD_EntityType (AD_Client_ID,AD_EntityType_ID,AD_Org_ID,Created,CreatedBy,Description,EntityType,Help,IsActive,ModelPackage,Name,Processing,Updated,UpdatedBy,Version) VALUES (0,50005,0,TO_TIMESTAMP('2008-03-23 20:42:22','YYYY-MM-DD HH24:MI:SS'),100,'Libero Human Resource & Payroll','EE02','Project
|
||||||
|
http://www.adempiere.com/wiki/index.php/Sponsored_Development:_Libero_HR_%26_Payroll
|
||||||
|
Overview
|
||||||
|
http://www.adempiere.com/wiki/images/3/32/Payroll.pdf
|
||||||
|
|
||||||
|
Sponsored Development www.e-evolution.com','Y','org.eevolution.model','e-Evolution Libero Human Resource & Payroll','N',TO_TIMESTAMP('2008-03-23 20:42:22','YYYY-MM-DD HH24:MI:SS'),100,'1.00')
|
||||||
|
;
|
||||||
|
|
||||||
INSERT INTO AD_Ref_List (Created,CreatedBy,Updated,UpdatedBy,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Value,Name,IsActive,AD_Client_ID,EntityType) VALUES (TO_TIMESTAMP('2007-12-16 22:24:22','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2007-12-16 22:24:22','YYYY-MM-DD HH24:MI:SS'),0,0,53240,183,'HRP','HRPayroll','Y',0,'EE02')
|
INSERT INTO AD_Ref_List (Created,CreatedBy,Updated,UpdatedBy,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Value,Name,IsActive,AD_Client_ID,EntityType) VALUES (TO_TIMESTAMP('2007-12-16 22:24:22','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2007-12-16 22:24:22','YYYY-MM-DD HH24:MI:SS'),0,0,53240,183,'HRP','HRPayroll','Y',0,'EE02')
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
-- Mar 23, 2008 8:42:23 PM CST
|
-- Mar 23, 2008 8:42:23 PM CST
|
||||||
-- Human Resource & Payroll
|
-- Human Resource & Payroll
|
||||||
INSERT INTO AD_EntityType (AD_Client_ID,AD_EntityType_ID,AD_Org_ID,Created,CreatedBy,Description,EntityType,Help,IsActive,ModelPackage,Name,Processing,Updated,UpdatedBy,Version) VALUES (0,50005,0,TO_TIMESTAMP('2008-03-23 20:42:22','YYYY-MM-DD HH24:MI:SS'),100,'Libero Human Resource & Payroll','EE02','Project
|
-- INSERT INTO AD_EntityType (AD_Client_ID,AD_EntityType_ID,AD_Org_ID,Created,CreatedBy,Description,EntityType,Help,IsActive,ModelPackage,Name,Processing,Updated,UpdatedBy,Version) VALUES (0,50005,0,TO_TIMESTAMP('2008-03-23 20:42:22','YYYY-MM-DD HH24:MI:SS'),100,'Libero Human Resource & Payroll','EE02','Project
|
||||||
http://www.adempiere.com/wiki/index.php/Sponsored_Development:_Libero_HR_%26_Payroll
|
-- http://www.adempiere.com/wiki/index.php/Sponsored_Development:_Libero_HR_%26_Payroll
|
||||||
Overview
|
-- Overview
|
||||||
http://www.adempiere.com/wiki/images/3/32/Payroll.pdf
|
-- http://www.adempiere.com/wiki/images/3/32/Payroll.pdf
|
||||||
|
--
|
||||||
Sponsored Development www.e-evolution.com','Y','org.eevolution.model','e-Evolution Libero Human Resource & Payroll','N',TO_TIMESTAMP('2008-03-23 20:42:22','YYYY-MM-DD HH24:MI:SS'),100,'1.00')
|
-- Sponsored Development www.e-evolution.com','Y','org.eevolution.model','e-Evolution Libero Human Resource & Payroll','N',TO_TIMESTAMP('2008-03-23 20:42:22','YYYY-MM-DD HH24:MI:SS'),100,'1.00')
|
||||||
;
|
-- ;
|
||||||
|
|
||||||
-- Mar 23, 2008 8:44:14 PM CST
|
-- Mar 23, 2008 8:44:14 PM CST
|
||||||
-- Human Resource & Payroll
|
-- Human Resource & Payroll
|
||||||
|
|
|
@ -18,16 +18,6 @@ CREATE VIEW "rv_pp_product_bomline" ("seqno", "levelno", "levels", "ad_client_id
|
||||||
LEFT JOIN pp_product_bomline bl ON t.pp_product_bomline_id = bl.pp_product_bomline_id
|
LEFT JOIN pp_product_bomline bl ON t.pp_product_bomline_id = bl.pp_product_bomline_id
|
||||||
ORDER BY t.seqno;
|
ORDER BY t.seqno;
|
||||||
|
|
||||||
-- May 12, 2008 1:58:58 PM EST
|
|
||||||
-- BF1949804 Broken Report - MultiLevel BOM & Formula Detail
|
|
||||||
DELETE FROM AD_Element_Trl WHERE AD_Element_ID=1000003
|
|
||||||
;
|
|
||||||
|
|
||||||
-- May 12, 2008 1:58:58 PM EST
|
|
||||||
-- BF1949804 Broken Report - MultiLevel BOM & Formula Detail
|
|
||||||
DELETE FROM AD_Element WHERE AD_Element_ID=1000003
|
|
||||||
;
|
|
||||||
|
|
||||||
-- May 12, 2008 2:01:04 PM EST
|
-- May 12, 2008 2:01:04 PM EST
|
||||||
-- BF1949804 Broken Report - MultiLevel BOM & Formula Detail
|
-- BF1949804 Broken Report - MultiLevel BOM & Formula Detail
|
||||||
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53466,0,'Implotion',TO_TIMESTAMP('2008-05-12 14:01:03','YYYY-MM-DD HH24:MI:SS'),100,'Implosion of a Bill of Materials refers to finding all the BOM''''s in which a component is used.','EE01','Commonly called a Where-Used report.','Y','Implotion','Implosion',TO_TIMESTAMP('2008-05-12 14:01:03','YYYY-MM-DD HH24:MI:SS'),100)
|
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53466,0,'Implotion',TO_TIMESTAMP('2008-05-12 14:01:03','YYYY-MM-DD HH24:MI:SS'),100,'Implosion of a Bill of Materials refers to finding all the BOM''''s in which a component is used.','EE01','Commonly called a Where-Used report.','Y','Implotion','Implosion',TO_TIMESTAMP('2008-05-12 14:01:03','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
|
|
@ -399,6 +399,56 @@ INSERT INTO t_alter_column values('PP_MRP','OrderType','character varying(3)',nu
|
||||||
|
|
||||||
INSERT INTO t_alter_column values('PP_MRP','TypeMRP','char(1)',null,'NULL');
|
INSERT INTO t_alter_column values('PP_MRP','TypeMRP','char(1)',null,'NULL');
|
||||||
|
|
||||||
|
/*
|
||||||
|
*This file is part of Adempiere ERP Bazaar
|
||||||
|
*http://www.adempiere.org
|
||||||
|
*Copyright (C) 2006-2008 Antonio Cañaveral, e-Evolution
|
||||||
|
*
|
||||||
|
*This program is free software; you can redistribute it and/or
|
||||||
|
*modify it under the terms of the GNU General Public License
|
||||||
|
*as published by the Free Software Foundation; either version 2
|
||||||
|
*of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
*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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.of
|
||||||
|
* Return the Document for Dcocument Type
|
||||||
|
*/
|
||||||
|
create or replace FUNCTION documentNo
|
||||||
|
(
|
||||||
|
p_PP_MRP_ID IN PP_MRP.PP_MRP_ID%TYPE
|
||||||
|
)
|
||||||
|
RETURNS PP_MRP.Value%TYPE
|
||||||
|
AS
|
||||||
|
$BODY$
|
||||||
|
DECLARE
|
||||||
|
v_DocumentNo PP_MRP.Value%TYPE := '';
|
||||||
|
BEGIN
|
||||||
|
-- If NO id return empty string
|
||||||
|
IF p_PP_MRP_ID <= 0 THEN
|
||||||
|
RETURN '';
|
||||||
|
END IF;
|
||||||
|
SELECT --ordertype, m_forecast_id, c_order_id, dd_order_id, pp_order_id, m_requisition_id,
|
||||||
|
CASE
|
||||||
|
WHEN trim(mrp.ordertype) = 'FTC' THEN (SELECT f.Name FROM M_Forecast f WHERE f.M_Forecast_ID=mrp.M_Forecast_ID)
|
||||||
|
WHEN trim(mrp.ordertype) = 'POO' THEN (SELECT co.DocumentNo FROM C_Order co WHERE co.C_Order_ID=mrp.C_Order_ID)
|
||||||
|
WHEN trim(mrp.ordertype) = 'DOO' THEN (SELECT dd.DocumentNo FROM DD_Order dd WHERE dd.DD_Order_ID=mrp.DD_Order_ID)
|
||||||
|
WHEN trim(mrp.ordertype) = 'SOO' THEN (SELECT co.DocumentNo FROM C_Order co WHERE co.C_Order_ID=mrp.C_Order_ID)
|
||||||
|
WHEN trim(mrp.ordertype) = 'MOP' THEN (SELECT po.DocumentNo FROM PP_Order po WHERE po.PP_Order_ID=mrp.PP_Order_ID)
|
||||||
|
WHEN trim(mrp.ordertype) = 'POR' THEN (SELECT r.DocumentNo FROM M_Requisition r WHERE r.M_Requisition_ID=mrp.M_Requisition_ID)
|
||||||
|
|
||||||
|
END INTO v_DocumentNo
|
||||||
|
FROM pp_mrp mrp
|
||||||
|
WHERE mrp.pp_mrp_id = p_PP_MRP_ID;
|
||||||
|
RETURN v_DocumentNo;
|
||||||
|
END;
|
||||||
|
$BODY$
|
||||||
|
LANGUAGE 'plpgsql' ;
|
||||||
|
|
||||||
DROP VIEW rv_pp_mrp;
|
DROP VIEW rv_pp_mrp;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
-- missing function nextIDfunc
|
-- missing function nextIDfunc
|
||||||
CREATE OR REPLACE FUNCTION nextIDfunc(AD_Sequence_ID INTEGER, System VARCHAR)
|
-- CREATE OR REPLACE FUNCTION nextIDfunc(AD_Sequence_ID INTEGER, System VARCHAR)
|
||||||
RETURNS INTEGER
|
-- RETURNS INTEGER
|
||||||
AS 'org.compiere.sqlj.Adempiere.nextIDfunc(int,java.lang.String)'
|
-- AS 'org.compiere.sqlj.Adempiere.nextIDfunc(int,java.lang.String)'
|
||||||
LANGUAGE java VOLATILE;
|
-- LANGUAGE java VOLATILE;
|
||||||
|
|
||||||
ALTER FUNCTION nextIDfunc(AD_Sequence_ID INTEGER, System VARCHAR) OWNER TO adempiere;
|
-- ALTER FUNCTION nextIDfunc(AD_Sequence_ID INTEGER, System VARCHAR) OWNER TO adempiere;
|
||||||
|
|
|
@ -8927,116 +8927,11 @@ DELETE FROM PP_MRP WHERE OrderType = 'MOP' AND DocStatus='CL' AND AD_Client_ID=1
|
||||||
DELETE FROM PP_MRP WHERE OrderType = 'POR' AND DocStatus='CL' AND AD_Client_ID = 11 AND AD_Org_ID=50001 AND M_Warehouse_ID=50002 AND S_Resource_ID=50000
|
DELETE FROM PP_MRP WHERE OrderType = 'POR' AND DocStatus='CL' AND AD_Client_ID = 11 AND AD_Org_ID=50001 AND M_Warehouse_ID=50002 AND S_Resource_ID=50000
|
||||||
;
|
;
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:05 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order_Node WHERE PP_Order_Node_ID=1000000
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:05 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order_Workflow WHERE PP_Order_Workflow_ID=1000000
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:06 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order_BOMLine WHERE PP_Order_BOMLine_ID=1000000
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:06 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order_BOMLine WHERE PP_Order_BOMLine_ID=1000001
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:06 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order_BOM WHERE PP_Order_BOM_ID=1000000
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:06 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_MRP WHERE PP_Order_ID = 1000000 AND AD_Client_ID = 11
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:06 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order WHERE PP_Order_ID=1000000
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:06 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order_Node WHERE PP_Order_Node_ID=1000001
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:07 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order_Workflow WHERE PP_Order_Workflow_ID=1000001
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:07 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order_BOMLine WHERE PP_Order_BOMLine_ID=1000002
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:07 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order_BOMLine WHERE PP_Order_BOMLine_ID=1000003
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:07 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order_BOM WHERE PP_Order_BOM_ID=1000001
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:07 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_MRP WHERE PP_Order_ID = 1000001 AND AD_Client_ID = 11
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:07 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
DELETE FROM PP_Order WHERE PP_Order_ID=1000001
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:07 PM CDT
|
-- Sep 25, 2008 6:02:07 PM CDT
|
||||||
-- Manufacturing Demo
|
-- Manufacturing Demo
|
||||||
UPDATE PP_MRP SET IsAvailable ='Y' WHERE TypeMRP = 'S' AND AD_Client_ID = 11 AND AD_Org_ID=50001 AND M_Warehouse_ID=50002
|
UPDATE PP_MRP SET IsAvailable ='Y' WHERE TypeMRP = 'S' AND AD_Client_ID = 11 AND AD_Org_ID=50001 AND M_Warehouse_ID=50002
|
||||||
;
|
;
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:17 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
INSERT INTO AD_Note (AD_Client_ID,AD_Message_ID,AD_Note_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,IsActive,Processed,Processing,Record_ID,Reference,TextMsg,Updated,UpdatedBy) VALUES (11,53013,50000,50006,53043,TO_DATE('2008-09-25 18:02:07','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N',1001224,'Fertilizer#50 Fertilizer #50','Expedite
|
|
||||||
|
|
||||||
Indicates that a scheduled supply order is due after is needed and should be rescheduled to an earlier date or demand rescheduled to a later date.',TO_DATE('2008-09-25 18:02:07','YYYY-MM-DD HH24:MI:SS'),100)
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:18 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
INSERT INTO AD_Note (AD_Client_ID,AD_Message_ID,AD_Note_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,IsActive,Processed,Processing,Record_ID,Reference,TextMsg,Updated,UpdatedBy) VALUES (11,53013,50001,50006,53043,TO_DATE('2008-09-25 18:02:17','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N',1001234,'Fertilizer#50 Fertilizer #50','Expedite
|
|
||||||
|
|
||||||
Indicates that a scheduled supply order is due after is needed and should be rescheduled to an earlier date or demand rescheduled to a later date.',TO_DATE('2008-09-25 18:02:17','YYYY-MM-DD HH24:MI:SS'),100)
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:19 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
INSERT INTO AD_Note (AD_Client_ID,AD_Message_ID,AD_Note_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,IsActive,Processed,Processing,Record_ID,Reference,TextMsg,Updated,UpdatedBy) VALUES (11,53013,50002,50006,53043,TO_DATE('2008-09-25 18:02:18','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N',1001228,'Fertilizer#50 Fertilizer #50','Expedite
|
|
||||||
|
|
||||||
Indicates that a scheduled supply order is due after is needed and should be rescheduled to an earlier date or demand rescheduled to a later date.',TO_DATE('2008-09-25 18:02:18','YYYY-MM-DD HH24:MI:SS'),100)
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:21 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
INSERT INTO AD_Note (AD_Client_ID,AD_Message_ID,AD_Note_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,IsActive,Processed,Processing,Record_ID,Reference,TextMsg,Updated,UpdatedBy) VALUES (11,53013,50003,50006,53043,TO_DATE('2008-09-25 18:02:19','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N',1001230,'Fertilizer#50 Fertilizer #50','Expedite
|
|
||||||
|
|
||||||
Indicates that a scheduled supply order is due after is needed and should be rescheduled to an earlier date or demand rescheduled to a later date.',TO_DATE('2008-09-25 18:02:19','YYYY-MM-DD HH24:MI:SS'),100)
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:22 PM CDT
|
|
||||||
-- Manufacturing Demo
|
|
||||||
INSERT INTO AD_Note (AD_Client_ID,AD_Message_ID,AD_Note_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,IsActive,Processed,Processing,Record_ID,Reference,TextMsg,Updated,UpdatedBy) VALUES (11,53013,50004,50006,53043,TO_DATE('2008-09-25 18:02:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N',1001232,'Fertilizer#50 Fertilizer #50','Expedite
|
|
||||||
|
|
||||||
Indicates that a scheduled supply order is due after is needed and should be rescheduled to an earlier date or demand rescheduled to a later date.',TO_DATE('2008-09-25 18:02:21','YYYY-MM-DD HH24:MI:SS'),100)
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Sep 25, 2008 6:02:23 PM CDT
|
-- Sep 25, 2008 6:02:23 PM CDT
|
||||||
-- Manufacturing Demo
|
-- Manufacturing Demo
|
||||||
INSERT INTO PP_Order (AD_Client_ID,AD_Org_ID,AD_Workflow_ID,C_DocTypeTarget_ID,C_DocType_ID,C_UOM_ID,Created,CreatedBy,DateFinishSchedule,DateOrdered,DatePromised,DateStartSchedule,DocAction,DocStatus,DocumentNo,IsActive,IsApproved,IsPrinted,IsSOTrx,IsSelected,Line,M_Product_ID,M_Warehouse_ID,PP_Order_ID,PP_Product_BOM_ID,Planner_ID,Posted,PriorityRule,Processed,Processing,QtyBatchSize,QtyBatchs,QtyDelivered,QtyEntered,QtyOrdered,QtyReject,QtyScrap,S_Resource_ID,ScheduleType,Updated,UpdatedBy,Yield) VALUES (11,50006,50017,50002,50002,100,TO_DATE('2008-09-25 18:02:22','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2008-08-17 00:00:00','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2008-09-25 18:02:02','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2008-08-17 00:00:00','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2008-08-16 00:00:00','YYYY-MM-DD HH24:MI:SS'),'CO','DR','8000','Y','N','N','N','N',10,136,50002,50000,50004,101,'N','5','N','N',100.000000000000,1,0,100.000000000000,100.000000000000,0,0,50000,'D',TO_DATE('2008-09-25 18:02:22','YYYY-MM-DD HH24:MI:SS'),100,0)
|
INSERT INTO PP_Order (AD_Client_ID,AD_Org_ID,AD_Workflow_ID,C_DocTypeTarget_ID,C_DocType_ID,C_UOM_ID,Created,CreatedBy,DateFinishSchedule,DateOrdered,DatePromised,DateStartSchedule,DocAction,DocStatus,DocumentNo,IsActive,IsApproved,IsPrinted,IsSOTrx,IsSelected,Line,M_Product_ID,M_Warehouse_ID,PP_Order_ID,PP_Product_BOM_ID,Planner_ID,Posted,PriorityRule,Processed,Processing,QtyBatchSize,QtyBatchs,QtyDelivered,QtyEntered,QtyOrdered,QtyReject,QtyScrap,S_Resource_ID,ScheduleType,Updated,UpdatedBy,Yield) VALUES (11,50006,50017,50002,50002,100,TO_DATE('2008-09-25 18:02:22','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2008-08-17 00:00:00','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2008-09-25 18:02:02','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2008-08-17 00:00:00','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2008-08-16 00:00:00','YYYY-MM-DD HH24:MI:SS'),'CO','DR','8000','Y','N','N','N','N',10,136,50002,50000,50004,101,'N','5','N','N',100.000000000000,1,0,100.000000000000,100.000000000000,0,0,50000,'D',TO_DATE('2008-09-25 18:02:22','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
|
|
@ -259,58 +259,6 @@ $BODY$
|
||||||
LANGUAGE 'plpgsql' ;
|
LANGUAGE 'plpgsql' ;
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
*This file is part of Adempiere ERP Bazaar
|
|
||||||
*http://www.adempiere.org
|
|
||||||
*Copyright (C) 2006-2008 Antonio Cañaveral, e-Evolution
|
|
||||||
*
|
|
||||||
*This program is free software; you can redistribute it and/or
|
|
||||||
*modify it under the terms of the GNU General Public License
|
|
||||||
*as published by the Free Software Foundation; either version 2
|
|
||||||
*of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
*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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.of
|
|
||||||
* Return the Document for Dcocument Type
|
|
||||||
*/
|
|
||||||
create or replace FUNCTION documentNo
|
|
||||||
(
|
|
||||||
p_PP_MRP_ID IN PP_MRP.PP_MRP_ID%TYPE
|
|
||||||
)
|
|
||||||
RETURNS PP_MRP.Value%TYPE
|
|
||||||
AS
|
|
||||||
$BODY$
|
|
||||||
DECLARE
|
|
||||||
v_DocumentNo PP_MRP.Value%TYPE := '';
|
|
||||||
BEGIN
|
|
||||||
-- If NO id return empty string
|
|
||||||
IF p_PP_MRP_ID <= 0 THEN
|
|
||||||
RETURN '';
|
|
||||||
END IF;
|
|
||||||
SELECT --ordertype, m_forecast_id, c_order_id, dd_order_id, pp_order_id, m_requisition_id,
|
|
||||||
CASE
|
|
||||||
WHEN trim(mrp.ordertype) = 'FTC' THEN (SELECT f.Name FROM M_Forecast f WHERE f.M_Forecast_ID=mrp.M_Forecast_ID)
|
|
||||||
WHEN trim(mrp.ordertype) = 'POO' THEN (SELECT co.DocumentNo FROM C_Order co WHERE co.C_Order_ID=mrp.C_Order_ID)
|
|
||||||
WHEN trim(mrp.ordertype) = 'DOO' THEN (SELECT dd.DocumentNo FROM DD_Order dd WHERE dd.DD_Order_ID=mrp.DD_Order_ID)
|
|
||||||
WHEN trim(mrp.ordertype) = 'SOO' THEN (SELECT co.DocumentNo FROM C_Order co WHERE co.C_Order_ID=mrp.C_Order_ID)
|
|
||||||
WHEN trim(mrp.ordertype) = 'MOP' THEN (SELECT po.DocumentNo FROM PP_Order po WHERE po.PP_Order_ID=mrp.PP_Order_ID)
|
|
||||||
WHEN trim(mrp.ordertype) = 'POR' THEN (SELECT r.DocumentNo FROM M_Requisition r WHERE r.M_Requisition_ID=mrp.M_Requisition_ID)
|
|
||||||
|
|
||||||
END INTO v_DocumentNo
|
|
||||||
FROM pp_mrp mrp
|
|
||||||
WHERE mrp.pp_mrp_id = p_PP_MRP_ID;
|
|
||||||
RETURN v_DocumentNo;
|
|
||||||
END;
|
|
||||||
$BODY$
|
|
||||||
LANGUAGE 'plpgsql' ;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION nextidfunc(
|
CREATE OR REPLACE FUNCTION nextidfunc(
|
||||||
p_AD_Sequence_ID IN INTEGER,
|
p_AD_Sequence_ID IN INTEGER,
|
||||||
p_System IN VARCHAR
|
p_System IN VARCHAR
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
-- 18.12.2008 16:48:43 EET
|
-- 18.12.2008 16:48:43 EET
|
||||||
-- FR [ 2445409 ] Translate Info MRP
|
-- FR [ 2445409 ] Translate Info MRP
|
||||||
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53717,0,'QtyGrossReq',TO_TIMESTAMP('2008-12-18 16:48:41','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','Gross Requirements Qty','Gross Req.',TO_TIMESTAMP('2008-12-18 16:48:41','YYYY-MM-DD HH24:MI:SS'),0)
|
-- INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53717,0,'QtyGrossReq',TO_TIMESTAMP('2008-12-18 16:48:41','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','Gross Requirements Qty','Gross Req.',TO_TIMESTAMP('2008-12-18 16:48:41','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
;
|
-- ;
|
||||||
|
|
||||||
-- 18.12.2008 16:48:43 EET
|
-- 18.12.2008 16:48:43 EET
|
||||||
-- FR [ 2445409 ] Translate Info MRP
|
-- FR [ 2445409 ] Translate Info MRP
|
||||||
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=53717 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
-- 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=53717 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||||
;
|
-- ;
|
||||||
|
|
||||||
-- 18.12.2008 16:50:31 EET
|
-- 18.12.2008 16:50:31 EET
|
||||||
-- FR [ 2445409 ] Translate Info MRP
|
-- FR [ 2445409 ] Translate Info MRP
|
||||||
|
|
Loading…
Reference in New Issue