quiet warnings
authorIvan Kohler <ivan@freeside.biz>
Thu, 1 Feb 2018 18:20:04 +0000 (10:20 -0800)
committerIvan Kohler <ivan@freeside.biz>
Thu, 1 Feb 2018 18:20:04 +0000 (10:20 -0800)
FS/FS/cust_bill_pkg.pm
FS/FS/part_pkg/flat_introrate.pm

index e44a847..9567278 100644 (file)
@@ -863,7 +863,7 @@ sub _item_discount {
   # show introductory rate as a pseudo-discount
   if (!$d) { # this will conflict with showing real discounts
     my $part_pkg = $self->part_pkg;
-    if ( $part_pkg and $part_pkg->option('show_as_discount') ) {
+    if ( $part_pkg and $part_pkg->option('show_as_discount',1) ) {
       my $cust_pkg = $self->cust_pkg;
       my $intro_end = $part_pkg->intro_end($cust_pkg);
       my $_date = $self->cust_bill->_date;
index e43a525..f12b1ac 100644 (file)
@@ -94,7 +94,7 @@ sub base_recur {
 
 sub item_discount {
   my ($self, $cust_pkg) = @_;
-  return unless $self->option('show_as_discount');
+  return unless $self->option('show_as_discount',1);
   my $intro_end = $self->intro_end($cust_pkg);
   my $amount = sprintf('%.2f',
                 $self->option('intro_fee') - $self->option('recur_fee')