Bug 8253 - Fine doubling
authorMason James <mtj@kohaaloha.com>
Tue, 2 Oct 2012 22:09:41 +0000 (11:09 +1300)
committerPaul Poulain <paul.poulain@biblibre.com>
Sun, 28 Oct 2012 18:12:27 +0000 (19:12 +0100)
Provides a fix that during database upgrade, fines are correclty
formatted. Once the misc/cronjobs/fines.pl is run in the
upgraded database, it will not result in duplicate fines being
generated.

Signed-off-by: wajasu <matted-34813@mypacks.net>
installer/data/mysql/updatedatabase.pl

index 4759034..7ab48ee 100755 (executable)
@@ -5026,7 +5026,8 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     $dbh->do("ALTER TABLE old_issues CHANGE returndate returndate datetime");
     $dbh->do("ALTER TABLE old_issues CHANGE lastreneweddate lastreneweddate datetime");
     $dbh->do("ALTER TABLE old_issues CHANGE issuedate issuedate datetime");
-    print "Upgrade to $DBversion done (Setting up issues tables for hourly loans)\n";
+    $dbh->do("UPDATE accountlines SET description = CONCAT(description,' 23:59') WHERE accounttype='F' OR accounttype='FU'"); #BUG-8253
+    print "Upgrade to $DBversion done (Setting up issues and accountlines tables for hourly loans)\n";
     SetVersion($DBversion);
 }