From e5fc4f01cca3de11b2f1114efb1ff3c4cf0acc47 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 14 Jan 2011 02:51:41 +0000 Subject: [PATCH] fix declined signup of prepaid package provisioning to RADIUS anyway, RT#10122 --- FS/FS/ClientAPI/Signup.pm | 2 +- FS/FS/cust_main/Billing.pm | 3 ++- 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 7ae3d459e..c47e630c8 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, @@ -946,6 +946,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; -- 2.11.0