~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to stock_schedule/schedule.py

  • Committer: chloups208
  • Date: 2011-08-23 06:36:05 UTC
  • mto: This revision was merged to the branch mainline in revision 253.
  • Revision ID: chloups208@chloups208-laptop-20110823063605-g92qqcpmnnb74iok
[UF-368]first commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
256
256
                    if start_date < today():
257
257
                        start_date = today()
258
258
                    next_date = start_date + RelativeDate(weekday=(day,frequence.monthly_choose_freq))
259
 
                    while next_date < start_date:
260
 
                        next_date = next_date + RelativeDate(months=1, weekday=(day,frequence.monthly_choose_freq))
 
259
                    if next_date < start_date:
 
260
                        next_date = start_date + RelativeDate(months=1, weekday=(day,frequence.monthly_choose_freq))
261
261
                    return next_date
262
262
 
263
263
            elif frequence.monthly_repeating_ok: