mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Fix custom fields in product datatable
This commit is contained in:
parent
663d26ede4
commit
cf9165154d
@ -43,14 +43,14 @@ class ProductDatatable extends EntityDatatable
|
|||||||
$account->invoice_item_taxes,
|
$account->invoice_item_taxes,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'-' . Utils::getCustomLabel($account->custom_invoice_item_label1),
|
'custom_value1',
|
||||||
function ($model) {
|
function ($model) {
|
||||||
return $model->custom_value1;
|
return $model->custom_value1;
|
||||||
},
|
},
|
||||||
$account->custom_invoice_item_label1
|
$account->custom_invoice_item_label1
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'-' . Utils::getCustomLabel($account->custom_invoice_item_label2),
|
'custom_value2',
|
||||||
function ($model) {
|
function ($model) {
|
||||||
return $model->custom_value2;
|
return $model->custom_value2;
|
||||||
},
|
},
|
||||||
|
@ -41,7 +41,9 @@ class ProductRepository extends BaseRepository
|
|||||||
if ($filter) {
|
if ($filter) {
|
||||||
$query->where(function ($query) use ($filter) {
|
$query->where(function ($query) use ($filter) {
|
||||||
$query->where('products.product_key', 'like', '%'.$filter.'%')
|
$query->where('products.product_key', 'like', '%'.$filter.'%')
|
||||||
->orWhere('products.notes', 'like', '%'.$filter.'%');
|
->orWhere('products.notes', 'like', '%'.$filter.'%')
|
||||||
|
->orWhere('products.custom_value1', 'like', '%'.$filter.'%')
|
||||||
|
->orWhere('products.custom_value2', 'like', '%'.$filter.'%');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user