mirror of
https://github.com/frappe/books.git
synced 2024-12-25 20:11:15 +00:00
fix: Default precision
This commit is contained in:
parent
7af5c30e7b
commit
8f02928cee
@ -45,7 +45,8 @@ module.exports = class BaseMeta extends BaseDocument {
|
||||
// attach default precision to Float and Currency
|
||||
this.fields = this.fields.map(df => {
|
||||
if (['Float', 'Currency'].includes(df.fieldtype)) {
|
||||
df.precision = df.precision || frappe.SystemSettings.floatPrecision;
|
||||
let defaultPrecision = frappe.SystemSettings ? frappe.SystemSettings.floatPrecision : 2;
|
||||
df.precision = df.precision || defaultPrecision;
|
||||
}
|
||||
return df;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user