fix: missed to add voucher_type, voucher_no to get GL Entries (#27377)

* fix: missed to add voucher_type, voucher_no to get GL Entries (#27368)

* fix: missed to add voucher_type, voucher_no to get gl entries

* test: get voucherwise details utilities

# Conflicts:
#	erpnext/accounts/test/test_utils.py

* fix: resolve conflicts

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

(cherry picked from commit 058d98342a)
This commit is contained in:
Frappe PR Bot
2021-09-07 13:00:40 +05:30
committed by GitHub
parent f28cb55d0f
commit ede188d138
2 changed files with 49 additions and 32 deletions

View File

@@ -960,6 +960,9 @@ def get_voucherwise_gl_entries(future_stock_vouchers, posting_date):
Only fetches GLE fields required for comparing with new GLE.
Check compare_existing_and_expected_gle function below.
returns:
Dict[Tuple[voucher_type, voucher_no], List[GL Entries]]
"""
gl_entries = {}
if not future_stock_vouchers:
@@ -968,7 +971,7 @@ def get_voucherwise_gl_entries(future_stock_vouchers, posting_date):
voucher_nos = [d[1] for d in future_stock_vouchers]
gles = frappe.db.sql("""
select name, account, credit, debit, cost_center, project
select name, account, credit, debit, cost_center, project, voucher_type, voucher_no
from `tabGL Entry`
where
posting_date >= %s and voucher_no in (%s)""" %