stray closing /TABLE in the no-ticket case
[freeside.git] / httemplate / elements / tr-select-reason.html
index 93949ba..9a43022 100755 (executable)
@@ -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',
@@ -181,9 +188,8 @@ my $class = $opt{'reason_class'};
 my $init_reason;
 if ( $opt{'cgi'} ) {
   $init_reason = $opt{'cgi'}->param($name);
-} else {
-  $init_reason = $opt{'curr_value'};
 }
+$init_reason ||= $opt{'curr_value'};
 
 my $id = $opt{'id'} || $name;
 $id =~ s/\./_/g; # for edit/part_event