@extends('layouts/microfin_layout') @section('title', 'MIS Yearly Plan Details') @section('content') @include('microfin.AopBudget.misYearlyPlan.entry.style') @php $catCount = count($samityCategories); // $catCount = 1; // for testing only $catCount > 1 ? $colspan = 2 : $colspan = 1; @endphp

Plan Details

{{ $companyInfo->name }}
{{ $companyInfo->address }}
Annual Operation Plan {{ $fiscalYears[$fiscalYearId] }} ({{ ucfirst($budgetTypes[$typeId]) }})
Project Name : {{ $projects[$projectId] }} Branch Name : {{ $branches[$branchId] }}
Project Type : {{ $projectTypes[$projectTypeIdFk] }} Print Date : {{ date("d-m-Y") }}
{!! Form::open(array('url' => '', 'id' => 'budget-form', 'role' => 'form')) !!} @foreach($mfnSamityCategories as $samityCatId => $samityProductCategories) @foreach($samityProductCategories->productCategories as $key => $item) @php $firstProductCat = key($samityProductCategories->productCategories); @endphp {{-- @php $firstProductCat = array_key_first($samityProductCategories->productCategories); @endphp --}} @foreach($particularsName as $opKey => $opName) @if ($catCount > 1) @if($firstProductCat == $key && $opKey == 'add') @elseif($firstProductCat == $key && $opKey == 'add') @endif @endif @if($opKey == 'add') @endif @if($opKey == 'add') @endif @php if($opKey == 'add') { $prevLastFyClosing = 0; $lastFyClosing = $openingData[$key]['lastFyAdd']; } if($opKey == 'cancellation') { $prevLastFyClosing = 0; $lastFyClosing = $openingData[$key]['lastFyCancellation']; } if($opKey == 'net') { $prevLastFyClosing = 0; $lastFyClosing = $openingData[$key]['lastFyNet']; } if($opKey == 'closing') { $prevLastFyClosing = $openingData[$key]['prevLastFyClosing']; $lastFyClosing = $openingData[$key]['lastFyClosing']; } @endphp @if($opKey == 'closing') @endif @if ($opKey == 'new_recovery' || $opKey == 'old_recovery' || $opKey == 'due_recovery') @else @endif @foreach($fyMonths as $i => $month) @endforeach @endforeach {{-- particularsName --}} @endforeach {{-- productCategories --}} {{-- SUB TOTAL --}} @if ($catCount > 1) @foreach($particularsName as $opKey => $opName) @if($opKey == 'add') @endif @if($opKey == 'add') @endif @php if($opKey == 'add') $subtotalLastFy = $samityProductCategories->totalLastFyAdd; if($opKey == 'cancellation') $subtotalLastFy = $samityProductCategories->totalLastFyCancellation; if($opKey == 'net') $subtotalLastFy = $samityProductCategories->totalLastFyNet; if($opKey == 'closing') $subtotalLastFy = $samityProductCategories->totalLastFyClosing; $subtotalPrevLastFyClosing = $samityProductCategories->totalPrevLastFyClosing; @endphp @if($opKey == 'closing') @endif @if ($opKey == 'new_recovery' || $opKey == 'old_recovery' || $opKey == 'due_recovery') @else @endif @for ($i = 1; $i <= 12; $i++) @endfor @endforeach @endif {{-- SUB TOTAL END --}} @endforeach {{-- samityCategories --}} {{-- GRAND TOTAL --}} @foreach($particularsName as $opKey => $opName) @if($opKey == 'add') @endif @if($opKey == 'add') @endif @php if($opKey == 'add') $totalLastFy = $total_lastFy_add; if($opKey == 'cancellation') $totalLastFy = $total_lastFy_cancellation; if($opKey == 'net') $totalLastFy = $total_lastFy_net; if($opKey == 'closing') $totalLastFy = $total_lastFy_closing; @endphp @if($opKey == 'closing') @endif @if ($opKey == 'new_recovery' || $opKey == 'old_recovery' || $opKey == 'due_recovery') @else @endif @for ($i = 1; $i <= 12; $i++) @endfor @endforeach {{-- GRAND TOTAL END --}}
Components {{ $prevLastFy }} {{ $lastFy }} {{ $fiscalyear }} {{ $fiscalyear }}
Jul, {{ $partOfyear[0] }} Aug, {{ $partOfyear[0] }} Sep, {{ $partOfyear[0] }} Oct, {{ $partOfyear[0] }} Nov, {{ $partOfyear[0] }} Dec, {{ $partOfyear[0] }} Jan, {{ $partOfyear[1] }} Feb, {{ $partOfyear[1] }} Mar, {{ $partOfyear[1] }} Apr, {{ $partOfyear[1] }} May, {{ $partOfyear[1] }} Jun, {{ $partOfyear[1] }} Total
{{$samityCategories[$samityProductCategories->samityCategoryId]->categoryName}}{{$samityCategories[$samityProductCategories->samityCategoryId]->categoryName}}{{ $item['category'] }} {{ $particularsName[$opKey] }} {{ $prevLastFyClosing }}0{{ $lastFyClosing }}{{ $item[$opKey][$month] }}
Sub Total {{ $particularsName[$opKey] }} {{ number_format($subtotalPrevLastFyClosing) }}0{{ number_format($subtotalLastFy) }}
Grand Total {{ $particularsName[$opKey] }} {{ $total_prevLastFy_closing }}0{{ $totalLastFy }}
{!! Form::close() !!}
@endsection