From 8a4195658d677f2e53c895266ce4f035ecb9a0b5 Mon Sep 17 00:00:00 2001
From: Darrell Ulm
Date: Wed, 19 Aug 2009 12:39:32 -0400
Subject: [PATCH] Bug 2652 - This patch is an extension of the slip printing
feature
and will print a SHORT SLIP of today's checkouts only.
I also enhanced the normal slip to print the overdues separately as well as today's
checkouts. There is another button on the print CIRC menu. Easily another quick key
can be added, one for the regular slip and one for the short slip, i.e. today's
only.
Signed-off-by: Galen Charlton
---
.../prog/en/includes/circ-toolbar.inc | 3 +-
.../prog/en/includes/members-toolbar.inc | 3 +-
.../modules/members/moremember-receipt.tmpl | 28 +++++++++++++++----
members/moremember.pl | 10 ++++++-
4 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
index 359e6978ad..4306fceb90 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
@@ -53,7 +53,8 @@ function update_child() {
function yuiToolbar() {
var printmenu = [
{ text: _("Print Page"), onclick: {fn: function(){printx_window("page")}} },
- { text: _("Print Slip"), onclick: {fn: function(){printx_window("slip")}} }
+ { text: _("Print Slip"), onclick: {fn: function(){printx_window("slip")}} },
+ { text: _("Quick Slip"), onclick: {fn: function(){printx_window("qslip")}} }
];
var moremenu = [
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 8da6db2067..dcd55a487e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
@@ -51,7 +51,8 @@ function update_child() {
function yuiToolbar() {
var printmenu = [
{ text: _("Print Page"), onclick: {fn: function(){printx_window("page")}} },
- { text: _("Print Slip"), onclick: {fn: function(){printx_window("slip")}} }
+ { text: _("Print Slip"), onclick: {fn: function(){printx_window("slip")}} },
+ { text: _("Quick Slip"), onclick: {fn: function(){printx_window("qslip")}} }
];
var moremenu = [
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl
index f04e6ab4ed..a63e15d1ad 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl
@@ -18,20 +18,22 @@ Checked out to
-Checked Out
+
+Checked Out Today
+
&biblionumber=&bi=">
Barcode:
Date due:
+
-
-
-Overdues
-
-
+
+Checked Out
+
+
&biblionumber=&bi=">
Barcode:
Date due:
@@ -40,4 +42,18 @@ Date due:
+
+
+
+Overdues
+
+
+&biblionumber=&bi=">
+Barcode:
+Date due:
+
+
+
+
+
diff --git a/members/moremember.pl b/members/moremember.pl
index b0cab92447..d5040b6dba 100755
--- a/members/moremember.pl
+++ b/members/moremember.pl
@@ -73,9 +73,11 @@ my %return_failed;
for my $failedret (@failedreturns) { $return_failed{$failedret} = 1; }
my $template_name;
+my $quickslip = 0;
if ($print eq "page") { $template_name = "members/moremember-print.tmpl"; }
elsif ($print eq "slip") { $template_name = "members/moremember-receipt.tmpl"; }
+elsif ($print eq "qslip") { $template_name = "members/moremember-receipt.tmpl"; $quickslip = 1; }
else { $template_name = "members/moremember.tmpl"; }
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
@@ -222,6 +224,7 @@ my $overdues_exist = 0;
my $totalprice = 0;
for ( my $i = 0 ; $i < $count ; $i++ ) {
my $datedue = $issue->[$i]{'date_due'};
+ my $issuedate = $issue->[$i]{'issuedate'};
$issue->[$i]{'date_due'} = C4::Dates->new($issue->[$i]{'date_due'}, 'iso')->output('syspref');
$issue->[$i]{'issuedate'} = C4::Dates->new($issue->[$i]{'issuedate'},'iso')->output('syspref');
my $biblionumber = $issue->[$i]{'biblionumber'};
@@ -255,7 +258,11 @@ for ( my $i = 0 ; $i < $count ; $i++ ) {
if ( $datedue lt $today ) {
$overdues_exist = 1;
$row{'red'} = 1;
- }
+ }
+ if ( $issuedate eq $today ) {
+ $row{'today'} = 1;
+ }
+
#find the charge for an item
my ( $charge, $itemtype ) =
GetIssuingCharges( $issue->[$i]{'itemnumber'}, $borrowernumber );
@@ -398,6 +405,7 @@ $template->param(
dateformat => C4::Context->preference("dateformat"),
"dateformat_" . (C4::Context->preference("dateformat") || '') => 1,
samebranch => $samebranch,
+ quickslip => $quickslip,
);
output_html_with_http_headers $input, $cookie, $template->output;
--
2.39.2