@extends('frontpage.layouts.main') @section('title') Invoice - {{ $order->invoice_number }} @endsection @push('style') @endpush @section('content')

{{ __('order_history.user_profile') }}

@if ($order_billing->status == 'unpaid' && $order->status == 'waiting_for_payment' && $order_billing->payment_method == 'manual_bank_transfer')
@endif @include('frontpage.customers.sidebar')

{{ __('order_history.To') }} : {{ $order->customer_id != null ? $order->customer_name : $order->name }}
{{ __('order_history.Phone') }} : {{ $order->customer_id != null ? $order->customer_phone : $order->phone }}
{{ __('order_history.Payment') }} :

Status : @if ($order->status == 'processed') {{ __('order_history.Processed') }}
{{ __('order_history.Processed') }}
@elseif($order->status == 'waiting_for_confirmation') {{ __('order_history.Waiting_For_Confirmation') }}
{{ __('order_history.Waiting_For_Confirmation') }}
@elseif($order->status == 'shipping') {{ __('order_history.Shipping') }}
{{ __('order_history.Shipping') }}
@elseif($order->status == 'finished') {{ __('order_history.Finished') }}
{{ __('order_history.Finished') }}
@elseif($order->status == 'complain') {{ __('order_history.Complain') }}
{{ __('order_history.Complain') }}
@else {{ __('order_history.Waiting_For_Payment') }}
{{ __('order_history.Waiting For Payment') }}
@endif
{{ __('order_history.Issue_Date') }} : {{ date('d M Y - h:i:s', strtotime($order->transaction_date)) }}
{{ __('order_history.Store') }} : {{ $store_name }}
{{ __('order_history.Invoice_Number') }} : #{{ $order->invoice_number }}
{{ __('order_history.Courier') }} : {{ $order_shipping->courier }}
{{ __('order_history.ReceivedName') }} : @php $address = json_decode($order_shipping->address); echo $address[0]->reveived_name; @endphp
{{ __('order_history.Address') }} : @php $address = json_decode($order_shipping->address); echo $address[0]->address."
"; echo $address[0]->province." - ".$address[0]->city." - ".$address[0]->distric." - ".$address[0]->postalcode; @endphp
@foreach ($order_items as $item) @php $fix_customer_discount = 0; $harga_normal_diskon = 0; if (isset(auth()->user()->customer_group_id)) { $status_diskon_customer = false; $harga = $item->price;//Update Septi : 8 Juni 2022 foreach ($discount_customer as $dc) { $discount_brand = json_decode($dc->discount); foreach ($discount_brand as $brand) { if ($item->brand_id === $brand->id) { $harga_normal = $item->price; $harga_normal_diskon = $item->discount_price; $potongan = ($item->price * $brand->discount) / 100; $fix_customer_discount = $item->price - $potongan; if ($fix_customer_discount < $item->discount_price) { $status_diskon_customer = true; $harga = $fix_customer_discount; } else { if ($item->discount_price > 0) { $item->discount_price > 0 ? ($harga = $item->discount_price) : ($harga = $item->price); } else { $status_diskon_customer = true; $harga = $fix_customer_discount; } } } } } if ($status_diskon_customer == false) { if ($item->discount_price > 0) { $item->discount_price > 0 ? ($harga = $item->discount_price) : ($harga = $item->price); } } } else { $item->discount_price > 0 ? ($harga = $item->discount_price) : ($harga = $item->price); } $harga = isset($harga) ? $harga : ($item->discount_price > 0 ? $item->discount_price : $item->price); @endphp @endforeach {{-- --}}
{{ __('order_history.SKU') }} {{ __('order_history.Product') }} {{ __('order_history.Qty') }} {{ __('order_history.Price') }} {{ __('order_history.Discount') }} {{ __('order_history.Total') }}
{{ $item->sku }} {{ $item->product_name }}
Variant : {{ $item->variant_name }}
{{ __('order_history.Noted') }} : {{ $item->noted }}
{{ number_format($item->quantity, 0, '.', ',') }} {{ number_format($item->price, 0, '.', ',') }} {{ number_format($item->price - $harga, 0, '.', ',') }} @if(($item->price - $harga) > 0 ) @if($item->discount_price > 0) Discount Product @else Discount Customer @endif @endif {{ number_format($harga * $item->quantity, 0, '.', ',') }}
Sub Total {{ number_format($order->total, 0, '.', ',') }}
{{ __('order_history.Discount') }} ({{ $order->discount_order }}%) {{ number_format(($order->total * $order->discount_order) / 100, 0, '.', ',') }}
{{ __('order_history.Discount') }} {{ __('order_history.Customer') }} ({{ $order->discount_customer }}%) {{ number_format(($order->total * $order->discount_customer) / 100, 0, '.', ',') }}
{{ __('order_history.Shipping_Cost') }} {{ number_format($cost, 0, '.', ',') }}
{{ __('order_history.Note') }} :{{ $order->note }} Grand Total {{ number_format($order->total -($order->total * $order->discount_order) / 100 -($order->total * $order->discount_customer) / 100 +$cost,0,'.',',') }}
@if ($order->status == 'waiting_for_payment' && $order_billing->payment_method == 'manual_bank_transfer')
@csrf {{ method_field('PUT') }}
{{ __('order_history.Payment_Confirmation') }}

@endif @if ($order->status == 'shipping')

Informasi Pengiriman

Keterangan Tanggal
@endif
@endsection @push('scripts') @if ($order->status == 'shipping') @endif @endpush