Bugzilla – Attachment 2827 Details for
Bug 4160
Currency Conversion dosn't handle rates other than 100
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-4160-Currency-conversion-doesn-t-handle-rates-ot.patch (text/plain), 2.20 KB, created by
Katrin Fischer
on 2010-12-10 07:04:58 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2010-12-10 07:04:58 UTC
Size:
2.20 KB
patch
obsolete
>From 83f82cfc70224befdf78d3376edd822f6777512f Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Fri, 10 Dec 2010 07:53:49 +0100 >Subject: [PATCH] Bug 4160: Currency conversion doesn't handle rates other than 100 >Content-Type: text/plain; charset="utf-8" > >Changes data type for currency.rate to accomodate bigger currency conversion rates. > >FLOAT( 15, 5 ) >--- > installer/data/mysql/kohastructure.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > kohaversion.pl | 2 +- > 3 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 9148970..bf992be 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -563,7 +563,7 @@ CREATE TABLE `currency` ( > `currency` varchar(10) NOT NULL default '', > `symbol` varchar(5) default NULL, > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, >- `rate` float(7,5) default NULL, >+ `rate` float(15,5) default NULL, > `active` tinyint(1) default NULL, > PRIMARY KEY (`currency`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index d093946..bd0a588 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -3876,6 +3876,14 @@ VALUES > SetVersion ($DBversion); > }; > >+$DBversion = '3.03.00.00X'; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("ALTER TABLE `currency` CHANGE `rate` `rate` FLOAT( 15, 5 ) NULL DEFAULT NULL;"); >+ print "Upgrade to $DBversion done (Enable currency rates >= 100)\n"; >+ SetVersion ($DBversion); >+} >+ >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >diff --git a/kohaversion.pl b/kohaversion.pl >index 53c1724..3ece202 100644 >--- a/kohaversion.pl >+++ b/kohaversion.pl >@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : > use strict; > > sub kohaversion { >- our $VERSION = '3.03.00.004'; >+ our $VERSION = '3.0X.XX.XXX'; > # version needs to be set this way > # so that it can be picked up by Makefile.PL > # during install >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4160
: 2827