2 'menubar'=> [ "View all $classname Reasons" =>
3 $p.'browse/reason.html?class='.$class,
4 "View $classname Reason Types" =>
5 $p.'browse/reason_type.html?class='.$class,
7 'name' => ucfirst($classname) . ' Reason',
11 'reasonnum' => $classname . ' Reason',
12 'reason_type' => $classname . ' Reason type',
13 'reason' => $classname . ' Reason',
14 'disabled' => 'Disabled',
16 'unsuspend_pkgpart' => 'Unsuspension fee',
17 'unsuspend_hold' => 'Delay until next bill',
18 'unused_credit' => 'Credit unused portion of service',
25 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
27 $cgi->param('class') =~ /^(\w)$/ or die "illegal class";
30 my $classname = ucfirst($FS::reason_type::class_name{$class});
32 my (@types) = qsearch( 'reason_type', { 'class' => $class } );
34 unless (scalar(@types)) {
35 print $cgi->redirect( "reason_type.html?class=$class" );
39 { 'field' => 'reason_type',
40 'type' => 'select-table',
41 'table' => 'reason_type',
43 'value_col' => 'typenum',
44 'hashref' => { 'class' => $class },
46 # #then fix tr-select.html
48 # 'value' => { 'vcolumn' => 'typenum',
49 # 'ccolumn' => 'type',
50 # 'values' => \@types,
52 # # that wasn't so hard...did this do something else that I'm missing?
59 { 'field' => 'disabled',
65 if ( $class eq 'S' ) {
67 { 'field' => 'unsuspend_pkgpart',
68 'type' => 'select-part_pkg',
69 'hashref' => { 'disabled' => '',
70 'freq' => 0 }, # one-time charges only
72 { 'field' => 'unsuspend_hold',
76 { 'field' => 'unused_credit',