X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=e839eb93eee8b4c81eaa11a901dea3224b3bac60;hb=87b5a2f15b23247a68fd29f8c0fb5cd81ab406ba;hp=4e57fbf2d9a7c49e94054295c9c298479f96d279;hpb=d1014a727cefa5d9813153594541f62ec15fc8b9;p=freeside.git diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 4e57fbf2d..e839eb93e 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -603,8 +603,9 @@ sub cancel { #resolved by performing a change package instead (which unprovisions) and #later cancelling if ( !$options{nobill} && !$date && $conf->exists('bill_usage_on_cancel') ) { + my $copy = $self->new({$self->hash}); my $error = - $self->cust_main->bill( pkg_list => [ $self ], cancel => 1 ); + $copy->cust_main->bill( pkg_list => [ $copy ], cancel => 1 ); warn "Error billing during cancel, custnum ". #$self->cust_main->custnum. ": $error" ": $error" @@ -2476,7 +2477,7 @@ sub search_sql { @pkgpart = grep /^(\d+)$/, @pkgpart; - push @where, 'pkgpart IN ('. join(',', @pkgpart). ')'; + push @where, 'pkgpart IN ('. join(',', @pkgpart). ')' if scalar(@pkgpart); } elsif ( $params->{'pkgpart'} =~ /^(\d+)$/ ) { push @where, "pkgpart = $1";