[minor] added get_terms methods to erpnext.utils so that it can be used in non transactional documents (#9037)
This commit is contained in:
committed by
Nabin Hait
parent
4b12896941
commit
157c334737
@@ -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)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user