Browse Source

[fix] If precision > 6, use Decimal(21,9) to allow for 12 digits before the decimal dot like in (18,6)

version-14
Anand Doshi 9 years ago
parent
commit
4f93c976a7
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      frappe/model/db_schema.py

+ 1
- 1
frappe/model/db_schema.py View File

@@ -575,7 +575,7 @@ def get_definition(fieldtype, precision=None, length=None):


if size: if size:
if fieldtype in ["Float", "Currency", "Percent"] and cint(precision) > 6: if fieldtype in ["Float", "Currency", "Percent"] and cint(precision) > 6:
size = '18,9'
size = '21,9'


if coltype == "varchar" and length: if coltype == "varchar" and length:
size = length size = length


Loading…
Cancel
Save