diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js index 277fcf4705..cf62fd3073 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js @@ -20,20 +20,19 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext get_unreconciled_entries: function() { var me = this; - if (!this.frm.doc.company) { - msgprint(__("Please enter the Company")); - } - else if (!this.frm.doc.party_account) { - msgprint(__("Please enter the Party Account")); - } - else { + if(!this.frm.doc.company || !this.frm.doc.party_account) { + if(!this.frm.doc.company) { + msgprint(__("Please enter Company")); + } else { + msgprint(__("Please enter Party Account")); + } + } else { return this.frm.call({ doc: me.frm.doc, method: 'get_unreconciled_entries' }); } } - }); $.extend(cur_frm.cscript, new erpnext.accounts.PaymentReconciliationController({frm: cur_frm})); diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 17dd5e70a5..b0b189e6d0 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -53,6 +53,7 @@ class PaymentReconciliation(Document): ent.posting_date = e.get('posting_date') ent.amount = flt(e.get('credit' or 'debit')) ent.remark = e.get('remark') + ent.voucher_detail_number = e.get('voucher_detail_no') def validation(self): self.check_mandatory() diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json index cbff5b1e20..231dfae075 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json +++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json @@ -56,10 +56,19 @@ "label": "Remark", "permlevel": 0, "read_only": 1 + }, + { + "fieldname": "voucher_detail_number", + "fieldtype": "Data", + "hidden": 1, + "in_list_view": 0, + "label": "Voucher Detail Number", + "permlevel": 0, + "read_only": 1 } ], "istable": 1, - "modified": "2014-07-09 17:00:18.705385", + "modified": "2014-07-14 16:48:45.875052", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Reconciliation Payment",