From af585e300994ed77c926f6a6f0193fc282cb55c9 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Mon, 7 Jan 2008 20:42:38 -0600 Subject: [PATCH] More work on the til reconciliation report Signed-off-by: Joshua Ferraro --- C4/Accounts.pm | 43 +++++++++---------- .../prog/en/modules/reports/stats_screen.tmpl | 32 +++++++++----- 2 files changed, 41 insertions(+), 34 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index 73757a5743..e46e39df4a 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -573,29 +573,26 @@ sub getcredits { } -sub getrefunds { - my ( $date, $date2 ) = @_; - my $dbh = C4::Context->dbh; - - my $sth = $dbh->prepare( - "Select *, - date_FORMAT(timestamp, '%Y-%m-%d %H:%i' ) as datetime - from accountlines,borrowers - where (accounttype = 'REF' - and accountlines.borrowernumber = borrowers.borrowernumber - and date >=? and date execute( $date, $date2 ); - - my $i = 0; - my @results; - while ( my $data = $sth->fetchrow_hashref ) { - $results[$i] = $data ; - $i++; - } - - return (@results); +sub getrefunds { + my ( $date, $date2 ) = @_; + my $dbh = C4::Context->dbh; + + my $sth = $dbh->prepare( + "SELECT *,timestamp AS datetime + FROM accountlines,borrowers + WHERE (accounttype = 'REF' + AND accountlines.borrowernumber = borrowers.borrowernumber + AND date >=? AND date execute( $date, $date2 ); + + my @results; + while ( my $data = $sth->fetchrow_hashref ) { + push @results,$data; + + } + return (@results); } END { } # module clean-up code here (global destructor) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/stats_screen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/stats_screen.tmpl index 4bd004d202..574d70baef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/stats_screen.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/stats_screen.tmpl @@ -1,34 +1,45 @@ - - + +Koha › Reports › Till Reconciliation + + + + + + + + +

Till Reconciliation

Search between two dates

today" id="from"> - /includes/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" /> + /lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" /> - tomorrow" id="to"> - /includes/calendar/cal.gif" id="buttonto1" style="cursor: pointer;" /> + /lib/calendar/cal.gif" id="buttonto1" style="cursor: pointer;" /> - (dd/mm/yyyy) +

Payments

@@ -129,8 +140,7 @@

Total amount of cash collected:$

- - - +
+ -- 2.39.5