X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FClientAPI%2FMyAccount.pm;h=e2cce0de084207b81ee4dea5eab8b5ffeda5329e;hp=c432bb870e70f34837225cb4db831d3af1c96362;hb=e820c248c68a5885843a77d87fddfb26c6eb515b;hpb=bfc5435b9b9352a7eb62f7946cb77c5c5ebc88b9 diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index c432bb870..e2cce0de0 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -2476,10 +2476,14 @@ sub change_pkg { my $err_or_cust_pkg = $cust_pkg->change( 'pkgpart' => $p->{'pkgpart'}, 'quantity' => $p->{'quantity'} || 1, ); + + my $new_pkg = qsearchs('part_pkg', { 'pkgpart' => $p->{pkgpart} } ) + or return { 'error' => "unknown package $p->{pkgpart}" }; return { error=>$err_or_cust_pkg, pkgnum=>$cust_pkg->pkgnum } unless ref($err_or_cust_pkg); + if ( $conf->exists('signup_server-realtime') ) { my $bill_error = _do_bop_realtime( $cust_main, $status, 'no_invoice_void'=>1 ); @@ -2495,7 +2499,7 @@ sub change_pkg { $err_or_cust_pkg->reexport; } - return { error => '', pkgnum => $cust_pkg->pkgnum }; + return { error => '', pkg => $new_pkg->pkg, pkgnum => $err_or_cust_pkg->pkgnum }; }