mirror of
https://github.com/frappe/books.git
synced 2025-02-14 01:40:26 +00:00
fix: foolproofing currency defaults
This commit is contained in:
parent
45f7ccf54c
commit
0c556ff8a4
@ -116,6 +116,10 @@ module.exports = class BaseDocument extends Observable {
|
||||
defaultValue = field.default;
|
||||
}
|
||||
|
||||
if (field.fieldtype === 'Currency' && !isPesa(defaultValue)) {
|
||||
defaultValue = frappe.pesa(defaultValue);
|
||||
}
|
||||
|
||||
this[field.fieldname] = defaultValue;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user