refactor: allow unreconcile on bank and cash entry type journals

(cherry picked from commit 2c4f37f488)
This commit is contained in:
ruthra kumar
2024-10-22 11:59:57 +05:30
committed by Mergify
parent 14a589eb2f
commit 0dcb5a4fbb

View File

@@ -4,7 +4,8 @@ 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") ||
(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
)