Bugzilla – Attachment 91657 Details for
Bug 15283
Switch default ISSUEQSLIP notice to Template Toolkit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15283: Switch default ISSUEQSLIP notice to TT
Bug-15283-Switch-default-ISSUEQSLIP-notice-to-TT.patch (text/plain), 3.99 KB, created by
Martin Renvoize (ashimema)
on 2019-07-19 14:47:11 UTC
(
hide
)
Description:
Bug 15283: Switch default ISSUEQSLIP notice to TT
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-07-19 14:47:11 UTC
Size:
3.99 KB
patch
obsolete
>From 81fdd92b6ba85a5bf4a36ed177057734d10950b8 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 19 Jul 2019 15:40:08 +0100 >Subject: [PATCH] Bug 15283: Switch default ISSUEQSLIP notice to TT > >Test Plan: >1) Apply this patch >2) Replace your ISSUESLIP with the following: > >[%- USE KohaDates -%] ><h3>[% branch.branchname %]</h3> >Checked out to [% patron.title %] [% patron.firstname %] [% patron.initials %] [% patron.surname %] <br /> >([% patron.cardnumber %]) <br /> > >[% today | $KohaDates %]<br /> > ><h4>Checked Out Today</h4> >[% FOREACH checkout IN patron.todays_checkouts %] ><p> > [% checkout.item.biblio.title %] </br /> > Barcode: [% checkout.item.barcode %]<br /> > Date due: [% checkout.date_due %]<br /> ></p> >[% END %] > >3) Print a quick slip for a patron, note the data is complete > >Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Patron.pm | 39 +++++++++++++++++++ > .../mysql/en/mandatory/sample_notices.sql | 20 +++++----- > 2 files changed, 50 insertions(+), 9 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index f0ab2d4d3e..eef53b553b 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -882,6 +882,45 @@ sub checkouts { > return Koha::Checkouts->_new_from_dbic( $checkouts ); > } > >+=head3 todays_checkouts >+ >+my $todays_checkouts = $patron->todays_checkouts >+ >+This method will return a filtered set of patron checkouts limited by those that have taken place today. >+ >+=cut >+ >+sub todays_checkouts { >+ my ($self) = @_; >+ my $dtf = Koha::Database->new->schema->storage->datetime_parser; >+ my $today_start = >+ dt_from_string->set( hour => 0, minute => 0, second => 0 ); >+ my $today_end = >+ dt_from_string->set( hour => 23, minute => 59, second => 0 ); >+ >+ my $checkouts = $self->_result->issues->search( >+ { >+ -or => { >+ issuedate => { >+ '>=' => $dtf->format_datetime($today_start), >+ '<=' => $dtf->format_datetime($today_end), >+ }, >+ lastreneweddate => { >+ '>=' => $dtf->format_datetime($today_start), >+ '<=' => $dtf->format_datetime($today_end), >+ } >+ } >+ }, >+ { >+ order_by => [ >+ -desc => 'me.lastreneweddate', >+ -desc => 'me.issuedate' >+ ] >+ } >+ ); >+ return Koha::Checkouts->_new_from_dbic($checkouts); >+} >+ > =head3 pending_checkouts > > my $pending_checkouts = $patron->pending_checkouts >diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql >index 6d676e73e6..210353064f 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.sql >+++ b/installer/data/mysql/en/mandatory/sample_notices.sql >@@ -91,20 +91,22 @@ Date due: <<issues.date_due>><br /> > <hr /> > </div> > </news>', 1), >-('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<h3><<branches.branchname>></h3> >-Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >-(<<borrowers.cardnumber>>) <br /> >+('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '[%- USE KohaDates -%] >+<h3>[% branch.branchname %]</h3> >+Checked out to [% patron.title %] [% patron.firstname %] [% patron.initials %] [% patron.surname %] <br /> >+([% patron.cardnumber %]) <br /> > >-<<today>><br /> >+[% today | $KohaDates %]<br /> > > <h4>Checked Out Today</h4> >-<checkedout> >+[% FOREACH checkout IN patron.todays_checkouts %] > <p> >-<<biblio.title>> <br /> >-Barcode: <<items.barcode>><br /> >-Date due: <<issues.date_due>><br /> >+ [% checkout.item.biblio.title %] </br /> >+ Barcode: [% checkout.item.barcode %]<br /> >+ Date due: [% checkout.date_due %]<br /> > </p> >-</checkedout>', 1), >+[% END %] >+', 1), > ('circulation','HOLD_SLIP','Hold Slip','Hold Slip', '<h5>Date: <<today>></h5> > > <h3> Transfer to/Hold in <<branches.branchname>></h3> >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15283
:
45332
|
45335
|
45336
|
70651
|
91656
| 91657