[freeside-commits] branch FREESIDE_4_BRANCH updated. 56f462be879b12559bfd7ffa9baf5ab8075b7623

Ivan ivan at 420.am
Tue Sep 26 11:38:52 PDT 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  56f462be879b12559bfd7ffa9baf5ab8075b7623 (commit)
      from  20d614e61c4342ef01a5e9b10a5226a72d662610 (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 56f462be879b12559bfd7ffa9baf5ab8075b7623
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Sep 26 11:38:51 2017 -0700

    fix import of 0 custom price, RT#76992

diff --git a/FS/FS/cust_pkg/Import.pm b/FS/FS/cust_pkg/Import.pm
index 3cf38cd..b827bcf 100644
--- a/FS/FS/cust_pkg/Import.pm
+++ b/FS/FS/cust_pkg/Import.pm
@@ -141,15 +141,15 @@ warn join('-', @location_params);
     my $s = $param->{'quan_price.setup_fee'};
     my $r = $param->{'quan_price.recur_fee'};
     my $part_pkg = $record->part_pkg;
-    if (    ( $s && $s != $part_pkg->option('setup_fee') )
-         or ( $r && $r != $part_pkg->option('recur_fee') )
+    if (    ( length($s) && $s != $part_pkg->option('setup_fee') )
+         or ( length($r) && $r != $part_pkg->option('recur_fee') )
        )
     {
       my $custom_part_pkg = $part_pkg->clone;
       $custom_part_pkg->disabled('Y');
       my %options = $part_pkg->options;
-      $options{'setup_fee'} = $s if $s;
-      $options{'recur_fee'} = $r if $r;
+      $options{'setup_fee'} = $s if length($s);
+      $options{'recur_fee'} = $r if length($r);
       my $error = $custom_part_pkg->insert( options=>\%options );
       return "error customizing package: $error" if $error;
       $record->pkgpart( $custom_part_pkg->pkgpart );

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

Summary of changes:
 FS/FS/cust_pkg/Import.pm |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list