fix: Allocate advance taxes only for payment entry
This commit is contained in:
parent
e2f83ffaa4
commit
a23aaf43f4
@ -903,6 +903,7 @@ class PurchaseInvoice(BuyingController):
|
||||
def allocate_advance_taxes(self, gl_entries):
|
||||
tax_map = self.get_tax_map()
|
||||
for pe in self.get('advances'):
|
||||
if pe.reference_type == 'Payment Entry':
|
||||
pe = frappe.get_doc('Payment Entry', pe.reference_name)
|
||||
for tax in pe.get('taxes'):
|
||||
account_currency = get_account_currency(tax.account_head)
|
||||
|
||||
@ -916,6 +916,7 @@ class SalesInvoice(SellingController):
|
||||
def allocate_advance_taxes(self, gl_entries):
|
||||
tax_map = self.get_tax_map()
|
||||
for pe in self.get('advances'):
|
||||
if pe.reference_type == 'Payment Entry':
|
||||
pe = frappe.get_doc('Payment Entry', pe.reference_name)
|
||||
for tax in pe.get('taxes'):
|
||||
account_currency = get_account_currency(tax.account_head)
|
||||
|
||||
@ -726,6 +726,7 @@ class AccountsController(TransactionBase):
|
||||
tax_map = self.get_tax_map()
|
||||
|
||||
for pe in self.get('advances'):
|
||||
if pe.reference_type == 'Payment Entry':
|
||||
pe = frappe.get_doc('Payment Entry', pe.reference_name)
|
||||
for tax in pe.get('taxes'):
|
||||
allocated_amount = tax_map.get(tax.account_head) - allocated_tax_map.get(tax.account_head)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user