@@ -, +, @@ C4/Budgets.pm --- C4/Budgets.pm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) --- a/C4/Budgets.pm +++ a/C4/Budgets.pm @@ -343,8 +343,8 @@ sub GetBudgetSpent { SELECT SUM(shipmentcost) AS sum FROM aqinvoices WHERE shipmentcost_budgetid = ? - AND closedate IS NOT NULL |); + $sth->execute($budget_id); my ($shipmentcost_sum) = $sth->fetchrow_array; $sum += $shipmentcost_sum; @@ -365,16 +365,6 @@ sub GetBudgetOrdered { $sth->execute($budget_id); my $sum = $sth->fetchrow_array; - $sth = $dbh->prepare(qq| - SELECT SUM(shipmentcost) AS sum - FROM aqinvoices - WHERE shipmentcost_budgetid = ? - AND closedate IS NULL - |); - $sth->execute($budget_id); - my ($shipmentcost_sum) = $sth->fetchrow_array; - $sum += $shipmentcost_sum; - return $sum; } --