fix(tds): Create tds payable under correct parent
This commit is contained in:
parent
9cdece4ca2
commit
f77cd54a6c
@ -350,12 +350,17 @@ def set_tax_withholding_category(company):
|
|||||||
|
|
||||||
def set_tds_account(docs, company):
|
def set_tds_account(docs, company):
|
||||||
abbr = frappe.get_value("Company", company, "abbr")
|
abbr = frappe.get_value("Company", company, "abbr")
|
||||||
docs.extend([
|
parent_account = frappe.db.get_value("Account", filters = {"account_name": "Duties and Taxes", "company": company})
|
||||||
{
|
if parent_account:
|
||||||
"doctype": "Account", "account_name": "TDS Payable", "account_type": "Tax",
|
docs.extend([
|
||||||
"parent_account": "Duties and Taxes - {0}".format(abbr), "company": company
|
{
|
||||||
}
|
"doctype": "Account",
|
||||||
])
|
"account_name": "TDS Payable",
|
||||||
|
"account_type": "Tax",
|
||||||
|
"parent_account": parent_account,
|
||||||
|
"company": company
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
def get_tds_details(accounts, fiscal_year):
|
def get_tds_details(accounts, fiscal_year):
|
||||||
# bootstrap default tax withholding sections
|
# bootstrap default tax withholding sections
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user