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 ) %>
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) %>
71 unless $FS::CurrentUser::CurrentUser->access_right('Qualify service');
74 if ( $cgi->param('qualnum') ) {
75 $cgi->param('qualnum') =~ /^(\d+)$/ or die "unparsable qualnum";
78 my($query) = $cgi->keywords;
79 $query =~ /^(\d+)$/ or die "no qualnum";
83 my $qual = qsearchs('qual', { qualnum => $qualnum }) or die "invalid qualnum";
84 my $location_line = '';
85 my %location_hash = $qual->location_hash;
87 if ( %location_hash ) {
88 $cust_location = new FS::cust_location(\%location_hash);
89 $location_line = $cust_location->location_label;
93 $location_kind = "Residential" if $cust_location->get('location_kind') eq 'R';
94 $location_kind = "Business" if $cust_location->get('location_kind') eq 'B';
96 my $cust_or_prospect = $qual->cust_or_prospect;
97 my $export = $qual->part_export;