add unused_credit flag to edit/reason.html for cancel reasons, #27911
authorMark Wells <mark@freeside.biz>
Mon, 1 Feb 2016 19:57:16 +0000 (11:57 -0800)
committerMark Wells <mark@freeside.biz>
Mon, 1 Feb 2016 20:02:46 +0000 (12:02 -0800)
httemplate/browse/reason.html
httemplate/edit/reason.html

index bdbcf37..7f62ada 100644 (file)
@@ -65,11 +65,8 @@ my @links = (
 
 my $align = 'rll';
 
-if ( $class eq 'S' ) {
-  push @header,
-    'Credit unused service',
-    'Suspension fee',
-  ;
+if ( $class eq 'S' or $class eq 'C' ) {
+  push @header, 'Credit unused service';
   push @fields,
     sub {
       my $reason = shift;
@@ -78,7 +75,12 @@ if ( $class eq 'S' ) {
       } else {
         return '<SPAN STYLE="background-color:#ff0000">NO</SPAN>';
       }
-    },
+    };
+  $align .= 'c';
+}
+if ( $class eq 'S' ) {
+  push @header, 'Suspension fee';
+  push @fields,
     sub {
       my $reason = shift;
       my $feepart = $reason->feepart;
@@ -107,7 +109,7 @@ if ( $class eq 'S' ) {
       $text .= '</FONT>';
     }
   ;
-  $align .= 'cl';
+  $align .= 'l';
 }
 
 # reason merge handling
index 30168d5..331db44 100644 (file)
@@ -65,12 +65,14 @@ my @fields = (
   },
 );
 
-if ( $class eq 'S' ) {
+if ( $class eq 'S' or $class eq 'C' ) {
   push @fields,
     { 'field'     => 'unused_credit',
       'type'      => 'checkbox',
       'value'     => 'Y',
-    }, 
+    };
+}
+if ( $class eq 'S' ) {
     { 'type' => 'tablebreak-tr-title' },
     { 'field'     => 'feepart',
       'type'      => 'select-table',