summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/cust_main.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index e98f70012..293606396 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -2758,8 +2758,14 @@ sub bill {
local $FS::UID::AutoCommit = 0;
my $dbh = dbh;
+ warn "$me acquiring lock on customer ". $self->custnum. "\n"
+ if $DEBUG;
+
$self->select_for_update; #mutex
+ warn "$me running pre-bill events for customer ". $self->custnum. "\n"
+ if $DEBUG;
+
my $error = $self->do_cust_event(
'debug' => ( $options{'debug'} || 0 ),
'time' => $invoice_time,
@@ -2771,6 +2777,9 @@ sub bill {
return $error;
}
+ warn "$me done running pre-bill events for customer ". $self->custnum. "\n"
+ if $DEBUG;
+
#keep auto-charge and non-auto-charge line items separate
my @passes = ( '', 'no_auto' );