From 3b6e8cbc53b7a116f7764e78a59e7e332e62481c Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Mon, 14 Jul 2008 12:15:15 -0500 Subject: [PATCH] fix for 2177: Barcode on checkout slip This patch adds barcodes to the Checkouts and Overdues section of the receipt. It also removes the Overdues section if it is empty. Signed-off-by: Joshua Ferraro --- .../modules/members/moremember-receipt.tmpl | 63 ++++++++++--------- members/moremember.pl | 3 + 2 files changed, 38 insertions(+), 28 deletions(-) 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 6c97137bf4..786f442a32 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 @@ -15,35 +15,42 @@ Issued To
- - - - - + + + + + + - - - - - - - - + + + + + + + + +
Issues
Date DueTitle
Issues
Date DueTitleBarcode
&biblionumber=&bi=">
&biblionumber=&bi=">
- - - - - - - - - - - - - - -
Overdues
Date DueTitle
&biblionumber=&bi=">
+ + + + + + + + + + + + + + + + + + +
Overdues
Date DueTitleBarcode
&biblionumber=&bi=">
+ diff --git a/members/moremember.pl b/members/moremember.pl index 5989627335..3919eb1b45 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -218,6 +218,7 @@ my ( $count, $issue ) = GetPendingIssues($borrowernumber); my $roaddetails = &GetRoadTypeDetails( $data->{'streettype'} ); my $today = POSIX::strftime("%Y-%m-%d", localtime); # iso format my @issuedata; +my $overdues_exist = 0; my $totalprice = 0; my $toggle = 0; for ( my $i = 0 ; $i < $count ; $i++ ) { @@ -228,6 +229,7 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { $totalprice += $issue->[$i]{'replacementprice'}; $row{'replacementprice'} = $issue->[$i]{'replacementprice'}; if ( $datedue lt $today ) { + $overdues_exist = 1; $row{'red'} = 1; #print ""; } $row{toggle} = $toggle++ % 2; @@ -350,6 +352,7 @@ $template->param( totalprice => sprintf( "%.2f", $totalprice ), totaldue => sprintf( "%.2f", $total ), issueloop => \@issuedata, + overdues_exist => $overdues_exist, unvalidlibrarian => $unvalidlibrarian, error => $error, $error => 1, -- 2.39.5