From 0a5215e0a2f8e71201bddb0b2361db96cfe6f61b Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Wed, 16 Jun 2021 14:27:30 +0100 Subject: [PATCH] Bug 24190: (follow-up) Rename AcqLog As requested in comment #49, renamed uses of AcqLog to AcquisitionLog Signed-off-by: Nick Clemens JD amended patch: replace one missing occurrence in Budgets.t --- C4/Budgets.pm | 6 +++--- acqui/addorder.pl | 4 ++-- acqui/cancelorder.pl | 2 +- acqui/finishreceive.pl | 2 +- acqui/invoice.pl | 6 +++--- admin/aqbudgetperiods.pl | 2 +- t/db_dependent/Budgets.t | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 8b6d63c7e57..9624650be14 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -645,7 +645,7 @@ sub AddBudget { my $id = $resultset->create($budget)->id; # Log the addition - if (C4::Context->preference("AcqLog")) { + if (C4::Context->preference("AcquisitionLog")) { my $infos = { budget_amount => $budget->{budget_amount}, budget_encumb => $budget->{budget_encumb}, @@ -669,7 +669,7 @@ sub ModBudget { return unless($result); # Log this modification - if (C4::Context->preference("AcqLog")) { + if (C4::Context->preference("AcquisitionLog")) { my $infos = { budget_amount_new => $budget->{budget_amount}, budget_encumb_new => $budget->{budget_encumb}, @@ -701,7 +701,7 @@ sub DelBudget { my $sth = $dbh->prepare("delete from aqbudgets where budget_id=?"); my $rc = $sth->execute($budget_id); # Log the deletion - if (C4::Context->preference("AcqLog")) { + if (C4::Context->preference("AcquisitionLog")) { logaction( 'ACQUISITIONS', 'DELETE_FUND', diff --git a/acqui/addorder.pl b/acqui/addorder.pl index dbfad999a18..e62cfe47108 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -319,7 +319,7 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { if ( $orderinfo->{ordernumber} ) { ModOrder($orderinfo); # Log the order modification - if (C4::Context->preference("AcqLog")) { + if (C4::Context->preference("AcquisitionLog")) { my $infos = {}; foreach my $field(@log_order_fields) { $infos->{$field} = $orderinfo->{$field}; @@ -335,7 +335,7 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { else { # else, it's a new line $order->store; # Log the order creation - if (C4::Context->preference("AcqLog")) { + if (C4::Context->preference("AcquisitionLog")) { my $infos = {}; foreach my $field(@log_order_fields) { $infos->{$field} = $orderinfo->{$field}; diff --git a/acqui/cancelorder.pl b/acqui/cancelorder.pl index a0df47a866b..b0eb8edb075 100755 --- a/acqui/cancelorder.pl +++ b/acqui/cancelorder.pl @@ -66,7 +66,7 @@ if( $action and $action eq "confirmcancel" ) { if $messages[0]->message eq 'error_delbiblio'; } else { # Log the cancellation of the order - if (C4::Context->preference("AcqLog")) { + if (C4::Context->preference("AcquisitionLog")) { logaction('ACQUISITIONS', 'CANCEL_ORDER', $ordernumber); } $template->param(success_cancelorder => 1); diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 9934af6aa00..e37c91530ef 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -192,7 +192,7 @@ if ($suggestion_id) { } # Log the receipt -if (C4::Context->preference("AcqLog")) { +if (C4::Context->preference("AcquisitionLog")) { my $infos = { quantityrec => $quantityrec, bookfund => $bookfund, diff --git a/acqui/invoice.pl b/acqui/invoice.pl index 8e73e6dd636..91edfc435f2 100755 --- a/acqui/invoice.pl +++ b/acqui/invoice.pl @@ -148,7 +148,7 @@ elsif ( $op && $op eq 'del_adj' ) { my $adjustment_id = $input->param('adjustment_id'); my $del_adj = Koha::Acquisition::Invoice::Adjustments->find( $adjustment_id ); if ($del_adj) { - if (C4::Context->preference("AcqLog")) { + if (C4::Context->preference("AcquisitionLog")) { my $infos = { invoiceid => $del_adj->invoiceid, budget_id => $del_adj->budget_id, @@ -194,7 +194,7 @@ elsif ( $op && $op eq 'mod_adj' ) { my $new_adj = Koha::Acquisition::Invoice::Adjustment->new($adj); $new_adj->store(); # Log this addition - if (C4::Context->preference("AcqLog")) { + if (C4::Context->preference("AcquisitionLog")) { logaction( 'ACQUISITIONS', 'CREATE_INVOICE_ADJUSTMENT', @@ -207,7 +207,7 @@ elsif ( $op && $op eq 'mod_adj' ) { my $old_adj = Koha::Acquisition::Invoice::Adjustments->find( $adjustment_id[$i] ); unless ( $old_adj->adjustment == $adjustment[$i] && $old_adj->reason eq $reason[$i] && $old_adj->budget_id == $budget_id[$i] && $old_adj->encumber_open == $e_open{$adjustment_id[$i]} && $old_adj->note eq $note[$i] ){ # Log this modification - if (C4::Context->preference("AcqLog")) { + if (C4::Context->preference("AcquisitionLog")) { my $infos = { adjustment => $adjustment[$i], reason => $reason[$i], diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl index 091943acb3b..71ede5dccb9 100755 --- a/admin/aqbudgetperiods.pl +++ b/admin/aqbudgetperiods.pl @@ -120,7 +120,7 @@ elsif ( $op eq 'add_validate' ) { $$budget_period_hashref{$_}||=0 for qw(budget_period_active budget_period_locked); my $status=ModBudgetPeriod($budget_period_hashref); # Log the budget modification - if (C4::Context->preference("AcqLog")) { + if (C4::Context->preference("AcquisitionLog")) { my $diff = 0 - ($budgetperiod_old->{budget_period_total} - $budget_period_hashref->{budget_period_total}); my $infos = { budget_period_startdate => $input->param('budget_period_startdate'), diff --git a/t/db_dependent/Budgets.t b/t/db_dependent/Budgets.t index 66c8426b6fd..e31753fb32b 100755 --- a/t/db_dependent/Budgets.t +++ b/t/db_dependent/Budgets.t @@ -24,7 +24,7 @@ use Koha::DateUtils; use t::lib::Mocks; t::lib::Mocks::mock_preference('OrderPriceRounding',''); -t::lib::Mocks::mock_preference('AcqLog','1'); +t::lib::Mocks::mock_preference('AcquisitionLog','1'); my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; -- 2.25.1