diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2015-11-07 12:32:06 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2015-11-07 12:32:06 -0800 |
| commit | b3c70d709fd646ef355d49a4e87151c99ee413e9 (patch) | |
| tree | 93dc04bf9042e8e007aa1d8f61d5746b390c18b4 /httemplate/elements/tr-select-reason.html | |
| parent | 80f265ee8f2603f0e3f7f5ad6c6c0cf704f98cb8 (diff) | |
| parent | 59285fa7c07ac86914f3998f2635caf067c07506 (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/elements/tr-select-reason.html')
| -rwxr-xr-x | httemplate/elements/tr-select-reason.html | 19 |
1 files changed, 3 insertions, 16 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', |
