I have a problem like the one marked as solved, but it doesn’t work for me: [Solved] Adding custom fields to the Client details page
I use invoiceplane1.5.7 and can’t get the output on the pdf. The custom field description in the documentation is not up to date as it mentions a Column description which I don’t get. I have instead an “Order” column.
I added “Company name” to the Client as a custom field and try to retrieve it in the invoice template pdf in two different ways according to two different suggested posts:
I’m not sure why company name is not a standard field. I mean, we have fields for date of birth, tax id’s etc, but no company name?
I’d also like to search using company name and I don’t see that happening when company name is a custom field.
I made some small modifications to the code to add company name to the ip_client table and it works like a charm. The next step is to be able to search by company. I want to contribute the code to github but am still a little unsure how to set it up, but will figure it out.
I’m getting off-topic. As nmay1990 said, you have to “echo” the values out. That’s what I got stuck with.
Thanks DementedZA. I agree, I would like to see the company name as a standard field and that is how I actually got it to work in my case as the custom field didn’t work.
I haven’t had a look into how to get it into search.
Here is what I did so far:
added column in db client_company_name:
SQL: ALTER TABLE ip_clients
ADD COLUMN client_company_name VARCHAR(100) AFTER client_date_modified;
added form.php in application\modules\clients\views above client_name
<?php _trans('client_company_name'); ?>
add in application\language\english\ip_lang.php:
‘client_company_name’ => ‘Client Company Name’,
add in application\modules\clients\models\Mdl_clients.php:
to validation rules:
‘client_company_name’ => array(
‘field’ => ‘client_company_name’,
‘label’ => trans(‘client_company_name’)
add in application\modules\user_clients\models\Mdl_user_clients.php
public function default_select()
$this->db->select(‘ip_user_clients.*, ip_users.user_name, ip_clients.client_company_name, ip_clients.client_name, ip_clients.client_surname’);
in all the:
application\views templates (pdf and public)
application\modules\guest\views: payment_information.php and invoices_index.php
application\modules\invoices: (without the ) partial_invoice_table.php and view.php
application\modules\dashboard\views index.php: instead of