(quantity > quantityreceived OR quantityreceived IS NULL)
GROUP BY aqorders.biblionumber, aqorders.basketno, aqorders.ordernumber,
tleft,
- ecost, budgetdate, entrydate,
+ ecost_tax_included, budgetdate, entrydate,
aqbasket.booksellerid,
aqbooksellers.name,
itype,
$left = $data->{'quantity'};
}
if ( $left && $left > 0 ) {
- my $subtotal = get_rounded_price( $left * $data->{'ecost_tax_included'} );
+ my $subtotal = $left * get_rounded_price( $data->{'ecost_tax_included'} );
$data->{subtotal} = sprintf( "%.2f", $subtotal );
$data->{'left'} = $left;
push @ordered, $data;
}
}
-my $adjustments = Koha::Acquisition::Invoice::Adjustments->search({budget_id => $fund_id, closedate => undef, encumber_open => 1 }, { join => 'invoiceid' } );
+my $adjustments = Koha::Acquisition::Invoice::Adjustments->search({budget_id => $fund_id, closedate => undef, encumber_open => 1 }, { prefetch => 'invoiceid' } );
while ( my $adj = $adjustments->next ){
$total += $adj->adjustment;
}