IDEMPIERE-1459 Improving performance on InfoWindows
This commit is contained in:
parent
648146e876
commit
01410e176e
|
@ -5,7 +5,7 @@ SELECT
|
||||||
ms.IsActive, ms.Created, ms.CreatedBy, ms.Updated, ms.UpdatedBy,
|
ms.IsActive, ms.Created, ms.CreatedBy, ms.Updated, ms.UpdatedBy,
|
||||||
mp.VALUE, mp.help, (ms.qtyonhand - ms.qtyreserved) AS qtyavailable, ms.qtyonhand,
|
mp.VALUE, mp.help, (ms.qtyonhand - ms.qtyreserved) AS qtyavailable, ms.qtyonhand,
|
||||||
ms.qtyreserved, mp.description, mw.NAME AS warehouse, mw.m_warehouse_id, mw.ad_client_id,
|
ms.qtyreserved, mp.description, mw.NAME AS warehouse, mw.m_warehouse_id, mw.ad_client_id,
|
||||||
mw.ad_org_id, mp.documentnote
|
mw.ad_org_id, mp.documentnote, mp.m_product_id
|
||||||
FROM M_STORAGE ms
|
FROM M_STORAGE ms
|
||||||
JOIN M_PRODUCT mp ON ms.m_product_id = mp.m_product_id
|
JOIN M_PRODUCT mp ON ms.m_product_id = mp.m_product_id
|
||||||
JOIN M_LOCATOR ml ON ms.m_locator_id = ml.m_locator_id
|
JOIN M_LOCATOR ml ON ms.m_locator_id = ml.m_locator_id
|
||||||
|
|
|
@ -16,7 +16,7 @@ AS
|
||||||
s.m_attributesetinstance_id,
|
s.m_attributesetinstance_id,
|
||||||
s.m_storageonhand_uu AS m_storage_uu
|
s.m_storageonhand_uu AS m_storage_uu
|
||||||
FROM m_storageonhand s
|
FROM m_storageonhand s
|
||||||
UNION
|
UNION ALL
|
||||||
SELECT sr.m_product_id,
|
SELECT sr.m_product_id,
|
||||||
w.m_reservelocator_id AS m_locator_id,
|
w.m_reservelocator_id AS m_locator_id,
|
||||||
sr.ad_client_id,
|
sr.ad_client_id,
|
||||||
|
@ -36,7 +36,7 @@ AS
|
||||||
JOIN m_warehouse w
|
JOIN m_warehouse w
|
||||||
ON sr.m_warehouse_id = w.m_warehouse_id
|
ON sr.m_warehouse_id = w.m_warehouse_id
|
||||||
WHERE sr.issotrx = 'Y'
|
WHERE sr.issotrx = 'Y'
|
||||||
UNION
|
UNION ALL
|
||||||
SELECT so.m_product_id,
|
SELECT so.m_product_id,
|
||||||
w.m_reservelocator_id AS m_locator_id,
|
w.m_reservelocator_id AS m_locator_id,
|
||||||
so.ad_client_id,
|
so.ad_client_id,
|
||||||
|
|
|
@ -5,7 +5,7 @@ SELECT
|
||||||
ms.IsActive, ms.Created, ms.CreatedBy, ms.Updated, ms.UpdatedBy,
|
ms.IsActive, ms.Created, ms.CreatedBy, ms.Updated, ms.UpdatedBy,
|
||||||
mp.VALUE, mp.help, (ms.qtyonhand - ms.qtyreserved) AS qtyavailable, ms.qtyonhand,
|
mp.VALUE, mp.help, (ms.qtyonhand - ms.qtyreserved) AS qtyavailable, ms.qtyonhand,
|
||||||
ms.qtyreserved, mp.description, mw.NAME AS warehouse, mw.m_warehouse_id, mw.ad_client_id,
|
ms.qtyreserved, mp.description, mw.NAME AS warehouse, mw.m_warehouse_id, mw.ad_client_id,
|
||||||
mw.ad_org_id, mp.documentnote
|
mw.ad_org_id, mp.documentnote, mp.m_product_id
|
||||||
FROM M_STORAGE ms
|
FROM M_STORAGE ms
|
||||||
JOIN M_PRODUCT mp ON ms.m_product_id = mp.m_product_id
|
JOIN M_PRODUCT mp ON ms.m_product_id = mp.m_product_id
|
||||||
JOIN M_LOCATOR ml ON ms.m_locator_id = ml.m_locator_id
|
JOIN M_LOCATOR ml ON ms.m_locator_id = ml.m_locator_id
|
||||||
|
|
|
@ -16,7 +16,7 @@ AS
|
||||||
s.m_attributesetinstance_id,
|
s.m_attributesetinstance_id,
|
||||||
s.m_storageonhand_uu AS m_storage_uu
|
s.m_storageonhand_uu AS m_storage_uu
|
||||||
FROM m_storageonhand s
|
FROM m_storageonhand s
|
||||||
UNION
|
UNION ALL
|
||||||
SELECT sr.m_product_id,
|
SELECT sr.m_product_id,
|
||||||
w.m_reservelocator_id AS m_locator_id,
|
w.m_reservelocator_id AS m_locator_id,
|
||||||
sr.ad_client_id,
|
sr.ad_client_id,
|
||||||
|
@ -36,7 +36,7 @@ AS
|
||||||
JOIN m_warehouse w
|
JOIN m_warehouse w
|
||||||
ON sr.m_warehouse_id = w.m_warehouse_id
|
ON sr.m_warehouse_id = w.m_warehouse_id
|
||||||
WHERE sr.issotrx = 'Y'
|
WHERE sr.issotrx = 'Y'
|
||||||
UNION
|
UNION ALL
|
||||||
SELECT so.m_product_id,
|
SELECT so.m_product_id,
|
||||||
w.m_reservelocator_id AS m_locator_id,
|
w.m_reservelocator_id AS m_locator_id,
|
||||||
so.ad_client_id,
|
so.ad_client_id,
|
||||||
|
|
Loading…
Reference in New Issue