2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11:29:00 +00:00

fix(document.js): fix applyFormula for empty chid table

This commit is contained in:
Rushabh Mehta 2020-05-06 22:57:52 +05:30
parent 1980e5e26f
commit 9131b85221

View File

@ -432,7 +432,7 @@ module.exports = class BaseDocument extends Observable {
.getFormulaFields();
if (formulaFields.length) {
// for each row
for (let row of this[tablefield.fieldname]) {
for (let row of this[tablefield.fieldname] || []) {
for (let field of formulaFields) {
if (shouldApplyFormula(field, row)) {
let val = await this.getValueFromFormula(field, row);