mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 14:09:19 +00:00
[Fix] TDS Payable Monthly report is not working (#15666)
This commit is contained in:
committed by
Nabin Hait
parent
42510a411f
commit
0d2a4c6a59
@@ -8,6 +8,7 @@ frappe.query_reports["TDS Payable Monthly"] = {
|
|||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
"label": __("Company"),
|
"label": __("Company"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_default('company')
|
"default": frappe.defaults.get_default('company')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,13 +64,16 @@ def get_result(filters):
|
|||||||
total_amount_credited += k.credit
|
total_amount_credited += k.credit
|
||||||
|
|
||||||
rate = [i.tax_withholding_rate for i in tds_doc.rates
|
rate = [i.tax_withholding_rate for i in tds_doc.rates
|
||||||
if i.fiscal_year == gle_map[d][0].fiscal_year][0]
|
if i.fiscal_year == gle_map[d][0].fiscal_year]
|
||||||
|
|
||||||
if getdate(filters.from_date) <= gle_map[d][0].posting_date \
|
if rate and len(rate) > 0:
|
||||||
and getdate(filters.to_date) >= gle_map[d][0].posting_date:
|
rate = rate[0]
|
||||||
out.append([supplier.pan, supplier.name, tds_doc.name,
|
|
||||||
supplier.supplier_type, rate, total_amount_credited, tds_deducted,
|
if getdate(filters.from_date) <= gle_map[d][0].posting_date \
|
||||||
gle_map[d][0].posting_date, "Purchase Invoice", d])
|
and getdate(filters.to_date) >= gle_map[d][0].posting_date:
|
||||||
|
out.append([supplier.pan, supplier.name, tds_doc.name,
|
||||||
|
supplier.supplier_type, rate, total_amount_credited, tds_deducted,
|
||||||
|
gle_map[d][0].posting_date, "Purchase Invoice", d])
|
||||||
|
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user