@extends('layouts/fams_layout') @section('title', '| Report') @section('content') @php use App\Service\UserUtility; $hasAccessToViewAllProjects = UserUtility::hasAccessToViewAllProjects(); $projectSelected = isset($_GET['searchProject']) ? $_GET['searchProject'] : null; $projectTypeSelected = isset($_GET['searchProjectType']) ? $_GET['searchProjectType'] : null; $branchSelected = isset($_GET['searchBranch']) ? $_GET['searchBranch'] : null; $categorySelected = isset($_GET['searchCategory']) ? $_GET['searchCategory'] : null; $productTypeSelected = isset($_GET['searchProductType']) ? $_GET['searchProductType'] : null; $searchMethodSelected = isset($_GET['searchMethod']) ? $_GET['searchMethod'] : null; $fiscalYearSelected = isset($_GET['fiscalYear']) ? $_GET['fiscalYear'] : null; $dateFromSelected = isset($_GET['dateFrom']) ? $_GET['dateFrom'] : null; $dateToSelected = isset($_GET['dateTo']) ? $_GET['dateTo'] : null; $firstRequest = isset($_GET['fiscalYear']) ? '1' : '0'; @endphp
| SL# | Purchase Date | Product Name | Product ID Number | User Name / Use Room-Department | Cost Value (Tk) | ||
|---|---|---|---|---|---|---|---|
| Cost Price | Accumulated Dep. | Written Down Value | |||||
| {{$index+1}} | {{date('d-m-Y',strtotime($product->purchaseDate))}} | {{$product->name}} | {{$product->productCode}} | @php if ($employeeId>0) { $employee = DB::table('hr_emp_general_info')->where('id',$employeeId)->select('emp_id','emp_name_english')->first(); echo $employee->emp_id.'-'.$employee->emp_name_english; } else{ $roomId = (int) DB::table('fams_tra_use')->where('id',$useProduct->useId)->value('roomId'); $departmentRoom = DB::table('gnr_room')->where('id',$roomId)->value('name'); echo $departmentRoom.str_repeat(' ', (4*2)); $room = DB::table('gnr_room')->where('id',$roomId)->first(); $splitArray=str_replace(array('[', ']', '"', ''), '', $room->departmentId); $targetArray = explode(",",$splitArray); $arraySize = sizeof($targetArray); $j = 0; //var_dump($targetArray); foreach($targetArray as $departmentId){ echo App\Models\gnr\GnrDepartment::where('id',$departmentId)->value('name'); $j++; if($j<$arraySize){ echo ' / '; } } } @endphp | {{number_format($product->totalCost,2,'.',',')}} | {{number_format($product->depreciationOpeningBalance+$depAmount,2,'.',',')}} | {{number_format($product->totalCost-($product->depreciationOpeningBalance+$depAmount),2,'.',',')}} |
| Total | {{number_format($totalCostPrice,2,'.',',')}} | {{number_format($totalDep,2,'.',',')}} | {{number_format($totalWrittenDown,2,'.',',')}} | ||||