fix: pass accounts as list to query

This commit is contained in:
ruthra kumar
2024-01-15 14:10:55 +05:30
parent 36b8e972f1
commit a6bc5cae90
3 changed files with 3 additions and 3 deletions

View File

@@ -433,7 +433,7 @@ def get_payments(filters):
account_fieldname="paid_to",
party="supplier",
party_name="supplier_name",
party_account=get_party_account("Supplier", filters.supplier, filters.company),
party_account=[get_party_account("Supplier", filters.supplier, filters.company)],
)
payment_entries = get_payment_entries(filters, args)
journal_entries = get_journal_entries(filters, args)

View File

@@ -477,7 +477,7 @@ def get_payments(filters):
account_fieldname="paid_from",
party="customer",
party_name="customer_name",
party_account=get_party_account("Customer", filters.customer, filters.company),
party_account=[get_party_account("Customer", filters.customer, filters.company)],
)
payment_entries = get_payment_entries(filters, args)
journal_entries = get_journal_entries(filters, args)

View File

@@ -253,7 +253,7 @@ def get_journal_entries(filters, args):
(je.voucher_type == "Journal Entry")
& (je.docstatus == 1)
& (journal_account.party == filters.get(args.party))
& (journal_account.account == args.party_account)
& (journal_account.account.isin(args.party_account))
)
.orderby(je.posting_date, je.name, order=Order.desc)
)