details:   https://code.openbravo.com/erp/devel/pi/rev/8aa2fba3af35
changeset: 22668:8aa2fba3af35
user:      Jon Alegría <jon.alegria <at> openbravo.com>
date:      Mon Mar 10 17:46:23 2014 +0100
summary:   Fixes issue 0025245: Accurrals and deferrals is not working fine,
becuase the first period of the next year needs to be in the system
and not needed

diffstat:

 src/org/openbravo/erpCommon/ad_forms/DocInvoice.java |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r 12e8d6182406 -r 8aa2fba3af35 
src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java      Mon Mar 10 
17:33:26 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java      Mon Mar 10 
17:46:23 2014 +0100
@@ -1067,8 +1067,10 @@
         log4j.warn("DocInvoice - Error checking period open.", e);
         e.printStackTrace();
       }
-      period = AccDefUtility.getNextPeriod(period);
-      date = period.getEndingDate();
+      if (i < periodNumber) {
+        period = AccDefUtility.getNextPeriod(period);
+        date = period.getEndingDate();
+      }
       total = total.add(periodAmount);
       i++;
     }

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to