X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fqual.cgi;h=56c2b61df1ca4be21d60138cb12095ac3443751e;hb=9aa198dfc90054de34cf1af8f3238d004416ebc9;hp=f96726995dd7f61b5a1eb273181271ad1f20747a;hpb=663b89d06a2c97fb0e7915ba409310fbefefea98;p=freeside.git diff --git a/httemplate/view/qual.cgi b/httemplate/view/qual.cgi index f96726995..56c2b61df 100644 --- a/httemplate/view/qual.cgi +++ b/httemplate/view/qual.cgi @@ -2,16 +2,24 @@ % if ( $cust_or_prospect->custnum ) { - <% include( '/elements/small_custview.html', $cust_or_prospect->custnum, '', 1, - "${p}view/cust_main.cgi") %> -
+ <% include( '/elements/small_custview.html', $cust_or_prospect, + '', #countrydefault override + 1, #no balance + "${p}view/cust_main.cgi"), #url + %> + +% } elsif ( $cust_or_prospect->prospectnum ) { + + <% include( '/elements/small_prospect_view.html', $cust_or_prospect) %> % } +

+ Qualification #<% $qual->qualnum %> <% ntable("#cccccc", 2) %> <% include('elements/tr.html', label => 'Status', value => $qual->status_long ) %> -<% include('elements/tr.html', label => 'Service Telephone Number', value => $qual->phonenum ) %> +<% include('elements/tr.html', label => 'Service Telephone Number', value => $qual->phonenum || '(none - dry loop)' ) %> <% include('elements/tr.html', label => 'Address', value => $location_line ) %> % if ( $location_kind ) { <% include('elements/tr.html', label => 'Location Kind', value => $location_kind ) %> @@ -23,12 +31,64 @@

% if ( $export ) { -<% $export->qual_html($qual) %> +% my $qual_result = $export->qual_result($qual); +% if ($qual_result->{'pkglist'}) { # one of the possible formats (?) + Qualifying Packages - 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'}; + +% } + +% 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> -# XXX: add access right for quals? +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Qualify service'); my $qualnum; if ( $cgi->param('qualnum') ) { @@ -42,24 +102,18 @@ if ( $cgi->param('qualnum') ) { my $qual = qsearchs('qual', { qualnum => $qualnum }) or die "invalid qualnum"; my $location_line = ''; -my %location_hash = $qual->location; +my %location_hash = $qual->location_hash; my $cust_location; if ( %location_hash ) { $cust_location = new FS::cust_location(\%location_hash); $location_line = $cust_location->location_label; } -# XXX: geocode_Mixin location_label doesn't currently have the new cust_location fields - add them my $location_kind; -$location_kind = "Residential" if $cust_location->location_kind eq 'R'; -$location_kind = "Business" if $cust_location->location_kind eq 'B'; - -my $cust_or_prospect = $qual->cust_or_prospect; +$location_kind = "Residential" if $cust_location->get('location_kind') eq 'R'; +$location_kind = "Business" if $cust_location->get('location_kind') eq 'B'; -my $export; -if ( $qual->exportnum ) { - $export = qsearchs('part_export', { exportnum => $qual->exportnum } ) - or die 'invalid exportnum'; -} +my $cust_or_prospect = $qual->cust_or_prospect; #or die? qual without this? +my $export = $qual->part_export;