Refactor total and line discount calculation according to new design

This commit is contained in:
Burak Çakırel
2021-01-03 23:46:19 +03:00
parent 76cb9076a2
commit a832142dcd
4 changed files with 55 additions and 94 deletions

View File

@ -13,11 +13,6 @@
<col style="width: 30%;">
<col style="width: 100px;">
<col style="width: 100px;">
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
<col style="width: 100px;">
@endif
@endif
<col style="width: 250px;">
<col style="width: 40px;">
</colgroup>
@ -57,16 +52,6 @@
@endif
@stack('price_th_end')
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_th_start')
<th id="line-discount" class="text-right border-top-0 border-right-0 border-bottom-0">
{{ trans('invoices.discount') }}
</th>
@stack('discount_th_end')
@endif
@endif
@stack('total_th_start')
@if (!$hideAmount)
<th class="text-right border-top-0 border-bottom-0 item-total">