diff --git a/app/Ninja/Repositories/AccountRepository.php b/app/Ninja/Repositories/AccountRepository.php
index f338cfaa5de1..4ae38eea9348 100644
--- a/app/Ninja/Repositories/AccountRepository.php
+++ b/app/Ninja/Repositories/AccountRepository.php
@@ -234,6 +234,21 @@ class AccountRepository
'tokens' => implode(',', [$invoice->invoice_number, $invoice->po_number]),
'url' => $invoice->present()->url,
];
+
+ if ($customValue = $invoice->custom_text_value1) {
+ $data[$account->present()->customLabel('invoice_text1')][] = [
+ 'value' => "{$customValue}: {$invoice->getDisplayName()}",
+ 'tokens' => $customValue,
+ 'url' => $invoice->present()->url,
+ ];
+ }
+ if ($customValue = $invoice->custom_text_value2) {
+ $data[$account->present()->customLabel('invoice_text2')][] = [
+ 'value' => "{$customValue}: {$invoice->getDisplayName()}",
+ 'tokens' => $customValue,
+ 'url' => $invoice->present()->url,
+ ];
+ }
}
}
diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php
index 61f51f84e73a..11dac2571c91 100644
--- a/resources/views/header.blade.php
+++ b/resources/views/header.blade.php
@@ -95,6 +95,28 @@
}
}
@endif
+ @if (Auth::check() && Auth::user()->account->customLabel('invoice_text1'))
+ ,{
+ name: 'data',
+ limit: 3,
+ display: 'value',
+ source: searchData(data['{{ Auth::user()->account->present()->customLabel('invoice_text1') }}'], 'tokens'),
+ templates: {
+ header: ' {{ Auth::user()->account->present()->customLabel('invoice_text1') }}'
+ }
+ }
+ @endif
+ @if (Auth::check() && Auth::user()->account->customLabel('invoice_text2'))
+ ,{
+ name: 'data',
+ limit: 3,
+ display: 'value',
+ source: searchData(data['{{ Auth::user()->account->present()->customLabel('invoice_text2') }}'], 'tokens'),
+ templates: {
+ header: ' {{ Auth::user()->account->present()->customLabel('invoice_text2') }}'
+ }
+ }
+ @endif
@foreach (['clients', 'contacts', 'invoices', 'quotes', 'navigation'] as $type)
,{
name: 'data',