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

(-)a/reports/borrowers_stats.pl (-2 / +1 lines)
Lines 322-328 sub calculate { Link Here
322
	@$filters[7]=~ s/\*/%/g if (@$filters[7]);
322
	@$filters[7]=~ s/\*/%/g if (@$filters[7]);
323
	$strcalc .= " AND sort2 like '" . @$filters[7] ."'" if ( @$filters[7] );
323
	$strcalc .= " AND sort2 like '" . @$filters[7] ."'" if ( @$filters[7] );
324
	$strcalc .= " AND borrowernumber in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "')" if ($activity eq 'active');
324
	$strcalc .= " AND borrowernumber in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "')" if ($activity eq 'active');
325
	$strcalc .= " AND borrowernumber not in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "')" if ($activity eq 'nonactive');
325
	$strcalc .= " AND borrowernumber not in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "' AND borrowernumber IS NOT NULL)" if ($activity eq 'nonactive');
326
	$strcalc .= " AND $status='1' " if ($status);
326
	$strcalc .= " AND $status='1' " if ($status);
327
	$strcalc .= " group by $linefield, $colfield";
327
	$strcalc .= " group by $linefield, $colfield";
328
	push @loopfilter, {sql=>1, crit=>"Query", filter=>$strcalc};
328
	push @loopfilter, {sql=>1, crit=>"Query", filter=>$strcalc};
329
- 

Return to bug 8306