@extends('backend.layouts.app') @section('content')
{{-- bill details starts --}} @if($bill)
@php $old_dues_present_due = 0; if ($bill->member->old_dues) { $old_dues_present_due = $bill->member->old_dues->present_due; } $advance_next_date = strtotime('+1 Month', strtotime($bill->year.'-'.$bill->month)); $advance_next_year = date('Y', $advance_next_date); $advance_next_month = date('F', $advance_next_date); $getAllAdvanceBillPaid = $bill->member->getAllAdvanceBillPaid($bill->member->id, $advance_next_year, $advance_next_month); $advance_months_paid = 0; if (count($getAllAdvanceBillPaid)) { $advance_months_paid = $getAllAdvanceBillPaid->sum('paid_amount'); } $all_due_bill = $bill->member->getAllDueBillDetails($bill->member->id); //here previous month is bill month $previous_month = $bill->month; $previous_year = $bill->year; $prev_month_bill=collect(); $prev_of_prev_bills=collect(); $adv_month_bills=collect(); foreach ($all_due_bill as $key => $value) { if(strtotime($value->year.'-'.$value->month) < strtotime($previous_year.'-'.$previous_month)){ $prev_of_prev_bills->push($value); }else if ($previous_month == $value->month && $previous_year == $value->year) { $prev_month_bill = $value; } if(strtotime($value->year.'-'.$value->month) > strtotime($previous_year.'-'.$previous_month)){ $adv_month_bills->push($value); } } //previous dues of entry ok for specific month here $dues_start_date=""; $dues_end_date=""; if ($bill->member->getLastBillDetails()['old_dues'] && $bill->member->getLastBillDetails()['old_dues']->present_due > 0) { $dues_start_date = $bill->member->getLastBillDetails()['old_dues']->from_month; $dues_end_date = $bill->member->getLastBillDetails()['old_dues']->to_month; } $dues_or_advance = ($bill->member->getLastBillDetails()['old_dues'] ? $bill->member->getLastBillDetails()['old_dues']->present_due:0) + (count($prev_of_prev_bills)?$prev_of_prev_bills->sum('due_amount'):0) ; // echo '
'; dd($dues_or_advance); echo '
'; $advancePay = $bill->member->subscriptionAdvance(); $advancePayDate=""; if (isset($advancePay->total_amount) && $advancePay->total_amount > 0) { $advancePayDate = 'Advance up to '.$advancePay->to_month.' '.$advancePay->to_year; }else if( count($getAllAdvanceBillPaid) ){ $advancePayDate = 'Advance up to '.$getAllAdvanceBillPaid->last()->month.' '.$getAllAdvanceBillPaid->last()->year; } $total_bill = 0; @endphp @php $total_bill = 0; @endphp

Bhatiary Golf &Country Club

Dhaka Catonment

Dhaka - 1206, Opposite Zoarshahara Bus Stand

Phone: 88 02 8752332, Army 8751777 Ex 6110 Email: agc_bd@yahoo.com, Web: www.agc.com.bd


Monthly Bill - Member Copy

Bill No : {{ sprintf('%06d', $bill->id) }}
Billing Month : {{ $bill->month . ' ' . $bill->year }}
Print Date : {{ date('d F Y') }}
Due Date : {{ date('20 F Y', strtotime("+1 month", strtotime($bill->year.'-'.$bill->month.'-01'))) }}
Membership No : {{ $bill->member->membership_no }}
Member Name : {{ $bill->member->full_name }}
Address : {{ $bill->member->present_address }}
@if($dues_or_advance != 0) @endif
Description Susbcription Fee Dependent Fee Fee Increased Bill Total Bill Paid Balance
{{$bill->month.' '.$bill->year}} {{ number_format($bill->subscription_fee, 2) }} {{ number_format($bill->dependent_fee, 2) }} {{ number_format($bill->fee_increased, 2) }} {{ number_format($bill->total_amount, 2) }} {{ number_format($bill->paid_amount, 2) }} {{ number_format($bill->due_amount, 2) }} @php $total_bill += $bill->due_amount @endphp
{{ ($dues_or_advance>0)?'[Dues]':'' }} {{ ($dues_or_advance<0)?'[Advance]':'' }} @if(count($prev_of_prev_bills)) {{ $dues_start_date ? $dues_start_date: $prev_of_prev_bills->first()->month.' '.$prev_of_prev_bills->first()->year}} {{' to '.$prev_of_prev_bills->last()->month.' '.$prev_of_prev_bills->last()->year}} @elseif( $dues_start_date && $dues_end_date) {{$dues_start_date.' to '.$dues_end_date}} @endif {{ number_format($dues_or_advance, 2) }} @php $total_bill += $dues_or_advance @endphp
Total {{ number_format( $total_bill, 2) }}

In Word: Zero Taka Only

Note:

  1. Please notify in the case of any change in your address/update online visiting the website www.agc-bd.com
  2. 20th of each month is the last date of payment.
  3. Checque should be issued in favour of 'Bhatiary Golf &Country Club, Dhaka Cantonment'
  4. Please add Tk. 40.00 (Fourty) for Bank Cheque of outside of Dhaka City, Otherwise cheque will not be accepted

This is computer generated bill and does not require any singnature

Powered By ISSIT Ltd. Mobile: +8801712 650270

Bhatiary Golf &Country Club

Dhaka Catonment

Dhaka - 1206, Opposite Zoarshahara Bus Stand

Phone: 88 02 8752332, Army 8751777 Ex 6110 Email: agc_bd@yahoo.com, Web: www.agc.com.bd


Monthly Bill - Office Copy

Bill No : {{ sprintf('%06d', $bill->id) }}
Billing Month : {{ $bill->month . ' ' . $bill->year }}
Print Date : {{ date('d F Y') }}
Due Date : {{ date('20 F Y', strtotime($bill->year.'-'.$bill->month.'-01')) }}
Membership No : {{ $bill->member->membership_no }}
Member Name : {{ $bill->member->full_name }}
Address : {{ $bill->member->present_address }}
@if($dues_or_advance != 0) @endif
Description Susbcription Fee Dependent Fee Fee Increased Bill Total Bill Paid Balance
{{$bill->month.' '.$bill->year}} {{ number_format($bill->subscription_fee, 2) }} {{ number_format($bill->dependent_fee, 2) }} {{ number_format($bill->fee_increased, 2) }} {{ number_format($bill->total_amount, 2) }} {{ number_format($bill->paid_amount, 2) }} {{ number_format($bill->due_amount, 2) }} @php $total_bill += $bill->due_amount @endphp
{{ ($dues_or_advance>0)?'[Dues]':'' }} {{ ($dues_or_advance<0)?'[Advance]':'' }} @if(count($prev_of_prev_bills)) {{ $dues_start_date ? $dues_start_date: $prev_of_prev_bills->first()->month.' '.$prev_of_prev_bills->first()->year}} {{' to '.$prev_of_prev_bills->last()->month.' '.$prev_of_prev_bills->last()->year}} @elseif( $dues_start_date && $dues_end_date) {{$dues_start_date.' to '.$dues_end_date}} @endif {{ number_format($dues_or_advance, 2) }} @php $total_bill += $dues_or_advance @endphp
Total {{ number_format( $total_bill, 2) }}

In Word: Zero Taka Only

Note:

  1. Please notify in the case of any change in your address/update online visiting the website www.agc-bd.com
  2. 20th of each month is the last date of payment.
  3. Checque should be issued in favour of 'Bhatiary Golf &Country Club, Dhaka Cantonment'
  4. Please add Tk. 40.00 (Fourty) for Bank Cheque of outside of Dhaka City, Otherwise cheque will not be accepted

This is computer generated bill and does not require any singnature

Powered By ISSIT Ltd. Mobile: +8801712 650270

@else
Invalid Bill
@endif {{-- bill details end --}}
@endsection @section('before_body_end') @endsection