Skip to content

Commit

Permalink
Update tax_withholding_category.py to fix the query function.
Browse files Browse the repository at this point in the history
The journal_entries_details in get_invoice_vouchers function is supposed to return dict.

Resolves: #46050
  • Loading branch information
harshpwctech authored Feb 21, 2025
1 parent f68730f commit 86b2e28
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,20 +436,22 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"):
tax_details.get("tax_withholding_category"),
company,
),
as_dict=1,
)

for d in journal_entries_details:
vouchers.append(d.name)
voucher_wise_amount.append(
frappe._dict(
{
"voucher_name": d.name,
"voucher_type": "Journal Entry",
"taxable_amount": d.amount,
"reference_type": d.reference_type,
}
if journal_entries_details:
for d in journal_entries_details:
vouchers.append(d.name)
voucher_wise_amount.append(
frappe._dict(
{
"voucher_name": d.name,
"voucher_type": "Journal Entry",
"taxable_amount": d.amount,
"reference_type": d.reference_type,
}
)
)
)

return vouchers, voucher_wise_amount

Expand Down

0 comments on commit 86b2e28

Please sign in to comment.