giving it a weight avoids weight use of uninitialized value in sort messages in part_...
[freeside.git] / FS / FS / part_pkg / flat.pm
index 02ac6ae..9bb45e6 100644 (file)
@@ -210,9 +210,9 @@ sub is_free_options {
   qw( setup_fee recur_fee );
 }
 
-sub is_prepaid {
-  0; #no, we're postpaid
-}
+sub is_prepaid { 0; } #no, we're postpaid
+
+sub can_discount { 1; } #and anything that inherits from us
 
 sub usage_valuehash {
   my $self = shift;
@@ -223,7 +223,7 @@ sub usage_valuehash {
 
 sub reset_usage {
   my($self, $cust_pkg, %opt) = @_;
-  warn "    resetting usage counters" if $opt{debug} > 1;
+  warn "   resetting usage counters" if defined($opt{debug}) && $opt{debug} > 1;
   my %values = $self->usage_valuehash;
   if ($self->option('usage_rollover', 1)) {
     $cust_pkg->recharge(\%values);