summaryrefslogtreecommitdiff
path: root/FS/FS/part_pkg
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-06-03 17:45:04 -0700
committerMark Wells <mark@freeside.biz>2016-06-03 17:45:37 -0700
commit7483c5e354bbee171bbb9c6996ae9a56e9517ea6 (patch)
tree130ba6f91641f9b1b1541c0b8be14e2a6e8c1d8c /FS/FS/part_pkg
parentd22baa4e71bfa9e153c1fe1152ff4c748f1d935c (diff)
calculate unitrecur on sql_external packages with quantity details, #40558
Diffstat (limited to 'FS/FS/part_pkg')
-rw-r--r--FS/FS/part_pkg/sql_external.pm3
1 files changed, 1 insertions, 2 deletions
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+$/ ) {