From a70de3cbdecc23e53221bb9725e504469d5cd188 Mon Sep 17 00:00:00 2001 From: szrj1m Date: Mon, 22 Aug 2005 01:05:49 +0000 Subject: [PATCH] &getcredits now returning 'BAY' and 'WORK' type credits too. --- C4/Stats.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Stats.pm b/C4/Stats.pm index 185428db43..ac7f5e9c5d 100644 --- a/C4/Stats.pm +++ b/C4/Stats.pm @@ -178,10 +178,10 @@ sub getcredits{ my $timestamp = $a.$b.$c.$padding; my $timestamp2 = $x.$y.$z.$padding; - my $sth; - - $sth=$dbh->prepare("Select * from accountlines where (accounttype = 'CR' or accounttype = 'LR') and timestamp >=? and timestamp execute($timestamp,$timestamp2); + my $sth=$dbh->prepare("Select * from accountlines,borrowers where (((accounttype = 'LR') or (accounttype <> 'Pay')) + and amount < 0 and accountlines.borrowernumber = borrowers.borrowernumber + and timestamp >=? and timestamp execute($timestamp, $timestamp2); my $i=0; my @results; -- 2.39.5