|
BUKTI TRANSAKSI
|
|
|
|
#{{$transaction->number}}
{{$transactionTypes[$transaction->transaction_type_value]}} - {{$mode}}
|
@if(($signed!==1 && $signed!==true) || $transaction->transaction_type_value !== 2)
| Tanggal transaksi |
{{date('d-m-Y', strtotime($transaction->transactionDate))}} |
@endif
@if(isset($transaction->admin) && $signed!==1 && $signed!==true)
| Admin |
{{$transaction->admin->name}} |
@endif
@php
$allName = '';
@endphp
@foreach ($names as $name)
@php
$allName .= ($loop->first ? '' : ', ') . $name;
@endphp
@endforeach
|
Nama
{{$allName}}
|
| Detail transaksi |
Jumlah |
@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
| {{ substr($billString, 0, 50) }} |
{{ number_format($bill->pivot->pay, 0, '', '.') }} |
@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
|
{{ $label }} {{ $percentageLabel }}
|
{{ $value }}
|
@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]))
| {{$transaction->description}} |
{{number_format($transaction->amount, 0, '', '.')}} |
@endif
| Total transaksi |
{{number_format($transaction->amount, 0, '', '.')}} |
@if(isset($transaction->special_price))
|
Diskon : {{$transaction->special_price}}
|
@endif
@if(isset($transaction->additionalInfo) && trim($transaction->additionalInfo)!=='')
|
Informasi : {{$transaction->additionalInfo}}
|
@endif
@if($transaction->transaction_type_value===2)
|
{{$note}}
|
@endif
@if(count($outstandings)>0)
| Tagihan belum dibayar |
Jumlah |
@foreach ($outstandings as $outstanding)
|
{{
$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, '', '.')}} |
@endforeach
@endif
@if(count($upcomings)>0)
| Tagihan mendatang |
Jumlah |
@foreach ($upcomings as $upcoming)
|
{{
$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, '', '.')}} |
@endforeach
@endif
@if($transaction->transaction_type_value===2 && ($signed===1 || $signed===true))
| {{$city}}, {{date('d-m-Y', strtotime($transaction->transactionDate))}} |
|
| {{$transaction->admin->name??'Admin'}} |
@endif