X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=d4ce0fd67865f3873571d11982722b692bba1cbc;hb=c79fddf94eb1ee76858a83fdb0f6b2e23d93a874;hp=a4f88b4f4e6d5838c25e8a9adafc17ca8da9918b;hpb=76d7b15503b50b3bb33459006ff9fcab413ea15c;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index a4f88b4f4..d4ce0fd67 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -3065,7 +3065,7 @@ sub _make_lines { my $old_cust_pkg = new FS::cust_pkg \%hash; my @details = (); - + my @discounts = (); my $lineitems = 0; $cust_pkg->pkgpart($part_pkg->pkgpart); @@ -3150,6 +3150,7 @@ sub _make_lines { ); my %param = ( 'precommit_hooks' => $precommit_hooks, 'increment_next_bill' => $increment_next_bill, + 'discounts' => \@discounts, ); my $method = $options{cancel} ? 'calc_cancel' : 'calc_recur'; @@ -3229,6 +3230,7 @@ sub _make_lines { 'unitrecur' => $unitrecur, 'quantity' => $cust_pkg->quantity, 'details' => \@details, + 'discounts' => \@discounts, 'hidden' => $part_pkg->hidden, }; @@ -3926,7 +3928,7 @@ sub due_cust_event { warn " invalid conditions not eliminated with condition_sql:\n". join('', map " $_: ".$unsat{$_}."\n", keys %unsat ) - if $DEBUG; # > 1; + if keys %unsat && $DEBUG; # > 1; ## # insert