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

(-)a/Koha/REST/V1/Checkouts.pm (-1 / +1 lines)
Lines 262-268 sub add { Link Here
262
        }
262
        }
263
263
264
        # Call 'AddIssue'
264
        # Call 'AddIssue'
265
        my $checkout = AddIssue( $patron->unblessed, $item->barcode );
265
        my $checkout = AddIssue( $patron, $item->barcode );
266
        if ($checkout) {
266
        if ($checkout) {
267
            $c->res->headers->location(
267
            $c->res->headers->location(
268
                $c->req->url->to_string . '/' . $checkout->id );
268
                $c->req->url->to_string . '/' . $checkout->id );
(-)a/t/db_dependent/Circulation/issue.t (-4 / +3 lines)
Lines 555-571 my $itemnumber4 = Koha::Item->new( Link Here
555
)->store->itemnumber;
555
)->store->itemnumber;
556
556
557
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', q{} );
557
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', q{} );
558
AddIssue( $borrower_2, 'barcode_6', dt_from_string );
558
AddIssue( $patron_2, 'barcode_6', dt_from_string );
559
$item = Koha::Items->find( $itemnumber4 );
559
$item = Koha::Items->find( $itemnumber4 );
560
ok( $item->notforloan eq -1, 'UpdateNotForLoanStatusOnCheckout does not modify value when not enabled' );
560
ok( $item->notforloan eq -1, 'UpdateNotForLoanStatusOnCheckout does not modify value when not enabled' );
561
561
562
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', '-1: 0' );
562
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', '-1: 0' );
563
AddReturn( 'barcode_6', $branchcode_1 );
563
AddReturn( 'barcode_6', $branchcode_1 );
564
my $test = AddIssue( $borrower_2, 'barcode_6', dt_from_string );
564
my $test = AddIssue( $patron_2, 'barcode_6', dt_from_string );
565
$item = Koha::Items->find( $itemnumber4 );
565
$item = Koha::Items->find( $itemnumber4 );
566
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout updates notforloan value from -1 to 0 with setting "-1: 0"} );
566
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout updates notforloan value from -1 to 0 with setting "-1: 0"} );
567
567
568
AddIssue( $borrower_2, 'barcode_6', dt_from_string );
568
AddIssue( $patron_2, 'barcode_6', dt_from_string );
569
AddReturn( 'barcode_6', $branchcode_1 );
569
AddReturn( 'barcode_6', $branchcode_1 );
570
$item = Koha::Items->find( $itemnumber4 );
570
$item = Koha::Items->find( $itemnumber4 );
571
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout does not update notforloan value from 0 with setting "-1: 0"} );
571
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout does not update notforloan value from 0 with setting "-1: 0"} );
572
- 

Return to bug 32496