fix: copy_parent_value_in_all_row function error

This commit is contained in:
Andy Zhu 2021-03-17 13:53:02 +13:00 committed by GitHub
parent 8fbb043190
commit 6117ac5aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,7 +293,7 @@ $.extend(erpnext.utils, {
}, },
copy_parent_value_in_all_row: function(doc, dt, dn, table_fieldname, fieldname, parent_fieldname) { copy_parent_value_in_all_row: function(doc, dt, dn, table_fieldname, fieldname, parent_fieldname) {
var d = locals[dt][dn]; var d = locals[dt][dn];
if(d[fieldname]){ if(d[parent_fieldname]){
var cl = doc[table_fieldname] || []; var cl = doc[table_fieldname] || [];
for(var i = 0; i < cl.length; i++) { for(var i = 0; i < cl.length; i++) {
cl[i][fieldname] = doc[parent_fieldname]; cl[i][fieldname] = doc[parent_fieldname];