X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling.pm;h=205180481dffa34c19274174bd695549bc4862aa;hp=464ee8a87cb369b22a08d59665b146abd23fef8f;hb=e243f4541c78a033c4f969a03d29b9da84829d97;hpb=d8535724aaeb4f5157d221a46a47bc25739d7495 diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm index 464ee8a87..205180481 100644 --- a/FS/FS/cust_main/Billing.pm +++ b/FS/FS/cust_main/Billing.pm @@ -420,11 +420,17 @@ sub bill { 'real_pkgpart' => $real_pkgpart, 'options' => \%options, ); - # Stop if anything goes wrong, or if we're not incrementing - # the bill date. + + # Stop if anything goes wrong last if $error; + + # or if we're not incrementing the bill date. last if ($cust_pkg->getfield('bill') || 0) == $next_bill; + $next_bill = $cust_pkg->getfield('bill') || 0; + + #stop if -o was passed to freeside-daily + last if $options{'one_recur'}; } if ($error) { $dbh->rollback if $oldAutoCommit && !$options{no_commit};