diff options
Diffstat (limited to 'httemplate')
| -rwxr-xr-x | httemplate/elements/tr-select-reason.html | 19 | ||||
| -rwxr-xr-x | httemplate/misc/void-cust_bill.cgi | 2 | ||||
| -rwxr-xr-x | httemplate/misc/void-cust_pay.cgi | 2 | 
3 files changed, 5 insertions, 18 deletions
| diff --git a/httemplate/elements/tr-select-reason.html b/httemplate/elements/tr-select-reason.html index 37a34baba..93949ba8c 100755 --- a/httemplate/elements/tr-select-reason.html +++ b/httemplate/elements/tr-select-reason.html @@ -6,8 +6,7 @@ Example:      #required       'field'         => 'reasonnum', -    'reason_class'  => 'C', # currently 'C', 'R', 'F', 'S' or 'X' -                           # for cancel, credit, refund, suspend or void credit +    'reason_class'  => 'C', # one of those in %FS::reason_type::class_name      #recommended      'cgi' => $cgi, #easiest way for things to be properly "sticky" on errors @@ -189,20 +188,8 @@ if ( $opt{'cgi'} ) {  my $id = $opt{'id'} || $name;  $id =~ s/\./_/g; # for edit/part_event -my $add_access_right; -if ($class eq 'C') { -  $add_access_right = 'Add on-the-fly cancel reason'; -} elsif ($class eq 'S') { -  $add_access_right = 'Add on-the-fly suspend reason'; -} elsif ($class eq 'R') { -  $add_access_right = 'Add on-the-fly credit reason'; -} elsif ($class eq 'F') { -  $add_access_right = 'Add on-the-fly refund reason'; -} elsif ($class eq 'X') { -  $add_access_right = 'Add on-the-fly void reason'; -} else { -  die "illegal class: $class"; -} +my $add_access_right = $FS::reason_type::class_add_access_right{$class} +  or die "unknown class: $class";  my @reasons = qsearch({    'table'           => 'reason', diff --git a/httemplate/misc/void-cust_bill.cgi b/httemplate/misc/void-cust_bill.cgi index 213cf9566..e4e4705d7 100755 --- a/httemplate/misc/void-cust_bill.cgi +++ b/httemplate/misc/void-cust_bill.cgi @@ -14,7 +14,7 @@  <% ntable("#cccccc", 2) %>  <& /elements/tr-select-reason.html,               'field'          => 'reasonnum', -             'reason_class'   => 'X', +             'reason_class'   => 'I',               'cgi'            => $cgi  &> diff --git a/httemplate/misc/void-cust_pay.cgi b/httemplate/misc/void-cust_pay.cgi index 784bb9a94..dc0ff4d35 100755 --- a/httemplate/misc/void-cust_pay.cgi +++ b/httemplate/misc/void-cust_pay.cgi @@ -18,7 +18,7 @@  <TABLE BGCOLOR="#cccccc" BORDER="0" CELLSPACING="2" STYLE="margin-left:auto; margin-right:auto">  <& /elements/tr-select-reason.html,               'field'          => 'reasonnum', -             'reason_class'   => 'X', +             'reason_class'   => 'P',               'cgi'            => $cgi  &>  </TABLE> | 
