(self)
return due
if(visit/[next_visits][before_window][1]/@increment != '', @increment + last_visit_date_{form_id},
              visit/[next_visits][before_window][1]/@due != '', @due + anchor_date, MAX_DATE)
if(visit/[next_visits][before_window][1]/
if ( visit / [ next_visits ] [ before_window ] [ 1 ] /
def due_later(self):
        """if(visit/[next_visits][before_window][1]/@increment != '', @increment + last_visit_date_{form_id},
              visit/[next_visits][before_window][1]/@due != '', @due + anchor_date, MAX_DATE)
        """
        due_visit = (self.fixture.visit().
                     select_raw(self.next_visits()).
                     select_raw(self.before_window()).
                     select_raw("1"))
        due_repeat = due_visit.slash("@increment")
        due_regular = due_visit.slash("@due")
        due = (
            "if({repeat} != '', {repeat} + date({last_visit}),"
            " if({regular} != '', {regular} + date({anchor}),"
            " {max_date}))".format(
                repeat=due_repeat,
                last_visit=self.last_visit_date,
                regular=due_regular,
                anchor=self.anchor,
                max_date=SCHEDULE_MAX_DATE,)
        )
        return due
def due_later ( self ) : due_visit = ( self . fixture . visit ( ) . select_raw ( self . next_visits ( ) ) . select_raw ( self . before_window ( ) ) . select_raw ( "1" ) ) due_repeat = due_visit . slash ( "@increment" ) due_regular = due_visit . slash ( "@due" ) due = ( "if({repeat} != '', {repeat} + date({last_visit})," " if({regular} != '', {regular} + date({anchor})," " {max_date}))" . format ( repeat = due_repeat , last_visit = self . last_visit_date , regular = due_regular , anchor = self . anchor , max_date = SCHEDULE_MAX_DATE , ) ) return due