diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py index fff99369ef0..f697b0ab0af 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py @@ -295,7 +295,7 @@ def get_payments(invoices): .groupby(SalesInvoicePayment.mode_of_payment) .select( SalesInvoicePayment.mode_of_payment, - SalesInvoicePayment.account.as_("account"), + fn.Max(SalesInvoicePayment.account).as_("account"), fn.Sum(SalesInvoicePayment.amount).as_("amount"), ) ) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index d9974cf8c71..beabadda2bf 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -1835,6 +1835,7 @@ def get_voucherwise_gl_entries(future_stock_vouchers, posting_date): "GL Entry", filters={"posting_date": [">=", posting_date], "voucher_no": ["in", voucher_nos]}, fields=["name", "account", "credit", "debit", "cost_center", "project", "voucher_type", "voucher_no"], + limit=0, ) for d in gles: