" AND ( cancel IS NULL OR cancel = 0)"
} )
) {
- my $error = $cust_pkg->suspend;
- warn "Error suspended package ". $cust_pkg->pkgnum.
+
+ my $action = $cust_pkg->part_pkg->option('recur_action') || 'suspend';
+
+ my $error = $cust_pkg->$action();
+
+ warn "Error ${action}ing package ". $cust_pkg->pkgnum.
" for custnum ". $cust_pkg->custnum.
": $error\n"
if $error;
=head1 DESCRIPTION
-Runs continuously and suspendes any prepaid customer packages which have
-passed their renewal date (next bill date).
+Runs continuously and suspends or cancels any prepaid customer packages which
+have passed their renewal date (next bill date).
=head1 SEE ALSO