def set_next_date(doc, posting_date):
 if (not doc.repeat_on_day_of_month):
  msgprint(_(u"Please enter 'Repeat on Day of Month' field value"), raise_exception=1)
 next_date = get_next_date(posting_date, month_map[doc.recurring_type], cint(doc.repeat_on_day_of_month))
 doc.db_set(u'next_date', next_date)
 msgprint(_(u'Next Recurring {0} will be created on {1}').format(doc.doctype, next_date))

def set_next_date ( doc , posting_date ) : if ( not doc . repeat_on_day_of_month ) : msgprint ( _ ( u"Please enter 'Repeat on Day of Month' field value" ) , raise_exception = 1 ) next_date = get_next_date ( posting_date , month_map [ doc . recurring_type ] , cint ( doc . repeat_on_day_of_month ) ) doc . db_set ( u'next_date' , next_date ) msgprint ( _ ( u'Next Recurring {0} will be created on {1}' ) . format ( doc . doctype , next_date ) )
set next date on which recurring document will be created .