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

Fixing verification on document.js - applyFormula Method

This commit is contained in:
Franklin A. Toribio Maria 2020-02-20 20:57:15 -04:00 committed by 18alantom
parent dbdc3c9354
commit 6b23aeb986

View File

@ -435,6 +435,11 @@ module.exports = class BaseDocument extends Observable {
.getMeta(tablefield.childtype) .getMeta(tablefield.childtype)
.getFormulaFields(); .getFormulaFields();
if (formulaFields.length) { if (formulaFields.length) {
let value = this[tablefield.fieldname];
//if this[table.fieldname] doesnt have value, skip it
if (value == null || value == undefined)
continue;
// for each row // for each row
for (let row of this[tablefield.fieldname] || []) { for (let row of this[tablefield.fieldname] || []) {
for (let field of formulaFields) { for (let field of formulaFields) {