mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-07 23:31:20 +00:00
fix: set bill_no before against_voucher gets concatenated
(cherry picked from commit 7bade7f1fe)
This commit is contained in:
@@ -337,9 +337,17 @@ def get_accounts_with_children(accounts):
|
|||||||
return list(set(all_accounts)) if all_accounts else None
|
return list(set(all_accounts)) if all_accounts else None
|
||||||
|
|
||||||
|
|
||||||
|
def set_bill_no(gl_entries):
|
||||||
|
inv_details = get_supplier_invoice_details()
|
||||||
|
for gl in gl_entries:
|
||||||
|
gl["bill_no"] = inv_details.get(gl.get("against_voucher"), "")
|
||||||
|
|
||||||
|
|
||||||
def get_data_with_opening_closing(filters, account_details, accounting_dimensions, gl_entries):
|
def get_data_with_opening_closing(filters, account_details, accounting_dimensions, gl_entries):
|
||||||
data = []
|
data = []
|
||||||
|
|
||||||
|
set_bill_no(gl_entries)
|
||||||
|
|
||||||
gle_map = initialize_gle_map(gl_entries, filters)
|
gle_map = initialize_gle_map(gl_entries, filters)
|
||||||
|
|
||||||
totals, entries = get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map)
|
totals, entries = get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map)
|
||||||
@@ -513,7 +521,6 @@ def get_account_type_map(company):
|
|||||||
|
|
||||||
def get_result_as_list(data, filters):
|
def get_result_as_list(data, filters):
|
||||||
balance, _balance_in_account_currency = 0, 0
|
balance, _balance_in_account_currency = 0, 0
|
||||||
inv_details = get_supplier_invoice_details()
|
|
||||||
|
|
||||||
for d in data:
|
for d in data:
|
||||||
if not d.get("posting_date"):
|
if not d.get("posting_date"):
|
||||||
@@ -523,7 +530,6 @@ def get_result_as_list(data, filters):
|
|||||||
d["balance"] = balance
|
d["balance"] = balance
|
||||||
|
|
||||||
d["account_currency"] = filters.account_currency
|
d["account_currency"] = filters.account_currency
|
||||||
d["bill_no"] = inv_details.get(d.get("against_voucher"), "")
|
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user