@php
if($branchSelected===0){
$selectedBranchName = "All Branches";
}
else{
$selectedBranchName = DB::table('gnr_branch')->where('id',$branchSelected)->value('name');
}
$selectedProjectName = DB::table('gnr_project')->where('id',$projectSelected)->value('name');
$selectedProjectTypeName = DB::table('gnr_project_type')->where('id',$projectTypeSelected)->value('name');
$selectedCategoryName = DB::table('fams_product_category')->where('id',$categorySelected)->value('name');
@endphp
@if(!$firstRequest )
Ambala Foundation
House # 62, Block # Ka, Piciculture Housing Society, Shyamoli, Dhaka-1207
Fixed Assets Depreciation Report
{{--
{{$selectedBranchName}}
--}}
{{date('F d, Y',strtotime($endDate))}}
Branch Name : @php
if($selectedBranchName==null){
echo "All";
}
else{
echo $selectedBranchName;
}
@endphp
Reporting Peroid : {{date('d-m-Y',strtotime($startDate))." to ".date('d-m-Y',strtotime($endDate))}}
Project Name : @php
if($selectedProjectName==null){
echo "All";
}
else{
echo $selectedProjectName;
}
@endphp
Assets Category : @php
if($selectedCategoryName==null){
echo "All";
}
else{
echo $selectedCategoryName;
}
@endphp
Project Type : @php
if($selectedProjectTypeName==null){
echo "All";
}
else{
echo $selectedProjectTypeName;
}
@endphp
Print Date : {{date('F d,Y')}}
| SL# |
Purchase Date |
Product Name |
Product ID Number |
Cost Price |
Dep. Rate(%) |
Depreciation |
| Opening Balance |
Curr. Period |
Total Dep. |
| Use Day |
Amount (TK) |
@php
$index = 0;
$totalCostPrice = 0;
$totalDepOpeningBalance = 0;
$totalAmount = 0;
$totalClosingBalance = 0;
@endphp
@foreach($products as $key => $product)
@php
$productCost = (float) $product->totalCost + (float) DB::table('fams_additional_charge')->where('productId',$product->id)->where('purchaseDate','<=',$endDate)->sum('amount');
$depOpeningBalance = (float)$product->depreciationOpeningBalance + (float)DB::table('fams_depreciation_details')->where('productId',$product->id)->where('depTo','<',$startDate)->sum('amount');
$useDays = DB::table('fams_depreciation_details')->where('productId',$product->id)->where('depTo','>=',$startDate)->where('depTo','<=',$endDate)->sum('days');
$currentDep = DB::table('fams_depreciation_details')->where('productId',$product->id)->where('depTo','>=',$startDate)->where('depTo','<=',$endDate)->sum('amount');
@endphp
| {{$key+1}} |
{{date('d-m-Y',strtotime($product->purchaseDate))}} |
{{$product->name}} |
{{$prefix.$product->productCode}} |
{{number_format($productCost,2)}} |
@php $totalCostPrice = $totalCostPrice + $productCost; @endphp
{{$product->depreciationPercentage}} |
{{number_format($depOpeningBalance,2)}} |
@php $totalDepOpeningBalance = $totalDepOpeningBalance + $depOpeningBalance; @endphp
{{$useDays}} |
{{number_format($currentDep,2)}} |
@php $totalAmount = $totalAmount + $currentDep; @endphp
{{number_format($depOpeningBalance+$currentDep,2)}} |
@php $totalClosingBalance = $totalClosingBalance + $depOpeningBalance+$currentDep; @endphp
@endforeach
| Total |
{{number_format($totalCostPrice,2)}} |
|
{{number_format($totalDepOpeningBalance,2)}} |
|
{{number_format($totalAmount,2)}} |
{{number_format($totalClosingBalance,2)}} |
@endif