summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-prepaidd
diff options
context:
space:
mode:
authorivan <ivan>2006-10-22 05:18:37 +0000
committerivan <ivan>2006-10-22 05:18:37 +0000
commitdfa5a456854a8a31c671f363be9a7a7bde9b94bf (patch)
treed7b5f2c53a0fc75b397fb0b1adab8ec368849321 /FS/bin/freeside-prepaidd
parent1df4b7b2b8859ce8ae32e708d5c66477869209db (diff)
add price plan option for prepaid packages to cancel instead of suspend
Diffstat (limited to 'FS/bin/freeside-prepaidd')
-rw-r--r--FS/bin/freeside-prepaidd12
1 files changed, 8 insertions, 4 deletions
diff --git a/FS/bin/freeside-prepaidd b/FS/bin/freeside-prepaidd
index e51a563..1f57316 100644
--- a/FS/bin/freeside-prepaidd
+++ b/FS/bin/freeside-prepaidd
@@ -37,8 +37,12 @@ while (1) {
" 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;
@@ -65,8 +69,8 @@ freeside-prepaidd - Real-time daemon for prepaid packages
=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