@foreach ($document->totals_sorted as $total)
                @if ($total->code != 'total')
                    @stack($total->code . '_total_tr_start')
                    {{ trans($total->title) }}:
                    @money($total->amount, $document->currency_code, true)
                    @stack($total->code . '_total_tr_end')
                @else
                    @if ($document->paid)
                        @stack('paid_total_tr_start')
                        {{ trans('invoices.paid') }}:
                        - @money($document->paid, $document->currency_code, true)
                        @stack('paid_total_tr_end')
                    @endif
                    @stack('grand_total_tr_start')
                        {{ trans($total->name) }}:
                        @money($total->amount - $document->paid, $document->currency_code, true)
                    @stack('grandtotal_tr_end')
                @endif
            @endforeach