Skip to content

Commit

Permalink
fix: indentation and args
Browse files Browse the repository at this point in the history
  • Loading branch information
nabinhait authored Aug 25, 2021
1 parent 6b1632d commit 574a399
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions erpnext/accounts/doctype/bank_transaction/bank_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ def clear_linked_payment_entries(self, for_cancel=False):
elif payment_entry.payment_document == "Sales Invoice":
self.clear_sales_invoice(payment_entry, for_cancel=for_cancel)

def clear_simple_entry(self, payment_entry):
def clear_simple_entry(self, payment_entry, for_cancel=False):
if payment_entry.payment_document == "Payment Entry":
if frappe.db.get_value("Payment Entry", payment_entry.payment_entry, "payment_type") == "Internal Transfer":
if len(get_reconciled_bank_transactions(payment_entry)) < 2:
return
clearance_date = self.date if not for_cancel else None

clearance_date = self.date if not for_cancel else None
frappe.db.set_value(
payment_entry.payment_document, payment_entry.payment_entry,
"clearance_date", clearance_date)
Expand Down

0 comments on commit 574a399

Please sign in to comment.