@extends('layouts.app') @section('title', __('Master Dashboard')) @section('content')
@include('layouts.leftside-menubar')
@lang('Make a Payment')
Your service charge has been paid till @if(!empty($schools->lastCharged)) {{date('F, Y', strtotime($schools->lastCharged))}} @else ☑ Service charge not paid yet. @endif
@php $lastCharged = $schools->lastCharged; if(empty($lastCharged)){ $createday = date('d',strtotime($schools->created_at)); $createdmy = strtotime($schools->created_at); if($createday>=16){ if($createday>28){ $lastCharged = date('Y-m-d H:i:s', strtotime('-3 day',$createdmy)); }else{ $lastCharged = date('Y-m-d H:i:s', strtotime($schools->created_at)); } }else{ $lastCharged = date('Y-m-d H:i:s', strtotime('-1 month', $createdmy)); } } $paidtill = strtotime($lastCharged); $prev_date = date('Y-m',strtotime($lastCharged)); $current_ym = date('Y-m'); $current_str = strtotime($current_ym); $today = date('d'); $months = $totla_stdnt = 0; $checked = ''; if($today>=21){ $pr_month = date('Y-m', strtotime('+1 month', $current_str)); $current_date = strtotime($pr_month); }else{ $current_date = $current_str; } $diff = $current_date - strtotime($prev_date); $months = floor(floatval($diff) / (60 * 60 * 24 * 365 / 12)); echo ''; for($i=1; $i <=$months; $i++) { ${"payable_months".$i} = date('F, y',strtotime("+$i Months",$paidtill)); echo '
'; } $totla_stdnt = total_student_current_school(); $per_stdnt = $schools->perStudent; $total_amount = ($totla_stdnt*$per_stdnt)*$months; $total_chage = round($total_amount, 2); $mnts = ' Months'; $country = $schools->country->code; if($months==1){ $mnts = ' Month'; } if($country=='BD'){ $cny = '৳'; $total = $total_chage / (1 - 0.025); $tran_fee = round($total, 2) - $total_chage; $amount = round($total, 2); }else{ $cny = '$'; $total = ($total_chage + 0.30) / (1 - 0.029); $tran_fee = round($total, 2) - $total_chage; $amount = round($total, 2); } @endphp
Total Students: {{$totla_stdnt}}
Per Student: {{$cny.$per_stdnt}}
Total Month: {{$months.$mnts}}
Total Service Charge: {{$cny}}{{$total_chage}}
+ Transaction Fee: {{$cny}}{{$tran_fee}}
Total Amount To Be Paid: {{$cny}}{{$amount}}
@if($country=='BD' && $amount >= 10) {!! Form::open(array('route' =>['school.service.charge',$schools->code],'method' =>'POST','role' =>'form','autocomplete'=>'off','class'=>'stripe')) !!} {!! Form::close() !!} @elseif($amount >= 1) {!! Form::open(array('route' =>['school.services.charge',$schools->code],'method' =>'POST','role' =>'form','autocomplete'=>'off','class'=>'stripe')) !!} {!! Form::close() !!} @endif
@push('script') @endpush @endsection