@php($student = $invoice->student) @php($class = $invoice->activeDetails[0]->classItem->class) @php($details = $invoice->activeDetails) @php($colspan = 2)
{{--Invoice Status--}}
@if($invoice->status==1)
PAID
@elseif($invoice->status==2)
UNPAID
@elseif($invoice->status==3)
DELETED
@endif
Name: {{ $student->name }} ID: {{ $student->roll }} Class: {{ $class->code }} Session: {{ $invoice->year }}-{{ $invoice->year+1 }} Inv. No: {{ $invoice->invoice_no }}
{{-- @if($invoice->invoice_type==3)--}} {{-- @php($colspan +=1)--}} {{-- --}} {{-- @endif--}} @php($sl=1) @php($previousDueAmount = 0) @if(isset($invoice->previousDue)) @php($previousDue = $invoice->previousDue) @endif @foreach($details as $detail) @php($paymentItem = $detail->classItem->item) @endforeach @php($fine=0) @php($fineDiscount=0) @if($invoice->status==1) @if(isset($invoice->fine) and $invoice->invoice_type==3) @php($fine=$invoice->fine->amount) @if($invoice->fine->discount>0) @php($fineDiscount=$invoice->fine->discount) @endif @endif @elseif($invoice->status=2) @php($delay = invoiceDelay($invoice->deadline)) @if($delay>0) @php($lateFee = lateFee($invoice->id)) {{-- @php($fine=$delay*siteInfo('daily_fine'))--}} @php($fine=$lateFee['fine']) @endif @endif @php($total = $previousDueAmount + $details->sum('receivable_amount')+$fine-$fineDiscount) @if($invoice->invoice_type==3) @endif
Sl. DescriptionReferenceReference Amount (BDT)
{{ $sl++ }} Previous Due {{ $previousDue->description }} {{ numberFormat($previousDueAmount = $previousDue->receivable) }}
{{ $sl++ }} {{ $paymentItem->name }} @if($paymentItem->billing_cycle==3) {{ $detail->month->name }} @elseif($paymentItem->billing_cycle==2) {{ $invoice->year }} - {{ $invoice->year+1 }} @endif {{ numberFormat($detail->receivable_amount) }}
{{ ++$sl }} {{ 'Late Fee' }} {{ $invoice->fine->delay }}{{ numberFormat($fine) }}
{{ ++$sl }} {{ 'Discount' }} Late Fee{{ numberFormat($fineDiscount) }}
{{ ++$sl }} {{ 'Late Fee' }} {{ $lateFee['reference'] }}{{ numberFormat($fine) }}
Total {{ numberFormat($total) }}
In Word: {{ convertNumberToWord($total) }} taka only @php($dueDate = invoiceDueDate($invoice->id)) Last date of payment : {{ dateFormat($dueDate,'jS M Y') }}
Important Note:
    @php($secondDueDate = secondInvoiceDueDate($invoice->id))
  • Tk.500/- will be added as a late fee after {{ dateFormat($dueDate,'jS M Y') }}
  • Tk.750/- will be added as a late fee after {{ dateFormat($secondDueDate,'jS M Y') }}
@if($invoice->status==2)   @else @if($invoice->status==1 and $invoice->payment_date==null) {{ dateFormat($invoice->payments[0]->payment_date,'jS M y') }} @else {{ dateFormat($invoice->payment_date,'jS M y') }} @endif @endif {{--  --}} {{ siteInfo('invoice_signatory') }}
Payment Date Head Of Accounts