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 'feepart' => 'Charge a suspension fee',
17 'fee_on_unsuspend' => 'When a package is',
18 'fee_hold' => 'Delay fee until next bill',
19 'unused_credit' => 'Credit unused portion of service',
20 'unsuspend_pkgpart' => 'Order an unsuspension package',
21 'unsuspend_hold' => 'Delay package until next bill',
28 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
30 $cgi->param('class') =~ /^(\w)$/ or die "illegal class";
33 my $classname = ucfirst($FS::reason_type::class_name{$class});
35 my (@types) = qsearch( 'reason_type', { 'class' => $class } );
37 unless (scalar(@types)) {
38 print $cgi->redirect( "reason_type.html?class=$class" );
42 { 'field' => 'reason_type',
43 'type' => 'select-table',
44 'table' => 'reason_type',
46 'value_col' => 'typenum',
47 'hashref' => { 'class' => $class },
49 # #then fix tr-select.html
51 # 'value' => { 'vcolumn' => 'typenum',
52 # 'ccolumn' => 'type',
53 # 'values' => \@types,
55 # # that wasn't so hard...did this do something else that I'm missing?
62 { 'field' => 'disabled',
68 if ( $class eq 'S' or $class eq 'C' ) {
70 { 'field' => 'unused_credit',
75 if ( $class eq 'S' ) {
76 { 'type' => 'tablebreak-tr-title' },
77 { 'field' => 'feepart',
78 'type' => 'select-table',
79 'table' => 'part_fee',
80 'hashref' => { disabled => '' },
81 'name_col' => 'itemdesc',
82 'value_col' => 'feepart',
83 'empty_label' => 'none',
85 { 'field' => 'fee_on_unsuspend',
87 'options' => [ '', 'Y' ],
88 'labels' => { '' => 'suspended', 'Y' => 'unsuspended' },
90 { 'field' => 'fee_hold',
94 { 'field' => 'unsuspend_pkgpart',
95 'type' => 'select-part_pkg',
96 'hashref' => { 'disabled' => '',
97 'freq' => 0 }, # one-time charges only
99 { 'field' => 'unsuspend_hold',
100 'type' => 'checkbox',