https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27080
--- Comment #28 from Martin Renvoize <martin.renvo...@ptfs-europe.com> --- Comment on attachment 114323 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114323 Bug 27080: Add --statute-barred-fees option to cleanup_database.pl. Review of attachment 114323: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=27080&attachment=114323) ----------------------------------------------------------------- A few comments whilst I wrap my head around the requirements. ::: misc/cronjobs/cleanup_database.pl @@ +354,5 @@ > +if ($statue_barred_fees_days) { > + my $date = $dtf->format_datetime( DateTime->now->subtract(days => > $statue_barred_fees_days) ); > + my $accountlines = Koha::Account::Lines->search({ > + amountoutstanding => { '>' => 0 }, > + status => 'RETURNED', 1) Do you not want to limit by "debit_type_code => 'OVERDUE'" to ensure you only catch overdue fines? 2) Limiting to "status => 'RETURNED'" will mean you miss accruing fines, fines fixed at the point of the lose of the item being reported and others 3) Is there any difference between a partially paid and completely unpaid fee in the legal context that needs taking care of? @@ +359,5 @@ > + date => { '<=' => $date } > + }); > + if ( $confirm ) { > + say "Purging " . $accountlines->count . " statute-barred fees from > accountlines." if $verbose; > + $accountlines->delete; Hmm.. should this really be a delete rather than a recorded writeoff... the mere fact the function is found inside cleanup_database makes me think you know that you do want to delete entirely rather than record the writeoff (of a statute-barred type). You may want to also take care of offsets here, else you will be leaving behind related data I think. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/