-small svc_dsl UI and flow changes, RT7111
[freeside.git] / httemplate / view / qual.cgi
1 <% include("/elements/header.html","View Qualification") %>
2
3 % if ( $cust_or_prospect->get('custnum') ) {
4
5   <% include( '/elements/small_custview.html', $cust_or_prospect->custnum, '', 1,
6      "${p}view/cust_main.cgi") %>
7   <BR>
8
9 % }
10
11 <B>Qualification #<% $qual->qualnum %></B>
12 <% ntable("#cccccc", 2) %>
13 <% include('elements/tr.html', label => 'Status', value => $qual->status_long ) %>
14 <% include('elements/tr.html', label => 'Service Telephone Number', value => $qual->phonenum ) %>
15 <% include('elements/tr.html', label => 'Address', value => $location_line ) %>
16 % if ( $location_kind ) {
17 <% include('elements/tr.html', label => 'Location Kind', value => $location_kind ) %>
18 % } if ( $export ) { 
19 <% include('elements/tr.html', label => 'Qualified using', value => $export->exportname ) %>
20 <% include('elements/tr.html', label => 'Vendor Qualification #', value => $qual->vendor_qual_id ) %>
21 % } 
22 </TABLE>
23 <BR><BR>
24
25 % if ( $export ) {
26 <% $export->qual_html($qual) %>
27 % }
28
29 <%init>
30
31 die "access denied"
32   unless $FS::CurrentUser::CurrentUser->access_right('Qualify service');
33
34 my $qualnum;
35 if ( $cgi->param('qualnum') ) {
36   $cgi->param('qualnum') =~ /^(\d+)$/ or die "unparsable qualnum";
37   $qualnum = $1;
38 } else {
39   my($query) = $cgi->keywords;
40   $query =~ /^(\d+)$/ or die "no qualnum";
41   $qualnum = $1;
42 }
43
44 my $qual = qsearchs('qual', { qualnum => $qualnum }) or die "invalid qualnum";
45 my $location_line = '';
46 my %location_hash = $qual->location;
47 my $cust_location;
48 if ( %location_hash ) {
49     $cust_location = new FS::cust_location(\%location_hash);
50     $location_line = $cust_location->location_label;
51 }
52
53 my $location_kind;
54 $location_kind = "Residential" if $cust_location->get('location_kind') eq 'R';
55 $location_kind = "Business" if $cust_location->get('location_kind') eq 'B';
56
57 my $cust_or_prospect = $qual->cust_or_prospect;
58 my $export = $qual->export;
59
60 </%init>