It depends where you want to place the value in the PDF, but consider this example which places it below the "Due Date" field:
Update /components/invoice_templates/default_invoice/default_invoice_pdf.php (line 402):
private function drawInvoiceInfo() {
$data = array(
array(
'name'=>Language::_("DefaultInvoice.invoice_id_code", true),
'space'=>null,
'value'=>$this->invoice->id_code
),
array(
'name'=>Language::_("DefaultInvoice.client_id_code", true),
'space'=>null,
'value'=>$this->invoice->client->id_code
),
array(
'name'=>Language::_("DefaultInvoice.date_billed", true),
'space'=>null,
'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_billed))
),
array(
'name'=>Language::_("DefaultInvoice.date_due", true),
'space'=>null,
'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_due))
)
);
to
private function drawInvoiceInfo() {
$cf_data = array();
if (property_exists($this->invoice->client, "id")) {
Loader::loadModels($this, array("Clients"));
$field_id = 6;
$values = $this->Clients->getCustomFieldValues($this->invoice->client->id);
foreach ($values as $value) {
if ($value->id == $field_id) {
$cf_data = array(
'name' => $value->name . ":",
'space' => null,
'value' => $value->value
);
break;
}
}
unset($values, $value);
}
$data = array(
array(
'name'=>Language::_("DefaultInvoice.invoice_id_code", true),
'space'=>null,
'value'=>$this->invoice->id_code
),
array(
'name'=>Language::_("DefaultInvoice.client_id_code", true),
'space'=>null,
'value'=>$this->invoice->client->id_code
),
array(
'name'=>Language::_("DefaultInvoice.date_billed", true),
'space'=>null,
'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_billed))
),
array(
'name'=>Language::_("DefaultInvoice.date_due", true),
'space'=>null,
'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_due))
)
);
if (!empty($cf_data))
$data[] = $cf_data;
You need to update line 407 to set the integer to the correct custom field ID for your custom field. For example, if you go to edit the custom field in Blesta, the integer value will you're looking for appears at the end of the URL.
Note that this is a core file in Blesta, and future patches/updates from us may overwrite this file, and you will need to merge these changes with any subsequent update accordingly.