projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
additional due_cust_event debugging
[freeside.git]
/
FS
/
FS
/
Cron
/
bill.pm
diff --git
a/FS/FS/Cron/bill.pm
b/FS/FS/Cron/bill.pm
index
38fbae5
..
e4ba118
100644
(file)
--- a/
FS/FS/Cron/bill.pm
+++ b/
FS/FS/Cron/bill.pm
@@
-18,10
+18,13
@@
sub bill {
my $check_freq = $opt{'check_freq'} || '1d';
my $check_freq = $opt{'check_freq'} || '1d';
- $FS::cust_main::DEBUG = 1 if $opt{'v'};
- $FS::cust_main::DEBUG = $opt{'l'} if $opt{'l'};
+ my $debug = 0;
+ $debug = 1 if $opt{'v'};
+ $debug = $opt{'l'} if $opt{'l'};
+
+ $FS::cust_main::DEBUG = $debug;
#$FS::cust_event::DEBUG = $opt{'l'} if $opt{'l'};
#$FS::cust_event::DEBUG = $opt{'l'} if $opt{'l'};
-
+
my %search = ();
$search{'payby'} = $opt{'p'} if $opt{'p'};
$search{'agentnum'} = $opt{'a'} if $opt{'a'};
my %search = ();
$search{'payby'} = $opt{'p'} if $opt{'p'};
$search{'agentnum'} = $opt{'a'} if $opt{'a'};
@@
-44,7
+47,7
@@
sub bill {
)
)
END
)
)
END
-
+
my $where_event = join(' OR ', map {
my $eventtable = $_;
my $where_event = join(' OR ', map {
my $eventtable = $_;
@@
-76,7
+79,7
@@
END
my $extra_sql = ( scalar(%search) ? ' AND ' : ' WHERE ' ).
"( $where_pkg OR $where_event )";
my $extra_sql = ( scalar(%search) ? ' AND ' : ' WHERE ' ).
"( $where_pkg OR $where_event )";
-
+
my @cust_main;
if ( @ARGV ) {
@cust_main = map { qsearchs('cust_main', { custnum => $_, %search } ) } @ARGV
my @cust_main;
if ( @ARGV ) {
@cust_main = map { qsearchs('cust_main', { custnum => $_, %search } ) } @ARGV
@@
-95,8
+98,7
@@
END
}
}
- my($cust_main,%saw);
- foreach $cust_main ( @cust_main ) {
+ foreach my $cust_main ( @cust_main ) {
if ( $opt{'m'} ) {
if ( $opt{'m'} ) {
@@
-106,7
+108,7
@@
END
'secure' => 'Y',
};
my $error = $queue->insert(
'secure' => 'Y',
};
my $error = $queue->insert(
- 'custnum' =>
$cust_main->custnum,
+ 'custnum' => $cust_main->custnum,
'time' => $time,
'invoice_time' => $invoice_time,
'check_freq' => $check_freq,
'time' => $time,
'invoice_time' => $invoice_time,
'check_freq' => $check_freq,
@@
-120,10
+122,11
@@
END
'invoice_time' => $invoice_time,
'check_freq' => $check_freq,
'resetup' => $opt{'s'},
'invoice_time' => $invoice_time,
'check_freq' => $check_freq,
'resetup' => $opt{'s'},
+ 'debug' => $debug,
);
}
);
}
-
+
}
}
}
}