summaryrefslogtreecommitdiff
path: root/FS/FS/cust_pkg.pm
diff options
context:
space:
mode:
authorlevinse <levinse>2010-12-09 19:26:20 +0000
committerlevinse <levinse>2010-12-09 19:26:20 +0000
commit57fecbd959fd5d72b20105161b7e3df94cbedd03 (patch)
tree93c68293eeefe6a29f650ee272e93e5832168e35 /FS/FS/cust_pkg.pm
parent19f2731dbceb444c5dd45f57fb0a785dcaf9aa65 (diff)
-change ikano.pm to use the new part_pkg_vendor, RT7111
-implement service expiry and add export expire to ikano, RT7111 -fix edit part_pkg bug, RT7111
Diffstat (limited to 'FS/FS/cust_pkg.pm')
-rw-r--r--FS/FS/cust_pkg.pm20
1 files changed, 19 insertions, 1 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index e3f4777..b97bc93 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -661,7 +661,25 @@ sub cancel {
}
my %svc;
- unless ( $date ) {
+ if ( $date ) {
+ # copied from below
+ foreach my $cust_svc (
+ #schwartz
+ map { $_->[0] }
+ sort { $a->[1] <=> $b->[1] }
+ map { [ $_, $_->svc_x->table_info->{'cancel_weight'} ]; }
+ qsearch( 'cust_svc', { 'pkgnum' => $self->pkgnum } )
+ ) {
+
+ my $error = $cust_svc->cancel( ('date' => $date) );
+
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return "Error expiring cust_svc: $error";
+ }
+ }
+
+ } else {
foreach my $cust_svc (
#schwartz
map { $_->[0] }