Bug 21739

Summary: 'Copier fees' should not be used as accounttype on maninvoice.pl
Product: Koha Reporter: Nick Clemens <nick>
Component: Fines and feesAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: josef.moravec, katrin.fischer, martin.renvoize, tomascohen
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23636
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 23049    
Bug Blocks:    

Description Nick Clemens 2018-10-31 14:31:47 UTC
To recreate (with strict mode enabled)

1 - Pull up a patron's fines tab
2 - Add a manual fine
3 - Select type 'Copier fees'
4 - Try to add the fine

DBIx::Class::Storage::DBI::_dbh_execute(): Data too long for column 'accounttype' at row 1 at /home/vagrant/kohaclone/Koha/Object.pm line 125
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77
Comment 1 Katrin Fischer 2018-10-31 21:28:28 UTC
The problem is that this comes form MANUAL_INV, where you have to put the description in the authorised value (the code...) to make it show up correctly. It's always been used as accounttype, but the field is too short.

So at the moment, it will be shortened to fit in... no longer with strict mode.

I think we can't use one hard coded account type for all MANUAL_INV entries, as libraries need to be able to tell them apart (ILL fee from copier fees...)

So what can we do?
Comment 2 Tomás Cohen Arazi 2018-10-31 22:34:55 UTC
It should be handled the same way payment types are. A hardcoded generic accounttype and then a debit_type
Comment 3 Katrin Fischer 2018-10-31 22:37:04 UTC
I am not sure how that works, can you give an example?

And will it fix the no code but only a lengthy description issue?
Comment 4 Martin Renvoize 2020-01-07 22:15:08 UTC
There is now a dedicated debit_types table and handling to optionally enable/disable types for manual invoices.