Skip to content

Commit

Permalink
chore: rename skip flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Apr 19, 2023
1 parent a3801c2 commit 556aff1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def get_allocated_entry(self, pay, inv, allocated_amount):
}
)

def reconcile_allocations(self, skip_setter_for_missing_values=False):
def reconcile_allocations(self, skip_ref_details_update_for_pe=False):
dr_or_cr = (
"credit_in_account_currency"
if erpnext.get_party_account_type(self.party_type) == "Receivable"
Expand All @@ -322,7 +322,7 @@ def reconcile_allocations(self, skip_setter_for_missing_values=False):
self.make_difference_entry(payment_details)

if entry_list:
reconcile_against_document(entry_list, skip_setter_for_missing_values)
reconcile_against_document(entry_list, skip_ref_details_update_for_pe)

if dr_or_cr_notes:
reconcile_dr_cr_note(dr_or_cr_notes, self.company)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def reconcile(doc: None | str = None) -> None:
pr.append("allocation", x)

# reconcile
pr.reconcile_allocations(skip_setter_for_missing_values=True)
pr.reconcile_allocations(skip_ref_details_update_for_pe=True)

# If Payment Entry, update details only for newly linked references
# This is for performance
Expand Down
8 changes: 4 additions & 4 deletions erpnext/accounts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def add_cc(args=None):
return cc.name


def reconcile_against_document(args, skip_setter_for_missing_values=False): # nosemgrep
def reconcile_against_document(args, skip_ref_details_update_for_pe=False): # nosemgrep
"""
Cancel PE or JV, Update against document, split if required and resubmit
"""
Expand Down Expand Up @@ -466,7 +466,7 @@ def reconcile_against_document(args, skip_setter_for_missing_values=False): # n
update_reference_in_journal_entry(entry, doc, do_not_save=True)
else:
update_reference_in_payment_entry(
entry, doc, do_not_save=True, skip_setter_for_missing_values=skip_setter_for_missing_values
entry, doc, do_not_save=True, skip_ref_details_update_for_pe=skip_ref_details_update_for_pe
)

doc.save(ignore_permissions=True)
Expand Down Expand Up @@ -605,7 +605,7 @@ def update_reference_in_journal_entry(d, journal_entry, do_not_save=False):


def update_reference_in_payment_entry(
d, payment_entry, do_not_save=False, skip_setter_for_missing_values=False
d, payment_entry, do_not_save=False, skip_ref_details_update_for_pe=False
):
reference_details = {
"reference_doctype": d.against_voucher_type,
Expand Down Expand Up @@ -650,7 +650,7 @@ def update_reference_in_payment_entry(
payment_entry.flags.ignore_validate_update_after_submit = True
payment_entry.setup_party_account_field()
payment_entry.set_missing_values()
if not skip_setter_for_missing_values:
if not skip_ref_details_update_for_pe:
payment_entry.set_missing_ref_details()
payment_entry.set_amounts()

Expand Down

0 comments on commit 556aff1

Please sign in to comment.