summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-04-26 23:26:50 -0700
committerMark Wells <mark@freeside.biz>2015-04-26 23:26:50 -0700
commit37d0fe4165cbfaf57d82f3aff926508d565759f6 (patch)
tree30e38c4045b39308668d8f29bc7d066c9888743b /FS
parent35fef4f60229db2bc540522cce1815d4a05ff283 (diff)
allow all legal packages to be chosen in selfservice quotations
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/ClientAPI/MyAccount/quotation.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/ClientAPI/MyAccount/quotation.pm b/FS/FS/ClientAPI/MyAccount/quotation.pm
index ce2debdde..90c2acebb 100644
--- a/FS/FS/ClientAPI/MyAccount/quotation.pm
+++ b/FS/FS/ClientAPI/MyAccount/quotation.pm
@@ -136,7 +136,10 @@ sub quotation_add_pkg {
my $part_pkg = FS::part_pkg->by_key($pkgpart);
- if (!$part_pkg or !$allowed_pkgpart->{$pkgpart}) {
+ if (!$part_pkg or
+ (!$allowed_pkgpart->{$pkgpart} and
+ $cust_main->agentnum != ($part_pkg->agentnum || 0))
+ ) {
warn "disallowed quotation_pkg pkgpart $pkgpart\n"
if $DEBUG;
return { 'error' => "unknown package $pkgpart" };