Fixed hideItems option fixed PDF download method.
This commit is contained in:
parent
5aac80bf2b
commit
50f2e7d991
@ -175,74 +175,76 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-100">
|
||||
<div class="text">
|
||||
<table class="c-lines">
|
||||
<thead>
|
||||
<tr>
|
||||
@stack('name_th_start')
|
||||
@if (!$hideItems || (!$hideName && !$hideDescription))
|
||||
<th class="text-left item">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
|
||||
@endif
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
@if (!$hideQuantity)
|
||||
<th class="quantity">{{ trans($textQuantity) }}</th>
|
||||
@endif
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
@if (!$hidePrice)
|
||||
<th class="price">{{ trans($textPrice) }}</th>
|
||||
@endif
|
||||
@stack('price_th_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<th class="discount">{{ trans('invoices.discount') }}</th>
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="total">{{ trans($textAmount) }}</th>
|
||||
@endif
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@if ($document->items->count())
|
||||
@foreach($document->items as $item)
|
||||
<x-documents.template.line-item
|
||||
type="{{ $type }}"
|
||||
:item="$item"
|
||||
:document="$document"
|
||||
hide-items="{{ $hideItems }}"
|
||||
hide-name="{{ $hideName }}"
|
||||
hide-description="{{ $hideDescription }}"
|
||||
hide-quantity="{{ $hideQuantity }}"
|
||||
hide-price="{{ $hidePrice }}"
|
||||
hide-discount="{{ $hideDiscount }}"
|
||||
hide-amount="{{ $hideAmount }}"
|
||||
/>
|
||||
@endforeach
|
||||
@else
|
||||
@if (!$hideItems)
|
||||
<div class="row">
|
||||
<div class="col-100">
|
||||
<div class="text">
|
||||
<table class="c-lines">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="5" class="text-center empty-items">
|
||||
{{ trans('documents.empty_items') }}
|
||||
</td>
|
||||
@stack('name_th_start')
|
||||
@if (!$hideItems || (!$hideName && !$hideDescription))
|
||||
<th class="text-left item">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
|
||||
@endif
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
@if (!$hideQuantity)
|
||||
<th class="quantity">{{ trans($textQuantity) }}</th>
|
||||
@endif
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
@if (!$hidePrice)
|
||||
<th class="price">{{ trans($textPrice) }}</th>
|
||||
@endif
|
||||
@stack('price_th_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<th class="discount">{{ trans('invoices.discount') }}</th>
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="total">{{ trans($textAmount) }}</th>
|
||||
@endif
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@if ($document->items->count())
|
||||
@foreach($document->items as $item)
|
||||
<x-documents.template.line-item
|
||||
type="{{ $type }}"
|
||||
:item="$item"
|
||||
:document="$document"
|
||||
hide-items="{{ $hideItems }}"
|
||||
hide-name="{{ $hideName }}"
|
||||
hide-description="{{ $hideDescription }}"
|
||||
hide-quantity="{{ $hideQuantity }}"
|
||||
hide-price="{{ $hidePrice }}"
|
||||
hide-discount="{{ $hideDiscount }}"
|
||||
hide-amount="{{ $hideAmount }}"
|
||||
/>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="5" class="text-center empty-items">
|
||||
{{ trans('documents.empty_items') }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row mt-4 clearfix">
|
||||
<div class="col-58">
|
||||
|
@ -160,73 +160,75 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-100">
|
||||
<div class="text">
|
||||
<table class="lines">
|
||||
<thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
|
||||
<tr>
|
||||
@stack('name_th_start')
|
||||
@if (!$hideItems || (!$hideName && !$hideDescription))
|
||||
<th class="item text-left text-white">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
|
||||
@endif
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
@if (!$hideQuantity)
|
||||
<th class="quantity text-white">{{ trans($textQuantity) }}</th>
|
||||
@endif
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
@if (!$hidePrice)
|
||||
<th class="price text-white">{{ trans($textPrice) }}</th>
|
||||
@endif
|
||||
@stack('price_th_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<th class="discount text-white">{{ trans('invoices.discount') }}</th>
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="total text-white">{{ trans($textAmount) }}</th>
|
||||
@endif
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($document->items->count())
|
||||
@foreach($document->items as $item)
|
||||
<x-documents.template.line-item
|
||||
type="{{ $type }}"
|
||||
:item="$item"
|
||||
:document="$document"
|
||||
hide-items="{{ $hideItems }}"
|
||||
hide-name="{{ $hideName }}"
|
||||
hide-description="{{ $hideDescription }}"
|
||||
hide-quantity="{{ $hideQuantity }}"
|
||||
hide-price="{{ $hidePrice }}"
|
||||
hide-discount="{{ $hideDiscount }}"
|
||||
hide-amount="{{ $hideAmount }}"
|
||||
/>
|
||||
@endforeach
|
||||
@else
|
||||
@if (!$hideItems)
|
||||
<div class="row">
|
||||
<div class="col-100">
|
||||
<div class="text">
|
||||
<table class="lines">
|
||||
<thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
|
||||
<tr>
|
||||
<td colspan="5" class="text-center empty-items">
|
||||
{{ trans('documents.empty_items') }}
|
||||
</td>
|
||||
@stack('name_th_start')
|
||||
@if (!$hideItems || (!$hideName && !$hideDescription))
|
||||
<th class="item text-left text-white">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
|
||||
@endif
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
@if (!$hideQuantity)
|
||||
<th class="quantity text-white">{{ trans($textQuantity) }}</th>
|
||||
@endif
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
@if (!$hidePrice)
|
||||
<th class="price text-white">{{ trans($textPrice) }}</th>
|
||||
@endif
|
||||
@stack('price_th_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<th class="discount text-white">{{ trans('invoices.discount') }}</th>
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="total text-white">{{ trans($textAmount) }}</th>
|
||||
@endif
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($document->items->count())
|
||||
@foreach($document->items as $item)
|
||||
<x-documents.template.line-item
|
||||
type="{{ $type }}"
|
||||
:item="$item"
|
||||
:document="$document"
|
||||
hide-items="{{ $hideItems }}"
|
||||
hide-name="{{ $hideName }}"
|
||||
hide-description="{{ $hideDescription }}"
|
||||
hide-quantity="{{ $hideQuantity }}"
|
||||
hide-price="{{ $hidePrice }}"
|
||||
hide-discount="{{ $hideDiscount }}"
|
||||
hide-amount="{{ $hideAmount }}"
|
||||
/>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="5" class="text-center empty-items">
|
||||
{{ trans('documents.empty_items') }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row mt-9 clearfix">
|
||||
<div class="col-58">
|
||||
|
@ -150,73 +150,75 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-100">
|
||||
<div class="text">
|
||||
<table class="m-lines">
|
||||
<thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
|
||||
<tr>
|
||||
@stack('name_th_start')
|
||||
@if (!$hideItems || (!$hideName && !$hideDescription))
|
||||
<th class="item text-left text-white">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
|
||||
@endif
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
@if (!$hideQuantity)
|
||||
<th class="quantity text-white">{{ trans($textQuantity) }}</th>
|
||||
@endif
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
@if (!$hidePrice)
|
||||
<th class="price text-white">{{ trans($textPrice) }}</th>
|
||||
@endif
|
||||
@stack('price_th_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<th class="discount text-white">{{ trans('invoices.discount') }}</th>
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="total text-white">{{ trans($textAmount) }}</th>
|
||||
@endif
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($document->items->count())
|
||||
@foreach($document->items as $item)
|
||||
<x-documents.template.line-item
|
||||
type="{{ $type }}"
|
||||
:item="$item"
|
||||
:document="$document"
|
||||
hide-items="{{ $hideItems }}"
|
||||
hide-name="{{ $hideName }}"
|
||||
hide-description="{{ $hideDescription }}"
|
||||
hide-quantity="{{ $hideQuantity }}"
|
||||
hide-price="{{ $hidePrice }}"
|
||||
hide-discount="{{ $hideDiscount }}"
|
||||
hide-amount="{{ $hideAmount }}"
|
||||
/>
|
||||
@endforeach
|
||||
@else
|
||||
@if (!$hideItems)
|
||||
<div class="row">
|
||||
<div class="col-100">
|
||||
<div class="text">
|
||||
<table class="m-lines">
|
||||
<thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
|
||||
<tr>
|
||||
<td colspan="5" class="text-center empty-items">
|
||||
{{ trans('documents.empty_items') }}
|
||||
</td>
|
||||
@stack('name_th_start')
|
||||
@if (!$hideItems || (!$hideName && !$hideDescription))
|
||||
<th class="item text-left text-white">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
|
||||
@endif
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
@if (!$hideQuantity)
|
||||
<th class="quantity text-white">{{ trans($textQuantity) }}</th>
|
||||
@endif
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
@if (!$hidePrice)
|
||||
<th class="price text-white">{{ trans($textPrice) }}</th>
|
||||
@endif
|
||||
@stack('price_th_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<th class="discount text-white">{{ trans('invoices.discount') }}</th>
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="total text-white">{{ trans($textAmount) }}</th>
|
||||
@endif
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($document->items->count())
|
||||
@foreach($document->items as $item)
|
||||
<x-documents.template.line-item
|
||||
type="{{ $type }}"
|
||||
:item="$item"
|
||||
:document="$document"
|
||||
hide-items="{{ $hideItems }}"
|
||||
hide-name="{{ $hideName }}"
|
||||
hide-description="{{ $hideDescription }}"
|
||||
hide-quantity="{{ $hideQuantity }}"
|
||||
hide-price="{{ $hidePrice }}"
|
||||
hide-discount="{{ $hideDiscount }}"
|
||||
hide-amount="{{ $hideAmount }}"
|
||||
/>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="5" class="text-center empty-items">
|
||||
{{ trans('documents.empty_items') }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row mt-7">
|
||||
<div class="col-58">
|
||||
|
Loading…
x
Reference in New Issue
Block a user