details:   https://code.openbravo.com/erp/devel/pi/rev/9574e17af819
changeset: 17587:9574e17af819
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Wed Aug 01 14:25:58 2012 +0200
summary:   issue 20926: Generate Average Cost
process should not consider elements in closed periods to be unposted

diffstat:

 src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 441f08ff52d8 -r 9574e17af819 
src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml
--- a/src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml      Wed Aug 
01 13:07:52 2012 +0200
+++ b/src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml      Wed Aug 
01 14:25:58 2012 +0200
@@ -148,6 +148,7 @@
       IF (v_MinDateCosting IS NULL OR v_MinFirstInOut < v_MinDateCosting) THEN
         v_MinDateCosting := v_MinFirstInOut;
       END IF;
+    END IF;
 
       SELECT GREATEST(MAX(enddate),v_MinDateCosting) ENDDATE
       INTO v_MinDateCosting 
@@ -159,8 +160,6 @@
                                WHERE c_period_id=cp.c_period_id AND 
periodstatus='O')
             ) periodClosed;
        
-    END IF;
-
     v_CheckResultStr := '';
    IF (NOT v_doNothing) THEN
     SELECT MAX(MOVEMENTDATE) INTO v_Date FROM M_MOVEMENT WHERE 
AD_CLIENT_ID=v_Client AND POSTED='Y';

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to