Merge pull request #28070 from frappe/mergify/bp/develop/pr-28014

fix: Error in TDS computation summary (backport #28014)
This commit is contained in:
Deepesh Garg 2021-10-23 19:20:14 +05:30 committed by GitHub
commit 35fe065cf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,16 +44,16 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map):
if rate and tds_deducted: if rate and tds_deducted:
row = { row = {
'pan' if frappe.db.has_column('Supplier', 'pan') else 'tax_id': supplier_map.get(supplier).pan, 'pan' if frappe.db.has_column('Supplier', 'pan') else 'tax_id': supplier_map.get(supplier, {}).get('pan'),
'supplier': supplier_map.get(supplier).name 'supplier': supplier_map.get(supplier, {}).get('name')
} }
if filters.naming_series == 'Naming Series': if filters.naming_series == 'Naming Series':
row.update({'supplier_name': supplier_map.get(supplier).supplier_name}) row.update({'supplier_name': supplier_map.get(supplier, {}).get('supplier_name')})
row.update({ row.update({
'section_code': tax_withholding_category, 'section_code': tax_withholding_category,
'entity_type': supplier_map.get(supplier).supplier_type, 'entity_type': supplier_map.get(supplier, {}).get('supplier_type'),
'tds_rate': rate, 'tds_rate': rate,
'total_amount_credited': total_amount_credited, 'total_amount_credited': total_amount_credited,
'tds_deducted': tds_deducted, 'tds_deducted': tds_deducted,