X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Freason_type.pm;h=1d049861d92527264302ebc0b3131b553520ab7d;hp=d66f7b5727e957f09ec9a99612eabaab382b2965;hb=ff27c3f36240aee48ed50153dd5d8fe3ac3f2443;hpb=73e20a91b38b27ad5be79306ba25bdfb5a1252e1 diff --git a/FS/FS/reason_type.pm b/FS/FS/reason_type.pm index d66f7b572..1d049861d 100644 --- a/FS/FS/reason_type.pm +++ b/FS/FS/reason_type.pm @@ -3,27 +3,38 @@ package FS::reason_type; use strict; use vars qw( @ISA ); use FS::Record qw( qsearch qsearchs ); +use Tie::IxHash; @ISA = qw(FS::Record); -our %class_name = ( +tie our %class_name, 'Tie::IxHash', ( 'C' => 'cancel', 'R' => 'credit', 'S' => 'suspend', - 'U' => 'activate', #uncancel/unsuspend - 'W' => 'renewal', - 'T' => 'term change', 'F' => 'refund', + 'X' => 'credit void', + 'I' => 'invoice void', + 'P' => 'payment void', ); our %class_purpose = ( 'C' => 'explain why a customer package was cancelled', 'R' => 'explain why a customer was credited', 'S' => 'explain why a customer package was suspended', - 'U' => 'explain why a customer package was unsuspended/uncanceled/activated', - 'W' => 'explain why a customer package was renewed', - 'T' => 'explain why a customer package term was changed', 'F' => 'explain why a customer was refunded', + 'X' => 'explain why a credit was voided', + 'I' => 'explain why an invoice was voided', + 'P' => 'explain why a payment was voided', +); + +our %class_add_access_right = ( + 'C' => 'Add on-the-fly cancel reason', + 'R' => 'Add on-the-fly credit reason', + 'S' => 'Add on-the-fly suspend reason', + 'F' => 'Add on-the-fly refund reason', + 'X' => 'Add on-the-fly void reason', + 'I' => 'Add on-the-fly void reason', + 'P' => 'Add on-the-fly void reason', ); =head1 NAME @@ -54,7 +65,7 @@ inherits from FS::Record. The following fields are currently supported: =item typenum - primary key -=item class - currently 'C', 'R', or 'S' for cancel, credit, or suspend +=item class - one of the keys of %class_name =item type - name of the type of reason