From 2cd3ceed2e4df97d357e66e58df86a2bdd71d4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 5 Apr 2021 14:21:49 +0200 Subject: [PATCH] Allow expenses to be part of products table --- app/Services/PdfMaker/Design.php | 2 +- app/Utils/Traits/MakesInvoiceValues.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index a556422ae3bf..65acf2f4bed7 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -251,7 +251,7 @@ class Design extends BaseDesign public function productTable(): array { $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) { diff --git a/app/Utils/Traits/MakesInvoiceValues.php b/app/Utils/Traits/MakesInvoiceValues.php index 610e89f79f09..e9dd773cf902 100644 --- a/app/Utils/Traits/MakesInvoiceValues.php +++ b/app/Utils/Traits/MakesInvoiceValues.php @@ -273,7 +273,7 @@ trait MakesInvoiceValues foreach ($items as $key => $item) { if ($table_type == '$product' && $item->type_id != 1) { - if ($item->type_id != 4) { + if ($item->type_id != 4 && $item->type_id != 6) { continue; } }