@if(($signed!==1 && $signed!==true) || $transaction->transaction_type_value !== 2) @endif @if(isset($transaction->admin) && $signed!==1 && $signed!==true) @endif @php $allName = ''; @endphp @foreach ($names as $name) @php $allName .= ($loop->first ? '' : ', ') . $name; @endphp @endforeach @foreach ($transaction->bills as $bill) @php // Display label of bill (name + month + year) $billString = $bill->bill_type->name.' '.$months[$bill->month_value].' '.$bill->year_value; // Filter specialPrice by bill_type_id $relatedSpecialPrices = collect($transaction->specialPrice)->where('bill_type_id', $bill->bill_type_id); @endphp @if($relatedSpecialPrices->count() > 0) @foreach($relatedSpecialPrices as $sp) @php $label = $sp->special_type_value == 1 ? 'Diskon' : 'Harga Khusus'; if ($sp->discount_type_value == 1) { $discountAmount = ($sp->amount / 100) * $bill->bill_type->normalPrice; $value = '-Rp' . number_format($discountAmount, 0, '', '.'); $percentageLabel = $sp->amount . '%'; } else { // Fixed amount discount $value = '-Rp' . number_format($sp->amount, 0, '', '.'); $percentageLabel = ''; } @endphp @endforeach @endif @endforeach @if(in_array($transaction->transaction_type_value,[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])) @endif @if(isset($transaction->special_price)) @endif @if(isset($transaction->additionalInfo) && trim($transaction->additionalInfo)!=='') @endif @if($transaction->transaction_type_value===2) @endif @if(count($outstandings)>0) @foreach ($outstandings as $outstanding) @endforeach @endif @if(count($upcomings)>0) @foreach ($upcomings as $upcoming) @endforeach @endif @if($transaction->transaction_type_value===2 && ($signed===1 || $signed===true)) @endif
BUKTI TRANSAKSI
#{{$transaction->number}} {{$transactionTypes[$transaction->transaction_type_value]}}  -  {{$mode}}
Tanggal transaksi {{date('d-m-Y', strtotime($transaction->transactionDate))}}
Admin {{$transaction->admin->name}}
Nama {{$allName}}
Detail transaksi Jumlah
{{ substr($billString, 0, 50) }} {{ number_format($bill->pivot->pay, 0, '', '.') }}
{{ $label }} {{ $percentageLabel }} {{ $value }}
{{$transaction->description}} {{number_format($transaction->amount, 0, '', '.')}}
Total transaksi {{number_format($transaction->amount, 0, '', '.')}}

Diskon : {{$transaction->special_price}}

Informasi : {{$transaction->additionalInfo}}

{{$note}}

Tagihan belum dibayar Jumlah
{{ $outstanding->bill_type->name.' '.$months[$outstanding->month_value].' '.$outstanding->year_value }} - @if(isset($outstanding->student)) {{ $outstanding->student->name }} @elseif(isset($outstanding->new_student)) {{ $outstanding->new_student->name }} @endif {{number_format($outstanding->amount-$outstanding->paidAmount, 0, '', '.')}}
Tagihan mendatang Jumlah
{{ $upcoming->bill_type->name.' '.$months[$upcoming->month_value].' '.$upcoming->year_value }} - @if(isset($upcoming->student)) {{ $upcoming->student->name }} @elseif(isset($upcoming->new_student)) {{ $upcoming->new_student->name }} @endif {{number_format($upcoming->amount-$upcoming->paidAmount, 0, '', '.')}}
{{$city}}, {{date('d-m-Y', strtotime($transaction->transactionDate))}}
{{$transaction->admin->name??'Admin'}}