@@ -, +, @@ --- installer/data/mysql/updatedatabase.pl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --- a/installer/data/mysql/updatedatabase.pl +++ a/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; --