feat: Auto allocate advance payments only against orders (#34727)

feat: Auto allocate advance payments only againt orders
This commit is contained in:
Deepesh Garg
2023-04-05 12:02:44 +05:30
committed by GitHub
parent 869289a6e4
commit fd3fb64aa3
4 changed files with 31 additions and 4 deletions

View File

@@ -55,6 +55,14 @@ frappe.ui.form.on(cur_frm.doctype, {
},
allocate_advances_automatically: function(frm) {
frm.trigger('fetch_advances');
},
only_include_allocated_payments: function(frm) {
frm.trigger('fetch_advances');
},
fetch_advances: function(frm) {
if(frm.doc.allocate_advances_automatically) {
frappe.call({
doc: frm.doc,