diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-09-26 11:38:51 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-09-26 11:38:51 -0700 |
commit | 56f462be879b12559bfd7ffa9baf5ab8075b7623 (patch) | |
tree | dde0a90e05a8fd79a96d14a36f339e826bbd2dea /FS/FS/cust_pkg/Import.pm | |
parent | 20d614e61c4342ef01a5e9b10a5226a72d662610 (diff) |
fix import of 0 custom price, RT#76992
Diffstat (limited to 'FS/FS/cust_pkg/Import.pm')
-rw-r--r-- | FS/FS/cust_pkg/Import.pm | 8 |
1 files changed, 4 insertions, 4 deletions
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 ); |