WuYongJie 9595267ee7
Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
chore: 导入 Akaunting 初始源码与团队协作规则
2026-07-20 18:20:25 +08:00

81 lines
2.9 KiB
PHP

<tr>
@stack($item->id . '_line_item_start')
@stack('name_td_start')
@if (! $hideItems || (! $hideName && ! $hideDescription))
<td class="item text text-alignment-left ltr:text-left rtl:text-right max-w-0">
@if (! $hideName)
{{ $item->name }} <br/>
@endif
@if (! $hideDescription)
@if (! empty($item->description))
<div class="small-text break-words">
<x-nl2br :value="\Illuminate\Support\Str::limit($item->description, 500)" />
</div>
@endif
@endif
@stack('item_custom_fields')
@stack('item_custom_fields_' . $item->id)
</td>
@endif
@stack('name_td_end')
@stack('quantity_td_start')
@if (! $hideQuantity)
<td class="quantity text text-alignment-right ltr:text-right rtl:text-left">
{{ $item->quantity }}
</td>
@endif
@stack('quantity_td_end')
@stack('price_td_start')
@if (! $hidePrice)
<td class="price text text-alignment-right ltr:text-right rtl:text-left">
<x-money :amount="$item->price" :currency="$document->currency_code" />
</td>
@endif
@stack('price_td_end')
@if (! $hideDiscount)
@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 ltr:text-right rtl:text-left">
@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>
@else
<td class="discount text text-alignment-right ltr:text-right rtl:text-left">
<x-money :amount="$item->discount" :currency="$document->currency_code" />
</td>
@endif
@stack('discount_td_end')
@endif
@endif
@stack('total_td_start')
@if (! $hideAmount)
<td class="total text text-alignment-right ltr:text-right rtl:text-left">
<x-money :amount="$item->total" :currency="$document->currency_code" />
</td>
@endif
@stack('total_td_end')
@stack($item->id . '_line_item_end')
</tr>