[freeside-commits] branch FREESIDE_3_BRANCH updated. c211b1600b8777f4967f3f8f96c21e8d7f9bb228
Ivan
ivan at 420.am
Sun Aug 10 14:14:12 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via c211b1600b8777f4967f3f8f96c21e8d7f9bb228 (commit)
from 96ba79d4bb6d1a14a441cfc867da55dd5a454aae (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c211b1600b8777f4967f3f8f96c21e8d7f9bb228
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sun Aug 10 14:14:11 2014 -0700
additional debugging/profiling info for billing, RT#30238
diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm
index 2f01b2d..6191eb8 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -106,7 +106,7 @@ options of those methods are also available.
sub bill_and_collect {
my( $self, %options ) = @_;
- my $log = FS::Log->new('bill_and_collect');
+ my $log = FS::Log->new('FS::cust_main::Billing::bill_and_collect');
my %logopt = (object => $self);
$log->debug('start', %logopt);
@@ -379,7 +379,10 @@ sub bill {
return '' if $self->payby eq 'COMP';
local($DEBUG) = $FS::cust_main::DEBUG if $FS::cust_main::DEBUG > $DEBUG;
+ my $log = FS::Log->new('FS::cust_main::Billing::bill');
+ my %logopt = (object => $self);
+ $log->debug('start', %logopt);
warn "$me bill customer ". $self->custnum. "\n"
if $DEBUG;
@@ -408,11 +411,13 @@ sub bill {
local $FS::UID::AutoCommit = 0;
my $dbh = dbh;
+ $log->debug('acquiring lock', %logopt);
warn "$me acquiring lock on customer ". $self->custnum. "\n"
if $DEBUG;
$self->select_for_update; #mutex
+ $log->debug('running pre-bill events', %logopt);
warn "$me running pre-bill events for customer ". $self->custnum. "\n"
if $DEBUG;
@@ -428,6 +433,7 @@ sub bill {
return $error;
}
+ $log->debug('done running pre-bill events', %logopt);
warn "$me done running pre-bill events for customer ". $self->custnum. "\n"
if $DEBUG;
@@ -458,6 +464,7 @@ sub bill {
next if $options{'no_prepaid'} && $part_pkg->is_prepaid;
+ $log->debug('bill package '. $cust_pkg->pkgnum, %logopt);
warn " bill package ". $cust_pkg->pkgnum. "\n" if $DEBUG;
#? to avoid use of uninitialized value errors... ?
@@ -749,6 +756,7 @@ sub bill {
? ( $previous_bill->billing_balance + $previous_bill->charged )
: 0;
+ $log->debug('creating the new invoice', %logopt);
warn "creating the new invoice\n" if $DEBUG;
#create the new invoice
my $cust_bill = new FS::cust_bill ( {
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main/Billing.pm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list