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

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
This commit is contained in:
rohitwaghchaure
2021-09-07 12:14:40 +05:30
committed by GitHub
parent 8f6d22b7ea
commit 058d98342a
2 changed files with 45 additions and 31 deletions

View File

@@ -963,6 +963,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:
@@ -971,7 +974,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)""" %