Bug 15364 - fines and invoices in letter templates
Summary: fines and invoices in letter templates
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Martin Stenberg
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-13 14:48 UTC by Martin Stenberg
Modified: 2024-07-04 20:38 UTC (History)
5 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
Bug 15364: accountlines variable in letters (19.43 KB, patch)
2015-12-17 12:50 UTC, Martin Stenberg
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Stenberg 2015-12-13 14:48:30 UTC
Add letter template variables for accountlines (where amountoutstanding > 0).

Use case
========

Your fines:

<accountlines>
<<accountlines.amountoutstanding>>    <<accountlines.description>>
</accounlines>
Totalt: <<accountlines.total>>
Comment 1 Katrin Fischer 2015-12-13 17:20:15 UTC
Hi Martin, I think a lot of people will like this - which letters are you thinking about?
Comment 2 Martin Stenberg 2015-12-13 17:25:10 UTC
Hi Katrin,

I'm thinking of the "Notices & Slips"-letters
Comment 3 Katrin Fischer 2015-12-13 17:26:49 UTC
That's very broad :) You might have to exclude some of them, like the claims letters - but I think it could work for all the letters that are intended to be sent to the patrons.
Comment 4 Martin Stenberg 2015-12-13 17:34:34 UTC
:D thanks, I'll try to narrow it down to reasonable proportions :)
Comment 5 Martin Stenberg 2015-12-17 12:50:20 UTC
Created attachment 45768 [details] [review]
Bug 15364: accountlines variable in letters

Add accountlines variable to letter templates for advance_notices and
overdue_notices.

Test plan
=========
1. Edit the overdue notice template to look like this:

    <accountline><<accountlines.amountoutstanding>> - <<accountlines.description>></accountline>

    Total: <<accountlines.total>>

2. Make sure at least one patron has at least one accountline, if not, create
   one by checking out an item with a past due date.
3. run bin/cronjobs/overdue_notices.pl and check the generated mail content
4. run bin/cronjobs/advance_notices.pl and check the generated mail content
5. generated mail content should look something like this:

    $5 - Fine
    $10 - Rent

    Total: $15
Comment 6 Chris Cormack 2016-06-03 12:53:40 UTC
CONFLICT (content): Merge conflict in misc/cronjobs/overdue_notices.pl

I think it is a simple conflict, but not sure, if you could take a look I'll try to sign off again tomorrow
Comment 7 Katrin Fischer 2023-08-28 20:11:47 UTC
I think we can now do this with TT and would probably want to not introduce new 'hungry alligator' patterns. Closing, please reopen if you disagree.