@@ -, +, @@ checkin will work, but this is an easier to read option) to the following (assuming sample data): NEW: FIC FIC: GEN Arcadia Public Library (http://library.ci.arcadia.ca.us/) Middletown Township Public Library (http://www.mtpl.org/) --- C4/Circulation.pm | 50 ++++++++---- C4/Items.pm | 25 +----- C4/Reserves.pm | 9 ++- C4/UsageStats.pm | 2 - circ/returns.pl | 3 + ...576-add_UpdateItemLocationOnCheckin_syspref.sql | 5 ++ installer/data/mysql/sysprefs.sql | 3 +- .../prog/en/modules/admin/preferences.tt | 2 + .../en/modules/admin/preferences/circulation.pref | 27 ++++--- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 89 ++++++++++++++++++---- .../en/modules/help/admin/authorised_values.tt | 4 +- .../intranet-tmpl/prog/js/pages/preferences.js | 19 +++++ svc/checkin | 14 ---- 13 files changed, 165 insertions(+), 87 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_14576-add_UpdateItemLocationOnCheckin_syspref.sql --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -1379,10 +1379,11 @@ sub AddIssue { } ); - if ( C4::Context->preference('ReturnToShelvingCart') ) { - # ReturnToShelvingCart is on, anything issued should be taken off the cart. + if ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) { + ## Item was moved to cart via UpdateItemLocationOnCheckin, anything issued should be taken off the cart. CartToShelf( $item->{'itemnumber'} ); } + $item->{'issues'}++; if ( C4::Context->preference('UpdateTotalIssuesOnCirc') ) { UpdateTotalIssues( $item->{'biblionumber'}, 1 ); @@ -1844,16 +1845,7 @@ sub AddReturn { } } - if ( $item->{'location'} eq 'PROC' ) { - if ( C4::Context->preference("InProcessingToShelvingCart") ) { - $item->{'location'} = 'CART'; - } - else { - $item->{location} = $item->{permanent_location}; - } - - ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} ); - } + my $item = GetItem($itemnumber) or die "GetItem($itemnumber) failed"; # full item data, but no borrowernumber or checkout info (no issue) my $hbr = GetBranchItemRule($item->{'homebranch'}, $item->{'itype'})->{'returnbranch'} || "homebranch"; @@ -1864,6 +1856,37 @@ sub AddReturn { my $borrowernumber = $patron ? $patron->borrowernumber : undef; # we don't know if we had a borrower or not my $patron_unblessed = $patron ? $patron->unblessed : {}; + my $yaml_loc = C4::Context->preference('UpdateItemLocationOnCheckin'); + if ($yaml_loc) { + $yaml_loc = "$yaml_loc\n\n"; # YAML is strict on ending \n. Surplus does not hurt + my $rules; + eval { $rules = YAML::Load($yaml_loc); }; + if ($@) { + warn "Unable to parse UpdateItemLocationOnCheckin syspref : $@"; + } + else { + if (defined $rules->{_ALL_}) { + if ($rules->{_ALL_} eq '_PERM_') { $rules->{_ALL_} = $item->{permanent_location}; } + if ($rules->{_ALL_} eq '_BLANK_') { $rules->{_ALL_} = ''; } + if ( $item->{location} ne $rules->{_ALL_}) { + $messages->{'ItemLocationUpdated'} = { from => $item->{location}, to => $rules->{_ALL_} }; + ModItem( { location => $rules->{_ALL_} }, undef, $itemnumber ); + } + } + else { + foreach my $key ( keys %$rules ) { + if ( $rules->{$key} eq '_PERM_' ) { $rules->{$key} = $item->{permanent_location}; } + if ( $rules->{$key} eq '_BLANK_') { $rules->{$key} = '' ;} + if ( ($item->{location} eq $key && $item->{location} ne $rules->{$key}) || ($key eq '_BLANK_' && $item->{location} eq '' && $rules->{$key} ne '') ) { + $messages->{'ItemLocationUpdated'} = { from => $item->{location}, to => $rules->{$key} }; + ModItem( { location => $rules->{$key} }, undef, $itemnumber ); + last; + } + } + } + } + } + my $yaml = C4::Context->preference('UpdateNotForLoanStatusOnCheckin'); if ($yaml) { $yaml = "$yaml\n\n"; # YAML is anal on ending \n. Surplus does not hurt @@ -1972,15 +1995,12 @@ sub AddReturn { ); $sth->execute( $item->{'itemnumber'} ); # if we have a reservation with valid transfer, we can set it's status to 'W' - ShelfToCart( $item->{'itemnumber'} ) if ( C4::Context->preference("ReturnToShelvingCart") ); C4::Reserves::ModReserveStatus($item->{'itemnumber'}, 'W'); } else { $messages->{'WrongTransfer'} = $tobranch; $messages->{'WrongTransferItem'} = $item->{'itemnumber'}; } $validTransfert = 1; - } else { - ShelfToCart( $item->{'itemnumber'} ) if ( C4::Context->preference("ReturnToShelvingCart") ); } # fix up the accounts..... --- a/C4/Items.pm +++ a/C4/Items.pm @@ -84,7 +84,6 @@ BEGIN { GetLatestAcquisitions CartToShelf - ShelfToCart GetAnalyticsCount @@ -199,27 +198,6 @@ sub CartToShelf { } } -=head2 ShelfToCart - - ShelfToCart($itemnumber); - -Set the current shelving location of the item -to shelving cart ('CART'). - -=cut - -sub ShelfToCart { - my ( $itemnumber ) = @_; - - unless ( $itemnumber ) { - croak "FAILED ShelfToCart() - no itemnumber supplied"; - } - - my $item = GetItem($itemnumber); - $item->{'location'} = 'CART'; - ModItem($item, undef, $itemnumber); -} - =head2 AddItemFromMarc my ($biblionumber, $biblioitemnumber, $itemnumber) @@ -619,9 +597,10 @@ sub ModItemTransfer { my ( $itemnumber, $frombranch, $tobranch ) = @_; my $dbh = C4::Context->dbh; + my $item = GetItem( $itemnumber ); # Remove the 'shelving cart' location status if it is being used. - CartToShelf( $itemnumber ) if ( C4::Context->preference("ReturnToShelvingCart") ); + CartToShelf( $itemnumber ) if ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ); #new entry in branchtransfers.... my $sth = $dbh->prepare( --- a/C4/Reserves.pm +++ a/C4/Reserves.pm @@ -1001,7 +1001,8 @@ sub ModReserveStatus { my $sth_set = $dbh->prepare($query); $sth_set->execute( $newstatus, $itemnumber ); - if ( C4::Context->preference("ReturnToShelvingCart") && $newstatus ) { + my $item = GetItem($itemnumber); + if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) && $newstatus ) { CartToShelf( $itemnumber ); } } @@ -1053,9 +1054,9 @@ sub ModReserveAffect { if ( !$transferToDo && !$already_on_shelf ); _FixPriority( { biblionumber => $biblionumber } ); - - if ( C4::Context->preference("ReturnToShelvingCart") ) { - CartToShelf($itemnumber); + my $item = GetItem($itemnumber); + if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) ) { + CartToShelf( $itemnumber ); } return; --- a/C4/UsageStats.pm +++ a/C4/UsageStats.pm @@ -143,7 +143,6 @@ sub BuildReport { AutoRemoveOverduesRestrictions CircControl HomeOrHoldingBranch - InProcessingToShelvingCart IssueLostItem IssuingInProcess ManInvInNoissuesCharge @@ -152,7 +151,6 @@ sub BuildReport { RenewalSendNotice RentalsInNoissuesCharge ReturnBeforeExpiry - ReturnToShelvingCart TransfersMaxDaysWarning UseBranchTransferLimits useDaysMode --- a/circ/returns.pl +++ a/circ/returns.pl @@ -550,6 +550,9 @@ foreach my $code ( keys %$messages ) { elsif ( $code eq 'ForeverDebarred' ) { $err{foreverdebarred} = $messages->{'ForeverDebarred'}; } + elsif ( $code eq 'ItemLocationUpdated' ) { + $err{ItemLocationUpdated} = $messages->{ItemLocationUpdated}; + } elsif ( $code eq 'NotForLoanStatusUpdated' ) { $err{NotForLoanStatusUpdated} = $messages->{NotForLoanStatusUpdated}; } --- a/installer/data/mysql/atomicupdate/bug_14576-add_UpdateItemLocationOnCheckin_syspref.sql +++ a/installer/data/mysql/atomicupdate/bug_14576-add_UpdateItemLocationOnCheckin_syspref.sql @@ -0,0 +1,5 @@ +INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES('UpdateItemLocationOnCheckin', 'PROC: _PERM_\n', 'NULL', 'This a list of value pairs. When an item is checked in, if the location value on the left matches the items location value t will be updated to the right-hand value. E.g. ''PROC: FIC'' will cause an item that was set to ''Book Cart'' to now be in the ''Fiction'' shelving location. Note that PROC and CART are special values, for these locations only can location and permanent_location differ. In all other cases an update will affect both. Items in the CART location will be returned to their permanent location on checkout. You can also use the special term _BLANK_ on either side of a pair to update/remove items with no locaiton assigned. You can use the special term _ALL_ on the left side to affect all items and the special term _PERM_ on the right side to return items to their permanent location', 'Free'); +UPDATE systempreferences s1, (SELECT IF(value,'PROC: CART\n','') AS p2c FROM systempreferences WHERE variable='InProcessingToShelvingCart') s2 SET s1.value= CONCAT(s2.p2c, REPLACE(s1.value,'PROC: _PERM_\n','') ) WHERE s1.variable='UpdateItemLocationOnCheckin' AND s1.value NOT LIKE '%PROC: CART%'; +DELETE FROM systempreferences WHERE variable='InProcessingToShelvingCart'; +UPDATE systempreferences s1, (SELECT IF(value,'_ALL_: CART\n','') AS rtc FROM systempreferences WHERE variable='ReturnToShelvingCart') s2 SET s1.value= CONCAT(s2.rtc,s1.value) WHERE s1.variable='UpdateItemLocationOnCheckin' AND s1.value NOT LIKE '%_ALL_: CART%'; +DELETE FROM systempreferences WHERE variable='ReturnToShelvingCart'; --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -208,7 +208,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'), ('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'), ('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'), -('InProcessingToShelvingCart','0','','If set, when any item with a location code of PROC is \'checked in\', it\'s location code will be changed to CART.','YesNo'), ('INTRAdidyoumean','',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'), ('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'), ('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'), @@ -460,7 +459,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'), ('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'), ('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'), -('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'), ('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'), ('RisExportAdditionalFields', '', NULL , 'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'), ('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'), @@ -550,6 +548,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('UNIMARCAuthorsFacetsSeparator',', ',NULL,'UNIMARC authors facets separator','short'), ('UNIMARCField100Language','fre',NULL,'UNIMARC field 100 default language','short'), ('UniqueItemFields','barcode','','Space-separated list of fields that should be unique (used in acquisition module for item creation). Fields must be valid SQL column names of items table','Free'), +('UpdateItemLocationOnCheckin', '', 'NULL', 'This is a list of value pairs. When an item is checked in, if the location value on the left matches the items location value it will be updated to the right-hand value. E.g. ''PROC: FIC'' will cause an item that was set to ''Book Cart'' to now be in the ''Fiction'' shelving location. Note that PROC and CART are special values, for these locations only can location and permanent_location differ. In all other cases an update will affect both. Items in the CART location will be returned to their permanent location on checkout. You can also use the special term _BLANK_ on either side of a pair to update/remove items with no locaiton assigned. You can use the special term _ALL_ on the left side to affect all items and the special term _PERM_ on the right side to return items to their permanent location', 'Free'), ('UpdateNotForLoanStatusOnCheckin', '', 'NULL', 'This is a list of value pairs. When an item is checked in, if the not for loan value on the left matches the items not for loan value it will be updated to the right-hand value. E.g. ''-1: 0'' will cause an item that was set to ''Ordered'' to now be available for loan. Each pair of values should be on a separate line.', 'Free'), ('UpdateTotalIssuesOnCirc','0',NULL,'Whether to update the totalissues field in the biblio on each circ.','YesNo'), ('UploadPurgeTemporaryFilesDays','',NULL,'If not empty, number of days used when automatically deleting temporary uploads','integer'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -44,6 +44,8 @@ var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" ); var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" ); var MSG_LOADING = _( "Loading..." ); + var MSG_ALL_VALUE_WARN = _("Note: _ALL_ value will override all other values"); + var MSG_UPD_LOC_FORMAT_WARN = _("The following values are not formatted correctly:"); //]]> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -201,18 +201,6 @@ Circulation: no: "Don't allow" - staff to manually override and check out items to patrons who have more than noissuescharge in fines. - - - pref: InProcessingToShelvingCart - choices: - yes: Move - no: "Don't move" - - items that have the location PROC to the location CART when they are checked in. - - - - pref: ReturnToShelvingCart - choices: - yes: Move - no: "Don't move" - - all items to the location CART when they are checked in. - - - pref: AutomaticItemReturn choices: yes: Do @@ -474,6 +462,21 @@ Circulation: - calculate and update overdue charges when an item is returned. -
NOTE If you are doing hourly loans then you should have this on. - + - pref: UpdateItemLocationOnCheckin + type: textarea + class: code + - This is is a list of value pairs, the first value is followed immediately by colon space then the second value i.e.:
+ - "PROC: FIC" + -
When an item is checked in, if the location value on the left matches the items location value + - "it will be updated to the right-hand value.
E.g. ''PROC: FIC'' will cause an item that was set to ''Book Cart'' to now be in the ''Fiction'' shelving location." + -
Note that PROC and CART are special values, for these locations only can location and permanent_location differ. In all other cases an update will affect both. + -
Items in the CART location will be returned to their permanent location on checkout + -
You can use the special term _BLANK_ on either side of a pair to update/remove items with no location assigned + -
You can use the special term _ALL_ on the left side to affect all items + - and the special term _PERM_ on the right side to return items to their permanent location + -
**Use of an _ALL_ rule will override/ignore any other values** + -
Each pair of values should be on a separate line. + - - pref: UpdateNotForLoanStatusOnCheckin type: textarea class: code --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -589,19 +589,82 @@ $(document).ready(function () { [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]

Not for loan status updated. -
Old value: - [% IF errmsgloo.NotForLoanStatusUpdated.from %] - [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %]. - [% ELSE %] - Available for loan. - [% END %] -
New value: - [% IF errmsgloo.NotForLoanStatusUpdated.to %] - [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %]. - [% ELSE %] - Available for loan. - [% END %] -

+
Old value: + [% IF errmsgloo.NotForLoanStatusUpdated.from %] + [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %]. + [% ELSE %] + Available for loan. + [% END %] +
New value: + [% IF errmsgloo.NotForLoanStatusUpdated.to %] + [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %]. + [% ELSE %] + Available for loan. + [% END %] +

+ [% END %] + [% IF ( errmsgloo.ItemLocationUpdated ) %] +

+ Item shelving location updated from + [% IF errmsgloo.ItemLocationUpdated.from %] + [% IF errmsgloo.ItemLocationUpdated.from == '' %] + empty + [% ELSIF AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.from ) == '' %] + [% errmsgloo.ItemLocationUpdated.from %] (No description available) + [% ELSE %] + [% AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.from ) %] + [% END %] + [% ELSE %] + "Blank" + [% END %] + to + [% IF errmsgloo.ItemLocationUpdated.to %] + [% IF errmsgloo.ItemLocationUpdated.to == '' %] + empty + [% ELSIF AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.to ) == '' %] + [% errmsgloo.ItemLocationUpdated.to %] (Not an authorized value) + [% ELSE %] + [% AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.to ) %] + [% END %] + [% ELSE %] + "Blank" + [% END %] +

+ [% END %] + [% IF ( errmsgloo.badbarcode ) %] +

No item with barcode: [% errmsgloo.msg | html %]

+ [% END %] + [% IF ( errmsgloo.ispermanent ) %] +

Please return item to: [% Branches.GetName( errmsgloo.msg ) %]

+ [% END %] + [% IF ( errmsgloo.notissued ) %] +

Not checked out.

+ [% END %] + [% IF ( errmsgloo.localuse) %] +

Local use recorded

+ [% END %] + [% IF ( errmsgloo.waslost ) %] +

Item was lost, now found.

+ [% IF ( LostItemFeeRefunded ) %] +

A refund has been applied to the borrowing patron's account.

+ [% ELSE %] +

Any lost item fees for this item will remain on the patron's account.

+ [% END %] + [% END %] + [% IF ( errmsgloo.withdrawn ) %] + [% IF BlockReturnOfWithdrawnItems %] +
Cannot check in
+

NOT CHECKED IN

+

Item is withdrawn.

+ [% ELSE %] +

Item is withdrawn.

+ [% END %] + [% END %] + [% IF ( errmsgloo.debarred ) %] +

[% errmsgloo.debarname %]([% errmsgloo.debarcardnumber %]) is now debarred until [% errmsgloo.debarred | $KohaDates %].

+ [% END %] + [% IF ( errmsgloo.prevdebarred ) %] +

Reminder: Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].

[% END %] [% IF ( errmsgloo.badbarcode ) %]

No item with barcode: [% errmsgloo.msg | html %]

--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt @@ -16,7 +16,7 @@
  • 'BOR_NOTES' is for values for custom patron notes that appear on the circulation screen and the OPAC.
  • 'Bsort1' is for patron statistical purposes.
  • 'Bsort2' is used for patron statistical purposes.
  • -
  • 'CART' is the shelving cart location, used by InProcessingToShelvingCart and ReturnToShelvingCart
  • +
  • 'CART' is the shelving cart location, used by UpdateItemLocationOnCheckin
  • 'CCODE' is for collection codes (appears when cataloging and working with items).
  • 'DAMAGED' is for descriptions of damaged items, and appears when cataloging and working with items.
  • 'HINGS_AS' is for General Holdings: Acquisition Status Designator, a data element that specifies the acquisition status for the unit at the time of the holdings report.
  • @@ -32,7 +32,7 @@
  • 'MANUAL_INV' includes values for manual invoicing.
  • 'NOT_LOAN' is used to list reasons why a title is not for loan.
  • -
  • 'PROC' is for the location to be used for NewItemsDefaultLocation (change description as desired), also the location expected by InProcessingToShelvingCart.
  • +
  • 'PROC' is for the location to be used for NewItemsDefaultLocation (change description as desired), also a special location for UpdateItemLocationOnCheckin.
  • 'REPORT_GROUP' provides a way to sort and filter your reports, the default values in this category include the Koha modules (Accounts, Acquisitions, Catalog, Circulation, Patrons)
  • 'REPORT_SUBGROUP' can be used to further sort and filter your reports. This category is empty by default. Values here need to include the authorized value code from REPORT_GROUP in the Description (OPAC) field to link the subgroup to the appropriate group.
  • 'RESTRICTED' is used for the restricted status of an item
  • --- a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js +++ a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js @@ -137,4 +137,23 @@ $( document ).ready( function () { if ( search_jumped ) { document.location.hash = "jumped"; } + + $("#pref_UpdateItemLocationOnCheckin").change(function(){ + var the_text = $(this).val(); + var alert_text = ''; + if ( the_text.indexOf('_ALL_:') != -1 ) alert_text = MSG_ALL_VALUE_WARN + '\n'; + var split_text =the_text.split("\n"); + var alert_issues = ''; + var issue_count = 0; + var reg_check = /.*:\s.*/; + for (var i=0; i < split_text.length; i++){ + if ( !split_text[i].match(reg_check) && split_text[i].length ) { + alert_issues+=split_text[i]+"\n"; + issue_count++; + } + } + if (issue_count) alert_text += "\n"+ MSG_UPD_LOC_FORMAT_WARN +"\n"+alert_issues; + if ( alert_text.length ) alert(alert_text); + }); + } ); --- a/svc/checkin +++ a/svc/checkin @@ -60,20 +60,6 @@ $data->{itemnumber} = $itemnumber; $data->{borrowernumber} = $borrowernumber; $data->{branchcode} = $branchcode; -if ( C4::Context->preference("InProcessingToShelvingCart") ) { - my $item = GetItem($itemnumber); - if ( $item->{'location'} eq 'PROC' ) { - $item->{'location'} = 'CART'; - ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} ); - } -} - -if ( C4::Context->preference("ReturnToShelvingCart") ) { - my $item = GetItem($itemnumber); - $item->{'location'} = 'CART'; - ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} ); -} - my $checkout = Koha::Checkouts->find({ itemnumber => $itemnumber }); $data->{patronnote} = $checkout ? $checkout->note : q||; --