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

Order

@forelse ($orders as $item) @php $payment_status = $item->payment_status; $bgClass = 'text-bg-success'; $resultCode = '01'; if ( $payment_status == 'pending' || $payment_status == 'unpaid' || $payment_status == 'failed' ) { $payment_status = $payment_status == 'pending' || $payment_status == 'unpaid' ? 'unpaid' : $payment_status; $resultCode = '01'; if ($payment_status == 'failed') { $resultCode = '02'; } $bgClass = 'text-bg-danger'; }else{ $resultCode = '00'; } @endphp @foreach ($item->orderItem as $orderItem) @php $lcsPrice = $orderItem->price; $songId = $orderItem->songLicense->song_id; $license_type = $orderItem->songLicense->license_type; $payment_type = $orderItem->songLicense->payment_type; $time_amount = $orderItem->songLicense->time_amount; $time_amount = $time_amount && $time_amount !== 'null' && $time_amount !== 0 ? $time_amount : ''; $time_type = $orderItem->songLicense->time_type; $time_type = $time_type && $time_type !== 'null' ? $time_type : ''; $zone = $orderItem->songLicense->zone; $songTitle = $orderItem->songLicense->song->title; $coverImage = app(\App\Services\SongServices::class)->getCoverImageS3( $orderItem->songLicense->song, 'sm', ); $composerNames = $orderItem->songLicense->song->songContributors ->pluck('user.name') ->implode(', '); @endphp @endforeach
{{ $songTitle }}
{{ $item->order_no }}
{{ $item->created_at->format('d-m-Y H:i') }}
Lisensi {{ trim($license_type . ' ' . $time_amount . ' ' . $time_type . '(' . $zone . ')') }}
{{ $songTitle }}
Cipt. {{ $composerNames }}
@if ($payment_type == 'Beli Harga')
Rp.{{ number_format($lcsPrice) }}
@else
{{ number_format($lcsPrice) }}%
@endif
{{ $payment_status }}
@empty @endforelse
{{ $orders->links() }}
@endsection @push('script') @endpush