mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-06 04:24:35 -04:00
Allow expenses to be part of products table
This commit is contained in:
parent
126095bb1d
commit
2cd3ceed2e
@ -251,7 +251,7 @@ class Design extends BaseDesign
|
|||||||
public function productTable(): array
|
public function productTable(): array
|
||||||
{
|
{
|
||||||
$product_items = collect($this->entity->line_items)->filter(function ($item) {
|
$product_items = collect($this->entity->line_items)->filter(function ($item) {
|
||||||
return $item->type_id == 1;
|
return $item->type_id == 1 || $item->type_id == 6;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (count($product_items) == 0) {
|
if (count($product_items) == 0) {
|
||||||
|
@ -273,7 +273,7 @@ trait MakesInvoiceValues
|
|||||||
|
|
||||||
foreach ($items as $key => $item) {
|
foreach ($items as $key => $item) {
|
||||||
if ($table_type == '$product' && $item->type_id != 1) {
|
if ($table_type == '$product' && $item->type_id != 1) {
|
||||||
if ($item->type_id != 4) {
|
if ($item->type_id != 4 && $item->type_id != 6) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user