diff options
author | Christopher Burger <burgerc@freeside.biz> | 2017-06-01 10:21:48 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2017-07-21 17:18:36 -0400 |
commit | e820c248c68a5885843a77d87fddfb26c6eb515b (patch) | |
tree | a455618bd976e773609437a0770086dbefa114db /FS | |
parent | bfc5435b9b9352a7eb62f7946cb77c5c5ebc88b9 (diff) |
RT# 73993 - Updated process to display only packages customer has access to.
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 6 |
1 files changed, 5 insertions, 1 deletions
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 }; } |