X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fsql_external.pm;h=9bf107b7df314b3b919c8cf698b95794dca6895c;hb=9c2854f48fb79a5534bbb35c4b7c12b2e6acc0a4;hp=676063460b68630e35bbc5ec06f8f3c4b84fae74;hpb=3f15da8a0dd800432253294e623c6caaabc59fe3;p=freeside.git diff --git a/FS/FS/part_pkg/sql_external.pm b/FS/FS/part_pkg/sql_external.pm index 676063460..9bf107b7d 100644 --- a/FS/FS/part_pkg/sql_external.pm +++ b/FS/FS/part_pkg/sql_external.pm @@ -96,8 +96,7 @@ sub calc_recur { die "sql_external query returned non-numeric amount: $row->{amount}"; } } - if (exists $row->{quantity}) { - $quantity ||= 0; + if (defined $row->{quantity}) { if ( $row->{quantity} eq '' ) { # treat as zero } elsif ( $row->{quantity} =~ /^\d+$/ ) {