datecancellationprinted IS NULL
|);
$sth->execute($budget_id);
- my $sum = $sth->fetchrow_array;
+ my $sum = 0 + $sth->fetchrow_array;
$sth = $dbh->prepare(qq|
SELECT SUM(shipmentcost) AS sum
datecancellationprinted IS NULL
|);
$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;
+ my $sum = 0 + $sth->fetchrow_array;
my $adjustments = Koha::InvoiceAdjustments->search({budget_id => $budget_id, encumber_open => 1, closedate => undef},{ join => 'invoiceid' });
while ( my $adj = $adjustments->next ){
} );
is ( GetBudgetSpent( $fund ), 6, "total shipping cost is 6");
-is ( GetBudgetOrdered( $fund ), '26', "total ordered price is 20");
+is ( GetBudgetOrdered( $fund ), '20', "total ordered price is 20");
# CloneBudgetPeriod