From 84089a1b7ddbf848ac121a5f9dfa10d7f11570c2 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 13 May 2009 22:21:17 +0000 Subject: [PATCH] BUGFIX Increased decimal precision of Money->Amount database column to support currencies with a greater precision than 2 digits. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76743 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/fieldtypes/Money.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/model/fieldtypes/Money.php b/core/model/fieldtypes/Money.php index 91a88f58b..a75a8dab1 100644 --- a/core/model/fieldtypes/Money.php +++ b/core/model/fieldtypes/Money.php @@ -61,7 +61,7 @@ class Money extends DBField implements CompositeDBField { */ static $composite_db = array( "Currency" => "Varchar(3) null", - "Amount" => Array('type'=>'decimal', 'parts'=>Array('datatype'=>'decimal', 'precision'=>"14,2"), 'default' => '0'), + "Amount" => Array('type'=>'decimal', 'parts'=>Array('datatype'=>'decimal', 'precision'=>"19,4"), 'default' => '0'), ); function __construct($name = null) {