mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 06:59:20 +00:00
chore: add regional support for getting payment entries (#37119)
chore: add regional support for get payment entries
(cherry picked from commit 3e282bfbce)
This commit is contained in:
@@ -19,7 +19,7 @@ from erpnext.accounts.utils import (
|
|||||||
get_outstanding_invoices,
|
get_outstanding_invoices,
|
||||||
reconcile_against_document,
|
reconcile_against_document,
|
||||||
)
|
)
|
||||||
from erpnext.controllers.accounts_controller import get_advance_payment_entries
|
from erpnext.controllers.accounts_controller import get_advance_payment_entries_for_regional
|
||||||
|
|
||||||
|
|
||||||
class PaymentReconciliation(Document):
|
class PaymentReconciliation(Document):
|
||||||
@@ -62,7 +62,7 @@ class PaymentReconciliation(Document):
|
|||||||
if self.payment_name:
|
if self.payment_name:
|
||||||
condition += "name like '%%{0}%%'".format(self.payment_name)
|
condition += "name like '%%{0}%%'".format(self.payment_name)
|
||||||
|
|
||||||
payment_entries = get_advance_payment_entries(
|
payment_entries = get_advance_payment_entries_for_regional(
|
||||||
self.party_type,
|
self.party_type,
|
||||||
self.party,
|
self.party,
|
||||||
self.receivable_payable_account,
|
self.receivable_payable_account,
|
||||||
@@ -350,6 +350,7 @@ class PaymentReconciliation(Document):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def reconcile_allocations(self, skip_ref_details_update_for_pe=False):
|
def reconcile_allocations(self, skip_ref_details_update_for_pe=False):
|
||||||
|
adjust_allocations_for_taxes(self)
|
||||||
dr_or_cr = (
|
dr_or_cr = (
|
||||||
"credit_in_account_currency"
|
"credit_in_account_currency"
|
||||||
if erpnext.get_party_account_type(self.party_type) == "Receivable"
|
if erpnext.get_party_account_type(self.party_type) == "Receivable"
|
||||||
@@ -650,3 +651,8 @@ def reconcile_dr_cr_note(dr_cr_notes, company):
|
|||||||
None,
|
None,
|
||||||
inv.cost_center,
|
inv.cost_center,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@erpnext.allow_regional
|
||||||
|
def adjust_allocations_for_taxes(doc):
|
||||||
|
pass
|
||||||
|
|||||||
@@ -909,7 +909,7 @@ class AccountsController(TransactionBase):
|
|||||||
party_type, party, party_account, amount_field, order_doctype, order_list, include_unallocated
|
party_type, party, party_account, amount_field, order_doctype, order_list, include_unallocated
|
||||||
)
|
)
|
||||||
|
|
||||||
payment_entries = get_advance_payment_entries(
|
payment_entries = get_advance_payment_entries_for_regional(
|
||||||
party_type, party, party_account, order_doctype, order_list, include_unallocated
|
party_type, party, party_account, order_doctype, order_list, include_unallocated
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2349,6 +2349,11 @@ def get_advance_journal_entries(
|
|||||||
return list(journal_entries)
|
return list(journal_entries)
|
||||||
|
|
||||||
|
|
||||||
|
@erpnext.allow_regional
|
||||||
|
def get_advance_payment_entries_for_regional(*args, **kwargs):
|
||||||
|
return get_advance_payment_entries(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def get_advance_payment_entries(
|
def get_advance_payment_entries(
|
||||||
party_type,
|
party_type,
|
||||||
party,
|
party,
|
||||||
|
|||||||
Reference in New Issue
Block a user