From 321328d0db9207cd43e5ae5f0b9d7cbb2923b1d4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 6 Jan 2014 11:37:34 -0500 Subject: [PATCH] Bug 8836 - Resurrect Rotating Collections - Followup 3 * Fix bad TT Tag * Fix bad sql query * Fix capitalization ( HTML4 ) * Allow a rotating collection's location to keep AutomaticItemReturn from sending it back to the branch of origin * Fix bad query --- C4/Circulation.pm | 2 ++ C4/RotatingCollections.pm | 6 ++++-- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- .../rotating_collections/editCollections.tt | 10 +++++++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index f8b204a..4ff8fc2 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -42,6 +42,7 @@ use C4::Koha qw( GetKohaAuthorisedValueLib ); use C4::Overdues qw(CalcFine UpdateFine); +use C4::RotatingCollections qw(GetCollectionItemBranches); use Algorithm::CheckDigits; use Data::Dumper; @@ -1948,6 +1949,7 @@ sub AddReturn { $messages->{'NeedsTransfer'} = 1; # TODO: instead of 1, specify branchcode that the transfer SHOULD go to, $item->{homebranch} } } + return ( $doreturn, $messages, $issue, $borrower ); } diff --git a/C4/RotatingCollections.pm b/C4/RotatingCollections.pm index 7767867..6030089 100644 --- a/C4/RotatingCollections.pm +++ b/C4/RotatingCollections.pm @@ -333,8 +333,10 @@ sub AddItemToCollection { my $sth; $sth = $dbh->prepare(" - INSERT INTO collections_tracking ( collections_tracking_id, colId, itemnumber ) - VALUES ( NULL, ?, ? ) + INSERT INTO collections_tracking ( + colId, + itemnumber + ) VALUES ( ?, ? ) "); $sth->execute( $colId, $itemnumber ) or return ( 0, 3, $sth->errstr() ); 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 aee0a5e..4ec28d3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -67,7 +67,7 @@ $(document).ready(function () { [% END %] [% IF ( collectionItemNeedsTransferred ) %] -
This item is part of a Rotating Collection and needs to be Transferred to [% collectionBranch %]
+
This item is part of a rotating collection and needs to be transferred to [% collectionBranch %]
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt index 4917ff2..e1bb2a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt @@ -44,13 +44,16 @@
[% IF ( collectionsLoop ) %] + - - + + + + [% FOREACH collectionsLoo IN collectionsLoop %] @@ -60,6 +63,7 @@ [% END %] +
Title Description Holding library  
[% collectionsLoo.colTitle %]Delete
[% ELSE %] There are no collections currently defined. @@ -99,7 +103,7 @@ - [% IF (editColDescription ) %] + [% IF (editColDescription ) %] [% ELSE %][% END %] -- 1.7.2.5