added more stacks

This commit is contained in:
Denis Duliçi
2020-08-07 15:26:34 +03:00
parent 3f3a412000
commit 30639e29b6
4 changed files with 168 additions and 144 deletions

View File

@ -238,27 +238,29 @@
<tbody>
@foreach ($invoice->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_td_start')
<tr>
<th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@stack($total->code . '_td_end')
@stack($total->code . '_total_tr_start')
<tr>
<th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<tr>
<th class="text-success">
{{ trans('invoices.paid') }}:
</th>
<td class="text-right">- @money($invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_td_start')
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('grand_total_td_end')
@stack('grand_total_tr_start')
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('grand_total_tr_end')
@endif
@endforeach
</tbody>

View File

@ -186,21 +186,27 @@
<tbody>
@foreach($invoice->totals_sorted as $total)
@if($total->code != 'total')
@stack($total->code . '_total_tr_start')
<tr>
<th>{{ trans($total['name']) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<tr class="text-success">
<th>{{ trans('invoices.paid') }}:</th>
<td class="text-right">- @money($invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_tr_start')
<tr>
<th>{{ trans($total['name']) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('grand_total_tr_end')
@endif
@endforeach
</tbody>