Bugzilla – Attachment 110395 Details for
Bug 12224
Allow easy printing of patron check-in slip
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12224: Print a slip of borrower's checkins for today
Bug-12224-Print-a-slip-of-borrowers-checkins-for-t.patch (text/plain), 22.60 KB, created by
Owen Leonard
on 2020-09-18 14:03:25 UTC
(
hide
)
Description:
Bug 12224: Print a slip of borrower's checkins for today
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-09-18 14:03:25 UTC
Size:
22.60 KB
patch
obsolete
>From dfc99c95b9438d2ccd5f8fa20709b624eedf1cb7 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 18 Sep 2020 11:58:05 +1200 >Subject: [PATCH] Bug 12224: Print a slip of borrower's checkins for today >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: > >1) Apply patch and run installer >2) Check out two items (or more) to a borrower >3) Check in two items (or more) for this borrower (you should end up on > circ/returns.pl) >4) Notice the checked-in items table has started building. There should >be a new column with the button 'Print checkin slip' in each row. >5) Click the button and confirm the checkin slip opens for printing in a >new window. >6) Go to the patron's account >7) Click the Print dropdown. Confirm there is a 'Print checkin slip' >option. Click this and confirm the checkin slip opens for printing in a >new window. > >Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ) > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../bug_12224-add_CHECKINSLIP_notice.perl | 22 +++++++++++ > .../data/mysql/de-DE/mandatory/sample_notices.sql | 17 +++++++- > .../data/mysql/en/mandatory/sample_notices.yml | 23 +++++++++++ > .../mysql/fr-CA/obligatoire/sample_notices.sql | 15 ++++++- > .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 17 +++++++- > installer/data/mysql/it-IT/necessari/notices.sql | 17 +++++++- > .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 17 +++++++- > .../data/mysql/pl-PL/mandatory/sample_notices.sql | 17 +++++++- > .../data/mysql/ru-RU/mandatory/sample_notices.sql | 17 +++++++- > .../data/mysql/uk-UA/mandatory/sample_notices.sql | 17 +++++++- > .../prog/en/includes/members-toolbar.inc | 1 + > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 11 ++++++ > koha-tmpl/intranet-tmpl/prog/js/members-menu.js | 5 +++ > members/printslip.pl | 46 +++++++++++++++++++++- > 14 files changed, 233 insertions(+), 9 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_12224-add_CHECKINSLIP_notice.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_12224-add_CHECKINSLIP_notice.perl b/installer/data/mysql/atomicupdate/bug_12224-add_CHECKINSLIP_notice.perl >new file mode 100644 >index 0000000000..fc33a72771 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_12224-add_CHECKINSLIP_notice.perl >@@ -0,0 +1,22 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type) VALUES >+ ('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip', >+"<h3><<branches.branchname>></h3> >+Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >+(<<borrowers.cardnumber>>) <br /> >+ >+<<today>><br /> >+ >+<h4>Checked in today</h4> >+<checkedin> >+<p> >+<<biblio.title>> <br /> >+Barcode: <<items.barcode>><br /> >+</p> >+</checkedin>", >+ 'print') >+ }); >+ >+ NewVersion( $DBversion, 12224, "Add CHECKINSLIP notice" ); >+} >diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >index 0bf9d28c5d..c5c78823e9 100644 >--- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql >+++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >@@ -48,7 +48,22 @@ VALUES ('suggestions','NEW_SUGGESTION','Neuer Anschaffungsvorschlag','Neuer Ansc > <li><b>Grund für den Vorschlag:</b> <<suggestions.patronreason>></li> > <li><b>Notiz:</b> <<suggestions.note>></li> > </ul> >- </p>',1, 'email'); >+ </p>',1, 'email'), >+ ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >+ "<h3><<branches.branchname>></h3> >+ Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >+ (<<borrowers.cardnumber>>) <br /> >+ >+ <<today>><br /> >+ >+ <h4>Checked in today</h4> >+ <checkedin> >+ <p> >+ <<biblio.title>> <br /> >+ Barcode: <<items.barcode>><br /> >+ </p> >+ </checkedin>",1,'print'); >+ > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) > VALUES ('members', 'DISCHARGE', 'Entlastung', 'Entlastung für <<borrowers.firstname>> <<borrowers.surname>>', ' > <<today>> >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index 50bb421386..82e40a4027 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -1221,3 +1221,26 @@ tables: > - "[%- USE AuthorisedValues -%]" > - "Dear [% borrower.firstname %] [% borrower.surname %]," > - "Your hold for [% biblio.title %] was canceled for the following reason: [% AuthorisedValues.GetByCode( 'HOLD_CANCELLATION', hold.cancellation_reason ) %]" >+ >+ - module: circulation >+ code: CHECKINSLIP >+ branchcode: "" >+ name: "Checkin slip" >+ is_html: 1 >+ title: "Checkin slip" >+ message_transport_type: print >+ lang: default >+ content: >+ - "<h3><<branches.branchname>></h3>" >+ - "Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />" >+ - "(<<borrowers.cardnumber>>) <br />" >+ - "" >+ - "<<today>><br />" >+ - "" >+ - "<h4>Checked in today</h4>" >+ - "<checkedin>" >+ - "<p>" >+ - "<<biblio.title>> <br />" >+ - "Barcode: <<items.barcode>><br />" >+ - "</p>" >+ - "</checkedin>" >diff --git a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >index 1a231dd12e..3242343d3d 100644 >--- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >@@ -22,7 +22,20 @@ INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, m > ('suggestions','ACCEPTED','','Suggestion d\'achat acceptée',0,'Suggestion d\'achat acceptée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons évalué votre suggestion aujourdhui. Le document sera commandé dès que possible. Vous serez tenu au courant par courriel quand le document aura été commandé et quand il sera disponible à la bibliothèque.\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'), > ('suggestions','AVAILABLE','','Suggestion d\'achat disponible',0,'Suggestion d\'achat disponible','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons le plaisir de vous informer que le document fait aujourd\'hui partie de nos collection et qu\'il est disponible à la bibliothèque.\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'), > ('suggestions','ORDERED','','Suggestion d\'achat commandée',0,'Suggestion d\'achat commandée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons le plaisir de vous informer que le document a été commandé.\r\n\r\nVous recevrez une nouvelle notification quand le document sera disponible à bibliothèque.\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'), >-('suggestions','REJECTED','','Suggestion d\'achat rejetée',0,'Suggestion d\'achat rejetée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons évalué votre suggestion aujourd\'hui et décidé de ne pas l\'acheter cette fois.\r\n\r\nLa raison de notre refus est : <<suggestions.reason>>\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'); >+('suggestions','REJECTED','','Suggestion d\'achat rejetée',0,'Suggestion d\'achat rejetée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons évalué votre suggestion aujourd\'hui et décidé de ne pas l\'acheter cette fois.\r\n\r\nLa raison de notre refus est : <<suggestions.reason>>\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'), >+('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip',"<h3><<branches.branchname>></h3> >+Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >+(<<borrowers.cardnumber>>) <br /> >+ >+<<today>><br /> >+ >+<h4>Checked in today</h4> >+<checkedin> >+<p> >+<<biblio.title>> <br /> >+Barcode: <<items.barcode>><br /> >+</p> >+</checkedin>", 'print'); > > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) > VALUES ('suggestions','NEW_SUGGESTION','Nouvelle suggestion','Nouvelle suggestion','<h3>Suggestion en attente</h3> >diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >index f844c90b2a..ca17495bf5 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >@@ -50,7 +50,22 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su > <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li> > <li><b>Notes:</b> <<suggestions.note>></li> > </ul> >- </p>',1, 'email'); >+ </p>',1, 'email'), >+ ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >+ "<h3><<branches.branchname>></h3> >+ Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >+ (<<borrowers.cardnumber>>) <br /> >+ >+ <<today>><br /> >+ >+ <h4>Checked in today</h4> >+ <checkedin> >+ <p> >+ <<biblio.title>> <br /> >+ Barcode: <<items.barcode>><br /> >+ </p> >+ </checkedin>",1, 'print'); >+ > INSERT INTO `letter` (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','Ticket de de prêt','Ticket de prêt', '<h3><<branches.branchname>></h3> > Prêts à <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql >index 9be907b0b5..434544b2aa 100644 >--- a/installer/data/mysql/it-IT/necessari/notices.sql >+++ b/installer/data/mysql/it-IT/necessari/notices.sql >@@ -55,7 +55,22 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su > <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li> > <li><b>Notes:</b> <<suggestions.note>></li> > </ul> >- </p>',1, 'email'); >+ </p>',1, 'email'), >+ ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >+ "<h3><<branches.branchname>></h3> >+ Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >+ (<<borrowers.cardnumber>>) <br /> >+ >+ <<today>><br /> >+ >+ <h4>Checked in today</h4> >+ <checkedin> >+ <p> >+ <<biblio.title>> <br /> >+ Barcode: <<items.barcode>><br /> >+ </p> >+ </checkedin>",1, 'print'); >+ > INSERT INTO letter (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','Ricevuta di prestito','Ricevuta di prestito', '<h3><<branches.branchname>></h3> > Prestito a <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >index e3564ffb1d..9003de6e43 100644 >--- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >@@ -70,7 +70,22 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su > <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li> > <li><b>Notes:</b> <<suggestions.note>></li> > </ul> >- </p>',1, 'email'); >+ </p>',1, 'email'), >+ ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >+ "<h3><<branches.branchname>></h3> >+ Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >+ (<<borrowers.cardnumber>>) <br /> >+ >+ <<today>><br /> >+ >+ <h4>Checked in today</h4> >+ <checkedin> >+ <p> >+ <<biblio.title>> <br /> >+ Barcode: <<items.barcode>><br /> >+ </p> >+ </checkedin>",1, 'print'); >+ > INSERT INTO `letter` (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','UtlÃ¥n','UtlÃ¥n', '<h3><<branches.branchname>></h3> > UtlÃ¥nt til <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >index f228b5c68d..66aa99dcde 100644 >--- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >+++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >@@ -49,7 +49,22 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su > <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li> > <li><b>Notes:</b> <<suggestions.note>></li> > </ul> >- </p>',1, 'email'); >+ </p>',1, 'email'), >+ ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >+ "<h3><<branches.branchname>></h3> >+ Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >+ (<<borrowers.cardnumber>>) <br /> >+ >+ <<today>><br /> >+ >+ <h4>Checked in today</h4> >+ <checkedin> >+ <p> >+ <<biblio.title>> <br /> >+ Barcode: <<items.barcode>><br /> >+ </p> >+ </checkedin>",1, 'print'); >+ > INSERT INTO `letter` (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3> > Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >index 27f002b195..4041680b30 100644 >--- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >+++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >@@ -48,7 +48,22 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su > <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li> > <li><b>Notes:</b> <<suggestions.note>></li> > </ul> >- </p>',1, 'email'); >+ </p>',1, 'email'), >+ ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >+ "<h3><<branches.branchname>></h3> >+ Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >+ (<<borrowers.cardnumber>>) <br /> >+ >+ <<today>><br /> >+ >+ <h4>Checked in today</h4> >+ <checkedin> >+ <p> >+ <<biblio.title>> <br /> >+ Barcode: <<items.barcode>><br /> >+ </p> >+ </checkedin>",1, 'print'); >+ > INSERT INTO `letter` (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3> > Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >index 17bd9f7606..11308e81f7 100644 >--- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >+++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >@@ -113,7 +113,22 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su > <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li> > <li><b>Notes:</b> <<suggestions.note>></li> > </ul> >- </p>',1, 'email'); >+ </p>',1, 'email'), >+ ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >+ "<h3><<branches.branchname>></h3> >+ Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >+ (<<borrowers.cardnumber>>) <br /> >+ >+ <<today>><br /> >+ >+ <h4>Checked in today</h4> >+ <checkedin> >+ <p> >+ <<biblio.title>> <br /> >+ Barcode: <<items.barcode>><br /> >+ </p> >+ </checkedin>",1, 'print'); >+ > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES > ('members', 'DISCHARGE', 'пÑдÑвеÑÐ´Ð¶ÐµÐ½Ð½Ñ Ð½Ð° ÑозÑаÑÑваннÑ', > 'РозÑаÑÑÐ²Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ð²ÑдвÑдÑваÑа â <<borrowers.firstname>> <<borrowers.surname>>', ' >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index bebe5a143c..bb9abf4089 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -27,6 +27,7 @@ > [% IF patron.has_overdues %] > <li><a id="print_overdues" href="#">Print overdues</a></li> > [% END %] >+ <li><a id="printcheckinslip" href="#">Print checkin slip</a></li> > </ul> > </div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 1e1ca7d2ff..e313bf3f96 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -794,6 +794,7 @@ > <th class="ci-collection">Collection</th> > <th class="ci-patron">Patron</th> > <th class="ci-note">Note</th> >+ <th class="ci-printslip"> </th> > </tr> > </thead> > >@@ -876,6 +877,9 @@ > <p><span class="circ-hlt item-note-nonpublic">[% riloo.itemnotes_nonpublic | html %]</span></p> > [% END %] > </td> >+ <td class="ci-printslip actions"> >+ <a id="printcheckinslip" href="#" class="btn btn-default" data-borrowernumber="[% riloo.patron.borrowernumber | html %]"><i class="fa fa-print"></i> Print checkin slip</a> >+ </td> > </tr> > [% END # /FOREACH riloo %] > </table> <!-- /#checkedintable --> >@@ -1071,6 +1075,13 @@ > } > }); > $('[data-toggle="tooltip"]').tooltip(); >+ >+ $("#printcheckinslip").click(function(){ >+ var borrowernumber = $(this).data('borrowernumber'); >+ window.open("/cgi-bin/koha/members/printslip.pl?borrowernumber=" + borrowernumber + "&print=checkinslip", "printwindow"); >+ return false; >+ }); >+ > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >index f5458cfea4..9be4c7930d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >@@ -71,6 +71,11 @@ $(document).ready(function(){ > $(".btn-group").removeClass("open"); > return false; > }); >+ $("#printcheckinslip").click(function(){ >+ printx_window("checkinslip"); >+ $(".btn-group").removeClass("open"); >+ return false; >+ }); > $("#printclearscreen").click(function(){ > printx_window("slip"); > window.location.replace("/cgi-bin/koha/circ/circulation.pl"); >diff --git a/members/printslip.pl b/members/printslip.pl >index e59c625f91..80459e9063 100755 >--- a/members/printslip.pl >+++ b/members/printslip.pl >@@ -39,6 +39,7 @@ use C4::Auth qw/:DEFAULT get_session/; > use C4::Output; > use C4::Members; > use C4::Koha; >+use Koha::DateUtils; > > #use Smart::Comments; > #use Data::Dumper; >@@ -79,7 +80,50 @@ output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log > > my $branch=C4::Context->userenv->{'branch'}; > my ($slip, $is_html); >-if (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, $print eq "qslip")) { >+if ( $print eq 'checkinslip' ) { >+ my $checkinslip_branch = $session->param('branch') ? $session->param('branch') : $branch; >+ >+ # get today's checkins >+ 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 ); >+ $today_start = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_start ); >+ $today_end = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_end ); >+ my $todays_checkins = Koha::Old::Checkouts->search({ >+ returndate => { >+ '>=' => $today_start, >+ '<=' => $today_end, >+ }, >+ borrowernumber => $borrowernumber, >+ branchcode => $checkinslip_branch, >+ }); >+ >+ my @checkins; >+ while ( my $c = $todays_checkins->next ) { >+ push @checkins, { >+ biblio => $c->item->biblio->unblessed, >+ items => $c->item->unblessed, >+ }; >+ } >+ my %repeat = ( >+ checkedin => \@checkins, >+ ); >+ >+ my $letter = C4::Letters::GetPreparedLetter( >+ module => 'circulation', >+ letter_code => 'CHECKINSLIP', >+ branchcode => $checkinslip_branch, >+ tables => { >+ branches => $checkinslip_branch, >+ borrowers => $borrowernumber, >+ }, >+ repeat => \%repeat, >+ message_transport_type => 'print' >+ ); >+ >+ $slip = $letter->{content}; >+ $is_html = $letter->{is_html}; >+ >+} elsif (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, $print eq "qslip")) { > $slip = $letter->{content}; > $is_html = $letter->{is_html}; > } >-- >2.11.0
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 12224
:
28194
|
29693
|
41819
|
41820
|
44574
|
44576
|
44582
|
44584
|
91476
|
91477
|
91478
|
96970
|
96972
|
110308
|
110395
|
110396
|
110403
|
110404
|
110516
|
110529
|
110530
|
110531
|
110576
|
110577
|
110578
|
114121
|
114122
|
114123
|
114124
|
116135
|
116482
|
116485
|
116486
|
116487
|
116488
|
116489
|
117245
|
117246
|
117247
|
117248
|
117249
|
117250
|
117620
|
117812
|
117813
|
117814
|
117815
|
117816
|
117817
|
117818
|
117819