Bug 21739 - 'Copier fees' should not be used as accounttype on maninvoice.pl
Summary: 'Copier fees' should not be used as accounttype on maninvoice.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 23049
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-31 14:31 UTC by Nick Clemens
Modified: 2020-11-30 21:44 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.