Skip to content

Commit

Permalink
Merge pull request #39183 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-39161

refactor: allow sales invoice in Bank Reconciliation tool (backport #39161)
  • Loading branch information
ruthra-kumar authored Jan 8, 2024
2 parents c912e4c + 00d36d1 commit f1d2570
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
18 changes: 10 additions & 8 deletions erpnext/accounts/doctype/bank_transaction/bank_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,17 @@ def set_voucher_clearance(doctype, docname, clearance_date, self):
and len(get_reconciled_bank_transactions(doctype, docname)) < 2
):
return
frappe.db.set_value(doctype, docname, "clearance_date", clearance_date)

elif doctype == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
dict(parenttype=doctype, parent=docname),
"clearance_date",
clearance_date,
)
if doctype == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
dict(parenttype=doctype, parent=docname),
"clearance_date",
clearance_date,
)
return

frappe.db.set_value(doctype, docname, "clearance_date", clearance_date)

elif doctype == "Bank Transaction":
# For when a second bank transaction has fixed another, e.g. refund
Expand Down
1 change: 1 addition & 0 deletions erpnext/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@
"Payment Entry",
"Journal Entry",
"Purchase Invoice",
"Sales Invoice",
]

accounting_dimension_doctypes = [
Expand Down

0 comments on commit f1d2570

Please sign in to comment.