From ab7a8db43dbb240f111e3ea7eef5b9e0a1a62652 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 2 Jan 2024 08:58:04 -0500 Subject: [PATCH] Bug 35398: (QA follow-up) Tidy code Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer --- Koha/EDI.pm | 16 +++++++--------- t/db_dependent/Koha/EDI.t | 16 +++++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Koha/EDI.pm b/Koha/EDI.pm index 0c71f50ede..ad7ea7a075 100644 --- a/Koha/EDI.pm +++ b/Koha/EDI.pm @@ -830,19 +830,17 @@ sub quote_item { ); ++$created; - my $lrp = - $item->girfield( 'library_rotation_plan' ); + my $lrp = $item->girfield('library_rotation_plan'); if ($lrp) { - my $rota = - Koha::StockRotationRotas->find( { title => $lrp }, - { key => 'stockrotationrotas_title' } ); + my $rota = Koha::StockRotationRotas->find( + { title => $lrp }, + { key => 'stockrotationrotas_title' } + ); if ($rota) { $rota->add_item($itemnumber); $logger->trace("Item added to rota $rota->id"); - } - else { - $logger->error( - "No rota found matching $lrp in orderline"); + } else { + $logger->error("No rota found matching $lrp in orderline"); } } } diff --git a/t/db_dependent/Koha/EDI.t b/t/db_dependent/Koha/EDI.t index a91e307cc7..46c2455760 100755 --- a/t/db_dependent/Koha/EDI.t +++ b/t/db_dependent/Koha/EDI.t @@ -83,10 +83,12 @@ subtest 'process_quote' => sub { value => { title => 'ROT1' } } ); - $builder->build({ - source => 'Stockrotationstage', - value => { rota_id => $rota->rota_id }, - }); + $builder->build( + { + source => 'Stockrotationstage', + value => { rota_id => $rota->rota_id }, + } + ); # Process the test quote file process_quote($quote); @@ -113,11 +115,11 @@ subtest 'process_quote' => sub { my $item = $items->next; # Test that item is added to rota appropriately - my $on_rota = Koha::StockRotationItems->search({ itemnumber_id => $item->itemnumber }); - is($on_rota->count, 1, "Item added to stockrotation rota"); + my $on_rota = Koha::StockRotationItems->search( { itemnumber_id => $item->itemnumber } ); + is( $on_rota->count, 1, "Item added to stockrotation rota" ); my $rota_item = $on_rota->next; - is($rota_item->stage->rota->id, $rota->id, "Item is on correct rota"); + is( $rota_item->stage->rota->id, $rota->id, "Item is on correct rota" ); $schema->storage->txn_rollback; }; -- 2.39.5