From 0d11772bd3ce8320652846cfef8f874ee8e420a9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 22 Oct 2024 11:59:57 +0530 Subject: [PATCH] refactor: allow unreconcile on bank and cash entry type journals --- erpnext/public/js/utils/unreconcile.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js index f2d2b6afbe2..19a8612612c 100644 --- a/erpnext/public/js/utils/unreconcile.js +++ b/erpnext/public/js/utils/unreconcile.js @@ -3,9 +3,13 @@ frappe.provide('erpnext.accounts'); erpnext.accounts.unreconcile_payment = { add_unreconcile_btn(frm) { if (frm.doc.docstatus == 1) { - if(((frm.doc.doctype == "Journal Entry") && (frm.doc.voucher_type != "Journal Entry")) - || !["Purchase Invoice", "Sales Invoice", "Journal Entry", "Payment Entry"].includes(frm.doc.doctype) - ) { + if ( + (frm.doc.doctype == "Journal Entry" && + !["Journal Entry", "Bank Entry", "Cash Entry"].includes(frm.doc.voucher_type)) || + !["Purchase Invoice", "Sales Invoice", "Journal Entry", "Payment Entry"].includes( + frm.doc.doctype + ) + ) { return; } -- GitLab