calculate unitrecur on sql_external packages with quantity details, #40558
[freeside.git] / FS / FS / part_pkg / sql_external.pm
index 6760634..9bf107b 100644 (file)
@@ -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+$/ ) {