Bug 14666 - adds fixed_fines for overdues
Summary: adds fixed_fines for overdues
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-10 08:29 UTC by delaye
Modified: 2018-08-13 07:28 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 14666 - add fixed_fines for overdues (11.50 KB, patch)
2015-10-05 09:29 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 14666 - add fixed_fines for overdues (11.66 KB, patch)
2018-06-14 16:53 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description delaye 2015-08-10 08:29:35 UTC
adds fixed_fines for overdues

    - Add a overduerules.fixed_fineX for the 3 levels
    - Add a column "Fixed fines" in the tools/overduerules.pl page
    - Add column in csv generated by circ/overdue.pl (document_type and
      generatedate = the today's date)
    - Add column in csv generated by overduenoticeS.pl (streetnumber,
      streettype, generatedate, overdue_level
    - Now you can add 'count' and 'total_amount' in circulation letters
      count is "itemcount" and total_amount is the transcription of the
      total_amount (which is the sum of items.price + fixed_fine). The
      langage used is the locale of the system.
    - New dependency : Lingua::Any::Numbers. If you want use fr for example,
      you will have to install Lingua::FR::Numbers too.
Comment 1 Katrin Fischer 2015-08-10 22:29:55 UTC
Hi Stephane,

I am in doubt about this patch - especially the new dependencies. What are they used for? We have a new plugin to format prices now and also some existing code to do that - could it be achieved with the existing modules?

I also think this would be good on separate bugs - for example the colums added to the CSV seem unrelated to the main feature.
Comment 2 Fridolin SOMERS 2015-08-14 13:07:08 UTC
(In reply to Katrin Fischer from comment #1)
> Hi Stephane,
> 
> I am in doubt about this patch - especially the new dependencies. What are
> they used for? We have a new plugin to format prices now and also some
> existing code to do that - could it be achieved with the existing modules?
Ok thanks for the information.

> 
> I also think this would be good on separate bugs - for example the colums
> added to the CSV seem unrelated to the main feature.
Indeed, this bug will only focus on adding fixed_fines to overdue notices.
Comment 3 Fridolin SOMERS 2015-10-05 09:29:55 UTC
Created attachment 43116 [details] [review]
Bug 14666 - add fixed_fines for overdues

- Add a overduerules.fixed_fineX for the 3 levels
- Add a column "Fixed fines" in the tools/overduerules.pl page
Comment 4 Charles Farmer 2015-10-16 13:18:46 UTC
Hi Fridolin,

Could you take a look at Bug 12769? The patch was developed in 2014 to address the issue of adding a fee to any kind of notice, including overdue notices, and from what I see, your needs could be covered by that patch.

If we want to see this feature added to Koha someday, we will have to join our efforts.
Comment 5 Fridolin SOMERS 2015-10-19 14:45:10 UTC
(In reply to Charles Farmer from comment #4)
> Hi Fridolin,
> 
> Could you take a look at Bug 12769?
Nope, thanks  for this
Comment 6 Fridolin SOMERS 2015-10-19 15:46:33 UTC
(In reply to Fridolin SOMERS from comment #5)
> (In reply to Charles Farmer from comment #4)
> > Hi Fridolin,
> > 
> > Could you take a look at Bug 12769?
> Nope, thanks  for this
Sorry I thought you said "Did you have a look at Bug 12769?" :D

So my real answer :
Yes, I'll have a look when I can find time.
Comment 7 Charles Farmer 2015-10-19 15:54:38 UTC
(In reply to Fridolin SOMERS from comment #6)

Thank you for clearing this up ;)
Comment 8 Katrin Fischer 2017-08-17 11:18:14 UTC
Patch doesn't apply at the moment:

CONFLICT (content): Merge conflict in tools/overduerules.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt
Auto-merging installer/data/mysql/kohastructure.sql
CONFLICT (content): Merge conflict in installer/data/mysql/kohastructure.sql

The code looks clean, but appears to contain only the CRUD for the GUI, not the actually charging of the fine yet.
Comment 9 Victor Grousset/tuxayo 2018-06-14 16:53:43 UTC
Created attachment 76063 [details] [review]
Bug 14666 - add fixed_fines for overdues

- Add a overduerules.fixed_fineX for the 3 levels
- Add a column "Fixed fines" in the tools/overduerules.pl page
Comment 10 Victor Grousset/tuxayo 2018-06-14 16:57:38 UTC
Rebased and compared the old and new patches to check that nothing was lost or added.
Comment 11 Katrin Fischer 2018-07-14 12:26:32 UTC
The bug title is not very descrpitive, maybe fix in order to lure testers in? Should this still be "In discussion" or NSO?
Comment 12 Victor Grousset/tuxayo 2018-08-01 20:52:40 UTC
There doesn't seems to be any pending points right?
Comment 13 Victor Grousset/tuxayo 2018-08-01 20:56:26 UTC
Wait, maybe comment 4 is still valid? Or should we move on independently of bug 12769 that might be to wide to manage to make it through? (and which is also in discussion)
Comment 14 Victor Grousset/tuxayo 2018-08-01 20:58:56 UTC
> The bug title is not very descrpitive, maybe fix in order to lure testers in?

"Add fees when overdue notices triggers" ? I'm not sure to understand well enough to be sure if that's the aim.
Comment 15 Jonathan Druart 2018-08-07 13:53:22 UTC
(In reply to Victor Grousset/tuxayo from comment #12)
> There doesn't seems to be any pending points right?

This is a very old fashioned way of doing it (I know I wrote that code years ago), but it works.

IIRC the main problem was to make it consistent with bug 12769.