my $upcoming_mem_expires = Koha::Patrons->search_upcoming_membership_expires(
{
( $branch ? ( 'me.branchcode' => $branch ) : () ),
before => $before,
before => $before ? $before : $renew ? $expdays : $before,
after => $after,
}
);
-