X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling.pm;h=850ffaa3a985492f7c96d36c7ed97a02db95d52b;hp=464ee8a87cb369b22a08d59665b146abd23fef8f;hb=68c776b1b81217be620c9a4212d6652cc44452e5;hpb=d8535724aaeb4f5157d221a46a47bc25739d7495 diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm index 464ee8a87..850ffaa3a 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}; @@ -1159,7 +1165,7 @@ sub _handle_taxes { } else { - my @loc_keys = qw( city county state country ); + my @loc_keys = qw( district city county state country ); my %taxhash; if ( $conf->exists('tax-pkg_address') && $cust_pkg->locationnum ) { my $cust_location = $cust_pkg->cust_location; @@ -1176,7 +1182,7 @@ sub _handle_taxes { my @taxes = (); my %taxhash_elim = %taxhash; - my @elim = qw( city county state ); + my @elim = qw( district city county state ); do { #first try a match with taxclass