2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

Apply formula if readOnly always (#95)

This commit is contained in:
sahil28297 2018-09-25 17:45:10 +05:30 committed by Faris Ansari
parent fb4295a12b
commit 667a966769

View File

@ -251,11 +251,11 @@ module.exports = class BaseDocument extends Observable {
return true;
function shouldApplyFormula (field, doc) {
if (frappe.isServer) {
if (field.readOnly) {
return true;
}
} else {
if (field.readOnly) {
return true;
}
if (!frappe.isServer) {
if (doc[field.fieldname] == null) {
return true;
}
@ -347,4 +347,4 @@ module.exports = class BaseDocument extends Observable {
}
return _values[fieldname];
}
};
};