mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-23 04:04:52 +00:00
fix: refactor GL entry mapping to include voucher type
This commit is contained in:
@@ -46,13 +46,12 @@ def get_result(filters, tds_accounts, tax_category_map, net_total_map):
|
||||
precision = get_currency_precision()
|
||||
|
||||
entries = {}
|
||||
for name, details in gle_map.items():
|
||||
for (voucher_type, name), details in gle_map.items():
|
||||
for entry in details:
|
||||
tax_amount, total_amount, grand_total, base_total, base_tax_withholding_net_total = 0, 0, 0, 0, 0
|
||||
tax_withholding_category, rate = None, None
|
||||
bill_no, bill_date = "", ""
|
||||
posting_date = entry.posting_date
|
||||
voucher_type = entry.voucher_type
|
||||
|
||||
values = net_total_map.get((voucher_type, name))
|
||||
party = values.party if values else (entry.party or entry.against)
|
||||
@@ -197,7 +196,7 @@ def get_gle_map(net_total_map):
|
||||
|
||||
gle_map = {}
|
||||
for d in rows:
|
||||
gle_map.setdefault(d.voucher_no, []).append(d)
|
||||
gle_map.setdefault((d.voucher_type, d.voucher_no), []).append(d)
|
||||
|
||||
return gle_map
|
||||
|
||||
|
||||
Reference in New Issue
Block a user