Show "Invoice group name" on my invoice template [SOLVED]

Hello everybody.

I need some help in the correct php code.
The aim is to show “Invoice group name” on my invoice template.

When I tried the code below, the id the invoice correctly appeared (for me is “3”):

<?php echo $invoice->invoice_group_id ?>

So, I tried to do this, but this does’nt work:

<?php echo $invoice->invoice_group_name ?>

Any ideas on this please?

Just wanted to clarify.
My aim is to print the name of the invoice group in my invoice template.
How can I call the invoice_group_name?

Just found the solution.
On file: application/modules/invoices/models/mdl_invoices.php
Around line 84
Just before the line:

			ip_invoices.*", FALSE);

Add the following:

			ip_invoice_groups.*,

Then, few lines below, find the one:

        $this->db->join('ip_clients', 'ip_clients.client_id = ip_invoices.client_id');

And add just a line after, the following:

        $this->db->join('ip_invoice_groups', 'ip_invoice_groups.invoice_group_id = ip_invoices.invoice_group_id');

Then, go to your template and add whereever you want:

	<?php echo $invoice->invoice_group_name ?>

The invoice group name will appear!

1 Like

@dev_invoiceplane can you implement this on invoiceplane code?