@if(isset($data['allEmployees'][$approvedById]) || $approvedById == 0)

Proceed By:

@if(isset($history->procced_records) && count($history->procced_records) > 0) @else @endif @if(isset($history->procced_records) && count($history->procced_records) > 0) @else @endif @if(isset($history->procced_records) && count($history->procced_records) > 0) @php $history->procced_total_days = $totalDuration + $tempDuration; @endphp @endif
Name {{ ($approvedById == 0) ? 'Super Admin' : $data['allEmployees'][$approvedById]->emp_name_english }} Employee Id {{ ($approvedById == 0) ? 'N/A' : $data['allEmployees'][$approvedById]->emp_id }}
Designation @if($approvedById == 0) {{ 'N/A' }} @elseif(isset($history->boss_position_id)) {{ ($history->boss_position_id == 0) ? 'N/A' : $data['allPositions'][$history->boss_position_id]->name }} @else {{ $data['allEmployees'][$approvedById]->position }} @endif Work Station @if($approvedById == 0) {{ 'N/A' }} @elseif(isset($history->boss_branch_id)) {{ ($history->boss_branch_id == 0) ? 'N/A' : $data['allBranches'][$history->boss_branch_id]->name }} @else {{ $data['allEmployees'][$approvedById]->branch }} @endif
Status {{ ($approvedById == 0) ? 'Active' : $data['allEmployees'][$approvedById]->status }}Status {{ ($approvedById == 0) ? 'Active' : $data['allEmployees'][$approvedById]->status }}Submitted Information @php $totalDuration = $tempDuration = 0; $tempDateFrom = $tempDateTo = null; $totalData = count($history->procced_records); @endphp
    @foreach($history->procced_records as $indexValue => $proccedRecords) @php $dateFrom = date('d-m-Y', strtotime($proccedRecords['effect_boss_last_get_file_date'])); $dateTo = date('d-m-Y', strtotime($proccedRecords['effect_boss_last_submission_date'])); $duration = 0; $parsingInitialDate = \Carbon\Carbon::parse($dateFrom); $parsingSubmitedDate = \Carbon\Carbon::parse($dateTo); $calculatedDate = $parsingSubmitedDate->format('d-m-Y'); if($parsingInitialDate->format('Y-m-d') != $parsingSubmitedDate->format('Y-m-d')) { // $duration = $parsingInitialDate->diffInDays($parsingSubmitedDate->addDay()); $duration = $parsingInitialDate->diffInDays($parsingSubmitedDate); } $totalDuration += $duration; if($totalData == ($indexValue + 1) && $proccedRecords['is_backtrack_from_here'] == 1 && $proccedRecords['effect_boss_process_status_after_backtrack'] == 'Completed') { $tempDateFrom = date('d-m-Y', strtotime($previousBossSubmittedDate)); $tempDateTo = date('d-m-Y', strtotime($submittedDate)); } else if($totalData == ($indexValue + 1) && $proccedRecords['is_backtrack_from_here'] == 0 && $proccedRecords['effect_boss_process_status_after_backtrack'] == 'Completed') { $tempDateFrom = date('d-m-Y', strtotime($proccedRecords['backtrack_date'])); $tempDateTo = date('d-m-Y', strtotime($submittedDate)); } if($tempDateFrom != null && $tempDateTo != null) { $tempDuration = 0; $parsingInitialDate = \Carbon\Carbon::parse($tempDateFrom); $parsingSubmitedDate = \Carbon\Carbon::parse($tempDateTo); $calculatedDate = $parsingSubmitedDate->format('d-m-Y'); if($parsingInitialDate->format('Y-m-d') != $parsingSubmitedDate->format('Y-m-d')) { // $duration = $parsingInitialDate->diffInDays($parsingSubmitedDate->addDay()); $tempDuration = $parsingInitialDate->diffInDays($parsingSubmitedDate); } } @endphp
  • {{ $dateFrom }} - {{ $dateTo }} [ Count Down Day - {{ $duration }} ]
  • @endforeach @if($tempDateFrom != null && $tempDateTo != null)
  • {{ $tempDateFrom }} - {{ $tempDateTo }} [ Count Down Day - {{ $tempDuration }} ]
  • @endif
Submitted Date {{ $data['easyCodeExt']->getFormatedDateAndDurationForFinalPayment( $previousBossSubmittedDate, date('Y-m-d', strtotime($submittedDate))) }}
Total Day Count - {{ $totalDuration + $tempDuration }}

@endif