fix receivables report: credits/etc. should be limited by date like before, closes...
authorivan <ivan>
Thu, 31 Jul 2008 20:17:42 +0000 (20:17 +0000)
committerivan <ivan>
Thu, 31 Jul 2008 20:17:42 +0000 (20:17 +0000)
FS/FS/cust_main.pm
httemplate/search/report_receivables.cgi

index b9c2d66..e363f1b 100644 (file)
@@ -5262,7 +5262,7 @@ Available options are:
 
 =item unapplied_date
 
-set to true to disregard unapplied credits, payments and refunds outside the specified time period - by default the time period restriction only applies to invoices (useful for reporting (or is it?), probably a bad idea for event triggering)
+set to true to disregard unapplied credits, payments and refunds outside the specified time period - by default the time period restriction only applies to invoices (useful for reporting, probably a bad idea for event triggering)
 
 =item total
 
index 3e50006..b2fbb4d 100755 (executable)
@@ -174,7 +174,7 @@ sub balance {
   $start = $start ? "( $str2time now() $closing - ".($start * 86400). ' )' : '';
   $end   = $end   ? "( $str2time now() $closing - ".($end   * 86400). ' )' : '';
 
-  #$opt{'unapplied_date'} = 1;
+  $opt{'unapplied_date'} = 1;
 
   ( $opt{sum} ? 'SUM( ' : '' ). 
   FS::cust_main->balance_date_sql( $start, $end, %opt ).