diff options
author | ivan <ivan> | 2011-01-14 02:51:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-01-14 02:51:42 +0000 |
commit | 333583673f4f44d33bea17fcfba3f078ba1e11ec (patch) | |
tree | 09fff16a49441d227dd86e84d10ceee54eddd2f0 | |
parent | 02700a6ddd090c1166deb4f6facd66dc945bd9d2 (diff) |
fix declined signup of prepaid package provisioning to RADIUS anyway, RT#10122
-rw-r--r-- | FS/FS/ClientAPI/Signup.pm | 2 | ||||
-rw-r--r-- | FS/FS/cust_main/Billing.pm | 3 | ||||
-rw-r--r-- | FS/FS/cust_pkg.pm | 5 |
3 files changed, 7 insertions, 3 deletions
diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index 7087b12a2..244332396 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -738,7 +738,7 @@ sub new_customer { #warn "$me Billing customer...\n" if $Debug; - my $bill_error = $cust_main->bill; + my $bill_error = $cust_main->bill( 'depend_jobnum'=>$placeholder->jobnum ); #warn "$me error billing new customer: $bill_error" # if $bill_error; diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm index 4b727bb7c..f7ba123f1 100644 --- a/FS/FS/cust_main/Billing.pm +++ b/FS/FS/cust_main/Billing.pm @@ -547,7 +547,7 @@ sub bill { #create the new invoice my $cust_bill = new FS::cust_bill ( { 'custnum' => $self->custnum, - '_date' => ( $invoice_time ), + '_date' => $invoice_time, 'charged' => $charged, 'billing_balance' => $balance, 'previous_balance' => $previous_balance, @@ -940,6 +940,7 @@ sub _make_lines { if $DEBUG >1; my $error = $cust_pkg->replace( $old_cust_pkg, + 'depend_jobnum'=>$options{depend_jobnum}, 'options' => { $cust_pkg->options }, ) unless $options{no_commit}; diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index d9604459f..c3d3cb98e 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -493,7 +493,10 @@ sub replace { #trigger export of new RADIUS Expiration attribute when cust_pkg.bill changes foreach my $old_svc_acct ( @svc_acct ) { my $new_svc_acct = new FS::svc_acct { $old_svc_acct->hash }; - my $s_error = $new_svc_acct->replace($old_svc_acct); + my $s_error = + $new_svc_acct->replace( $old_svc_acct, + 'depend_jobnum' => $options->{depend_jobnum}, + ); if ( $s_error ) { $dbh->rollback if $oldAutoCommit; return $s_error; |