config to enable cust_pay report time selection, RT#22001
authorIvan Kohler <ivan@freeside.biz>
Mon, 18 Mar 2013 07:21:14 +0000 (00:21 -0700)
committerIvan Kohler <ivan@freeside.biz>
Mon, 18 Mar 2013 07:21:14 +0000 (00:21 -0700)
FS/FS/Conf.pm
httemplate/search/elements/report_cust_pay_or_refund.html

index 51a3f62..4842f67 100644 (file)
@@ -5406,6 +5406,13 @@ and customer address. Include units.',
     'type'        => 'text',
   },
 
+  {
+    'key'         => 'report-cust_pay-select_time',
+    'section'     => 'UI',
+    'description' => 'Enable time selection on payment and refund reports.',
+    'type'        => 'checkbox',
+  },
+
   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
index c79c3ab..0462f1c 100644 (file)
@@ -74,7 +74,7 @@ Examples:
       <TABLE>
         <& /elements/tr-input-beginning_ending.html,
                       layout     => 'horiz',
-                      input_time => 1,
+                      input_time => $conf->exists('report-cust_pay-select_time'),
         &>
       </TABLE>
     </TD>
@@ -124,6 +124,8 @@ my $name_singular = $opt{'name_singular'};
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
 
+my $conf = new FS::Conf;
+
 my $void = $cgi->param('void') ? 1 : 0;
 my $unapplied = $cgi->param('unapplied') ? 1 : 0;