X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_svc.cgi;h=26d090a3d3fd7dec8bfbad66a3a6a12a1793c32e;hb=0bfdd767de9c8758c5997beb72bfd8c22db25ab4;hp=94afdef1555c4f69734cd46836ecd1caca9d9c13;hpb=f920fdb29a19105c9102d29e532f8cbb40dd1171;p=freeside.git diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi index 94afdef15..26d090a3d 100755 --- a/httemplate/browse/part_svc.cgi +++ b/httemplate/browse/part_svc.cgi @@ -51,6 +51,8 @@ function part_export_areyousure(href) { Customer
Services
+ Customer
Self-service
+ Export Field @@ -60,12 +62,14 @@ function part_export_areyousure(href) { Modifier - +% my $conf = FS::Conf->new; % foreach my $part_svc ( @part_svc ) { % my $svcdb = $part_svc->svcdb; % my $svc_x = "FS::$svcdb"->new( { svcpart => $part_svc->svcpart } ); % my @dfields = $svc_x->fields; -% push @dfields, 'usergroup' if $svcdb eq 'svc_acct'; #kludge +% push @dfields, 'usergroup' if $svcdb eq 'svc_acct' #double kludge +% or ($svcdb eq 'svc_broadband' +% and $conf->exists('svc_broadband-radius')); % my @fields = % grep { my $col = $part_svc->part_svc_column($_); % my $def = FS::part_svc->svc_table_fields($svcdb)->{$_}; @@ -117,6 +121,14 @@ function part_export_areyousure(href) { +% tie my %selfservice_access, 'Tie::IxHash', #false laziness w/edit/part_svc.cgi +% '' => 'Yes', +% 'hidden' => 'Hidden', +% 'readonly' => 'Read-only', +% ; + CLASS="grid" BGCOLOR="<% $bgcolor %>" ALIGN="center"> + <% $selfservice_access{$part_svc->selfservice_access} %> + CLASS="inv" BGCOLOR="<% $bgcolor %>"> % @@ -129,7 +141,16 @@ function part_export_areyousure(href) { % - + % } @@ -160,14 +181,14 @@ function part_export_areyousure(href) {
<% $part_export->exportnum %>: <% $part_export->exporttype %> to <% $part_export->machine %> +<% $part_export->exportnum %>:  +% if ($part_export->exportname) { +<% $part_export->exportname %> ( +% } +<% $part_export->exporttype %> to <% $part_export->machine %> +% if ($part_export->exportname) { +) +% } +
% my $value = &$formatter($part_svc->part_svc_column($field)->columnvalue); -% if ( $flag =~ /^[MA]$/ ) { -% $inventory_class{$value} -% ||= qsearchs('inventory_class', { 'classnum' => $value } ); -% - - <% $inventory_class{$value} - ? $inventory_class{$value}->classname - : "WARNING: inventory_class.classnum $value not found" %> +% if ( $flag =~ /^[MAH]$/ ) { +% my $select_table = ($flag eq 'H') ? 'hardware_class' : 'inventory_class'; +% $select_class{$value} ||= +% qsearchs($select_table, { 'classnum' => $value } ); +% + <% $select_class{$value} + ? $select_class{$value}->classname + : "WARNING: $select_table.classnum $value not found" %> % } else { <% $value %> @@ -199,6 +220,7 @@ my %flag = ( 'M' => 'Manual selected from inventory', #'A' => 'Automatically fill in from inventory', 'A' => 'Automatically filled in from inventory', + 'H' => 'Selected from hardware class', 'X' => 'Excluded', ); @@ -223,6 +245,6 @@ if ( $cgi->param('orderby') eq 'active' ) { @part_svc = sort { lc($a->svc) cmp lc($b->svc) } @part_svc; } -my %inventory_class = (); +my %select_class = ();