IDEMPIERE-1963 Implement Generate Shipments (manual) as Info Window / Oracle fix (#1404)
This commit is contained in:
parent
96e0870efd
commit
b0e7389f0a
|
@ -189,7 +189,7 @@ UPDATE AD_ViewColumn SET SeqNo=160,Updated=TO_TIMESTAMP('2022-07-14 11:56:10','Y
|
|||
DROP VIEW M_InOut_Candidate_v
|
||||
;
|
||||
|
||||
-- Jul 20, 2022, 2:21:32 PM CEST
|
||||
-- Jul 20, 2022, 4:04:11 PM CEST
|
||||
CREATE OR REPLACE VIEW M_InOut_Candidate_v(AD_Client_ID, AD_Org_ID, Created, Updated, IsActive, C_BPartner_ID, C_Order_ID, DocumentNo, DateOrdered, C_DocType_ID, POReference, Description, SalesRep_ID, M_Warehouse_ID, M_InOut_ID, TotalLines, DocSource, M_InOut_Candidate_v_ID, DeliveryRule) AS SELECT o.ad_client_id AS AD_Client_ID, o.ad_org_id AS AD_Org_ID, o.created AS Created, o.updated AS Updated, o.isactive AS IsActive, o.c_bpartner_id AS C_BPartner_ID, o.c_order_id AS C_Order_ID, o.documentno AS DocumentNo, o.dateordered AS DateOrdered, o.c_doctype_id AS C_DocType_ID, o.poreference AS POReference, o.description AS Description, o.salesrep_id AS SalesRep_ID, l.m_warehouse_id AS M_Warehouse_ID, NULL AS M_InOut_ID, sum((l.qtyordered - l.qtydelivered) * l.priceactual) AS TotalLines, 'O' AS DocSource, o.c_order_id AS M_InOut_Candidate_v_ID, o.deliveryrule AS DeliveryRule FROM c_order o
|
||||
JOIN c_orderline l ON o.c_order_id = l.c_order_id WHERE o.docstatus = 'CO' AND o.isdelivered = 'N' AND (o.c_doctype_id IN ( SELECT c_doctype.c_doctype_id
|
||||
FROM c_doctype
|
||||
|
@ -198,7 +198,8 @@ JOIN c_orderline l ON o.c_order_id = l.c_order_id WHERE o.docstatus = 'CO' AND o
|
|||
WHERE l.m_product_id = p.m_product_id AND p.isexcludeautodelivery = 'N'))) AND l.qtyordered <> l.qtydelivered AND (l.m_product_id IS NOT NULL OR l.c_charge_id IS NOT NULL) AND NOT (EXISTS ( SELECT 1
|
||||
FROM m_inoutline iol
|
||||
JOIN m_inout io ON iol.m_inout_id = io.m_inout_id
|
||||
WHERE iol.c_orderline_id = l.c_orderline_id AND (io.docstatus IN ('DR', 'IN', 'IP', 'WC')))) GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered, o.c_doctype_id, o.poreference, o.description, o.salesrep_id, l.m_warehouse_id UNION ALL SELECT rma.ad_client_id AS AD_Client_ID, rma.ad_org_id AS AD_Org_ID, rma.created AS Created, rma.updated AS Updated, rma.isactive AS IsActive, rma.c_bpartner_id AS C_BPartner_ID, rma.c_order_id AS C_Order_ID, rma.documentno AS DocumentNo, rma.created AS DateOrdered, rma.c_doctype_id AS C_DocType_ID, NULL AS POReference, NULL AS Description, NULL AS SalesRep_ID, io.m_warehouse_id AS M_Warehouse_ID, rma.inout_id AS M_InOut_ID, rma.amt AS TotalLines, 'R' AS DocSource, rma.inout_id AS M_InOut_Candidate_v_ID, NULL AS DeliveryRule FROM m_rma RMA
|
||||
WHERE iol.c_orderline_id = l.c_orderline_id AND (io.docstatus IN ('DR', 'IN', 'IP', 'WC')))) GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered, o.c_doctype_id, o.poreference, o.description, o.salesrep_id, l.m_warehouse_id, o.created, o.updated, o.isactive, o.deliveryrule
|
||||
UNION ALL SELECT rma.ad_client_id AS AD_Client_ID, rma.ad_org_id AS AD_Org_ID, rma.created AS Created, rma.updated AS Updated, rma.isactive AS IsActive, rma.c_bpartner_id AS C_BPartner_ID, rma.c_order_id AS C_Order_ID, rma.documentno AS DocumentNo, rma.created AS DateOrdered, rma.c_doctype_id AS C_DocType_ID, NULL AS POReference, NULL AS Description, NULL AS SalesRep_ID, io.m_warehouse_id AS M_Warehouse_ID, rma.inout_id AS M_InOut_ID, rma.amt AS TotalLines, 'R' AS DocSource, rma.inout_id AS M_InOut_Candidate_v_ID, NULL AS DeliveryRule FROM m_rma RMA
|
||||
INNER JOIN ad_org ORG ON RMA.ad_org_id = ORG.ad_org_id
|
||||
INNER JOIN c_doctype DT ON RMA.c_doctype_id = DT.c_doctype_id
|
||||
INNER JOIN c_bpartner BP ON RMA.c_bpartner_id = BP.c_bpartner_id
|
||||
|
@ -585,6 +586,11 @@ INSERT INTO AD_ViewColumn (AD_Client_ID,AD_Org_ID,AD_ViewColumn_ID,AD_ViewColumn
|
|||
INSERT INTO AD_ViewColumn (AD_Client_ID,AD_Org_ID,AD_ViewColumn_ID,AD_ViewColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_ViewComponent_ID,ColumnName,ColumnSQL,SeqNo) VALUES (0,0,217383,'1a10e02e-37b3-4295-b606-9ec604819372',TO_TIMESTAMP('2022-07-18 11:18:48','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2022-07-18 11:18:48','YYYY-MM-DD HH24:MI:SS'),100,200065,'DeliveryRule','o.deliveryrule',190)
|
||||
;
|
||||
|
||||
-- Jul 20, 2022, 4:04:06 PM CEST
|
||||
UPDATE AD_ViewComponent SET OtherClause='GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered, o.c_doctype_id, o.poreference, o.description, o.salesrep_id, l.m_warehouse_id, o.created, o.updated, o.isactive, o.deliveryrule
|
||||
',Updated=TO_TIMESTAMP('2022-07-20 16:04:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewComponent_ID=200065
|
||||
;
|
||||
|
||||
-- Jul 18, 2022, 11:19:15 AM CEST
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215061,0,'Delivery Rule','Defines the timing of Delivery','The Delivery Rule indicates when an order should be delivered. For example should the order be delivered when the entire order is complete, when a line is complete or as the products become available.',200309,'DeliveryRule',1,'N','N','N','N','N',0,'N',17,151,0,0,'Y',TO_TIMESTAMP('2022-07-18 11:19:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-07-18 11:19:15','YYYY-MM-DD HH24:MI:SS'),100,555,'N','N','D','N','N','N','Y','43e1ba5e-0212-4467-861b-09b869aa892e','Y',0,'N','N','N')
|
||||
;
|
||||
|
|
|
@ -186,8 +186,8 @@ UPDATE AD_ViewColumn SET SeqNo=160,Updated=TO_TIMESTAMP('2022-07-14 11:56:10','Y
|
|||
DROP VIEW M_InOut_Candidate_v
|
||||
;
|
||||
|
||||
-- Jul 20, 2022, 2:21:32 PM CEST
|
||||
CREATE OR REPLACE VIEW M_InOut_Candidate_v(AD_Client_ID, AD_Org_ID, Created, Updated, IsActive, C_BPartner_ID, C_Order_ID, DocumentNo, DateOrdered, C_DocType_ID, POReference, Description, SalesRep_ID, M_Warehouse_ID, M_InOut_ID, TotalLines, DocSource, M_InOut_Candidate_v_ID, DeliveryRule) AS SELECT o.ad_client_id AS AD_Client_ID, o.ad_org_id AS AD_Org_ID, o.created AS Created, o.updated AS Updated, o.isactive AS IsActive, o.c_bpartner_id AS C_BPartner_ID, o.c_order_id AS C_Order_ID, o.documentno AS DocumentNo, o.dateordered AS DateOrdered, o.c_doctype_id AS C_DocType_ID, o.poreference AS POReference, o.description AS Description, o.salesrep_id AS SalesRep_ID, l.m_warehouse_id AS M_Warehouse_ID, NULL AS M_InOut_ID, sum((l.qtyordered - l.qtydelivered) * l.priceactual) AS TotalLines, 'O' AS DocSource, o.c_order_id AS M_InOut_Candidate_v_ID, o.deliveryrule AS DeliveryRule FROM c_order o JOIN c_orderline l ON o.c_order_id = l.c_order_id WHERE o.docstatus = 'CO' AND o.isdelivered = 'N' AND (o.c_doctype_id IN ( SELECT c_doctype.c_doctype_id FROM c_doctype WHERE c_doctype.docbasetype = 'SOO' AND (c_doctype.docsubtypeso NOT IN ('ON', 'OB', 'WR')))) AND o.deliveryrule <> 'M' AND (l.m_product_id IS NULL OR (EXISTS ( SELECT 1 FROM m_product p WHERE l.m_product_id = p.m_product_id AND p.isexcludeautodelivery = 'N'))) AND l.qtyordered <> l.qtydelivered AND (l.m_product_id IS NOT NULL OR l.c_charge_id IS NOT NULL) AND NOT (EXISTS ( SELECT 1 FROM m_inoutline iol JOIN m_inout io ON iol.m_inout_id = io.m_inout_id WHERE iol.c_orderline_id = l.c_orderline_id AND (io.docstatus IN ('DR', 'IN', 'IP', 'WC')))) GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered, o.c_doctype_id, o.poreference, o.description, o.salesrep_id, l.m_warehouse_id UNION ALL SELECT rma.ad_client_id AS AD_Client_ID, rma.ad_org_id AS AD_Org_ID, rma.created AS Created, rma.updated AS Updated, rma.isactive AS IsActive, rma.c_bpartner_id AS C_BPartner_ID, rma.c_order_id AS C_Order_ID, rma.documentno AS DocumentNo, rma.created AS DateOrdered, rma.c_doctype_id AS C_DocType_ID, NULL AS POReference, NULL AS Description, NULL AS SalesRep_ID, io.m_warehouse_id AS M_Warehouse_ID, rma.inout_id AS M_InOut_ID, rma.amt AS TotalLines, 'R' AS DocSource, rma.inout_id AS M_InOut_Candidate_v_ID, NULL AS DeliveryRule FROM m_rma RMA INNER JOIN ad_org ORG ON RMA.ad_org_id = ORG.ad_org_id INNER JOIN c_doctype DT ON RMA.c_doctype_id = DT.c_doctype_id INNER JOIN c_bpartner BP ON RMA.c_bpartner_id = BP.c_bpartner_id INNER JOIN m_inout IO ON RMA.inout_id = IO.m_inout_id WHERE RMA.docstatus = 'CO' AND DT.docbasetype = 'POO' AND EXISTS (SELECT 1 FROM m_rma R INNER JOIN m_rmaline RL ON R.m_rma_id = RL.m_rma_id WHERE R.m_rma_id = RMA.m_rma_id AND RL.isactive = 'Y' AND RL.m_inoutline_id > 0 AND RL.qtydelivered < RL.qty) AND NOT EXISTS (SELECT 1 FROM m_inout OIO WHERE OIO.m_rma_id = RMA.m_rma_id AND OIO.docstatus IN ( 'IP', 'CO', 'CL' ))
|
||||
-- Jul 20, 2022, 4:04:11 PM CEST
|
||||
CREATE OR REPLACE VIEW M_InOut_Candidate_v(AD_Client_ID, AD_Org_ID, Created, Updated, IsActive, C_BPartner_ID, C_Order_ID, DocumentNo, DateOrdered, C_DocType_ID, POReference, Description, SalesRep_ID, M_Warehouse_ID, M_InOut_ID, TotalLines, DocSource, M_InOut_Candidate_v_ID, DeliveryRule) AS SELECT o.ad_client_id AS AD_Client_ID, o.ad_org_id AS AD_Org_ID, o.created AS Created, o.updated AS Updated, o.isactive AS IsActive, o.c_bpartner_id AS C_BPartner_ID, o.c_order_id AS C_Order_ID, o.documentno AS DocumentNo, o.dateordered AS DateOrdered, o.c_doctype_id AS C_DocType_ID, o.poreference AS POReference, o.description AS Description, o.salesrep_id AS SalesRep_ID, l.m_warehouse_id AS M_Warehouse_ID, NULL AS M_InOut_ID, sum((l.qtyordered - l.qtydelivered) * l.priceactual) AS TotalLines, 'O' AS DocSource, o.c_order_id AS M_InOut_Candidate_v_ID, o.deliveryrule AS DeliveryRule FROM c_order o JOIN c_orderline l ON o.c_order_id = l.c_order_id WHERE o.docstatus = 'CO' AND o.isdelivered = 'N' AND (o.c_doctype_id IN ( SELECT c_doctype.c_doctype_id FROM c_doctype WHERE c_doctype.docbasetype = 'SOO' AND (c_doctype.docsubtypeso NOT IN ('ON', 'OB', 'WR')))) AND o.deliveryrule <> 'M' AND (l.m_product_id IS NULL OR (EXISTS ( SELECT 1 FROM m_product p WHERE l.m_product_id = p.m_product_id AND p.isexcludeautodelivery = 'N'))) AND l.qtyordered <> l.qtydelivered AND (l.m_product_id IS NOT NULL OR l.c_charge_id IS NOT NULL) AND NOT (EXISTS ( SELECT 1 FROM m_inoutline iol JOIN m_inout io ON iol.m_inout_id = io.m_inout_id WHERE iol.c_orderline_id = l.c_orderline_id AND (io.docstatus IN ('DR', 'IN', 'IP', 'WC')))) GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered, o.c_doctype_id, o.poreference, o.description, o.salesrep_id, l.m_warehouse_id, o.created, o.updated, o.isactive, o.deliveryrule UNION ALL SELECT rma.ad_client_id AS AD_Client_ID, rma.ad_org_id AS AD_Org_ID, rma.created AS Created, rma.updated AS Updated, rma.isactive AS IsActive, rma.c_bpartner_id AS C_BPartner_ID, rma.c_order_id AS C_Order_ID, rma.documentno AS DocumentNo, rma.created AS DateOrdered, rma.c_doctype_id AS C_DocType_ID, NULL AS POReference, NULL AS Description, NULL AS SalesRep_ID, io.m_warehouse_id AS M_Warehouse_ID, rma.inout_id AS M_InOut_ID, rma.amt AS TotalLines, 'R' AS DocSource, rma.inout_id AS M_InOut_Candidate_v_ID, NULL AS DeliveryRule FROM m_rma RMA INNER JOIN ad_org ORG ON RMA.ad_org_id = ORG.ad_org_id INNER JOIN c_doctype DT ON RMA.c_doctype_id = DT.c_doctype_id INNER JOIN c_bpartner BP ON RMA.c_bpartner_id = BP.c_bpartner_id INNER JOIN m_inout IO ON RMA.inout_id = IO.m_inout_id WHERE RMA.docstatus = 'CO' AND DT.docbasetype = 'POO' AND EXISTS (SELECT 1 FROM m_rma R INNER JOIN m_rmaline RL ON R.m_rma_id = RL.m_rma_id WHERE R.m_rma_id = RMA.m_rma_id AND RL.isactive = 'Y' AND RL.m_inoutline_id > 0 AND RL.qtydelivered < RL.qty) AND NOT EXISTS (SELECT 1 FROM m_inout OIO WHERE OIO.m_rma_id = RMA.m_rma_id AND OIO.docstatus IN ( 'IP', 'CO', 'CL' ))
|
||||
;
|
||||
|
||||
-- Jul 14, 2022, 12:05:41 PM CEST
|
||||
|
@ -557,6 +557,11 @@ INSERT INTO AD_ViewColumn (AD_Client_ID,AD_Org_ID,AD_ViewColumn_ID,AD_ViewColumn
|
|||
INSERT INTO AD_ViewColumn (AD_Client_ID,AD_Org_ID,AD_ViewColumn_ID,AD_ViewColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_ViewComponent_ID,ColumnName,ColumnSQL,SeqNo) VALUES (0,0,217383,'1a10e02e-37b3-4295-b606-9ec604819372',TO_TIMESTAMP('2022-07-18 11:18:48','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2022-07-18 11:18:48','YYYY-MM-DD HH24:MI:SS'),100,200065,'DeliveryRule','o.deliveryrule',190)
|
||||
;
|
||||
|
||||
-- Jul 20, 2022, 4:04:06 PM CEST
|
||||
UPDATE AD_ViewComponent SET OtherClause='GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered, o.c_doctype_id, o.poreference, o.description, o.salesrep_id, l.m_warehouse_id, o.created, o.updated, o.isactive, o.deliveryrule
|
||||
',Updated=TO_TIMESTAMP('2022-07-20 16:04:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewComponent_ID=200065
|
||||
;
|
||||
|
||||
-- Jul 18, 2022, 11:19:15 AM CEST
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215061,0,'Delivery Rule','Defines the timing of Delivery','The Delivery Rule indicates when an order should be delivered. For example should the order be delivered when the entire order is complete, when a line is complete or as the products become available.',200309,'DeliveryRule',1,'N','N','N','N','N',0,'N',17,151,0,0,'Y',TO_TIMESTAMP('2022-07-18 11:19:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-07-18 11:19:15','YYYY-MM-DD HH24:MI:SS'),100,555,'N','N','D','N','N','N','Y','43e1ba5e-0212-4467-861b-09b869aa892e','Y',0,'N','N','N')
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue