Summary: | Notice template tool enhancement | ||
---|---|---|---|
Product: | Koha | Reporter: | Francois Charbonnier <francois.charbonnier> |
Component: | Notices | Assignee: | Maxime Beaulieu <maxime.beaulieu> |
Status: | BLOCKED --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | charles.farmer, chris, eivin, eric.begin, indradg, jonathan.druart, martin, maxime.beaulieu, nengard, patrick.robitaille, philippe.blouin, viktor.sarge |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14666 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13816 |
||
Change sponsored?: | Sponsored | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 12769 | ||
Bug Blocks: | |||
Attachments: |
Bug 12770 - Notice template tool enhancement
Bug 12770 - Notice template tool enhancement |
Description
Francois Charbonnier
2014-08-15 13:08:11 UTC
Hi, just a quick question - I still have to read through the whole RFC: you write accountlines will be different to <items.fine> as it works inside <item> - but I think that is what <<items.fine>> does and how we use it currently. It outputs the fine for the specific item. I think I might misunderstand what is meant, can you explain? You're right Katrin. It does but <itemaccountlines> will do moreé <fine> and <itemaccountline> will work with <item>. * <fine> displays the fine for a specific item. * <itemaccountline> will display the fine for a specific item + fees + the replacementcost if charged AND built a table to display the information. (See the mock-up in the rfc wiki page) Created attachment 34336 [details] [review] Bug 12770 - Notice template tool enhancement To test: This patch adds new tags for the notice template tool. They helps building invoices. The new tags are : <itemaccountlines> and <accountlines> to display information from biblio, biblioitems, items and accountlines table. <<noticefee>> to display the notice fee (for future use. It's not usable before bug 12769 is pushed to master) <<total>> to display the invoice total The invoice generated with these tags will take the patron item daily fees, either charged by the fines.pl script or by the librarian directly throught the fine tab. To test this : 1. Apply patch and update the database. 2. Add to the ODUE notice template (or any other late notice templates) this code (it's an example using html.) <table style="width:70%; border: 1px solid black; border-collapse: collapse"> <tr> <th align="center" style="border: 1px solid black; border-collapse: collapse">TITLE</th> <th align="center" style="border: 1px solid black; border-collapse: collapse">AUTHOR</th> <th align="center" style="border: 1px solid black; border-collapse: collapse">BARCODE</th> <th align="center" style="border: 1px solid black; border-collapse: collapse">ITEMCALLNUMBER</th> <th align="center" style="border: 1px solid black; border-collapse: collapse">FINE</th> </tr> <itemaccountlines> <tr> <td align="center" style="border: 1px solid black; border-collapse: collapse"><<biblio.title>></td> <td align="center" style="border: 1px solid black; border-collapse: collapse"><<biblio.author>></td> <td align="center" style="border: 1px solid black; border-collapse: collapse"><<items.barcode>></td> <td align="center" style="border: 1px solid black; border-collapse: collapse"><<items.itemcallnumber>></td> <td align="center" style="border: 1px solid black; border-collapse: collapse">$</td> </tr> <accountlines> <tr> <td align="right" colspan=4 style="border: 1px solid black; border-collapse: collapse"><<accountlines.description>><<accountlines.note>> +</td> <td style="border: 1px solid black; border-collapse: collapse"><<accountlines.amountoutstanding>></td> </tr> </accountlines> </itemaccountlines> <tr> <td align="right" colspan=4 style="border: 1px solid black; border-collapse: collapse">Notice fee +</td> <td style="border: 1px solid black; border-collapse: collapse"><<noticefee>></td> <tr> <tr> <td align="right" colspan=4 style="border: 1px solid black; border-collapse: collapse"><b>TOTAL =</b></td> <td style="border: 1px solid black; border-collapse: collapse"><b><<total>></b></td> <tr> </table> 3. Checkout items with a due dates in the past to get the ODUE notice and fines according to your set up 4. Run fines.pl 5. Run overdue_notices.pl 6. Run process_message_queue.pl Check that : 7. the overdue notice diplays the fines correctly. If you used the example, it should be a table with the title, author, barcode, itemcallnumber. For each late items with fines, you should have the fine descriptions, notes and amounts to cover. You also should see the total amount to pay. I have tested this quite extensively both from a clean master and with patch 12769 installed. There is something that does not work as it should since the table is created and accountlines values are shown while itemaccountlines values are not shown. To be more specific none of the values in this part shows up: <itemaccountlines> <tr> <td align="center" style="border: 1px solid black; border-collapse: collapse"><<biblio.title>></td> <td align="center" style="border: 1px solid black; border-collapse: collapse"><<biblio.author>></td> <td align="center" style="border: 1px solid black; border-collapse: collapse"><<items.barcode>></td> <td align="center" style="border: 1px solid black; border-collapse: collapse"><<items.itemcallnumber>></td> <td align="center" style="border: 1px solid black; border-collapse: collapse">$</td> (In reply to Eivin Giske Skaaren from comment #5) > There is something that does not work as it should since the table is > created and accountlines values are shown while itemaccountlines values are > not shown. Hi Eivin, I just retested the patch. I could see the item's data in the table. Can you test this again? Make sure a fine is added to the item. ( accountlines table ) Tried to apply patch to master (208400f) but got merge conflicts in misc/cronjobs/overdue_notices.pl. It works well against 2331a21 (random pick from 2015-07-21 when patch was last said to work). All values show as described. Would perhaps be nice to add accountlines in the SQLfieldnames ($field_selection, letter.pl:247)? Created attachment 43442 [details] [review] Bug 12770 - Notice template tool enhancement Fixed merge conflict and rebased. Tested OK. Values now show up i table. Signed-off-by: Eivin Giske Skaaren <eivin@sysmystic.com> Blocked by 12769. At first glance I don't understand the change made in C4::Letters. And no tests for this change. Then, you add sql queries to pl file: should be in module and covered by tests. |