View | Details | Raw Unified | Return to bug 24299
Collapse All | Expand All

(-)a/C4/Circulation.pm (-3 / +5 lines)
Lines 252-258 sub decode { Link Here
252
=head2 transferbook
252
=head2 transferbook
253
253
254
  ($dotransfer, $messages, $iteminformation) = &transferbook($newbranch, 
254
  ($dotransfer, $messages, $iteminformation) = &transferbook($newbranch, 
255
                                            $barcode, $ignore_reserves);
255
                                            $barcode, $ignore_reserves, $trigger);
256
256
257
Transfers an item to a new branch. If the item is currently on loan, it is automatically returned before the actual transfer.
257
Transfers an item to a new branch. If the item is currently on loan, it is automatically returned before the actual transfer.
258
258
Lines 263-268 C<$barcode> is the barcode of the item to be transferred. Link Here
263
If C<$ignore_reserves> is true, C<&transferbook> ignores reserves.
263
If C<$ignore_reserves> is true, C<&transferbook> ignores reserves.
264
Otherwise, if an item is reserved, the transfer fails.
264
Otherwise, if an item is reserved, the transfer fails.
265
265
266
C<$trigger> is the enum value for what triggered the transfer.
267
266
Returns three values:
268
Returns three values:
267
269
268
=over
270
=over
Lines 304-310 The item was eligible to be transferred. Barring problems communicating with the Link Here
304
=cut
306
=cut
305
307
306
sub transferbook {
308
sub transferbook {
307
    my ( $tbr, $barcode, $ignoreRs ) = @_;
309
    my ( $tbr, $barcode, $ignoreRs, $trigger ) = @_;
308
    my $messages;
310
    my $messages;
309
    my $dotransfer      = 1;
311
    my $dotransfer      = 1;
310
    my $item = Koha::Items->find( { barcode => $barcode } );
312
    my $item = Koha::Items->find( { barcode => $barcode } );
Lines 360-366 sub transferbook { Link Here
360
362
361
    #actually do the transfer....
363
    #actually do the transfer....
362
    if ($dotransfer) {
364
    if ($dotransfer) {
363
        ModItemTransfer( $itemnumber, $fbr, $tbr );
365
        ModItemTransfer( $itemnumber, $fbr, $tbr, $trigger );
364
366
365
        # don't need to update MARC anymore, we do it in batch now
367
        # don't need to update MARC anymore, we do it in batch now
366
        $messages->{'WasTransfered'} = 1;
368
        $messages->{'WasTransfered'} = 1;
(-)a/C4/RotatingCollections.pm (-3 / +1 lines)
Lines 446-456 sub TransferCollection { Link Here
446
    while ( my $item = $sth->fetchrow_hashref ) {
446
    while ( my $item = $sth->fetchrow_hashref ) {
447
        my ($status) = CheckReserves( $item->{itemnumber} );
447
        my ($status) = CheckReserves( $item->{itemnumber} );
448
        my @transfers = C4::Circulation::GetTransfers( $item->{itemnumber} );
448
        my @transfers = C4::Circulation::GetTransfers( $item->{itemnumber} );
449
        C4::Circulation::transferbook( $colBranchcode, $item->{barcode}, my $ignore_reserves = 1 ) unless ( $status eq 'Waiting' || @transfers );
449
        C4::Circulation::transferbook( $colBranchcode, $item->{barcode}, 1, 'RotatingCollection' ) unless ( $status eq 'Waiting' || @transfers );
450
    }
450
    }
451
451
452
    return 1;
452
    return 1;
453
454
}
453
}
455
454
456
=head2 GetCollectionItemBranches
455
=head2 GetCollectionItemBranches
457
- 

Return to bug 24299