@@ -, +, @@ splitted sentence - Apply patch - Set up transfer policies for item types and collection codes in Home > Administration > Set library checkin and transfer policy Make sure that you have rules that deny and others that allow transfers - Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce' - Set 'BranchTransferLimitTypes' to 'item type' - Go to Home > Circulation > Transfers - Transfer an item that is allowed for item type - Verify that the table of transferred items displays information about Item type, Collection code and Destination - Transfer an item that is not allowed for the item type - Verify that the information about not allowing the transfer displays properly and is meaningfull - Set 'BranchTransferLimitTypes' to 'collection code' - Repeat the transfer steps above for allowed / not allowed collection code --- circ/branchtransfers.pl | 11 +--------- .../prog/en/modules/circ/branchtransfers.tt | 21 ++++++++++++++++---- 2 files changed, 18 insertions(+), 14 deletions(-) --- a/circ/branchtransfers.pl +++ a/circ/branchtransfers.pl @@ -188,15 +188,6 @@ if ($found) { } } -##################### - -# Used for branch transfer limits error messages. -my $codeTypeDescription = 'Collection Code'; -my $codeType = C4::Context->preference("BranchTransferLimitsType"); -if ( $codeType eq 'itemtype' ) { - $codeTypeDescription = 'Item Type'; -} - my @errmsgloop; foreach my $code ( keys %$messages ) { if ( $code ne 'WasTransfered' ) { @@ -212,7 +203,7 @@ foreach my $code ( keys %$messages ) { my ( $tbr, $typecode ) = split( /::/, $messages->{'NotAllowed'} ); $err{tbr} = $branches->{ $tbr }->{'branchname'}; $err{code} = $typecode; - $err{codeType} = $codeTypeDescription; + $err{codeType} = C4::Context->preference("BranchTransferLimitsType"); } elsif ( $code eq 'IsPermanent' ) { $err{errispermanent} = 1; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt @@ -1,3 +1,5 @@ +[% USE ItemTypes %] +[% USE AuthorisedValues %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Transfers [% INCLUDE 'doc-head-close.inc' %] @@ -110,7 +112,16 @@
  • Please return item to home library: [% errmsgloo.msg %]
  • [% END %] [% IF ( errmsgloo.errnotallowed ) %] -
  • You cannot transfer items of [% errmsgloo.codeType %] [% errmsgloo.code %] to [% errmsgloo.tbr %]
  • +
  • Transfer is not allowed for: +
      + [% IF ( errmsgloo.codeType ) == 'itemtype' %] +
    1. Item type: [% ItemTypes.GetDescription( errmsgloo.code ) %]
    2. + [% ELSE %] +
    3. Collection code: [% AuthorisedValues.GetByCode( 'CCODE', errmsgloo.code ) %]
    4. + [% END %] +
    5. Destination library: [% errmsgloo.tbr %]
    6. +
    +
  • [% END %] [% IF ( errmsgloo.errdesteqholding ) %]
  • Item is already at destination library.
  • @@ -169,8 +180,9 @@ Barcode Shelving location Call number - Type - To + Item type + Collection code + Destination [% FOREACH trsfitemloo IN trsfitemloop %] @@ -179,7 +191,8 @@ [% trsfitemloo.barcode %] [% trsfitemloo.location %] [% trsfitemloo.itemcallnumber %] - [% trsfitemloo.ccode %] + [% ItemTypes.GetDescription( trsfitemloo.itemtype ) %] + [% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.ccode ) %] [% trsfitemloo.tobrname %] [% END %] --