r20742 - gnucash/trunk/src/engine - Follow up on bug #650598 - Cannot Enter Nth Day of Month Scheduled

Geert Janssens gjanssens at code.gnucash.org
Thu Jun 9 11:17:16 EDT 2011


Author: gjanssens
Date: 2011-06-09 11:17:16 -0400 (Thu, 09 Jun 2011)
New Revision: 20742
Trac: http://svn.gnucash.org/trac/changeset/20742

Modified:
   gnucash/trunk/src/engine/Recurrence.c
Log:
Follow up on bug #650598 - Cannot Enter Nth Day of Month Scheduled
Transactions

Modified: gnucash/trunk/src/engine/Recurrence.c
===================================================================
--- gnucash/trunk/src/engine/Recurrence.c	2011-06-09 00:29:41 UTC (rev 20741)
+++ gnucash/trunk/src/engine/Recurrence.c	2011-06-09 15:17:16 UTC (rev 20742)
@@ -273,7 +273,8 @@
         else if ( g_date_is_last_of_month(next) ||
                   ((pt == PERIOD_MONTH || pt == PERIOD_YEAR) &&
                    g_date_get_day(next) >= g_date_get_day(start)) ||
-                  ((pt == PERIOD_NTH_WEEKDAY || pt == PERIOD_LAST_WEEKDAY)) )
+                  ((pt == PERIOD_NTH_WEEKDAY || pt == PERIOD_LAST_WEEKDAY) &&
+                    nth_weekday_compare(start, next, pt) <= 0) )
             g_date_add_months(next, mult);
         else
             /* one fewer month fwd because of the occurrence in this month */



More information about the gnucash-changes mailing list