Fixes Issue 28544.
authorDavid Miguelez <david.miguelez@openbravo.com>
Thu, 08 Jan 2015 17:07:41 +0100
changeset 25738 2cccc3703759
parent 25737 21b419419ea0
child 25739 a43106669a02
Fixes Issue 28544.

In Reset Unit Cost Process, now takes into account that Organization
parameter can be null in a Query.
src-db/database/model/functions/M_INITIALIZE_STOCK_VALUATION.xml
--- a/src-db/database/model/functions/M_INITIALIZE_STOCK_VALUATION.xml	Thu Nov 13 13:15:11 2014 -0500
+++ b/src-db/database/model/functions/M_INITIALIZE_STOCK_VALUATION.xml	Thu Jan 08 17:07:41 2015 +0100
@@ -58,7 +58,7 @@
     FOR Cur_products IN (
         SELECT m_product_id
         FROM m_product
-        WHERE AD_ORG_ISINNATURALTREE(ad_org_id, p_org, p_client) ='Y'
+        WHERE (AD_ORG_ISINNATURALTREE(ad_org_id, p_org, p_client) ='Y' OR p_org IS NULL)
           AND ad_client_id = p_client
           AND isstocked = 'Y'
           AND producttype = 'I'