Merge pull request #5338 from beganovich/v5-0504-expenses-in-products-table

(v5) Allow expenses to be part of products table
This commit is contained in:
Benjamin Beganović 2021-04-05 14:23:24 +02:00 committed by GitHub
commit 5af66f8cea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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;
} }
} }