Invoice Print as pdf from list view

I have got my invoices to mass print pdf from list view into a single pdf but i can’t get the line items to print out within the pages

when printing from list view each pdf page contains the correct invoice number etc but related items not being replaced with the data

Just the variables printing in the pdf

Invoice Number: 0001
Prepared By: $assigned_user_name_full_name
Date: …

line items print like this
$aos_products_quotes_product_qty $aos_produ…

line items and related data print perfectly from the detail as expected

Any suggestions to get the related line items into pdf from list view? :frowning:

What is your version of SuiteCRM?

Do you see any relevant errors in your logs at that time?

Just to be clear, printing from detail works ok except from data from related case
Printing from list view is not getting the related line items etc

any ideas

in my view.list.php

class AOS_InvoicesViewList extends ViewList
     * @see ViewList::preDisplay()
    public function preDisplay(){

        $this->lv = new AOS_InvoicesListViewSmarty();

    public function listViewPrepare()
        if (empty($_REQUEST['orderBy'])) {
            $_REQUEST['orderBy'] = 'number';
            $_REQUEST['sortOrder'] = 'desc';


(When you post code, put it inside the forums’s “code” tags, so that brackets aren’t removed.)

I don’t really know how to help you, I’m sorry.

You might need to traverse the relationship to get to the data you need. Maybe something here will help you

Got this working as i wanted, Actually was a lot simpler than I thought
By creating a custom formLetterPdf.php I can now mass print invoices from the list view with all relationship data B)


If you think your code can be useful for other people, don’t forget to post it here on the forums! Thanks.

Hi polsart,

I must need this same functionality for print mass invoice in single pdf from invoice list view. So can you please guide me how can i do that. I know i must need to create custom list view, but don’t have a idea how can i do that.
I will really thanks full to you.

Hello. Did anyone find solution?