X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg%2FImport.pm;h=b827bcfe1652ae0367dbca3b1080a7aac07a8b0a;hp=3cf38cd411261cd1da5250e7fb93e402d17c2dcf;hb=1bc76eeede2fcdea26a9e634409445626f53cdc9;hpb=1e7799dd8dd3fd1eda7b22e98edd7ae4702e2beb diff --git a/FS/FS/cust_pkg/Import.pm b/FS/FS/cust_pkg/Import.pm index 3cf38cd41..b827bcfe1 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 );