@@ -, +, @@ Run: t/db_dependent/Accounts.t --- misc/cronjobs/cleanup_database.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) --- a/misc/cronjobs/cleanup_database.pl +++ a/misc/cronjobs/cleanup_database.pl @@ -39,10 +39,11 @@ use C4::Dates; use C4::Search; use Getopt::Long; use C4::Log; +use C4::Accounts; sub usage { print STDERR < \$pImport, 'z3950' => \$pZ3950, 'logs:i' => \$pLogs, + 'fees:i' => \$fees_days, 'searchhistory:i' => \$pSearchhistory, 'list-invites:i' => \$pListShareInvites, 'restrictions:i' => \$pDebarments, @@ -116,6 +121,7 @@ unless ( $sessions || $purge_merged || $pImport || $pLogs + || $fees_days || $pSearchhistory || $pZ3950 || $pListShareInvites @@ -222,6 +228,12 @@ if ($pLogs) { print "Done with purging action_logs.\n" if $verbose; } +if ($fees_days) { + print "Purging records from accountlines.\n" if $verbose; + purge_zero_balance_fees( $fees_days ); + print "Done purging records from accountlines.\n" if $verbose; +} + if ($pSearchhistory) { print "Purging records older than $pSearchhistory from search_history.\n" if $verbose; PurgeSearchHistory($pSearchhistory); --