[minor] student applications to be submitted after payment

This commit is contained in:
Rushabh Mehta 2016-10-05 09:20:28 +05:30
parent efa68fb6b8
commit bb89f6e151
2 changed files with 8 additions and 7 deletions

View File

@ -5,12 +5,12 @@ frappe.ui.form.on("Student Applicant", {
frm.set_value("application_status", "Approved"); frm.set_value("application_status", "Approved");
frm.save_or_update(); frm.save_or_update();
}).addClass("btn-primary"); }, 'Actions');
frm.add_custom_button(__("Reject"), function() { frm.add_custom_button(__("Reject"), function() {
frm.set_value("application_status", "Rejected"); frm.set_value("application_status", "Rejected");
frm.save_or_update(); frm.save_or_update();
}).addClass("btn-danger"); }, 'Actions');
} }
if(frm.doc.application_status== "Approved" && frm.doc.docstatus== 1 ) { if(frm.doc.application_status== "Approved" && frm.doc.docstatus== 1 ) {

View File

@ -30,3 +30,4 @@ class StudentApplicant(Document):
def on_payment_authorized(self, *args, **kwargs): def on_payment_authorized(self, *args, **kwargs):
self.db_set('paid', 1) self.db_set('paid', 1)
self.submit()