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

(-)a/C4/Circulation.pm (-3 / +5 lines)
Lines 251-257 sub decode { Link Here
251
=head2 transferbook
251
=head2 transferbook
252
252
253
  ($dotransfer, $messages, $iteminformation) = &transferbook($newbranch, 
253
  ($dotransfer, $messages, $iteminformation) = &transferbook($newbranch, 
254
                                            $barcode, $ignore_reserves);
254
                                            $barcode, $ignore_reserves, $trigger);
255
255
256
Transfers an item to a new branch. If the item is currently on loan, it is automatically returned before the actual transfer.
256
Transfers an item to a new branch. If the item is currently on loan, it is automatically returned before the actual transfer.
257
257
Lines 262-267 C<$barcode> is the barcode of the item to be transferred. Link Here
262
If C<$ignore_reserves> is true, C<&transferbook> ignores reserves.
262
If C<$ignore_reserves> is true, C<&transferbook> ignores reserves.
263
Otherwise, if an item is reserved, the transfer fails.
263
Otherwise, if an item is reserved, the transfer fails.
264
264
265
C<$trigger> is the enum value for what triggered the transfer.
266
265
Returns three values:
267
Returns three values:
266
268
267
=over
269
=over
Lines 303-309 The item was eligible to be transferred. Barring problems communicating with the Link Here
303
=cut
305
=cut
304
306
305
sub transferbook {
307
sub transferbook {
306
    my ( $tbr, $barcode, $ignoreRs ) = @_;
308
    my ( $tbr, $barcode, $ignoreRs, $trigger ) = @_;
307
    my $messages;
309
    my $messages;
308
    my $dotransfer      = 1;
310
    my $dotransfer      = 1;
309
    my $item = Koha::Items->find( { barcode => $barcode } );
311
    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