@extends('layouts.main') @section('content')

{{ c_trans('Szczegóły zamówienia nr') }} {{ $order->id }}

@cstack('client.history.order.before')

{{ c_trans('Status zamówienia') }}: {{ $order->c('getStatus') }} @if ($order->payed == false && $order->payment->type == 2) @cstack('Orders::history.orders.options', $order) @endif

{{ c_trans('Forma wysyłki') }}: {{ $order->shipment->getExistsLanguageColumnValue('name') }}

@if( $has_order_shipment_package)
{{ c_trans('Kurier') }}: {{ $shipment_package_courier_name }}
{{ c_trans('Numer wysyłki') }}: {{ $shipment_package_delivery_number }}
@endif @isset( $order->discount_amount)

{{ c_trans('Rabat') }}: @isset( $order->discountCode) {{ c_trans('Kod rabatowy') }} - {{ optional( $order->discountCode )->name }} @endisset ( - {!! c_template()->price($order->discount_amount, '%d,%02d') !!} {!! $order->loadMissing('currency')->currency->user_currency_code !!} )

@endisset

{{ c_trans('Całkowity koszt zamówienia i koszt wysyłki') }}: {!! c_template()->price($order->getSum()) !!} {{ $currency = $order->currency->currency_code }}

@cstack('client.history.order.client-data.before')
{{ c_trans('Dane zamawiajacego') }}:

{{ $order->name }}
@if ($order->orderAddress) {{ $order->orderAddress->street }} {{ $order->orderAddress->number }} {{ $order->orderAddress->apartment ? (' / ' . $order->orderAddress->apartment) : '' }}
{{ $order->orderAddress->postal }} {{ $order->orderAddress->city }}
@endif {{ c_trans('Tel') }}: {{ $order->phone }}

@cstack('client.history.order.client-data.after') @if ($order->orderInvoice) @cstack('client.history.order.client-invoice.before')
{{ c_trans('Dane do faktury') }}:

@if ($order->orderInvoice->company) {{ $order->orderInvoice->company }}
@endif {{ $order->orderInvoice->name }} {{ $order->orderInvoice->surname }}
{{ $order->orderInvoice->street }} {{ $order->orderInvoice->number }} {{ $order->orderInvoice->apartment ? (' / ' . $order->orderInvoice->apartment) : '' }}
{{ $order->orderInvoice->postal }} {{ $order->orderInvoice->city }}
{{ c_trans('NIP') }}: {{ $order->orderInvoice->identity }}

@cstack('client.history.order.client-invoice.after') @endif
@if(!empty($order->additional_info))
{{ c_trans('Mój komentarz') }}

{{ $order->additional_info }}

@endif @foreach($visibleCommentsForOrder as $comment)
{{ c_trans('Komentarze od administratorów') }}

{{ $comment->user->name }} {{ $comment->created_at }}

{{ $comment->content }}

@endforeach
@cstack('client.history.order.products.before') @foreach ($order->orderPositions as $position) @endforeach
{{ c_trans('Produkt') }} {{ c_trans('Cena') }} {{ c_trans('Sztuki') }} {{ c_trans('Wartość') }}
@if (($product = $position->product) && count($product->productsPhoto)) @endif
@if ($position->product) {{ $position->name }} @else {{ $position->name }} @endif
{{ c_trans('Cena') }}: {{ c_price($position->gross, ['currency_code' => $order->currency->currency_code]) }} @if( c_options()->get('display_product_unit', 'products') ) / {{ optional( optional($position->loadMissing(['product.unit.unitLang'])->product)->unit)->getExistingLanguageColumnValue('name') ?? c_trans('szt.')}} @else {{ c_trans('szt.') }} @endif {{ c_trans('Sztuk') }}: {{ $position->quantity }} @if( c_options()->get('display_product_unit', 'products') ) {{ optional( optional($position->loadMissing(['product.unit.unitLang'])->product)->unit)->getExistingLanguageColumnValue('name') ?? c_trans('szt.')}} @endif {{ c_trans('Wartość') }}: {!! c_template()->price($position->gross * $position->quantity) !!} {{ $currency }}
@cstack('client.history.order.products.after') @cstack('client.history.order.after')
@endsection