mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Added custom invoice fields to search
This commit is contained in:
parent
9d6b8aed15
commit
bf55ff4ce4
@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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: ' <span style="font-weight:600;font-size:16px">{{ Auth::user()->account->present()->customLabel('invoice_text1') }}</span>'
|
||||
}
|
||||
}
|
||||
@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: ' <span style="font-weight:600;font-size:16px">{{ Auth::user()->account->present()->customLabel('invoice_text2') }}</span>'
|
||||
}
|
||||
}
|
||||
@endif
|
||||
@foreach (['clients', 'contacts', 'invoices', 'quotes', 'navigation'] as $type)
|
||||
,{
|
||||
name: 'data',
|
||||
|
Loading…
x
Reference in New Issue
Block a user