From: Paul Poulain <[email protected]>

---
 installer/data/mysql/updatedatabase.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/installer/data/mysql/updatedatabase.pl 
b/installer/data/mysql/updatedatabase.pl
index dd141f3..0b2fff4 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -2724,7 +2724,7 @@ if (C4::Context->preference("Version") < 
TransformToNum($DBversion)) {
     $dbh->do("ALTER TABLE `aqbooksellers` ADD COLUMN `gstrate` decimal(6,4) 
default NULL");
     for my $bookseller (@$booksellers) {
         my $sth = $dbh->prepare("UPDATE aqbooksellers SET gstrate=? WHERE 
id=?");
-        $sth->execute($bookseller->{gstrate} / 100, $bookseller->{id});
+        $sth->execute($bookseller->{gstrate}?$bookseller->{gstrate}:0 / 100, 
$bookseller->{id});
         $sth->finish;
     }
     print "Upgrade to $DBversion done (modify gstrate to be consistent with 
syspref)\n";
-- 
1.6.0.4

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to