1 <% include("/elements/header.html","View Qualification") %>
3 % if ( $cust_or_prospect->get('custnum') ) {
5 <% include( '/elements/small_custview.html', $cust_or_prospect->custnum, '', 1,
6 "${p}view/cust_main.cgi") %>
8 % } elsif ( $cust_or_prospect->get('prospectnum') ) {
9 % my $prospectnum = $cust_or_prospect->get('prospectnum');
10 % my $link = "${p}view/prospect_main.html?$prospectnum";
11 <A HREF="<%$link%>">Prospect #<%$prospectnum%></A>
16 <B>Qualification #<% $qual->qualnum %></B>
17 <% ntable("#cccccc", 2) %>
18 <% include('elements/tr.html', label => 'Status', value => $qual->status_long ) %>
19 <% include('elements/tr.html', label => 'Service Telephone Number', value => $qual->phonenum || '(none - dry loop)' ) %>
20 <% include('elements/tr.html', label => 'Address', value => $location_line ) %>
21 % if ( $location_kind ) {
22 <% include('elements/tr.html', label => 'Location Kind', value => $location_kind ) %>
24 <% include('elements/tr.html', label => 'Qualified using', value => $export->exportname ) %>
25 <% include('elements/tr.html', label => 'Vendor Qualification #', value => $qual->vendor_qual_id ) %>
31 % my $qual_result = $export->qual_result($qual);
32 % if ($qual_result->{'header'}) {
33 <B><% $qual_result->{'header'} %></B>
35 % if ($qual_result->{'pkglist'}) { # one of the possible formats
37 % my $pkglist = $qual_result->{'pkglist'};
38 % my $cust_or_prospect = $qual->cust_or_prospect;
39 % my $locationnum = '';
40 % my %location = $qual->location_hash;
41 % if (%location && $location{'locationnum'}) {
42 % $locationnum = $location{'locationnum'};
45 % foreach my $pkgpart ( keys %$pkglist ) {
46 % my %opt = ( 'label' => $pkglist->{$pkgpart},
47 % 'pkgpart' => $pkgpart,
48 % 'locationnum' => $locationnum, );
49 % if ( $export->exporttype eq 'ikano' ) {
50 % my $pkg_svc = qsearchs('pkg_svc', { 'pkgpart' => $pkgpart,
51 % 'primary_svc' => 'Y',
53 % $opt{'svcpart'} = $pkg_svc->svcpart if $pkg_svc;
56 % if($cust_or_prospect && $cust_or_prospect->custnum) {
57 <% include('/view/cust_main/order_pkg_link.html', $qual->cust_or_prospect, %opt) %>
67 % my $not_avail = $qual_result->{'not_avail'};
68 % if ( keys %$not_avail ) {
70 Qualifying vendor packages (not yet configured in any package definition):
71 <% join(', ', map $not_avail->{$_}, keys %$not_avail ) |h %>
79 unless $FS::CurrentUser::CurrentUser->access_right('Qualify service');
82 if ( $cgi->param('qualnum') ) {
83 $cgi->param('qualnum') =~ /^(\d+)$/ or die "unparsable qualnum";
86 my($query) = $cgi->keywords;
87 $query =~ /^(\d+)$/ or die "no qualnum";
91 my $qual = qsearchs('qual', { qualnum => $qualnum }) or die "invalid qualnum";
92 my $location_line = '';
93 my %location_hash = $qual->location_hash;
95 if ( %location_hash ) {
96 $cust_location = new FS::cust_location(\%location_hash);
97 $location_line = $cust_location->location_label;
101 $location_kind = "Residential" if $cust_location->get('location_kind') eq 'R';
102 $location_kind = "Business" if $cust_location->get('location_kind') eq 'B';
104 my $cust_or_prospect = $qual->cust_or_prospect;
105 my $export = $qual->part_export;