summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-daily
diff options
context:
space:
mode:
Diffstat (limited to 'FS/bin/freeside-daily')
-rwxr-xr-xFS/bin/freeside-daily13
1 files changed, 13 insertions, 0 deletions
diff --git a/FS/bin/freeside-daily b/FS/bin/freeside-daily
index 589af8998..603da12b8 100755
--- a/FS/bin/freeside-daily
+++ b/FS/bin/freeside-daily
@@ -89,6 +89,19 @@ foreach $cust_main ( @cust_main ) {
$cust_main->custnum. ": $error"
if $error;
}
+ # $^T not $time because -d is for pre-printing invoices
+ foreach my $cust_pkg (
+ grep { $_->part_pkg->is_prepaid
+ && $_->bill && $_->bill < $^T && ! $_->susp
+ }
+ $cust_main->ncancelled_pkgs
+ ) {
+ my $error = $cust_pkg->suspend;
+ warn "Error suspending package ". $cust_pkg->pkgnum.
+ " for custnum ". $cust_main->custnum.
+ ": $error"
+ if $error;
+ }
my $error = $cust_main->bill( 'time' => $time,
'resetup' => $opt_s, );