avoid sql injection
[freeside.git] / FS / FS / cust_main.pm
index 9ac9d4b..c210712 100644 (file)
@@ -4384,7 +4384,6 @@ sub realtime_bop {
   my $payment_gateway =  $self->_payment_gateway( \%options );
   my $namespace = $payment_gateway->gateway_namespace;
 
-  warn "use $namespace"; #if $DEBUG #erroring out??
   eval "use $namespace";  
   die $@ if $@;
 
@@ -7487,9 +7486,11 @@ Available options are:
 =cut
 
 sub unapplied_payments_date_sql {
-  my( $class, $start, $end, ) = @_;
+  my( $class, $start, $end, %opt ) = @_;
+
+  my $cutoff = $opt{'cutoff'};
 
-  my $unapp_pay    = FS::cust_pay->unapplied_sql;
+  my $unapp_pay    = FS::cust_pay->unapplied_sql($cutoff);
 
   my $pay_where = $class->_money_table_where( 'cust_pay', $start, $end,
                                                           'unapplied_date'=>1 );