Fixes for mobile view:

This commit is contained in:
David Bomba 2023-07-25 18:16:57 +10:00
parent 5ab37e0560
commit c1ddc5ae73

View File

@ -235,10 +235,13 @@ class PdfSlot extends Component
$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 || $item->type_id == 6 || $item->type_id == 5; return $item->type_id == 1 || $item->type_id == 6 || $item->type_id == 5;
})->map(function ($item){ })->map(function ($item){
$notes = strlen($item->notes) > 4 ? $item->notes : $item->product_key;
return [ return [
'quantity' => $item->quantity, 'quantity' => $item->quantity,
'cost' => Number::formatMoney($item->cost, $this->entity->client ?: $this->entity->vendor), 'cost' => Number::formatMoney($item->cost, $this->entity->client ?: $this->entity->vendor),
'notes' => $this->invitation->company->markdown_enabled ? DesignHelpers::parseMarkdownToHtml($item->notes) : $item->notes, 'notes' => $this->invitation->company->markdown_enabled ? DesignHelpers::parseMarkdownToHtml($notes) : $notes,
'line_total' => Number::formatMoney($item->line_total, $this->entity->client ?: $this->entity->vendor), 'line_total' => Number::formatMoney($item->line_total, $this->entity->client ?: $this->entity->vendor),
]; ];
}); });