projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
69f252e
)
better debugging
author
ivan
<ivan>
Wed, 27 Feb 2002 21:57:24 +0000
(21:57 +0000)
committer
ivan
<ivan>
Wed, 27 Feb 2002 21:57:24 +0000
(21:57 +0000)
FS/FS/cust_main.pm
patch
|
blob
|
history
FS/bin/freeside-daily
patch
|
blob
|
history
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
b6d3075
..
7445e35
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-1102,7
+1102,7
@@
sub collect {
my $dbh = dbh;
my $balance = $self->balance;
my $dbh = dbh;
my $balance = $self->balance;
- warn "collect: balance $balance" if $Debug;
+ warn "collect
customer". $self->custnum. "
: balance $balance" if $Debug;
unless ( $balance > 0 ) { #redundant?????
$dbh->rollback if $oldAutoCommit; #hmm
return '';
unless ( $balance > 0 ) { #redundant?????
$dbh->rollback if $oldAutoCommit; #hmm
return '';
@@
-1140,10
+1140,16
@@
sub collect {
qsearch('part_bill_event', { 'payby' => $self->payby,
'disabled' => '', } )
) {
qsearch('part_bill_event', { 'payby' => $self->payby,
'disabled' => '', } )
) {
- #run callback
+ warn "calling invoice event (". $part_bill_event->eventcode. ")\n"
+ if $Debug;
my $cust_main = $self; #for callback
my $error = eval $part_bill_event->eventcode;
my $cust_main = $self; #for callback
my $error = eval $part_bill_event->eventcode;
+ if ( $@ ) {
+ warn "fatal error running invoice event (". part_bill_event->eventcode.
+ "): $@";
+ }
+
if ( $error ) {
warn "Error running invoice event (". $part_bill_event->eventcode.
if ( $error ) {
warn "Error running invoice event (". $part_bill_event->eventcode.
diff --git
a/FS/bin/freeside-daily
b/FS/bin/freeside-daily
index
8d839cb
..
e6f02df
100755
(executable)
--- a/
FS/bin/freeside-daily
+++ b/
FS/bin/freeside-daily
@@
-9,12
+9,14
@@
use FS::Record qw(qsearch qsearchs);
use FS::cust_main;
&untaint_argv; #what it sounds like (eww)
use FS::cust_main;
&untaint_argv; #what it sounds like (eww)
-use vars qw($opt_d);
-getopts("d:");
+use vars qw($opt_d
$opt_v
);
+getopts("d:
v
");
my $user = shift or die &usage;
adminsuidsetup $user;
my $user = shift or die &usage;
adminsuidsetup $user;
+$FS::cust_main::Debug = 1 if $opt_v;
+
my @cust_main = @ARGV
? map { qsearchs('cust_main', { custnum => $_ } ) } @ARGV
: qsearch('cust_main', {} )
my @cust_main = @ARGV
? map { qsearchs('cust_main', { custnum => $_ } ) } @ARGV
: qsearch('cust_main', {} )