From ff0778b529011714e18e598f97eef7e19100a172 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 17 Aug 2012 08:48:39 -0400 Subject: [PATCH] Bug 8253 - Fine doubling - Followup Use timestamp as the 'un-matcher' rather than the fine description. --- installer/data/mysql/updatedatabase.pl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ad93d65..c5bcc48 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -5692,13 +5692,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SELECT * FROM accountlines WHERE ( accounttype = 'FU' OR accounttype = 'F' ) AND description like '%23:59%' - ORDER BY borrowernumber, itemnumber, accountno, description + ORDER BY borrowernumber, itemnumber, accountno, description, timestamp DESC "; my $sth = $dbh->prepare( $query ); $sth->execute(); my $results = $sth->fetchall_arrayref({}); - $query = "SELECT * FROM accountlines WHERE description LIKE ? AND description NOT LIKE ?"; + $query = "SELECT * FROM accountlines a WHERE a.description LIKE ? AND a.timestamp != ?"; $sth = $dbh->prepare( $query ); my @fines; @@ -5708,7 +5708,7 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { $description_to_match .= '%'; #warn "DESCRIPTION TO MATCH: " . $description_to_match; - $sth->execute( $description_to_match, $keeper->{'description'} ); + $sth->execute( $description_to_match, $keeper->{'timestamp'} ); my $has_changed = 0; -- 1.7.2.5