fix: condition (#18667)

This commit is contained in:
Anurag Mishra
2019-08-12 11:46:47 +05:30
committed by Nabin Hait
parent f4493674f7
commit 70b93e2cd4

View File

@@ -188,8 +188,7 @@ frappe.ui.form.on("Expense Claim", {
frappe.set_route("query-report", "General Ledger");
}, __("View"));
}
if (frm.doc.docstatus===1 && !cint(frm.doc.is_paid) && cint(frm.doc.grand_total) > 0
if (frm.doc.docstatus===1 && !cint(frm.doc.is_paid)
&& (cint(frm.doc.total_amount_reimbursed) < cint(frm.doc.total_sanctioned_amount))
&& frappe.model.can_create("Payment Entry")) {
frm.add_custom_button(__('Payment'),