[freeside-commits] branch master updated. d1a46f2831b8f74d4d323be20e70e36ad9d2aff8

Mark Wells mark at 420.am
Thu Jun 18 17:18:59 PDT 2015


The branch, master has been updated
       via  d1a46f2831b8f74d4d323be20e70e36ad9d2aff8 (commit)
       via  ed4675557ac1b7012bc1c1607a73070f052bede5 (commit)
       via  9ccb619364f1a04a98d914cd79bc7a75a9e196cb (commit)
       via  e653b204c7da74200345c1718ffda973ec8c6cee (commit)
      from  09f899143460b0e99388ef007ff262f9a5e80203 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d1a46f2831b8f74d4d323be20e70e36ad9d2aff8
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Jun 18 17:16:33 2015 -0700

    UI cleanup: hide new taxproduct selector when taxproducts are not in use

diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index bfa5d50..a90a625 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -200,7 +200,6 @@
                        include_opt_callback =>
                          sub { pkgpart => $_[0]->pkgpart },
                      },
-                      
 
                      { type  => 'tablebreak-tr-title',
                        value => 'Promotions', #better name?
@@ -1219,6 +1218,11 @@ my $field_callback = sub {
                            };
     $fieldref->{layer_fields} = \%taxproduct_fields;
     $fieldref->{layer_values_callback} = $taxproduct_values;
+  } elsif ($field eq 'taxproductnum') { # part_pkg-taxproduct, new style
+    if ( !$taxproducts ) {
+      # then make the widget go away
+      $fieldref->{type} = 'hidden';
+    }
   }
 };
 

commit ed4675557ac1b7012bc1c1607a73070f052bede5
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Jun 18 17:15:54 2015 -0700

    apply global default rates to calls outside every region, #35199, from #30633

diff --git a/FS/FS/rate.pm b/FS/FS/rate.pm
index a3826bf..8ee9a83 100644
--- a/FS/FS/rate.pm
+++ b/FS/FS/rate.pm
@@ -347,7 +347,7 @@ sub dest_detail {
       });
     }
 
-    return '' unless $rate_prefix;
+    return $self->default_detail unless $rate_prefix;
 
     $regionnum = $rate_prefix->regionnum;
 

commit 9ccb619364f1a04a98d914cd79bc7a75a9e196cb
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Jun 18 17:15:50 2015 -0700

    silence many spurious warnings from part_pkg options

diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index 4407ec6..0e9ee05 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -1392,6 +1392,11 @@ sub option {
   my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
                      split("\n", $self->get('plandata') );
   return $plandata{$opt} if exists $plandata{$opt};
+
+  # check whether the option is defined in plan info (if so, don't warn)
+  if (exists $plans{ $self->plan }->{fields}->{$opt}) {
+    return '';
+  }
   cluck "WARNING: (pkgpart ". $self->pkgpart. ") Package def option $opt ".
         "not found in options or plandata!\n"
     unless $ornull;

commit e653b204c7da74200345c1718ffda973ec8c6cee
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Jun 18 14:50:57 2015 -0700

    debug

diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm
index 01ee89d..544a0e8 100644
--- a/FS/FS/cust_credit.pm
+++ b/FS/FS/cust_credit.pm
@@ -822,8 +822,6 @@ Example:
 
 =cut
 
-use Data::Dumper; #XXX
-
 #maybe i should just be an insert with extra args instead of a class method
 sub credit_lineitems {
   my( $class, %arg ) = @_;
@@ -887,7 +885,6 @@ sub credit_lineitems {
   # determine the tax adjustments
   my %tax_adjust = $class->calculate_tax_adjustment(%arg);
 
-  warn Dumper \%arg;
   foreach my $billpkgnum ( @{$arg{billpkgnums}} ) {
     my $setuprecur = shift @{$arg{setuprecurs}};
     my $amount = shift @{$arg{amounts}};

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_credit.pm         |    3 ---
 FS/FS/part_pkg.pm            |    5 +++++
 FS/FS/rate.pm                |    2 +-
 httemplate/edit/part_pkg.cgi |    6 +++++-
 4 files changed, 11 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list