summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2007-08-01 19:19:54 +0000
committerivan <ivan>2007-08-01 19:19:54 +0000
commit673d0068c5121d3eeb08d8643cf9432cdacdcf88 (patch)
tree53f40314c86c9315102bd61f29cdfcec55f7d132
parent179a9b21f48b785d88a00d3657ac655d26f37fcd (diff)
better error reporting: all three of these methods might return an error
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 9ee770b20..bea31c5ac 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -910,10 +910,9 @@ sub _do_bop_realtime {
my $old_balance = $cust_main->balance;
- my $bill_error = $cust_main->bill;
-
- $cust_main->apply_payments_and_credits;
- $bill_error = $cust_main->collect('realtime' => 1);
+ my $bill_error = $cust_main->bill
+ || $cust_main->apply_payments_and_credits
+ || $cust_main->collect('realtime' => 1);
if ( $cust_main->balance > $old_balance
&& $cust_main->balance > 0