use Modern::Perl;
+use C4::Auth qw(haspermission);
use C4::Context;
use C4::Dates qw(format_date format_date_in_iso);
use Date::Calc qw(:all);
return $sth->fetchrow_array;
}
+=head2 can_edit_subscription
+
+ $can = can_edit_subscription( $subscriptionid[, $userid] );
+
+Return 1 if the subscription is editable by the current logged user (or a given $userid), else 0.
+
+=cut
+
sub can_edit_subscription {
my ( $subscription, $userid ) = @_;
my $flags = C4::Context->userenv->{flags};