Bug 4858

Summary: Ability to Charge for Print Notices
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: NoticesAssignee: Jacob O'Mara <jacob.omara>
Status: Needs Signoff --- QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: P5 - low CC: josef.moravec, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12769
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 4858: Add patron category column and debit type for print notice charging
Bug 4858: Implement print notice charging backend logic to scripts
Bug 4858: Add print notice charge account management interface updates
Bug 4858: Add staff messaging preferences interface for print notice charging
Bug 4858: Add category based print notice charging support to patron.pm
Bug 4858: Add tests for print notice charging
Bug 4858: Add OPAC interface updates for print notice charging
Bug 4858: Add validation enhancements to print notice charging
Bug 4858: Messaging print preference should be checked by default
Bug 4858: Add print message transports to installer and atomic update
Bug 4858: Add print_notice_charge to categories api definition
Bug 4858: DO NOT PUSH - DBIC

Description Nicole C. Engard 2010-06-08 12:43:57 UTC
With budgets being cut left and right, it would be great if libraries had the ability to choose to charge patrons who insisted on receiving notices (overdue and hold waiting) via snail mail.
Comment 1 Katrin Fischer 2013-04-13 19:05:27 UTC
i had libraries asking for a way to charge postage fees too.
Comment 2 Jacob O'Mara 2025-09-16 17:01:02 UTC
Created attachment 186491 [details] [review]
Bug 4858: Add patron category column and debit type for print notice charging

- Add print_notice_charge patron category column to set charge amount
- Add PRINT_NOTICE debit type for billing system integration
- Create atomic update for existing installations

This provides the foundation for implementing print notice charging
to recover postage and processing costs.

To test:
prove -vv t/db_dependent/Koha/Account/PrintNoticeCharges.t
prove -vv t/db_dependent/Koha/Patron/Category.t
prove -vv t/db_dependent/PrintNoticeCharging_EndToEnd.t

Navigate to patron categories, and check that you can set a print notice
charge amount
Check that in messaging preferences, you can amend the preferences of
print notices for both patrons and patron categories
Check that in messaging preferences on the opac, you will receive a
warning if print notice charging is enabled (set to anything other than
0 for this patron category) and a recommendation to set up email to
avoid charges.
Comment 3 Jacob O'Mara 2025-09-16 17:01:16 UTC
Created attachment 186492 [details] [review]
Bug 4858: Implement print notice charging backend logic to scripts

- Update misc/cronjobs/gather_print_notices.pl to apply charges
- Add --skip-charges option for testing purposes
Comment 4 Jacob O'Mara 2025-09-16 17:01:29 UTC
Created attachment 186493 [details] [review]
Bug 4858: Add print notice charge account management interface updates

- Update accounts.inc templates to display PRINT_NOTICE debit type
  * Staff interface:
koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc
  * OPAC interface:
koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc
  * Test templates: t/mock_templates for English and French-Canadian
  * All show 'Print notice charge' description for PRINT_NOTICE debits
Comment 5 Jacob O'Mara 2025-09-16 17:01:39 UTC
Created attachment 186494 [details] [review]
Bug 4858: Add staff messaging preferences interface for print notice charging

- Update messaging-preference-form.inc to include print transport column
- Update memberentry.pl controller with print charging context
- Add print charge warning to memberentrygen.tt template
Comment 6 Jacob O'Mara 2025-09-16 17:01:47 UTC
Created attachment 186495 [details] [review]
Bug 4858: Add category based print notice charging support to patron.pm

This adds the ability to define print charge notice amounts at a patron
category level.
Comment 7 Jacob O'Mara 2025-09-16 17:01:53 UTC
Created attachment 186496 [details] [review]
Bug 4858: Add tests for print notice charging

- Covers enabled/disabled states, custom amounts, error conditions

Add missing executable privs
Comment 8 Jacob O'Mara 2025-09-16 17:01:56 UTC
Created attachment 186497 [details] [review]
Bug 4858: Add OPAC interface updates for print notice charging

- Enhanced opac-messaging.pl to provide print notice charging context
- Added warnings in OPAC messaging preferences for patrons without email
- Implemented helpful information section about avoiding print charges
- Updated OPAC account page with explanatory information about print
charges
Comment 9 Jacob O'Mara 2025-09-16 17:01:58 UTC
Created attachment 186498 [details] [review]
Bug 4858: Add validation enhancements to print notice charging

- Add input validation in add_print_notice_charge method
Comment 10 Jacob O'Mara 2025-09-16 17:02:00 UTC
Created attachment 186499 [details] [review]
Bug 4858: Messaging print preference should be checked by default
Comment 11 Jacob O'Mara 2025-09-16 17:02:02 UTC
Created attachment 186500 [details] [review]
Bug 4858: Add print message transports to installer and atomic update
Comment 12 Jacob O'Mara 2025-09-16 17:02:05 UTC
Created attachment 186501 [details] [review]
Bug 4858: Add print_notice_charge to categories api definition
Comment 13 Jacob O'Mara 2025-09-16 17:02:07 UTC
Created attachment 186502 [details] [review]
Bug 4858: DO NOT PUSH - DBIC