diff options
author | Mark Wells <mark@freeside.biz> | 2015-11-04 15:06:58 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-11-04 15:06:58 -0800 |
commit | c82e10e2a7af8039962b3f2bd8df4050977c279c (patch) | |
tree | 63f5f817b52dd3234c14ef2c25a1d5a17998771a /FS/FS/reason_type.pm | |
parent | da046e5f2ceae7df8ea20cc0185d2c63d71a3daa (diff) |
separate reason classes for voiding different transaction types, #38532
Diffstat (limited to 'FS/FS/reason_type.pm')
-rw-r--r-- | FS/FS/reason_type.pm | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/FS/FS/reason_type.pm b/FS/FS/reason_type.pm index 4042972b4..a727ccd0a 100644 --- a/FS/FS/reason_type.pm +++ b/FS/FS/reason_type.pm @@ -6,12 +6,14 @@ use FS::Record qw( qsearch qsearchs ); @ISA = qw(FS::Record); -our %class_name = ( +tie our %class_name, Tie::IxHash, ( 'C' => 'cancel', 'R' => 'credit', 'S' => 'suspend', 'F' => 'refund', - 'X' => 'void', # credit/invoice/payment + 'X' => 'void credit', + 'I' => 'void invoice', + 'P' => 'void payment', ); our %class_purpose = ( @@ -19,7 +21,19 @@ our %class_purpose = ( 'R' => 'explain why a customer was credited', 'S' => 'explain why a customer package was suspended', 'F' => 'explain why a customer was refunded', - 'X' => 'explain why a transaction was voided', + '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 @@ -50,7 +64,7 @@ inherits from FS::Record. The following fields are currently supported: =item typenum - primary key -=item class - currently 'C', 'R', 'S', 'F' or 'X' for cancel, credit, suspend, refund or void credit +=item class - one of the keys of %class_name =item type - name of the type of reason |