@php $orders = collect($orders ?? [$order]); $subTotal = (float) $orders->sum('sub_total'); $discountAmount = (float) $orders->sum('discount_amount'); $shippingAmount = (float) $orders->sum('shipping_amount'); $taxAmount = (float) $orders->sum('tax_amount'); $paymentFee = (float) $orders->sum('payment_fee'); $totalAmount = (float) $orders->sum('amount'); @endphp @if ($discountAmount > 0) @endif @if ($shippingAmount > 0) @endif @if ($taxAmount > 0) @endif @if ($paymentFee > 0) @endif
{{ trans('plugins/ecommerce::products.form.sub_total') }}: {{ format_price($subTotal) }}
{{ __('Promotion discount') }}: -{{ format_price($discountAmount) }}
{{ trans('plugins/ecommerce::products.form.shipping_fee') }}: {{ format_price($shippingAmount) }}
{{ trans('plugins/ecommerce::products.form.tax') }}: {{ format_price($taxAmount) }}
{{ trans('plugins/payment::payment.payment_fee') }}: {{ format_price($paymentFee) }}
{{ trans('plugins/ecommerce::products.form.total') }}: {{ format_price($totalAmount) }}