diff options
| -rw-r--r-- | FS/FS/cust_bill_ApplicationCommon.pm | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/FS/FS/cust_bill_ApplicationCommon.pm b/FS/FS/cust_bill_ApplicationCommon.pm index 30243e210..cb21732ab 100644 --- a/FS/FS/cust_bill_ApplicationCommon.pm +++ b/FS/FS/cust_bill_ApplicationCommon.pm @@ -154,7 +154,10 @@ sub calculate_applications {         $self->cust_bill->invnum. ": ". join(', ', @open). "\n"      if $DEBUG;    my $total = 0; -  $total += $_->owed_setup + $_->owed_recur foreach @open; +  foreach (@open) { +    $total += $_->owed_setup if $_->setup; +    $total += $_->owed_recur if $_->recur; +  }    $total = sprintf('%.2f', $total);    if ( $self->amount > $total ) { | 
