+% my $qual_result = $export->qual_result($qual);
+% if ($qual_result->{'pkglist'}) { # one of the possible formats (?)
+ <B>Qualifying Packages</B> - click to order
+% my $svcpart = '';
+% my $pkglist = $qual_result->{'pkglist'};
+% my $cust_or_prospect = $qual->cust_or_prospect;
+% my $locationnum = '';
+% my %location = $qual->location_hash;
+% my $locationnum = $location{'locationnum'};
+ <UL>
+% foreach my $pkgpart ( keys %$pkglist ) {
+ <LI>
+
+% if($cust_or_prospect->custnum) {
+
+% my %opt = ( 'label' => $pkglist->{$pkgpart},
+% 'lock_pkgpart' => $pkgpart,
+% 'lock_locationnum' => $location{'locationnum'},
+% 'qualnum' => $qual->qualnum,
+% );
+% if ( $export->exporttype eq 'ikano' ) {
+% my $pkg_svc = qsearchs('pkg_svc', { 'pkgpart' => $pkgpart,
+% 'primary_svc' => 'Y',
+% }
+% );
+% $opt{'svcpart'} = $pkg_svc->svcpart if $pkg_svc;
+% }
+
+ <& /elements/order_pkg_link.html,
+ 'cust_main' => $cust_or_prospect,
+ %opt
+ &>
+
+% } elsif ($cust_or_prospect->prospectnum) {
+
+% my $link = "${p}edit/cust_main.cgi?qualnum=". $qual->qualnum.
+% ";lock_pkgpart=$pkgpart";
+ <A HREF="<% $link %>"><% $pkglist->{$pkgpart} |h %></A>
+
+% }
+ </LI>
+% }
+ </UL>
+% }
+
+% my $not_avail = $qual_result->{'not_avail'};
+% if ( keys %$not_avail ) {
+ <BR>
+ Qualifying vendor packages (not yet configured in any package definition):
+ <% join(', ', map $not_avail->{$_}, keys %$not_avail ) |h %>
+% }
+