Where is delcalred variable quote_table inside client module

Where is declared this variable $quote_table?

I copied this section to another module (invoices) but I get error quote_table variable not declared. I am trying to have a modal popup inside the invoice that will show all open quotes related to client of the invoice. Similar to Clients->View Clients->Click on Client to view it->click on tab Quotes (but in my case to open this list of related quotes in modal window inside of Invoices by clicking on one image or button)

In:
./application/modules/clients/views/view.php:

<?php echo $quote_table; ?>

In:./application/modules/clients/controllers/Clients.php:

./application/modules/clients/controllers/Clients.php:
array(
array(
‘invoice_table’,
‘invoices/partial_invoice_table’
),
array(
‘quote_table’,
‘quotes/partial_quote_table’
),
array(
‘payment_table’,
‘payments/partial_payment_table’
),
array(
‘partial_notes’,
‘clients/partial_notes’
),
array(
‘content’,
‘clients/view’
)
)
);

1 Like

I am trying to have a modal popup inside the invoice that will show all open quotes related to client of the invoice

Can you make a PR for that? It would be a nice feature.

Check modules/quotes/controllers
The $quote_table is most likely in the index() function of the … Quotes.php (from the top of my head).

But modals go through the Ajax.php coktroller, since you need to fetch that page with jQuery.

Check how the products are fetched on the invoice page,(there’s a special button that shows all products), that’s also how you want to fetch those quotes.

I am done with all changes and uploaded to my PR at github, Waiting for someone to review it, approve or suggest anything.

1 Like