@@ -, +, @@ --- installer/data/mysql/updatedatabase.pl | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -5369,6 +5369,28 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion ="3.09.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + my $pref = C4::Context->preference('dateformat'); + my $date_format; + + if ( $pref =~ /^iso/ ) { + $date_format = '____-__-__'; + } + elsif ( $pref =~ /^metric/ ) { + $date_format = '__/__/____'; + } + elsif ( $pref =~ /^us/ ) { + $date_format = '__/__/____'; + } + else { + $date_format = '____-__-__'; + } + + $dbh->do("UPDATE accountlines SET description = CONCAT( description, ' 00:00' ) WHERE description LIKE '%$date_format%' AND description NOT LIKE '%$date_format%__:__%'"); + print "Upgrade to $DBversion done (Fix fine descriptions)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS --