summaryrefslogtreecommitdiff
path: root/FS/FS/ClientAPI
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2017-06-01 10:21:48 -0400
committerChristopher Burger <burgerc@freeside.biz>2017-07-21 10:44:34 -0400
commit11a4c3c59e7a21a268458b4dfd7645bbc3f772d6 (patch)
treec4a52dba5e0c2f81ad8769048837972f3abc829f /FS/FS/ClientAPI
parent5296c83881b44f7b6eea393e5e8706855d48d8fe (diff)
RT# 73993 - Updated process to display only packages customer has access to.
Diffstat (limited to 'FS/FS/ClientAPI')
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 7df481e..8c082ec 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -2581,10 +2581,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 );
@@ -2600,7 +2604,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 };
}