[minor] added get_terms methods to erpnext.utils so that it can be used in non transactional documents (#9037)

This commit is contained in:
Makarand Bauskar
2017-05-26 21:32:33 +05:30
committed by Nabin Hait
parent 4b12896941
commit 157c334737
3 changed files with 25 additions and 16 deletions

View File

@@ -104,6 +104,21 @@ $.extend(erpnext.utils, {
}
}
refresh_field(table_fieldname);
},
get_terms: function(tc_name, doc, callback) {
if(tc_name) {
return frappe.call({
method: 'erpnext.setup.doctype.terms_and_conditions.terms_and_conditions.get_terms_and_conditions',
args: {
template_name: tc_name,
doc: doc
},
callback: function(r) {
callback(r)
}
});
}
}
});