fix: next follow up date should be always greater then current time (#24308)

This commit is contained in:
Shridhar Patil 2021-02-22 19:37:38 +05:30 committed by GitHub
parent 0ca74ce04b
commit 58399f6524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,12 @@ frappe.ui.form.on("Opportunity", {
frm.trigger('set_contact_link');
}
},
contact_date: function(frm) {
if(frm.doc.contact_date < frappe.datetime.now_datetime()){
frm.set_value("contact_date", "");
frappe.throw(__("Next follow up date should be greater than now."))
}
},
onload_post_render: function(frm) {
frm.get_field("items").grid.set_multiple_add("item_code", "qty");