Fixed merge conflict
This commit is contained in:
@@ -979,7 +979,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
|
||||
make_payment_entry: function() {
|
||||
return frappe.call({
|
||||
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry",
|
||||
method: cur_frm.cscript.get_method_for_payment(),
|
||||
args: {
|
||||
"dt": cur_frm.doc.doctype,
|
||||
"dn": cur_frm.doc.name
|
||||
@@ -990,5 +990,18 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
// cur_frm.refresh_fields()
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
get_method_for_payment: function(){
|
||||
method = "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry"
|
||||
if(cur_frm.doc.__onload && cur_frm.doc.__onload.make_payment_via_journal_entry){
|
||||
if(in_list(['Sales Invoice', 'Purchase Invoice'], cur_frm.doc.doctype)){
|
||||
method = "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_invoice"
|
||||
}else {
|
||||
method= "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_order"
|
||||
}
|
||||
}
|
||||
|
||||
return method
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user