Related to issue 20828: Depreciated lines discounted from the inserted ones.
authorIoritz Cia <ioritz.cia@openbravo.com>
Fri, 27 Jul 2012 14:27:55 +0200
changeset 17571 5f9d5073728d
parent 17570 b6862b1e8f54
child 17572 1555c04652b7
child 17573 96b2297ea85b
Related to issue 20828: Depreciated lines discounted from the inserted ones.
src-db/database/model/functions/A_ASSET_POST.xml
--- a/src-db/database/model/functions/A_ASSET_POST.xml	Sun Jul 29 18:07:15 2012 +0200
+++ b/src-db/database/model/functions/A_ASSET_POST.xml	Fri Jul 27 14:27:55 2012 +0200
@@ -371,6 +371,7 @@
                 v_PERCENTAGE:=100 - v_PERCENTAGE;
                 finish:=true;
                 FINISH_PROCESS:=true;
+                v_inserted:=v_inserted - v_depreciatedLines;
               ELSE v_AMOUNT:=v_AMORTIZATIONVALUEAMT*v_PERCENTAGE/100;
               end if;
               IF(v_AMOUNT>0) THEN