Add Payment Reconciliation Feature/Tool - javascript validation
This commit is contained in:
parent
345753ed19
commit
ec05d7f8a1
@ -20,20 +20,19 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
|
|||||||
|
|
||||||
get_unreconciled_entries: function() {
|
get_unreconciled_entries: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
if (!this.frm.doc.company) {
|
if(!this.frm.doc.company || !this.frm.doc.party_account) {
|
||||||
msgprint(__("Please enter the Company"));
|
if(!this.frm.doc.company) {
|
||||||
}
|
msgprint(__("Please enter Company"));
|
||||||
else if (!this.frm.doc.party_account) {
|
} else {
|
||||||
msgprint(__("Please enter the Party Account"));
|
msgprint(__("Please enter Party Account"));
|
||||||
}
|
}
|
||||||
else {
|
} else {
|
||||||
return this.frm.call({
|
return this.frm.call({
|
||||||
doc: me.frm.doc,
|
doc: me.frm.doc,
|
||||||
method: 'get_unreconciled_entries'
|
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}));
|
||||||
|
@ -53,6 +53,7 @@ class PaymentReconciliation(Document):
|
|||||||
ent.posting_date = e.get('posting_date')
|
ent.posting_date = e.get('posting_date')
|
||||||
ent.amount = flt(e.get('credit' or 'debit'))
|
ent.amount = flt(e.get('credit' or 'debit'))
|
||||||
ent.remark = e.get('remark')
|
ent.remark = e.get('remark')
|
||||||
|
ent.voucher_detail_number = e.get('voucher_detail_no')
|
||||||
|
|
||||||
def validation(self):
|
def validation(self):
|
||||||
self.check_mandatory()
|
self.check_mandatory()
|
||||||
|
@ -56,10 +56,19 @@
|
|||||||
"label": "Remark",
|
"label": "Remark",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"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,
|
"istable": 1,
|
||||||
"modified": "2014-07-09 17:00:18.705385",
|
"modified": "2014-07-14 16:48:45.875052",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Reconciliation Payment",
|
"name": "Payment Reconciliation Payment",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user