From 4565247d326f58c0129f11f8d8288fb75d2f0331 Mon Sep 17 00:00:00 2001 From: tspc Date: Sun, 1 Jun 2008 04:08:49 +0000 Subject: [PATCH] BF1981079 Print Multi-Level Bom --- client/src/org/eevolution/process/PrintBOM.java | 5 ++++- migration/351a-trunk/189_BF1981079_print_bom.sql | 11 +++++++++++ .../351a-trunk/postgresql/189_BF1981079_print_bom.sql | 11 +++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 migration/351a-trunk/189_BF1981079_print_bom.sql create mode 100644 migration/351a-trunk/postgresql/189_BF1981079_print_bom.sql diff --git a/client/src/org/eevolution/process/PrintBOM.java b/client/src/org/eevolution/process/PrintBOM.java index fae4013944..a044709722 100644 --- a/client/src/org/eevolution/process/PrintBOM.java +++ b/client/src/org/eevolution/process/PrintBOM.java @@ -73,7 +73,7 @@ public class PrintBOM extends SvrProcess { p_M_Product_ID = ((BigDecimal) para[i].getParameter()) .intValue(); - } else if (name.equals("Implotion")) { + } else if (name.equals("Implosion")) { p_implosion = ((String) para[i].getParameter()).equals("N") ? false : true; } @@ -108,6 +108,9 @@ public class PrintBOM extends SvrProcess { format = MPrintFormat.get(getCtx(), MPrintFormat .getPrintFormat_ID("Multi Level BOM & Formula Detail", 53063, getAD_Client_ID()), false); + if (format == null) + format = MPrintFormat.get(getCtx(), MPrintFormat + .getPrintFormat_ID("Multi Level BOM & Formula Detail", 53063, 0), false); //try client 0 format.setLanguage(language); format.setTranslationLanguage(language); // query diff --git a/migration/351a-trunk/189_BF1981079_print_bom.sql b/migration/351a-trunk/189_BF1981079_print_bom.sql new file mode 100644 index 0000000000..e60466c607 --- /dev/null +++ b/migration/351a-trunk/189_BF1981079_print_bom.sql @@ -0,0 +1,11 @@ +-- June 1, 2008 1:20:00 PM EST +-- BF1981079 - MultiLevel BOM & Formula Detail +DROP VIEW "rv_pp_product_bomline"; + +CREATE VIEW "rv_pp_product_bomline" ("seqno", "levelno", "levels", "ad_client_id", "ad_org_id", "createdby", "updatedby", "updated", "created", "ad_pinstance_id", "implosion", "m_product_id", "isactive", "pp_product_bom_id", "pp_product_bomline_id", "description", "iscritical", "componenttype", "tm_product_id", "c_uom_id", "issuemethod", "line", "m_attributesetinstance_id", "scrap", "validfrom", "validto", "qtybom", "qtybatch", "isqtypercentage") AS + SELECT t.seqno, t.levelno, t.levels, t.ad_client_id, t.ad_org_id, t.createdby, t.updatedby, t.updated, t.created, t.ad_pinstance_id, t.implosion, t.sel_product_id, bl.isactive, bl.pp_product_bom_id, bl.pp_product_bomline_id, bl.description, bl.iscritical, bl.componenttype, t.m_product_id, bl.c_uom_id, bl.issuemethod, bl.line, bl.m_attributesetinstance_id, bl.scrap, bl.validfrom, bl.validto, bl.qtybom, bl.qtybatch, bl.isqtypercentage + FROM t_bomline t + LEFT JOIN pp_product_bomline bl ON t.pp_product_bomline_id = bl.pp_product_bomline_id + ORDER BY t.seqno; + +ALTER TABLE T_BOMLine DROP COLUMN Implotion; diff --git a/migration/351a-trunk/postgresql/189_BF1981079_print_bom.sql b/migration/351a-trunk/postgresql/189_BF1981079_print_bom.sql new file mode 100644 index 0000000000..e60466c607 --- /dev/null +++ b/migration/351a-trunk/postgresql/189_BF1981079_print_bom.sql @@ -0,0 +1,11 @@ +-- June 1, 2008 1:20:00 PM EST +-- BF1981079 - MultiLevel BOM & Formula Detail +DROP VIEW "rv_pp_product_bomline"; + +CREATE VIEW "rv_pp_product_bomline" ("seqno", "levelno", "levels", "ad_client_id", "ad_org_id", "createdby", "updatedby", "updated", "created", "ad_pinstance_id", "implosion", "m_product_id", "isactive", "pp_product_bom_id", "pp_product_bomline_id", "description", "iscritical", "componenttype", "tm_product_id", "c_uom_id", "issuemethod", "line", "m_attributesetinstance_id", "scrap", "validfrom", "validto", "qtybom", "qtybatch", "isqtypercentage") AS + SELECT t.seqno, t.levelno, t.levels, t.ad_client_id, t.ad_org_id, t.createdby, t.updatedby, t.updated, t.created, t.ad_pinstance_id, t.implosion, t.sel_product_id, bl.isactive, bl.pp_product_bom_id, bl.pp_product_bomline_id, bl.description, bl.iscritical, bl.componenttype, t.m_product_id, bl.c_uom_id, bl.issuemethod, bl.line, bl.m_attributesetinstance_id, bl.scrap, bl.validfrom, bl.validto, bl.qtybom, bl.qtybatch, bl.isqtypercentage + FROM t_bomline t + LEFT JOIN pp_product_bomline bl ON t.pp_product_bomline_id = bl.pp_product_bomline_id + ORDER BY t.seqno; + +ALTER TABLE T_BOMLine DROP COLUMN Implotion;