MRP process should not generate Requisition for By Products

http://sourceforge.net/tracker/?func=detail&atid=934929&aid=2804811&group_id=176962

And fixed the error in VIEWs TO MO
This commit is contained in:
vpj-cd 2009-06-11 17:46:41 +00:00
parent 0c592d25d0
commit 5a6b62284a
4 changed files with 49 additions and 8 deletions

View File

@ -107,9 +107,9 @@ FROM PP_Order o
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID); LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID);
/ /
DROP VIEW PP_Order_Header_v; --DROP VIEW PP_Order_Header_v;
/ --/
CREATE OR REPLACE VIEW PP_Order_Header_v CREATE OR REPLACE VIEW PP_Order_Header_vt
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
dt.AD_Language, dt.AD_Language,

View File

@ -0,0 +1,20 @@
-- Jun 11, 2009 12:06:07 PM ECT
-- Manufacturing By Product
INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53481,53225,TO_DATE('2009-06-11 12:06:05','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','Co-Product',TO_DATE('2009-06-11 12:06:05','YYYY-MM-DD HH24:MI:SS'),0,'CP')
;
-- Jun 11, 2009 12:06:07 PM ECT
-- Manufacturing By Product
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=53481 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)
;
-- Jun 11, 2009 12:06:16 PM ECT
-- Manufacturing By Product
UPDATE AD_Ref_List SET Name='By-Product',Updated=TO_DATE('2009-06-11 12:06:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53257
;
-- Jun 11, 2009 12:06:16 PM ECT
-- Manufacturing By Product
UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53257
;

View File

@ -87,7 +87,8 @@ CASE WHEN o.qtybatchs = 0 THEN 1 ELSE round(obl.qtyrequiered / o.qtybatchs, 4) E
FROM PP_Order_BOMLine obl FROM PP_Order_BOMLine obl
INNER JOIN PP_Order o ON (o.PP_Order_ID=obl.PP_Order_ID) INNER JOIN PP_Order o ON (o.PP_Order_ID=obl.PP_Order_ID)
LEFT JOIN PP_Order_BOMLine_Trl oblt ON (oblt.PP_Order_BOMLine_ID=obl.PP_Order_BOMLine_ID); LEFT JOIN PP_Order_BOMLine_Trl oblt ON (oblt.PP_Order_BOMLine_ID=obl.PP_Order_BOMLine_ID);
--DROP VIEW PP_Order_Header_v;
CREATE OR REPLACE VIEW PP_Order_Header_v CREATE OR REPLACE VIEW PP_Order_Header_v
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
@ -108,8 +109,8 @@ FROM PP_Order o
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID); LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID);
DROP VIEW PP_Order_Header_v; --DROP VIEW PP_Order_Header_vt;
CREATE OR REPLACE VIEW PP_Order_Header_v CREATE OR REPLACE VIEW PP_Order_Header_vt
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
dt.AD_Language, dt.AD_Language,
@ -214,7 +215,7 @@ FROM PP_Order o
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID); LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID);
DROP VIEW PP_Product_BOMLine_v; --DROP VIEW PP_Product_BOMLine_v;
CREATE VIEW PP_Product_BOMLine_v AS CREATE VIEW PP_Product_BOMLine_v AS
SELECT SELECT
feature , feature ,
@ -251,7 +252,7 @@ SELECT
FROM PP_Product_BOMLine bl FROM PP_Product_BOMLine bl
INNER JOIN PP_Product_BOMLine_Trl blt ON (blt.PP_Product_BOMLine_ID=bl.PP_Product_BOMLine_ID); INNER JOIN PP_Product_BOMLine_Trl blt ON (blt.PP_Product_BOMLine_ID=bl.PP_Product_BOMLine_ID);
DROP VIEW PP_Product_BOMLine_vt; --DROP VIEW PP_Product_BOMLine_vt;
CREATE VIEW PP_Product_BOMLine_vt AS CREATE VIEW PP_Product_BOMLine_vt AS
SELECT SELECT
feature , feature ,

View File

@ -0,0 +1,20 @@
-- Jun 11, 2009 12:06:07 PM ECT
-- Manufacturing By Product
INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53481,53225,TO_TIMESTAMP('2009-06-11 12:06:05','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','Co-Product',TO_TIMESTAMP('2009-06-11 12:06:05','YYYY-MM-DD HH24:MI:SS'),0,'CP')
;
-- Jun 11, 2009 12:06:07 PM ECT
-- Manufacturing By Product
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=53481 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)
;
-- Jun 11, 2009 12:06:16 PM ECT
-- Manufacturing By Product
UPDATE AD_Ref_List SET Name='By-Product',Updated=TO_TIMESTAMP('2009-06-11 12:06:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53257
;
-- Jun 11, 2009 12:06:16 PM ECT
-- Manufacturing By Product
UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53257
;