diff options
| author | Mark Wells <mark@freeside.biz> | 2015-11-05 16:06:56 -0800 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2015-11-05 16:06:56 -0800 |
| commit | dd9dd7a913cd8da4d97b1c72522e016562a98459 (patch) | |
| tree | c6c0dd167d47b6bc8fdfc4545b714f1552898385 /httemplate/elements/tr-select-reason.html | |
| parent | 28816258c25afc6c64101b2ac31cb9dec7cb42d4 (diff) | |
Add proper reasons and reason types for payment and invoice voids.
Contributed by Irina Todeva <itodeva@hostgator.com>
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 125874694..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 credit 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', |
