https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43941 Bug ID: 43941 Summary: Add template plugin for fetching processing fee Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: lucas@bywatersolutions.com, martin.renvoize@openfifth.co.uk Depends on: 36506 Target Milestone: --- When Bug 36506 moved processing fees into the circulation rules it become much harder to include in an overdue notice. Previously, one could use [% overdue.item.itemtype.processfee %] to get the processing fee for the item type of a checked out item. Now one must get the relevant circ rule value, which requires knowing which branch to use based on the LostChargesControl and HomeOrHoldingBranch system preferences. It would be great to add a template plugin to allow one to use [% overdue.item.processing_fee %] and let Koha handle the work of checking system preferences and requesting the rule value. For reference, here's a basic notice template: [%- USE CirculationRules -%] [%- USE Koha -%] [%- SET lost_pref = Koha.Preference('LostChargesControl') -%] [%- SET item_field = Koha.Preference('HomeOrHoldingBranch') -%] Dear [% borrower.firstname %] [% borrower.surname %], These items are overdue: [% FOREACH odue IN overdues %] [%- SET process_branch = lost_pref == 'ItemHomeLibrary' ? c.item.$item_field : lost_pref == 'PickupLibrary' ? c.item.checkout.branchcode : borrower.branchcode -%] [%- SET processfee = CirculationRules.Get( process_branch, borrower.categorycode, c.item.effective_itemtype, 'lost_item_processing_fee' ) || 0 -%] "[% odue.item.biblio.title %]" by [% odue.item.biblio.author %], [% odue.item.itemcallnumber %], Barcode: [% odue.item.barcode %], Fine: [% overdue.overdue_fines.total_outstanding %] Replacement price: [% odue.item.replacementprice %] Processing fee: [% processfee %] [% END %] Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36506 [Bug 36506] Processing fee should be configurable by library -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.