From f8c1ee66a39bc54c8daa615d471ff358c6195a90 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 25 Jan 2010 10:07:01 -0500 Subject: [PATCH] Fix for Bug 3984, Confusing note on transfers to receive - Changing 'check this transfer' message to more informative 'Transfer is XX days late' - Adding note in the case of late transfers: 'Transfers are considered late after XX [TransfersMaxDaysWarning] days.' --- circ/transferstoreceive.pl | 10 ++++++++-- .../prog/en/modules/circ/transferstoreceive.tmpl | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index 88ae91d9ae..ddb7f4a0da 100755 --- a/circ/transferstoreceive.pl +++ b/circ/transferstoreceive.pl @@ -58,6 +58,7 @@ my $default = C4::Context->userenv->{'branch'}; # get the all the branches for reference my $branches = GetBranches(); my @branchesloop; +my $latetransfers; foreach my $br ( keys %$branches ) { my @transferloop; my %branchloop; @@ -78,15 +79,18 @@ foreach my $br ( keys %$branches ) { C4::Context->preference('TransfersMaxDaysWarning')); my $calcDate = Date_to_Days( $sent_year, $sent_month, $sent_day ); my $today = Date_to_Days(&Today); + my $diff = $today - $calcDate; if ($today > $calcDate) { + $latetransfers = 1; $getransf{'messcompa'} = 1; + $getransf{'diff'} = $diff; } my $gettitle = GetBiblioFromItemNumber( $num->{'itemnumber'} ); - my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} ); + my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $gettitle->{'itype'} : $gettitle->{'itemtype'} ); $getransf{'datetransfer'} = format_date( $num->{'datesent'} ); - $getransf{'itemtype'} = $itemtypeinfo->{'description'}; + $getransf{'itemtype'} = $itemtypeinfo ->{'description'}; foreach (qw(title biblionumber itemnumber barcode homebranch holdingbranch itemcallnumber)) { $getransf{$_} = $gettitle->{$_}; } @@ -114,6 +118,8 @@ $template->param( branchesloop => \@branchesloop, show_date => format_date(C4::Dates->today('iso')), 'dateformat_' . (C4::Context->preference("dateformat") || '') => 1, + TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'), + latetransfers => $latetransfers ? 1 : 0, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl index 6a7e902d77..6b036af247 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl @@ -35,9 +35,10 @@ $(document).ready(function() {
-

Transfers made to your library on :

+

Transfers made to your library as of

Your library is the destination for the following transfer(s)

+

Transfers are considered late after days.

@@ -55,7 +56,7 @@ $(document).ready(function() { -

check this transfer +

Transfer is days late "> -- 2.39.5