mirror of
https://github.com/frappe/books.git
synced 2024-12-26 12:28:12 +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
|
// attach default precision to Float and Currency
|
||||||
this.fields = this.fields.map(df => {
|
this.fields = this.fields.map(df => {
|
||||||
if (['Float', 'Currency'].includes(df.fieldtype)) {
|
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;
|
return df;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user