View | Details | Raw Unified | Return to bug 4831
Collapse All | Expand All

(-)a/C4/Budgets.pm (-2 / +1 lines)
Lines 304-310 sub GetBudgetSpent { Link Here
304
	my ($budget_id) = @_;
304
	my ($budget_id) = @_;
305
	my $dbh = C4::Context->dbh;
305
	my $dbh = C4::Context->dbh;
306
	my $sth = $dbh->prepare(qq|
306
	my $sth = $dbh->prepare(qq|
307
        SELECT SUM(ecost *  quantity) AS sum FROM aqorders
307
        SELECT SUM( COALESCE(unitprice, ecost) * quantity ) AS sum FROM aqorders
308
            WHERE budget_id = ? AND
308
            WHERE budget_id = ? AND
309
            quantityreceived > 0 AND
309
            quantityreceived > 0 AND
310
            datecancellationprinted IS NULL
310
            datecancellationprinted IS NULL
311
- 

Return to bug 4831