From 0201f2c73cf9927ce4398819f996a82b48636592 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Tue, 21 Feb 2023 22:02:03 +0000 Subject: [PATCH] Bug 31631: (follow-up) Fixes for QA test tool --- C4/Budgets.pm | 16 ++++++++-------- acqui/spent.pl | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index d22e32245c..26e4c49143 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -352,7 +352,7 @@ sub GetBudgetSpent { quantityreceived > 0 AND datecancellationprinted IS NULL |); - $sth->execute($budget_id); + $sth->execute($budget_id); my $sum = ( $sth->fetchrow_array || 0 ) + 0; $sth = $dbh->prepare(qq| @@ -370,24 +370,24 @@ sub GetBudgetSpent { $sum += $adj->adjustment; } - return $sum; + return $sum; } # ------------------------------------------------------------------- sub GetBudgetOrdered { - my ($budget_id) = @_; - my $dbh = C4::Context->dbh; + my ($budget_id) = @_; + my $dbh = C4::Context->dbh; # Get correct unitprice and ecost prices as possible my ( $unitprice_field, $ecost_field ) = FieldsForCalculatingFundValues(); - my $sth = $dbh->prepare(qq| + my $sth = $dbh->prepare(qq| SELECT SUM(| . C4::Acquisition::get_rounding_sql(qq|$ecost_field|) . qq| * quantity) AS sum FROM aqorders WHERE budget_id = ? AND quantityreceived = 0 AND datecancellationprinted IS NULL |); - $sth->execute($budget_id); + $sth->execute($budget_id); my $sum = ( $sth->fetchrow_array || 0 ) + 0; my $adjustments = Koha::Acquisition::Invoice::Adjustments->search({budget_id => $budget_id, encumber_open => 1, closedate => undef},{ join => 'invoiceid' }); @@ -395,7 +395,7 @@ sub GetBudgetOrdered { $sum += $adj->adjustment; } - return $sum; + return $sum; } =head2 GetBudgetName @@ -1414,7 +1414,7 @@ sub MoveOrders { my ( $unitprice_field, $ecost_field ) = FieldsForCalculatingFundValues(); -Fetch the tax inclusive or tax exclusive database fields for caclulating fund values based +Fetch the tax inclusive or tax exclusive database fields for calculating fund values based on the value of the CalculateFundValuesIncludingTax system preference. =cut diff --git a/acqui/spent.pl b/acqui/spent.pl index 25a5622a02..dfa3a041ae 100755 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -21,7 +21,7 @@ =head1 NAME - spent.pl + acqui/spent.pl =head1 DESCRIPTION -- 2.20.1