Bug 35944: (QA follow-up) Tidy
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
48f9867203
commit
bf4b39cb3b
|
|
@ -3121,7 +3121,7 @@ sub CanBookBeRenewed {
|
|||
}
|
||||
|
||||
# CHECK FOR BOOKINGS
|
||||
if( $item->bookings->count ){
|
||||
if ( $item->bookings->count ) {
|
||||
my $startdate =
|
||||
( C4::Context->preference('RenewalPeriodBase') eq 'date_due' )
|
||||
? dt_from_string( $issue->date_due, 'sql' )
|
||||
|
|
|
|||
|
|
@ -51,12 +51,12 @@ sub do_renew_for {
|
|||
$self->{due} = $self->duedatefromissue($issue, $self->{item}->{itemnumber});
|
||||
$self->renewal_ok(1);
|
||||
} else {
|
||||
$renewerror=~s/on_reserve/Item unavailable due to outstanding holds/;
|
||||
$renewerror=~s/booked/Item is booked for another borrower/;
|
||||
$renewerror=~s/too_many/Item has reached maximum renewals/;
|
||||
$renewerror=~s/too_unseen/Item has reached maximum consecutive renewals without being seen/;
|
||||
$renewerror=~s/item_denied_renewal/Item renewal is not allowed/;
|
||||
$renewerror=~s/item_issued_to_other_patron/Item already issued to other borrower/;
|
||||
$renewerror =~ s/on_reserve/Item unavailable due to outstanding holds/;
|
||||
$renewerror =~ s/booked/Item is booked for another borrower/;
|
||||
$renewerror =~ s/too_many/Item has reached maximum renewals/;
|
||||
$renewerror =~ s/too_unseen/Item has reached maximum consecutive renewals without being seen/;
|
||||
$renewerror =~ s/item_denied_renewal/Item renewal is not allowed/;
|
||||
$renewerror =~ s/item_issued_to_other_patron/Item already issued to other borrower/;
|
||||
$self->screen_msg($renewerror);
|
||||
$self->renewal_ok(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1739,7 +1739,7 @@ subtest "CanBookBeRenewed | bookings" => sub {
|
|||
my $schema = Koha::Database->schema;
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
t::lib::Mocks::mock_preference('RenewalPeriodBase', 'date_due');
|
||||
t::lib::Mocks::mock_preference( 'RenewalPeriodBase', 'date_due' );
|
||||
|
||||
my $renewing_patron = $builder->build_object( { class => 'Koha::Patrons' } );
|
||||
my $booked_patron = $builder->build_object( { class => 'Koha::Patrons' } );
|
||||
|
|
@ -1763,7 +1763,7 @@ subtest "CanBookBeRenewed | bookings" => sub {
|
|||
|
||||
# Proposed renewal would encroach on booking
|
||||
my ( $renewok, $error ) = CanBookBeRenewed( $renewing_patron, $issue, 0 );
|
||||
is( $renewok, 0, "Renewal not allowed as it would mean the item was not returned before the next booking" );
|
||||
is( $renewok, 0, "Renewal not allowed as it would mean the item was not returned before the next booking" );
|
||||
is( $error, 'booked', "Error is 'booked'" );
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
|
|
|
|||
Loading…
Reference in New Issue