Bug 34078 - Add --branchcode to writeoff_debts.pl
Summary: Add --branchcode to writeoff_debts.pl
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 27049
Blocks:
  Show dependency treegraph
 
Reported: 2023-06-21 14:13 UTC by Caroline Cyr La Rose
Modified: 2024-03-05 21:00 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2023-06-21 14:13:08 UTC
I think it would be useful to have a branchcode flag to the writeoff_debts.pl script.

My specific use case is that I wanted to use it in an Independent branch environment to writeoff fines for a specific branch.

I'm sure there are other use cases (one branch was closed or something).
Comment 1 Martin Renvoize (ashimema) 2023-10-17 11:44:30 UTC
So.. for clarification.. you mean the library the charge was recorded at.. not the patrons library or the checkouts library or... right?

It would be simple enough to filter on the branchcode as recorded in the accountlines table.. I just wanted to clarify that's what you want.. not the branchcodes from various related tables?
Comment 2 Caroline Cyr La Rose 2024-03-05 21:00:00 UTC
(In reply to Martin Renvoize from comment #1)
> So.. for clarification.. you mean the library the charge was recorded at..
> not the patrons library or the checkouts library or... right?
> 
> It would be simple enough to filter on the branchcode as recorded in the
> accountlines table.. I just wanted to clarify that's what you want.. not the
> branchcodes from various related tables?

In my specific case, with independentbranches, I think all branchcodes would be the same since patrons and items can't travel between branches. 

I was going to say that using the branchcode from accountlines would be fine, but it seems it's not recorded for overdue fines? Unless I'm doing something wrong... I added fines in the circ rules, issues an item to a patron with a due date in the past, ran fines.pl, checked accountlines.branchcode and it's NULL.