From: ivan Date: Mon, 21 Mar 2011 02:18:52 +0000 (+0000) Subject: show un-configured ikano products, RT#7111 X-Git-Tag: freeside_2_3_0~474 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=7637f73d594307c314c844fde0b92f3d7ae282cc show un-configured ikano products, RT#7111 --- diff --git a/FS/FS/part_export/ikano.pm b/FS/FS/part_export/ikano.pm index 303952cfb..2d7688ddc 100644 --- a/FS/FS/part_export/ikano.pm +++ b/FS/FS/part_export/ikano.pm @@ -356,21 +356,27 @@ sub qual_result { } my %pkglist = (); - my $result = { 'header' => 'Qualifying Packages', - 'pkglist' => \%pkglist, - }; - + my %found = (); my @part_pkgs = qsearch( 'part_pkg', { 'disabled' => '' } ); foreach my $part_pkg ( @part_pkgs ) { my %vendor_pkg_ids = $part_pkg->vendor_pkg_ids; my $externalid = $vendor_pkg_ids{$self->exportnum} if defined $vendor_pkg_ids{$self->exportnum}; - if ( $externalid && grep( $_ eq $externalid, @externalids )) { - $pkglist{$part_pkg->pkgpart} = $part_pkg->pkg." - ".$part_pkg->comment; + if ( $externalid && grep { $_ eq $externalid } @externalids ) { + $pkglist{$part_pkg->pkgpart} = $part_pkg->pkg_comment; + $found{$externalid}++; } } - $result; + my %not_avail = (); + foreach my $externalid ( grep !$found{$_}, @externalids ) { + $not_avail{$externalid} = $externalid; #a better label? + } + + { 'header' => 'Qualifying Packages', + 'pkglist' => \%pkglist, + 'not_avail' => \%not_avail, + }; } sub quals_by_cust_and_pkg { diff --git a/httemplate/view/qual.cgi b/httemplate/view/qual.cgi index 5e706a18d..a0768c3ac 100644 --- a/httemplate/view/qual.cgi +++ b/httemplate/view/qual.cgi @@ -63,6 +63,14 @@ % } % } + +% my $not_avail = $qual_result->{'not_avail'}; +% if ( keys %$not_avail ) { +
+ Qualifying vendor packages (not yet configured in any package definition): + <% join(', ', map $not_avail->{$_}, keys %$not_avail ) |h %> +% } + % } <%init>