@foreach($invoice->products as $k => $p) @endforeach
# {{__("Product")}} {{__("Order")}} {{__("Count")}} {{__("Price")}}
{{$k+1}} {{-- @if(strlen(trim($p->sku)) > 0)--}} {{-- {{$p->sku}}--}} {{-- @else--}} {{-- {{$p->id}}--}} {{-- @endif--}} {{$p->name}} @if($p->pivot->data == null) {{__("Normal")}} @else @foreach(json_decode(json_decode($p->pivot->data,true)['data']) as $k => $pr) @if(\App\Helpers\getPropLabel($k) !== '' && strlen(\App\Helpers\showMeta($k,$pr) ) > 0)
{{\App\Helpers\getPropLabel($k)}}: {!! \App\Helpers\showMeta($k,$pr) !!}
@endif @endforeach @endif
{{$p->pivot->count}} {{number_format($p->pivot->price_total)}} {{config('app.currency_type')}}
{{__("Sub invoices items")}}
@foreach($invoice->subInvoices as $inv) @foreach($inv->products as $k => $p) @endforeach
# {{__("Product")}} {{__("Order")}} {{__("Count")}} {{__("Price")}}
{{$k+1}} {{-- @if(strlen(trim($p->sku)) > 0)--}} {{-- {{$p->sku}}--}} {{-- @else--}} {{-- {{$p->id}}--}} {{-- @endif--}} {{$p->name}} ({{__($inv->status)}}) @if($p->pivot->data == null) {{__("Normal")}} @else @foreach(json_decode(json_decode($p->pivot->data,true)['data']) as $k => $pr) @if(\App\Helpers\getPropLabel($k) !== '' && strlen(\App\Helpers\showMeta($k,$pr) ) > 0)
{{\App\Helpers\getPropLabel($k)}}: {!! \App\Helpers\showMeta($k,$pr) !!}
@endif @endforeach @endif
{{$p->pivot->count}} {{number_format($p->pivot->price_total)}} {{config('app.currency_type')}}
@endforeach
@if($invoice->transport != null) @endif
{{__("Title")}} {{__("Price")}}
{{__("Transport method")}}: {{$invoice->transport->title}}
{{__("Transport price")}}: {{number_format($invoice->transport->price)}} {{config('app.currency_type')}}
{{__("Tax")}} 0 {{config('app.currency_type')}}
{{__("Pay by credit")}} {{number_format($invoice->credit_price)}} {{config('app.currency_type')}}
{{__("Discount")}} @if($invoice->discount == null) 0 {{config('app.currency_type')}} @else {{$invoice->dicsount->discount}} {{config('app.currency_type')}}/% @endif
{{__("Sum")}} {{number_format($invoice->total_price)}} {{config('app.currency_type')}}
@if($invoice->status===\App\Models\Invoice::PENDING || $invoice->status===\App\Models\Invoice::FAILED)
{{__("Payment price:")}} {{number_format($invoice->total_price - $invoice->credit_price)}}

  پرداخت آنلاین
@if(auth('customer')->user()->credit > 0)
{{__("Pay by credit")}}: {{number_format(auth('customer')->user()->credit)}} {{config('app.currency_type')}}
  پرداخت اعتباری ( @if($invoice->total_price < $invoice->credit_price) {{ number_format($invoice->credit_price) }} @else {{number_format($invoice->total_price)}} @endif {{config('app.currency_type')}} ) @endif @endif @if($invoice->subInvoices->count() > 0)
مبلغ فوق فقط برای این صورت حساب است، سایر صورت حساب ها باید جداگانه تسویه شود
@endif