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

(-)a/C4/Circulation.pm (-19 lines)
Lines 120-126 BEGIN { Link Here
120
		&GetTransfers
120
		&GetTransfers
121
		&GetTransfersFromTo
121
		&GetTransfersFromTo
122
		&updateWrongTransfer
122
		&updateWrongTransfer
123
		&DeleteTransfer
124
                &IsBranchTransferAllowed
123
                &IsBranchTransferAllowed
125
                &CreateBranchTransferLimit
124
                &CreateBranchTransferLimit
126
                &DeleteBranchTransferLimits
125
                &DeleteBranchTransferLimits
Lines 3487-3510 sub GetTransfersFromTo { Link Here
3487
    return (@gettransfers);
3486
    return (@gettransfers);
3488
}
3487
}
3489
3488
3490
=head2 DeleteTransfer
3491
3492
  &DeleteTransfer($itemnumber);
3493
3494
=cut
3495
3496
sub DeleteTransfer {
3497
    my ($itemnumber) = @_;
3498
    return unless $itemnumber;
3499
    my $dbh          = C4::Context->dbh;
3500
    my $sth          = $dbh->prepare(
3501
        "DELETE FROM branchtransfers
3502
         WHERE itemnumber=?
3503
         AND datearrived IS NULL "
3504
    );
3505
    return $sth->execute($itemnumber);
3506
}
3507
3508
=head2 SendCirculationAlert
3489
=head2 SendCirculationAlert
3509
3490
3510
Send out a C<check-in> or C<checkout> alert using the messaging system.
3491
Send out a C<check-in> or C<checkout> alert using the messaging system.
(-)a/t/db_dependent/Circulation/transfers.t (-8 lines)
Lines 38-44 can_ok( Link Here
38
    qw(
38
    qw(
39
      CreateBranchTransferLimit
39
      CreateBranchTransferLimit
40
      DeleteBranchTransferLimits
40
      DeleteBranchTransferLimits
41
      DeleteTransfer
42
      GetTransfers
41
      GetTransfers
43
      GetTransfersFromTo
42
      GetTransfersFromTo
44
      )
43
      )
Lines 223-234 is( Link Here
223
is(C4::Circulation::DeleteBranchTransferLimits(),undef,"Without parameters DeleteBranchTransferLimit returns undef");
222
is(C4::Circulation::DeleteBranchTransferLimits(),undef,"Without parameters DeleteBranchTransferLimit returns undef");
224
is(C4::Circulation::DeleteBranchTransferLimits('B'),'0E0',"With a wrong id DeleteBranchTransferLimit returns 0E0");
223
is(C4::Circulation::DeleteBranchTransferLimits('B'),'0E0',"With a wrong id DeleteBranchTransferLimit returns 0E0");
225
224
226
#Test DeleteTransfer
227
is( C4::Circulation::DeleteTransfer($item_id1),
228
    1, "A the item1's transfer has been deleted" );
229
is(C4::Circulation::DeleteTransfer(),undef,"Without itemid DeleteTransfer returns undef");
230
is(C4::Circulation::DeleteTransfer(-1),'0E0',"with a wrong itemid DeleteTranfer returns 0E0");
231
232
#Test TransferSlip
225
#Test TransferSlip
233
is( C4::Circulation::TransferSlip($branchcode_1, undef, 5, $branchcode_2),
226
is( C4::Circulation::TransferSlip($branchcode_1, undef, 5, $branchcode_2),
234
    undef, "No tranferslip if invalid or undef itemnumber or barcode" );
227
    undef, "No tranferslip if invalid or undef itemnumber or barcode" );
235
- 

Return to bug 27896