diff options
author | jeff <jeff> | 2009-09-28 15:55:12 +0000 |
---|---|---|
committer | jeff <jeff> | 2009-09-28 15:55:12 +0000 |
commit | 1425c9ef765b7fe350dafd5534bc70d20a6ff0ee (patch) | |
tree | 3bef22fe8d162361467ade1218bda115f6a8eb91 | |
parent | 8800e519dc0e4b8eee4ab2cddc74d52c205bc536 (diff) |
use object copy when billing on cancel to avoid very weird side effects ( including 'impossible' history ) RT#5723
-rw-r--r-- | FS/FS/cust_pkg.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index e7f84845f..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" |