@extends('layouts/acc_layout') @section('title', '| Update Budget For Asset & Liabilities') @section('content')

Update Budget For {{$BudgetName}}

@php // dd($child);companyIdFk $fiscalYearMonths = DB::table('gnr_fiscal_year') ->where('companyId', $companyId[0]) ->orderByRaw('id DESC') ->limit(1) ->pluck('fyStartDate') ->toArray(); $fiscalYearName = DB::table('gnr_fiscal_year') ->where('companyId', $companyId[0]) ->orderByRaw('id DESC') ->limit(1) ->pluck('name') ->toArray(); $savedDate = date("Y-m-d"); // print_r($fiscalYearMonths); $fiscalYearMonthsDays = $fiscalYearMonths[0]; list($year, $month, $day) = explode('-', $fiscalYearMonths[0]); list($year1, $month1, $day1) = explode('-', $fiscalYearMonths[0]); $month = ltrim($month, 0); $month1 = ltrim($month1, 0); @endphp {!! Form::open(array('url' => 'accRevisedBudgetSubmit', 'role' => 'form', 'class'=>'form-horizontal form-groups', 'id' => 'filterFormId', 'method'=>'POST')) !!} {{-- @method('POST') @csrf --}}
{{-- Start of Branch Name --}}
{{-- Start of the Submit Button --}} @for ($i=0; $i < 12; $i++) @php // dd($month); switch ($month) { case 1: $monthName = 'January'; ++$month; ++$year; break; case 2: $monthName = 'February'; ++$month; break; case 3: $monthName = 'March'; ++$month; break; case 4: $monthName = 'April'; ++$month; break; case 5: $monthName = 'May'; ++$month; break; case 6: $monthName = 'June'; ++$month; break; case 7: $monthName = 'July'; ++$month; break; case 8: $monthName = 'August'; ++$month; break; case 9: $monthName = 'September'; ++$month; break; case 10: $monthName = 'October'; ++$month; break; case 11: $monthName = 'Novomber'; ++$month; break; case 12: $monthName = 'December'; $month = 1; break; } @endphp @endfor @php $loanTracker = 0; $savingsTracker = 0; $loanNameTracker = 0; $count1 = 0; $count2 = 0; $count3 = 0; $parantId = 0; $countKey = -1; @endphp @if (sizeof($BudgetValues) > 0) @foreach ($BudgetValues as $key1 => $BudgetValue) @if (substr("$BudgetValue->code", 0, 1) == 1) @if ($count2 == 0) @php $headCode = DB::table('acc_account_ledger') ->select('code') ->where('code', '=', 10000) ->pluck('code') ->toArray(); @endphp @endif @php $count2 = 1; @endphp @php $parent = DB::table('acc_account_ledger') ->select('name') ->where('id', $BudgetValue->parentId) ->pluck('name') ->toArray(); $parentCode = DB::table('acc_account_ledger') ->select('code') ->where('id', $BudgetValue->parentId) ->pluck('code') ->toArray(); @endphp @if ($parantId != $BudgetValue->parentId) @php $parantId = $BudgetValue->parentId; @endphp @endif @elseif (substr("$BudgetValue->code", 0, 1) == 2) @if ($count3 == 0) @php $headCode = DB::table('acc_account_ledger') ->select('code') ->where('code', '=', 20000) ->pluck('code') ->toArray(); @endphp @endif @php $count3 = 1; @endphp @php $parent = DB::table('acc_account_ledger') ->select('name') ->where('id', $BudgetValue->parentId) ->pluck('name') ->toArray(); $parentCode = DB::table('acc_account_ledger') ->select('code') ->where('id', $BudgetValue->parentId) ->pluck('code') ->toArray(); @endphp @if ($parantId != $BudgetValue->parentId) @php $parantId = $BudgetValue->parentId; @endphp @endif @else @php $parent = DB::table('acc_account_ledger') ->select('name') ->where('id', $BudgetValue->parentId) ->pluck('name') ->toArray(); $parentCode = DB::table('acc_account_ledger') ->select('code') ->where('id', $BudgetValue->parentId) ->pluck('code') ->toArray(); @endphp @if ($parantId != $BudgetValue->parentId) @php $parantId = $BudgetValue->parentId; @endphp @endif @endif @foreach ($BudgetAmount as $key2 => $Budget) @if ($key1 == $key2) @foreach ($Budget as $key3 => $Budget1) @foreach ($Budget1 as $key => $Budget2) @php // if ($key2 == 1) { // dd($BudgetAmount, $Budget, $key2); // } // dd($BudgetAmount, $Budget, $key2); switch ($month1) { case 1: // ++$month1; ++$year1; $date = $month1.', '.$year1; ++$month1; break; case 2: $date = $month1.', '.$year1; ++$month1; break; case 3: $date = $month1.', '.$year1; ++$month1; break; case 4: $date = $month1.', '.$year1; ++$month1; break; case 5: $date = $month1.', '.$year1; ++$month1; break; case 6: $date = $month1.', '.$year1; ++$month1; break; case 7: $date = $month1.', '.$year1; ++$month1; break; case 8: $date = $month1.', '.$year1; ++$month1; break; case 9: $date = $month1.', '.$year1; ++$month1; break; case 10: $date = $month1.', '.$year1; ++$month1; break; case 11: $date = $month1.', '.$year1; ++$month1; break; case 12: $date = $month1.', '.$year1; $month1 = 1; break; } @endphp @php // global $count1; if ($countKey != $key2) { ++$count1; $countKey = $key2; } // ++$count1; // echo $count1; @endphp @endforeach @endforeach @php list($year1, $month1, $day1) = explode('-', $fiscalYearMonths[0]); $month1 = ltrim($month1, 0); @endphp @endif @endforeach @endforeach @else @endif
Name
Code
{{$monthName}}, {{ltrim($year, 20)}} @php $date1 = $monthName.','.$year; @endphp
Asset {{$headCode[0]}}
{{$parent[0]}} {{$parentCode[0]}}
Liabilities {{$headCode[0]}}
{{$parent[0]}} {{$parentCode[0]}}
{{$parent[0]}} {{$parentCode[0]}}
{{$BudgetValue->ladgerName}} {{$BudgetValue->code}}
NO DATA FOUND !
{!! Form::label('', '', ['class' => 'control-label col-md-12', 'style' => 'color:#708090; padding-top: 25px;']) !!}
{{-- End of the Submit button --}}
{{-- {!! Form::close() !!} --}}
{!! Form::close() !!} {{-- @php dd(sizeof($memberInformations)); @endphp --}}


{{--
--}}
@endsection