Updates for HTML view

This commit is contained in:
David Bomba 2023-12-23 07:22:29 +11:00
parent 9cce72d0d5
commit 6d2709e671
2 changed files with 9 additions and 6 deletions

View File

@ -203,20 +203,20 @@ class PdfSlot extends Component
if($this->entity_type == 'invoice' || $this->entity_type == 'recurring_invoice') { if($this->entity_type == 'invoice' || $this->entity_type == 'recurring_invoice') {
foreach($this->settings->pdf_variables->invoice_details as $variable) { foreach($this->settings->pdf_variables->invoice_details as $variable) {
$entity_details .= "<div class='flex px-5 block'><p class= w-36 block'>{$variable}_label</p><p class='pl-5 w-36 block entity-field'>{$variable}</p></div>"; $entity_details .= "<div class='flex px-5 block'><p class= w-36 block'>{$variable}_label</p><p class='ml-5 w-36 block entity-field'>{$variable}</p></div>";
} }
} elseif($this->entity_type == 'quote') { } elseif($this->entity_type == 'quote') {
foreach($this->settings->pdf_variables->quote_details ?? [] as $variable) { foreach($this->settings->pdf_variables->quote_details ?? [] as $variable) {
$entity_details .= "<div class='flex px-5 block'><p class= w-36 block'>{$variable}_label</p><p class='pl-5 w-36 block entity-field'>{$variable}</p></div>"; $entity_details .= "<div class='flex px-5 block'><p class= w-36 block'>{$variable}_label</p><p class='ml-5 w-36 block entity-field'>{$variable}</p></div>";
} }
} elseif($this->entity_type == 'credit') { } elseif($this->entity_type == 'credit') {
foreach($this->settings->pdf_variables->credit_details ?? [] as $variable) { foreach($this->settings->pdf_variables->credit_details ?? [] as $variable) {
$entity_details .= "<div class='flex px-5 block'><p class= w-36 block'>{$variable}_label</p><p class='pl-5 w-36 block entity-field'>{$variable}</p></div>"; $entity_details .= "<div class='flex px-5 block'><p class= w-36 block'>{$variable}_label</p><p class='ml-5 w-36 block entity-field'>{$variable}</p></div>";
} }
} elseif($this->entity_type == 'purchase_order') { } elseif($this->entity_type == 'purchase_order') {
foreach($this->settings->pdf_variables->purchase_order_details ?? [] as $variable) { foreach($this->settings->pdf_variables->purchase_order_details ?? [] as $variable) {
$entity_details .= "<div class='flex px-5 block'><p class= w-36 block'>{$variable}_label</p><p class='pl-5 w-36 block entity-field'>{$variable}</p></div>"; $entity_details .= "<div class='flex px-5 block'><p class= w-36 block'>{$variable}_label</p><p class='ml-5 w-36 block entity-field'>{$variable}</p></div>";
} }
} }
@ -310,6 +310,7 @@ class PdfSlot extends Component
return 'purchase_order'; return 'purchase_order';
} }
return ''; return '';
} }
} }

View File

@ -77,6 +77,8 @@ span {
<td> <td>
<div class="product-information"> <div class="product-information">
<div class="item-details"> <div class="item-details">
<p class="overflow-ellipsis overflow-hidden px-1 mb-2">{!! $product['notes'] !!}</p>
<p class="mt-2"> <p class="mt-2">
@if($show_quantity) @if($show_quantity)
{{ $product['quantity'] }} x {{ $product['quantity'] }} x
@ -86,7 +88,7 @@ span {
{{ $product['cost'] }} {{ $product['cost'] }}
@endif @endif
</p> </p>
<p class="overflow-ellipsis overflow-hidden px-1 mb-2">{!! $product['notes'] !!}</p>
</div> </div>
</div> </div>
</td> </td>