X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fcust_main.pm;h=d42bd813b494e644e61bb0793bc65ddffae7ad06;hb=9f179ee5fc7fc07a3f5e03ad1ad58cd3cadf1a56;hp=ae1c46ad5517732f21d80a3d974088cff0c7bb76;hpb=d800198db4f59bd5369e0d1acbfeb3c7594c32c0;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index ae1c46ad5..d42bd813b 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -743,20 +743,6 @@ sub insert { } } - # FS::geocode_Mixin::after_insert or something? - if ( $conf->config('tax_district_method') and !$import ) { - # if anything non-empty, try to look it up - my $queue = new FS::queue { - 'job' => 'FS::geocode_Mixin::process_district_update', - 'custnum' => $self->custnum, - }; - my $error = $queue->insert( ref($self), $self->custnum ); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "queueing tax district update: $error"; - } - } - # cust_main exports! warn " exporting\n" if $DEBUG > 1; @@ -5776,7 +5762,13 @@ sub process_bill_and_collect { $param->{'fatal'} = 1; # runs from job queue, will be caught $param->{'retry'} = 1; - $cust_main->bill_and_collect( %$param ); + local $@; + eval { $cust_main->bill_and_collect( %$param) }; + if ( $@ ) { + die $@ =~ /cancel_pkgs cannot be run inside a transaction/ + ? "Bill Now unavailable for customer with pending package expiration\n" + : $@; + } } =item pending_invoice_count