default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / search / cust_credit.html
index f81063c..88f9bca 100755 (executable)
@@ -33,18 +33,25 @@ my $clink = sub {
     : '';
 };
 
-# form selectbox for show_voided_credits:
-# - value='': use default from $conf
-# - value="0" : override default, do not show voided credits
-# - value="1" : override default, show voided credits
+# form checkbox for show_voided_credits:
+# - value=unset : do not show voided credits
+# - value="1"   : show voided credits
 my $show_voided_credits;
-$show_voided_credits = $conf->config('show_voided_credits');
 $show_voided_credits = $cgi->param('show_voided_credits')
-  if $cgi->param('show_voided_credits') =~ /^(\d)$/;
+  if $cgi->param('show_voided_credits');
 
 my (@header, @fields, @sort_fields, $align, @links, @color, @style);
 $align = '';
 
+# Report Column: crednum
+push @header, emt('Ref No');
+push @fields, sub { shift->crednum };
+push @sort_fields, '';
+$align .= 'l';
+push @links, '';
+push @color, '';
+push @style, '';
+
 # Report Column: Amount
 push @header, emt('Amount');
 push @fields, sub { $money_char .sprintf('%.2f', shift->amount) };
@@ -188,6 +195,10 @@ if ( $cgi->param('credbatch') =~ /^([\w\-\/\.\:]+)$/ ) {
   push @search, "cust_credit.credbatch = '$1'";
 }
 
+if ( $cgi->param('reasonnum') =~ /^(\d+)$/ && $1 ) {
+  push @search, "cust_credit.reasonnum = $1";
+}
+
 # commission_salesnum
 if ( $cgi->param('commission_salesnum') =~ /^(\d+)$/ ) {
   push @search, "commission_salesnum = $1";