@php use App\Enums\Accounting\DocumentDiscountMethod; use App\Utilities\Currency\CurrencyAccessor; use App\View\Models\DocumentTotalViewModel; $data = $this->form->getRawState(); $type = $getType(); $viewModel = new DocumentTotalViewModel($data, $type); extract($viewModel->buildViewData(), EXTR_SKIP); @endphp
{{-- Items --}} {{-- Quantity --}} {{-- Price --}} {{-- Adjustments --}} {{-- Amount --}} @if($subtotal) @endif @if($taxTotal) @endif @if($isPerDocumentDiscount) @elseif($discountTotal) @endif @if($amountDue) @endif @if($conversionMessage) @endif
@if($subtotal)
Subtotal: {{ $subtotal }}
@endif @if($taxTotal)
Tax: {{ $taxTotal }}
@endif @if($isPerDocumentDiscount)
Discount:
@foreach($getChildComponentContainer()->getComponents() as $component)
{{ $component }}
@endforeach
@elseif($discountTotal)
Discount: ({{ $discountTotal }})
@endif
{{ $amountDue ? 'Total' : 'Grand Total' }}: {{ $grandTotal }}
@if($amountDue)
Amount Due ({{ $currencyCode }}): {{ $amountDue }}
@endif @if($conversionMessage)
{{ $conversionMessage }}
@endif