-
- #XXX optimization: a single SQL query to return the total amount
- my $cdr_search = $svc_x->psearch_cdrs(%options);
- $cdr_search->limit(1000);
- $cdr_search->increment(0);
- while ( my $cdr = $cdr_search->fetch ) {
- $balance -= $cdr->rated_price;
- }