invoice print stacks

This commit is contained in:
Denis Duliçi 2020-08-07 19:39:23 +03:00
parent 47de7f9d2b
commit 803b26e0f8
3 changed files with 36 additions and 30 deletions

View File

@ -170,25 +170,27 @@
<div class="text company pr-2">
@foreach ($invoice->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_td_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span>
</div>
@stack($total->code . '_td_end')
@stack($total->code . '_total_tr_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span>
</div>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
<span>- @money($invoice->paid, $invoice->currency_code, true)</span>
</div>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_td_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($total->amount - $invoice->paid, $invoice->currency_code, true)</span>
</div>
@stack('grand_total_td_end')
@stack('grand_total_tr_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($total->amount - $invoice->paid, $invoice->currency_code, true)</span>
</div>
@stack('grand_total_tr_end')
@endif
@endforeach
</div>

View File

@ -158,25 +158,27 @@
<div class="text company">
@foreach ($invoice->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_td_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span><br>
</div>
@stack($total->code . '_td_end')
@stack($total->code . '_total_tr_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span><br>
</div>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
<span>- @money($invoice->paid, $invoice->currency_code, true)</span><br>
</div>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_td_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($total->amount - $invoice->paid, $invoice->currency_code, true)</span>
</div>
@stack('grand_total_td_end')
@stack('grand_total_tr_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($total->amount - $invoice->paid, $invoice->currency_code, true)</span>
</div>
@stack('grand_total_tr_end')
@endif
@endforeach
</div>

View File

@ -139,19 +139,21 @@
<div class="text company pr-2">
@foreach ($invoice->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_td_start')
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span><br><br>
@stack($total->code . '_td_end')
@stack($total->code . '_total_tr_start')
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span><br><br>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
<span>- @money($invoice->paid, $invoice->currency_code, true)</span><br><br>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_td_start')
@stack('grand_total_tr_start')
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($total->amount - $invoice->paid, $invoice->currency_code, true)</span>
@stack('grand_total_td_end')
@stack('grandtotal_tr_end')
@endif
@endforeach
</div>