fix fallout from discount work, RT#10025
[freeside.git] / FS / FS / cust_main / Billing.pm
index 3ebc87d..639d594 100644 (file)
@@ -3,6 +3,7 @@ package FS::cust_main::Billing;
 use strict;
 use vars qw( $conf $DEBUG $me );
 use Carp;
+use Data::Dumper;
 use List::Util qw( min );
 use FS::UID qw( dbh );
 use FS::Record qw( qsearch qsearchs dbdef );
@@ -628,6 +629,7 @@ jurisdictions (i.e. Texas) have tax exemptions which are date sensitive.
 =back
 
 =cut
+
 sub calculate_taxes {
   my ($self, $cust_bill_pkg, $taxlisthash, $invoice_time) = @_;
 
@@ -1615,7 +1617,7 @@ my $self = shift;
   my @where = ();
   push @where, "cust_bill_pkg.invnum = ". $cust_bill->invnum;
   push @where, "cust_bill_pkg.pkgpart_override IS NULL";
-  push @where, "part_pkg.freq = 1";
+  push @where, "part_pkg.freq = '1'";
   push @where, "(cust_pkg.cancel IS NULL OR cust_pkg.cancel = 0)";
   push @where, "(cust_pkg.susp   IS NULL OR cust_pkg.susp   = 0)";
   push @where, "0<(SELECT count(*) FROM part_pkg_discount