Bug 7638 - Add tool for printing patron notices
Summary: Add tool for printing patron notices
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-01 22:49 UTC by Melia Meggs
Modified: 2020-07-02 16:43 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Melia Meggs 2012-03-01 22:49:21 UTC
Our schools want a paper notice to send to students.  They want it to print one 8 1/2 x 11 page per student.  They want all fines, fees, and lost to be on one report.  I did create a SQL report that is working, but the schools want to be able to print this out on one piece of paper per student.  Below is the SQL statement I made:

SELECT b.cardnumber, b.surname, b.firstname, g.attribute AS 'Grade', h.attribute AS 'Homeroom', a.date, a.description, a.accounttype, a.amount, a.amountoutstanding
FROM borrowers b JOIN borrower_attributes g on (b.borrowernumber=g.borrowernumber)
JOIN borrower_attributes as h ON (h.borrowernumber=b.borrowernumber)
JOIN accountlines a ON (b.borrowernumber=a.borrowernumber)
WHERE b.branchcode =<<Pick your library|branches>>
AND a.date between <<Date Between (yyyy-mm-dd)>> and <<and (yyyy-mm-dd)>>
AND g.code='GRADE'
AND h.code='Homeroom'
ORDER BY a.accounttype ASC
Name (Last, First) or in 2 separate fields
Student ID number
Grade
Homeroom (even if the homeroom field is blank)
Item Title
Date Checked Out
Due Date
Item Status
Amount Due
Comment 1 Savitra Sirohi 2012-03-12 14:42:35 UTC
Draft Design:

A new tool called "Print Patron notices", that can perhaps be extended later to print other kinds of notices.

A default template (ACCTLINES_PRINT) will be created as part of this patch. The template will contain a header with borrower and borrower attributes fields and a body containing accountlines fields such as accounttype, amount, date. 

A mechanism to specify which borrower attribute(s) are to included in the notice will be provided. E.g. <<borrower_attributes.attribute|GRADE>> will allow the attribute for code "GRADE" to be included.

Only those acccountlines records that have outstanding amounts > 0 will be displayed in the report.

The tool will generate a PDF file containing a report per patron, each report will contain text per the notice template. Following filters will be made available during report generation:

Branch
Patron category
Transaction date range

The pages in the PDF fike will be of size Letter (8.5*11) by default. This can be extended later to include other paper sizes.
Comment 2 Nicole C. Engard 2012-03-13 12:51:22 UTC
For this section:

Following filters will be made available during report generation:

Branch
Patron category
Transaction date range

I would note with branch we're talking about - the patron's branch?

Also, will the notice allow for customization of what fields show from the accountlines table? You mention the defaults that will be in the template, but I just want to be clear.

Thanks a ton!
Nicole
Comment 3 Kyle M Hall 2012-03-13 13:43:28 UTC
As an alternative to PDF, it may be better to use html and css. I've done this before, it's possible to create page breaks using css, and it is much easier to work with HTML than it is to create PDF files. I know this from personal experience. This also means we could use the notices system to make this template-able. Customizing a PDF would be far more difficult.

http://davidwalsh.name/css-page-breaks
Comment 4 Ian Walls 2012-03-13 18:15:44 UTC
I highly recommend avoiding direct PDF generation; better to use HTML and CSS, then let the browser print to PDF.  Lots of the open source PDF tools are... limited... as we've seen with the Labels tool bug 2246.
Comment 5 Katrin Fischer 2019-04-28 21:28:49 UTC
I really like the ideas of a tool to print patron notices, but it would need some updates to fit into current practices.

No action since 2012, resetting assignee.