Fixes Issue 30167:Inactive products can be selected in Create Lines process
authorAtul Gaware <atul.gaware@openbravo.com>
Thu, 18 Jun 2015 21:51:53 +0530
changeset 27134 3282f8efffd9
parent 27133 f7c344c707ee
child 27135 db4b2910263f
Fixes Issue 30167:Inactive products can be selected in Create Lines process
of Purchase Order window

Added a isactive check in the where clause of the view to load only active
products.
src-db/database/model/views/M_CREATEPOLINES_PE_V.xml
--- a/src-db/database/model/views/M_CREATEPOLINES_PE_V.xml	Mon Jun 22 20:24:40 2015 +0200
+++ b/src-db/database/model/views/M_CREATEPOLINES_PE_V.xml	Thu Jun 18 21:51:53 2015 +0530
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
   <database name="VIEW M_CREATEPOLINES_PE_V">
-    <view name="M_CREATEPOLINES_PE_V"><![CDATA[SELECT pp.m_productprice_id AS m_createpolines_pe_v_id, pp.ad_client_id, pp.ad_org_id, pp.isactive, pp.created, pp.createdby, pp.updated, pp.updatedby, 'N' AS ob_selected, pp.m_product_id, plv.m_pricelist_id, pp.pricestd, NULL AS qtyordered FROM m_productprice pp JOIN m_product p ON pp.m_product_id = p.m_product_id AND COALESCE(p.isgeneric, 'N') = 'N' JOIN m_pricelist_version plv ON pp.m_pricelist_version_id = plv.m_pricelist_version_id JOIN m_pricelist pl ON pl.m_pricelist_id = plv.m_pricelist_id WHERE pl.issopricelist = 'N' AND plv.validfrom = ((SELECT max(plv2.validfrom) AS max FROM m_pricelist_version plv2 WHERE plv2.m_pricelist_id = pl.m_pricelist_id AND plv2.validfrom <= now()))]]></view>
+    <view name="M_CREATEPOLINES_PE_V"><![CDATA[SELECT pp.m_productprice_id AS m_createpolines_pe_v_id, pp.ad_client_id, pp.ad_org_id, pp.isactive, pp.created, pp.createdby, pp.updated, pp.updatedby, 'N' AS ob_selected, pp.m_product_id, plv.m_pricelist_id, pp.pricestd, NULL AS qtyordered FROM m_productprice pp JOIN m_product p ON pp.m_product_id = p.m_product_id AND COALESCE(p.isgeneric, 'N') = 'N' JOIN m_pricelist_version plv ON pp.m_pricelist_version_id = plv.m_pricelist_version_id JOIN m_pricelist pl ON pl.m_pricelist_id = plv.m_pricelist_id WHERE p.isactive = 'Y' AND pl.issopricelist = 'N' AND plv.validfrom = ((SELECT max(plv2.validfrom) AS max FROM m_pricelist_version plv2 WHERE plv2.m_pricelist_id = pl.m_pricelist_id AND plv2.validfrom <= now()))]]></view>
   </database>