1 package FS::Cron::breakage;
5 use vars qw( @EXPORT_OK );
7 use FS::Record qw(qsearch);
11 @EXPORT_OK = qw ( reconcile_breakage );
14 # -v: enable debugging
17 sub reconcile_breakage {
21 my $conf = new FS::Conf;
23 foreach my $agent (qsearch('agent', {})) {
25 my $days = $conf->config('breakage-days', $agent->agentnum)
28 #find customers w/a balance older than $days (and no activity since)
30 # - do a one time charge in the total amount of old unapplied payments.
31 # 'pkg' => 'Breakage', #or whatever.
33 # 'classnum' => scalar($conf->config('breakage-pkg_class')),
34 # - use the new $cust_main->charge( 'bill_now' => 1 ) option to generate an invoice, etc.
35 # - apply_payments_and_credits