mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Don't render delivery-not-table on products/tasks
This commit is contained in:
parent
0751a44d21
commit
f02826deed
@ -214,6 +214,10 @@ class Design extends BaseDesign
|
|||||||
|
|
||||||
public function deliveryNoteTable(): array
|
public function deliveryNoteTable(): array
|
||||||
{
|
{
|
||||||
|
if ($this->type !== 'delivery_note') {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
$elements = [
|
$elements = [
|
||||||
['element' => 'thead', 'elements' => [
|
['element' => 'thead', 'elements' => [
|
||||||
['element' => 'th', 'content' => '$item_label'],
|
['element' => 'th', 'content' => '$item_label'],
|
||||||
@ -259,7 +263,7 @@ class Design extends BaseDesign
|
|||||||
public function taskTable(): array
|
public function taskTable(): array
|
||||||
{
|
{
|
||||||
$task_items = collect($this->entity->line_items)->filter(function ($item) {
|
$task_items = collect($this->entity->line_items)->filter(function ($item) {
|
||||||
return $item->type_id = 2;
|
return $item->type_id == 2;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (count($task_items) == 0) {
|
if (count($task_items) == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user