Add Payment Reconciliation Feature/Tool - minor changes

This commit is contained in:
ankitjavalkarwork 2014-07-11 16:08:55 +05:30
parent 90b79fcd1f
commit 0e57b971ad
2 changed files with 17 additions and 6 deletions

View File

@ -7,19 +7,26 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
onload: function() { onload: function() {
var me = this var me = this
this.frm.set_query ("party_account", function() { this.frm.set_query ('party_account', function() {
return{ return{
filters:[ filters:[
["Account", "company", "=", me.frm.doc.company], ['Account', 'company', '=', me.frm.doc.company],
["Account", "group_or_ledger", "=", "Ledger"], ['Account', 'group_or_ledger', '=', 'Ledger'],
["Account", "master_type", "in", ["Customer", "Supplier"]] ['Account', 'master_type', 'in', ['Customer', 'Supplier']]
] ]
}; };
}); });
},
get_unreconciled_entries: function() {
return this.frm.call({
doc: me.frm.doc,
method: 'get_unreconciled_entries'
});
} }
}); });
$.extend(cur_frm.cscript, new erpnext.accounts.PaymentReconciliationController({frm: cur_frm})); $.extend(cur_frm.cscript, new erpnext.accounts.PaymentReconciliationController({frm: cur_frm}));
cur_frm.add_fetch("party_account", "master_type", "party_type") cur_frm.add_fetch('party_account', 'master_type', 'party_type')

View File

@ -11,4 +11,8 @@ from frappe import msgprint, _
from frappe.model.document import Document from frappe.model.document import Document
class PaymentReconciliation(Document): class PaymentReconciliation(Document):
pass def get_unreconciled_entries(self):
self.set('payment_reconciliation_payment', [])
jve = self.get_jv_entries()
self.create_payment_reconciliation_payment(jve)