| 
      
            Lines 513-518
          is(
      
      
        Link Here
      
     | 
  
        
          | 513 | 
              q{UpdateNotForLoanStatusOnCheckin does not update notforloan value for specific itemtype from 1 with setting "1: ONLYMESSAGE"} | 
          513 | 
              q{UpdateNotForLoanStatusOnCheckin does not update notforloan value for specific itemtype from 1 with setting "1: ONLYMESSAGE"} | 
        
        
          | 514 | 
          );  | 
          514 | 
          );  | 
        
        
          | 515 | 
           | 
          515 | 
           | 
        
            
               | 
               | 
              516 | 
              ##############################################  | 
            
            
              | 517 | 
              #  | 
            
            
              | 518 | 
              # UpdateNotForLoanStatusOnCheckout  | 
            
            
              | 519 | 
              #  | 
            
            
              | 520 | 
              ##############################################  | 
            
            
              | 521 | 
               | 
            
            
              | 522 | 
              my $itemnumber4 = Koha::Item->new(  | 
            
            
              | 523 | 
                  { | 
            
            
              | 524 | 
                      biblionumber   => $biblionumber,  | 
            
            
              | 525 | 
                      barcode        => 'barcode_6',  | 
            
            
              | 526 | 
                      itemcallnumber => 'callnumber6',  | 
            
            
              | 527 | 
                      homebranch     => $branchcode_1,  | 
            
            
              | 528 | 
                      holdingbranch  => $branchcode_1,  | 
            
            
              | 529 | 
                      notforloan     => -1,  | 
            
            
              | 530 | 
                      itype          => $itemtype,  | 
            
            
              | 531 | 
                      location       => 'loc1'  | 
            
            
              | 532 | 
                  },  | 
            
            
              | 533 | 
              )->store->itemnumber;  | 
            
            
              | 534 | 
               | 
            
            
              | 535 | 
              t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', q{} ); | 
            
            
              | 536 | 
              AddIssue( $patron_2, 'barcode_6', dt_from_string );  | 
            
            
              | 537 | 
              $item = Koha::Items->find($itemnumber4);  | 
            
            
              | 538 | 
              ok( $item->notforloan eq -1, 'UpdateNotForLoanStatusOnCheckout does not modify value when not enabled' );  | 
            
            
              | 539 | 
               | 
            
            
              | 540 | 
              t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', '-1: 0' );  | 
            
            
              | 541 | 
              AddReturn( 'barcode_6', $branchcode_1 );  | 
            
            
              | 542 | 
              my $test = AddIssue( $patron_2, 'barcode_6', dt_from_string );  | 
            
            
              | 543 | 
              $item = Koha::Items->find($itemnumber4);  | 
            
            
              | 544 | 
              ok(  | 
            
            
              | 545 | 
                  $item->notforloan eq 0,  | 
            
            
              | 546 | 
                  q{UpdateNotForLoanStatusOnCheckout updates notforloan value from -1 to 0 with setting "-1: 0"} | 
            
            
              | 547 | 
              );  | 
            
            
              | 548 | 
               | 
            
            
              | 549 | 
              AddIssue( $patron_2, 'barcode_6', dt_from_string );  | 
            
            
              | 550 | 
              AddReturn( 'barcode_6', $branchcode_1 );  | 
            
            
              | 551 | 
              $item = Koha::Items->find($itemnumber4);  | 
            
            
              | 552 | 
              ok(  | 
            
            
              | 553 | 
                  $item->notforloan eq 0,  | 
            
            
              | 554 | 
                  q{UpdateNotForLoanStatusOnCheckout does not update notforloan value from 0 with setting "-1: 0"} | 
            
            
              | 555 | 
              );  | 
            
            
              | 556 | 
               | 
            
            
              | 557 | 
              ##########################################  | 
            
            
              | 558 | 
              #  | 
            
            
              | 559 | 
              # END UpdateNotforloanOnCheckout  | 
            
            
              | 560 | 
              #  | 
            
            
              | 561 | 
              ##########################################  | 
            
            
              | 562 | 
               | 
            
        
          | 516 | 
          my $itemnumber2 = Koha::Item->new(  | 
          563 | 
          my $itemnumber2 = Koha::Item->new(  | 
        
        
          | 517 | 
              { | 
          564 | 
              { | 
        
        
          | 518 | 
                  biblionumber   => $biblionumber,  | 
          565 | 
                  biblionumber   => $biblionumber,  | 
        
  
    | 
      
            Lines 695-735
          AddRenewal(
      
      
        Link Here
      
     | 
  
        
          | 695 | 
          my ($unseen_reset) = ( C4::Circulation::GetRenewCount( $unseen_patron->borrowernumber, $unseen_item->itemnumber ) )[3];  | 
          742 | 
          my ($unseen_reset) = ( C4::Circulation::GetRenewCount( $unseen_patron->borrowernumber, $unseen_item->itemnumber ) )[3];  | 
        
        
          | 696 | 
          is( $unseen_reset, 0, 'seen renewal resets the unseen count' );  | 
          743 | 
          is( $unseen_reset, 0, 'seen renewal resets the unseen count' );  | 
        
        
          | 697 | 
           | 
          744 | 
           | 
        
            
              | 698 | 
              my $itemnumber4 = Koha::Item->new(  | 
               | 
               | 
            
            
              | 699 | 
                  { | 
            
            
              | 700 | 
                      biblionumber   => $biblionumber,  | 
            
            
              | 701 | 
                      barcode        => 'barcode_6',  | 
            
            
              | 702 | 
                      itemcallnumber => 'callnumber6',  | 
            
            
              | 703 | 
                      homebranch     => $branchcode_1,  | 
            
            
              | 704 | 
                      holdingbranch  => $branchcode_1,  | 
            
            
              | 705 | 
                      notforloan     => -1,  | 
            
            
              | 706 | 
                      itype          => $itemtype,  | 
            
            
              | 707 | 
                      location       => 'loc1'  | 
            
            
              | 708 | 
                  },  | 
            
            
              | 709 | 
              )->store->itemnumber;  | 
            
            
              | 710 | 
               | 
            
            
              | 711 | 
              t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', q{} ); | 
            
            
              | 712 | 
              AddIssue( $patron_2, 'barcode_6', dt_from_string );  | 
            
            
              | 713 | 
              $item = Koha::Items->find($itemnumber4);  | 
            
            
              | 714 | 
              ok( $item->notforloan eq -1, 'UpdateNotForLoanStatusOnCheckout does not modify value when not enabled' );  | 
            
            
              | 715 | 
               | 
            
            
              | 716 | 
              t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', '-1: 0' );  | 
            
            
              | 717 | 
              AddReturn( 'barcode_6', $branchcode_1 );  | 
            
            
              | 718 | 
              my $test = AddIssue( $patron_2, 'barcode_6', dt_from_string );  | 
            
            
              | 719 | 
              $item = Koha::Items->find($itemnumber4);  | 
            
            
              | 720 | 
              ok(  | 
            
            
              | 721 | 
                  $item->notforloan eq 0,  | 
            
            
              | 722 | 
                  q{UpdateNotForLoanStatusOnCheckout updates notforloan value from -1 to 0 with setting "-1: 0"} | 
            
            
              | 723 | 
              );  | 
            
            
              | 724 | 
               | 
            
            
              | 725 | 
              AddIssue( $patron_2, 'barcode_6', dt_from_string );  | 
            
            
              | 726 | 
              AddReturn( 'barcode_6', $branchcode_1 );  | 
            
            
              | 727 | 
              $item = Koha::Items->find($itemnumber4);  | 
            
            
              | 728 | 
              ok(  | 
            
            
              | 729 | 
                  $item->notforloan eq 0,  | 
            
            
              | 730 | 
                  q{UpdateNotForLoanStatusOnCheckout does not update notforloan value from 0 with setting "-1: 0"} | 
            
            
              | 731 | 
              );  | 
            
            
              | 732 | 
               | 
            
        
          | 733 | 
          # Bug 21159 - Update item shelving location on checkout  | 
          745 | 
          # Bug 21159 - Update item shelving location on checkout  | 
        
        
          | 734 | 
          my $itemnumber5 = Koha::Item->new(  | 
          746 | 
          my $itemnumber5 = Koha::Item->new(  | 
        
        
          | 735 | 
              { | 
          747 | 
              { | 
        
            
              | 736 | 
              -   | 
               | 
               |