unused_credit flag for cancellation reasons, #27911
[freeside.git] / httemplate / elements / tr-select-reason.html
index 836dd9b..3b9bb22 100755 (executable)
@@ -6,8 +6,8 @@ Example:
 
     #required 
     'field'         => 'reasonnum',
-    'reason_class'  => 'C', # currently 'C', 'R', 'S' or 'X'
-                           # for cancel, credit, suspend or void credit
+    'reason_class'  => 'C', # currently 'C', 'R', 'F', 'S' or 'X'
+                           # for cancel, credit, refund, suspend or void credit
 
     #recommended
     'cgi' => $cgi, #easiest way for things to be properly "sticky" on errors
@@ -120,6 +120,13 @@ Example:
       &>
 %   } # scalar(@types)
 
+%   if ( $class eq 'C' ) {
+      <& tr-checkbox.html,
+        label => 'Credit the unused portion of service when canceling',
+        field => $id.'_new_unused_credit',
+        value => 'Y'
+      &>
+%   }
 %   if ( $class eq 'S' ) {
       <& tr-checkbox.html,
         label => 'Credit the unused portion of service when suspending',
@@ -197,6 +204,8 @@ if ($class eq 'C') {
   $add_access_right = 'Add on-the-fly credit reason';
 } elsif ($class eq 'X') {
   $add_access_right = 'Add on-the-fly void credit reason';
+} elsif ($class eq 'F') {
+  $add_access_right = 'Add on-the-fly refund reason';
 } else {
   die "illegal class: $class";
 }