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

(-)a/reports/borrowers_stats.pl (-3 / +2 lines)
Lines 396-403 sub calculate { Link Here
396
            $strcalc .= " AND attribute_$type.attribute LIKE '" . $filter . "' ";
396
            $strcalc .= " AND attribute_$type.attribute LIKE '" . $filter . "' ";
397
        }
397
        }
398
    }
398
    }
399
	$strcalc .= " AND borrowernumber in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "')" if ($activity eq 'active');
399
	$strcalc .= " AND borrowers.borrowernumber in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "')" if ($activity eq 'active');
400
	$strcalc .= " AND borrowernumber not in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "' AND borrowernumber IS NOT NULL)" if ($activity eq 'nonactive');
400
	$strcalc .= " AND borrowers.borrowernumber not in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "' AND borrowernumber IS NOT NULL)" if ($activity eq 'nonactive');
401
	$strcalc .= " AND $status='1' " if ($status);
401
	$strcalc .= " AND $status='1' " if ($status);
402
402
403
    $strcalc .= " GROUP BY ";
403
    $strcalc .= " GROUP BY ";
404
- 

Return to bug 22082