Combine two set of list using frappe.get_all?

Hi all,

My concern is, is it possible to join/combine multiple set of jinja API in one print format ?

For example :

   {% set details = frappe.get_all('Sales Invoice',
                     filters={
                     'customer':['=',row.get_formatted('customer', doc)],
                     'posting_date':['between', [doc.from_date,doc.to_date]],
                     'status':['Not In', ('Draft','Cancelled')]},
                     fields=['*'], order_by='posting_date, name asc') %}

and another one :

   {% set paymententries = frappe.get_all('Payment Entry',
                 filters={
                 'party':['=',row.get_formatted('customer', doc)],
                 'posting_date':['>', doc.to_date],
                 'status':['=', ('Submitted')]},
                 fields=['*'], order_by='posting_date, name asc') %} 

and print the output from both, in 1 list ? I am attempting to generate/produce a list of Statement of Account using custom print format. What is the other best approach to achieve this ? Any feedback and guides is much appreciated :slight_smile: