Akaunting/resources/views/components/documents/template/line-item.blade.php

77 lines
2.7 KiB
PHP
Raw Normal View History

<tr>
@stack('name_td_start')
2022-06-01 07:15:55 +00:00
@if (! $hideItems || (! $hideName && ! $hideDescription))
2022-06-06 07:33:03 +00:00
<td class="item text text-alignment-left text-left">
2022-06-01 07:15:55 +00:00
@if (! $hideName)
{{ $item->name }} <br/>
2020-12-23 22:28:38 +00:00
@endif
2022-06-01 07:15:55 +00:00
@if (! $hideDescription)
@if (! empty($item->description))
<span class="small-text">
{!! \Illuminate\Support\Str::limit(nl2br($item->description), 500) !!}
2022-06-01 07:15:55 +00:00
</span>
2020-12-23 22:28:38 +00:00
@endif
@endif
2021-01-06 15:30:43 +00:00
@stack('item_custom_fields')
2021-01-06 16:01:19 +00:00
@stack('item_custom_fields_' . $item->id)
2020-12-23 22:28:38 +00:00
</td>
@endif
@stack('name_td_end')
@stack('quantity_td_start')
2022-06-01 07:15:55 +00:00
@if (! $hideQuantity)
<td class="quantity text text-alignment-right text-right">
{{ $item->quantity }}
</td>
2020-12-23 22:28:38 +00:00
@endif
@stack('quantity_td_end')
@stack('price_td_start')
2022-06-01 07:15:55 +00:00
@if (! $hidePrice)
<td class="price text text-alignment-right text-right">
<x-money :amount="$item->price" :currency="$document->currency_code" convert />
</td>
2020-12-23 22:28:38 +00:00
@endif
@stack('price_td_end')
2022-06-01 07:15:55 +00:00
@if (! $hideDiscount)
2020-12-23 22:28:38 +00:00
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
@if ($item->discount_type === 'percentage')
<td class="discount text text-alignment-right text-right">
@php
$text_discount = '';
if (setting('localisation.percent_position') == 'before') {
$text_discount .= '%';
}
$text_discount .= $item->discount;
if (setting('localisation.percent_position') == 'after') {
$text_discount .= '%';
}
@endphp
{{ $text_discount }}
</td>
2021-08-15 16:20:39 +00:00
@else
<td class="discount text text-alignment-right text-right">
<x-money :amount="$item->discount" :currency="$document->currency_code" convert />
</td>
2021-08-15 16:20:39 +00:00
@endif
2020-12-23 22:28:38 +00:00
@stack('discount_td_end')
@endif
@endif
@stack('total_td_start')
2022-06-01 07:15:55 +00:00
@if (! $hideAmount)
<td class="total text text-alignment-right text-right">
<x-money :amount="$item->total" :currency="$document->currency_code" convert />
</td>
2020-12-23 22:28:38 +00:00
@endif
@stack('total_td_end')
2021-01-06 15:30:43 +00:00
</tr>