Fixes Issue 13870: warehouse/Storage bin for inactive organisation are selectable in screens
authorHarikrishnan Raja <harikrishnan.raja@openbravo.com>
Thu, 22 Jul 2010 09:59:28 +0530
changeset 7905 152032f5fa94
parent 7904 289974ed369e
child 7906 5013a579164c
Fixes Issue 13870: warehouse/Storage bin for inactive organisation are selectable in screens
src-db/database/sourcedata/AD_REF_TABLE.xml
src/org/openbravo/erpCommon/info/Locator_data.xsql
--- a/src-db/database/sourcedata/AD_REF_TABLE.xml	Thu Jul 22 09:56:13 2010 +0530
+++ b/src-db/database/sourcedata/AD_REF_TABLE.xml	Thu Jul 22 09:59:28 2010 +0530
@@ -619,7 +619,7 @@
 <!--197-->  <AD_KEY><![CDATA[1151]]></AD_KEY>
 <!--197-->  <AD_DISPLAY><![CDATA[1152]]></AD_DISPLAY>
 <!--197-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
-<!--197-->  <WHERECLAUSE><![CDATA[M_Warehouse.AD_Client_ID=@#AD_Client_ID@]]></WHERECLAUSE>
+<!--197-->  <WHERECLAUSE><![CDATA[M_Warehouse.AD_Client_ID=@#AD_Client_ID@ AND (select ad.isactive from ad_org ad where ad.ad_org_id = M_Warehouse.AD_Org_ID) = 'Y']]></WHERECLAUSE>
 <!--197--></AD_REF_TABLE>
 
 <!--199--><AD_REF_TABLE>
--- a/src/org/openbravo/erpCommon/info/Locator_data.xsql	Thu Jul 22 09:56:13 2010 +0530
+++ b/src/org/openbravo/erpCommon/info/Locator_data.xsql	Thu Jul 22 09:59:28 2010 +0530
@@ -32,12 +32,14 @@
         SELECT m.M_LOCATOR_ID, mw.NAME, m.VALUE, REPLACE(AD_COLUMN_IDENTIFIER(TO_CHAR('M_LOCATOR'), TO_CHAR(m.M_LOCATOR_ID), TO_CHAR(?)), '''', chr(92)||'''') AS VALUE_HIDDEN, m.PRIORITYNO, 
         m.ISDEFAULT, m.X AS aisle, m.Y AS bin, m.Z AS nivel,
         m.M_LOCATOR_ID || '#' || m.value  AS rowKey
-        FROM M_LOCATOR m, M_WAREHOUSE mw
+        FROM M_LOCATOR m, M_WAREHOUSE mw,Ad_Org ao
         WHERE m.M_WAREHOUSE_ID = mw.M_WAREHOUSE_ID
         AND mw.AD_Client_ID IN ('1') 
         AND mw.AD_Org_ID IN ('1') 
         AND mw.ISACTIVE = 'Y'
         AND m.ISACTIVE = 'Y'
+        AND ao.AD_Org_ID = m.AD_Org_ID
+        AND ao.ISACTIVE='Y'
         ORDER BY m.M_LOCATOR_ID
 		) A ) B
 		WHERE 1=1