Add Payment Reconciliation Feature/Tool - javascript validation

This commit is contained in:
ankitjavalkarwork 2014-07-14 18:19:15 +05:30
parent 345753ed19
commit ec05d7f8a1
3 changed files with 18 additions and 9 deletions

View File

@ -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}));

View File

@ -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()

View File

@ -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",