create blade excel files

This commit is contained in:
2025-02-24 09:53:36 +03:30
parent a537a19faa
commit baab9196d7
11 changed files with 503 additions and 106 deletions

View File

@@ -1,79 +0,0 @@
<?php
namespace App\Exports\V3\AccidentReceipt;
use Illuminate\Contracts\View\View;
use Illuminate\Database\Eloquent\Collection;
use Maatwebsite\Excel\Concerns\FromView;
use Illuminate\Support\Facades\DB;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Maatwebsite\Excel\Events\AfterSheet;
use Maatwebsite\Excel\Concerns\WithEvents;
use Maatwebsite\Excel\Concerns\WithDrawings;
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
use Maatwebsite\Excel\Concerns\WithStyles;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
class CityReport implements FromView, ShouldAutoSize, WithEvents, WithDrawings, WithStyles
{
public function __construct(private array $data){}
public function view(): View
{
$data = $this->data;
return view('v3.AccidentReceipt.CityReport', [
'data' => $data['data'],
'fromDate' => $data['fromDate'],
'ToDate' => $data['ToDate'],
]);
}
/**
* @return array
*/
public function registerEvents(): array
{
return [
AfterSheet::class => function (AfterSheet $event) {
$event->sheet->getDelegate()->setRightToLeft(true);
},
];
}
public function drawings()
{
$drawing = new Drawing();
$drawing->setName('Logo');
$drawing->setDescription('This is my logo');
$drawing->setPath(public_path('/dist/logo.png'));
$drawing->setWidth(50);
$drawing->setHeight(50);
$drawing->setOffsetX(5);
$drawing->setOffsetY(5);
$drawing->setCoordinates('A1');
$drawing2 = new Drawing();
$drawing2->setName('Logo');
$drawing2->setDescription('This is my logo');
$drawing2->setPath(public_path('/dist/141icon.png'));
$drawing2->setWidth(50);
$drawing2->setHeight(50);
$drawing2->setOffsetX(5);
$drawing2->setOffsetY(5);
$drawing2->setCoordinates('B1');
return [$drawing, $drawing2];
}
public function styles(Worksheet $sheet)
{
return [
// Style the first row as bold text.
'A:BA' => [
'font' => [
'name' => 'B Nazanin'
]
],
];
}
}

View File

@@ -0,0 +1,123 @@
<?php
namespace App\Exports\V3\AccidentReceipt;
use App\Models\Province;
use Illuminate\Contracts\View\View;
use Illuminate\Database\Eloquent\Collection;
use Maatwebsite\Excel\Concerns\FromView;
use Illuminate\Support\Facades\DB;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Maatwebsite\Excel\Events\AfterSheet;
use Maatwebsite\Excel\Concerns\WithEvents;
use Maatwebsite\Excel\Concerns\WithDrawings;
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
use Maatwebsite\Excel\Concerns\WithStyles;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
class CountryReport implements FromView, ShouldAutoSize, WithEvents, WithDrawings, WithStyles
{
public function __construct(private array $data){}
public function view(): View
{
$data = $this->data;
foreach (Province::all() as $province) {
$existingProvince = array_search($province->id, array_column($data['data'], 'province_id'));
if ($existingProvince) {
$activities[] = [
'name' => $province->name_fa,
'tedade' => $data['data'][$existingProvince]->tedade,
'police_rah' => $data['data'][$existingProvince]->police_rah,
'gozaresh_gasht' => $data['data'][$existingProvince]->gozaresh_gasht,
'kol_sabt_shode' => $data['data'][$existingProvince]->kol_sabt_shode,
'vasel_shode' => $data['data'][$existingProvince]->vasel_shode ?? 0,
'vasel_shode_bimeh' => $data['data'][$existingProvince]->vasel_shode_bimeh ?? 0,
'vasel_shode_daghi' => $data['data'][$existingProvince]->vasel_shode_daghi ?? 0,
'vasel_shode_final' => $data['data'][$existingProvince]->vasel_shode_final ?? 0,
];
} else {
$activities[] = [
'name' => $province->name_fa,
'tedade' => "",
'police_rah' => "",
'gozaresh_gasht' => "",
'kol_sabt_shode' => "",
'vasel_shode' => "",
'vasel_shode_bimeh' => "",
'vasel_shode_daghi' => "",
'vasel_shode_final' => "",
];
}
}
$activities[] = [
'name' => 'کشوری',
'tedade' => $data['data'][-1]->tedade,
'police_rah' => $data['data'][-1]->police_rah,
'gozaresh_gasht' => $data['data'][-1]->gozaresh_gasht,
'kol_sabt_shode' => $data['data'][-1]->kol_sabt_shode,
'vasel_shode' => $data['data'][-1]->vasel_shode ?? 0,
'vasel_shode_bimeh' => $data['data'][-1]->vasel_shode_bimeh ?? 0,
'vasel_shode_daghi' => $data['data'][-1]->vasel_shode_daghi ?? 0,
'vasel_shode_final' => $data['data'][-1]->vasel_shode_final ?? 0,
];
return view('v3.Reports.AccidentReceipt.CountryReport', [
'data' => $activities,
'fromDate' => $data['fromDate'],
'toDate' => $data['toDate'],
]);
}
/**
* @return array
*/
public function registerEvents(): array
{
return [
AfterSheet::class => function (AfterSheet $event) {
$event->sheet->getDelegate()->setRightToLeft(true);
},
];
}
public function drawings(): array
{
$drawing = new Drawing();
$drawing->setName('Logo');
$drawing->setDescription('This is my logo');
$drawing->setPath(public_path('/dist/logo.png'));
$drawing->setWidth(50);
$drawing->setHeight(50);
$drawing->setOffsetX(5);
$drawing->setOffsetY(5);
$drawing->setCoordinates('A1');
$drawing2 = new Drawing();
$drawing2->setName('Logo');
$drawing2->setDescription('This is my logo');
$drawing2->setPath(public_path('/dist/141icon.png'));
$drawing2->setWidth(50);
$drawing2->setHeight(50);
$drawing2->setOffsetX(5);
$drawing2->setOffsetY(5);
$drawing2->setCoordinates('B1');
return [$drawing, $drawing2];
}
public function styles(Worksheet $sheet): array
{
return [
// Style the first row as bold text.
'A:BA' => [
'font' => [
'name' => 'B Nazanin'
]
],
];
}
}

View File

@@ -20,7 +20,7 @@ class DataTableReport implements FromView, ShouldAutoSize, WithEvents, WithDrawi
public function view(): View
{
return view('v3.AccidentReceipt.DataTableReport', [
return view('v3.Reports.AccidentReceipt.DataTableReport', [
'data' => $this->data,
]);
}

View File

@@ -20,11 +20,57 @@ class ProvinceReport implements FromView, ShouldAutoSize, WithEvents, WithDrawin
public function view(): View
{
$data = $this->data;
return view('v3.AccidentReceipt.ProvinceReport', [
'data' => $data['data'],
'fromDate' => $data['fromDate'],
'ToDate' => $data['ToDate'],
$inputData = $this->data;
$reportData =$inputData['report'];
foreach ($inputData['cities'] as $city) {
$existingCity = array_search($city->id, array_column($inputData['data'], 'city_id'));
if ($existingCity) {
$activities[] = [
'name' => $city->name_fa,
'tedade' => $reportData['data'][$existingCity]->tedade,
'police_rah' => $reportData['data'][$existingCity]->police_rah,
'gozaresh_gasht' => $reportData['data'][$existingCity]->gozaresh_gasht,
'kol_sabt_shode' => $reportData['data'][$existingCity]->kol_sabt_shode,
'vasel_shode' => $reportData['data'][$existingCity]->vasel_shode ?? 0,
'vasel_shode_bimeh' => $reportData['data'][$existingCity]->vasel_shode_bimeh ?? 0,
'vasel_shode_daghi' => $reportData['data'][$existingCity]->vasel_shode_daghi ?? 0,
'vasel_shode_final' => $reportData['data'][$existingCity]->vasel_shode_final ?? 0,
];
} else {
$activities[] = [
'name' => $city->name_fa,
'tedade' => "",
'police_rah' => "",
'gozaresh_gasht' => "",
'kol_sabt_shode' => "",
'vasel_shode' => "",
'vasel_shode_bimeh' => "",
'vasel_shode_daghi' => "",
'vasel_shode_final' => "",
];
}
}
$activities[] = [
'name' => 'استانی',
'tedade' => $reportData['data'][-1]->tedade,
'police_rah' => $reportData['data'][-1]->police_rah,
'gozaresh_gasht' => $reportData['data'][-1]->gozaresh_gasht,
'kol_sabt_shode' => $reportData['data'][-1]->kol_sabt_shode,
'vasel_shode' => $reportData['data'][-1]->vasel_shode ?? 0,
'vasel_shode_bimeh' => $reportData['data'][-1]->vasel_shode_bimeh ?? 0,
'vasel_shode_daghi' => $reportData['data'][-1]->vasel_shode_daghi ?? 0,
'vasel_shode_final' => $reportData['data'][-1]->vasel_shode_final ?? 0,
];
return view('v3.Reports.AccidentReceipt.ProvinceReport', [
'data' => $activities,
'fromDate' => $reportData['fromDate'],
'toDate' => $reportData['toDate'],
]);
}

View File

@@ -44,7 +44,7 @@ class AccidentReceiptController extends Controller
{
auth()->user()->addActivityComplete(1126);
$name = 'گزارش از خسارات وارده به ابنیه فنی و تاسیسات راه ' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
$data = $accidentReceiptTableService->dataTable($request);
$data = $accidentReceiptTableService->dataTable($request, true);
return Excel::download(new DataTableReport($data), $name);
}

View File

@@ -2,8 +2,8 @@
namespace App\Http\Controllers\V3\Dashboard\Reports;
use App\Exports\V3\AccidentReceipt\CityReport;
use App\Exports\V3\AccidentReceipt\ProvinceReport;
use App\Exports\V3\AccidentReceipt\CountryReport;
use App\Http\Controllers\Controller;
use App\Http\Traits\ApiResponse;
use App\Models\City;
@@ -18,18 +18,18 @@ class AccidentReceiptReportController extends Controller
{
use ApiResponse;
public function provinceReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): JsonResponse
public function countryReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): JsonResponse
{
$data = $accidentReceiptTableService->provinceReport($request);
$data = $accidentReceiptTableService->countryReport($request);
return $this->successResponse([
'activities' => $data['data'],
'provinces' => Province::all(['id', 'name_fa']),
]);
}
public function cityReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): JsonResponse
public function provinceReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): JsonResponse
{
$data = $accidentReceiptTableService->cityReport($request);
$data = $accidentReceiptTableService->provinceReport($request);
return $this->successResponse([
'activities' => $data['data'],
'cities' => City::query()->where('province_id', '=', $request->province_id)
@@ -38,17 +38,22 @@ class AccidentReceiptReportController extends Controller
]);
}
public function countryExcelReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): BinaryFileResponse
{
$data = $accidentReceiptTableService->countryReport($request);
$name = 'گزارش از خسارات وارده به ابنیه فنی و تاسیسات راه ' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
return Excel::download(new CountryReport($data), $name);
}
public function provinceExcelReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): BinaryFileResponse
{
$data = $accidentReceiptTableService->provinceReport($request);
$name = 'گزارش از خسارات وارده به ابنیه فنی و تاسیسات راه ' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
return Excel::download(new ProvinceReport($data), $name);
}
public function cityExcelReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): BinaryFileResponse
{
$data = $accidentReceiptTableService->cityReport($request);
$name = 'گزارش از خسارات وارده به ابنیه فنی و تاسیسات راه ' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
return Excel::download(new CityReport($data), $name);
return Excel::download(new ProvinceReport([
'report' => $data,
'cities' => City::query()->where('province_id', '=', $request->province_id)
->where('type_id', '=', 1)
->get(['id', 'name_fa']),
]), $name);
}
}

View File

@@ -12,20 +12,23 @@ class AccidentReceiptTableService
{
use ApiResponse;
public function dataTable(Request $request)
public function dataTable(Request $request, $loadRelations = false)
{
$user = auth()->user();
$query = null;
if ($user->hasPermissionTo('show-receipt')) {
$query = Accident::query();
$query = Accident::query()
->when($loadRelations, fn ($query) => $query->with('damages'));
}
else {
if (is_null($user->province_id)) {
return $this->errorResponse('استانی برای شما در سامانه ثبت نشده است!');
}
$query = Accident::query()->where('province_id', '=', $user->province_id);
$query = Accident::query()
->where('province_id', '=', $user->province_id)
->when($loadRelations, fn ($query) => $query->with('damages'));
}
return DataTableFacade::run(
@@ -36,7 +39,7 @@ class AccidentReceiptTableService
);
}
public function provinceReport(Request $request): array
public function countryReport(Request $request): array
{
$data = DB::select(
'SELECT
@@ -77,7 +80,7 @@ class AccidentReceiptTableService
];
}
public function cityReport(Request $request): array
public function provinceReport(Request $request): array
{
$data = DB::select(
'SELECT

View File

@@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>کشوری</title>
</head>
<body dir="rtl" style="text-align: center;">
<table>
<thead>
<tr>
<th colspan="9"
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
</th>
</tr>
<tr>
<th colspan="9"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
</th>
</tr>
<tr>
<th colspan="9"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13;">
گزارش خسارات وارده به ابنیه فنی و تاسیسات راه از تاریخ
{{ verta($fromDate)->format('Y/n/j') }}
تا
تاریخ
{{ verta($ToDate)->format('Y/n/j') }}
</th>
</tr>
<tr class="headercolortable">
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
اداره کل
</th>
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
تعداد کل
</th>
<th colspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
نحوه شناسایی خسارت
</th>
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
مبلغ کل خسارت ثبت شده (ریال)
</th>
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
کل مبلغ وصول شده (ریال)
</th>
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
مبلغ وصول شده به تفکیک نوع پرداخت (ریال)
</th>
</tr>
<tr>
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
گزارش پلیس راه
</th>
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
گزارش گشت راهداری
</th>
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
بیمه
</th>
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
کسر داغی
</th>
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
شخص
</th>
</tr>
</thead>
<tbody>
@foreach ($data as $road)
<tr>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['name'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['tedade'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['police_rah'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['gozaresh_gasht'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['kol_sabt_shode'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['vasel_shode'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['vasel_shode_bimeh'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['vasel_shode_daghi'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['vasel_shode_final'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>

View File

@@ -0,0 +1,82 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>خسارات وارده به تفکیک استان</title>
</head>
<body>
<table>
<thead>
<tr>
<th colspan="16" style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;text-align:center;">
تاریخ دریافت گزارش: {{verta()->now()->format('Y/m/d H:i')}}
</th>
</tr>
<tr>
<th colspan="16" style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;"></th>
</tr>
<tr>
<th colspan="16" style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">گزارش کلی خسارات وارده</th>
</tr>
<tr>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">شناسه ثبت در سامانه RMS</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">تاریخ ثبت در سامانه</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نام استان</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نام شهرستان</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">تاریخ تصادف</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">ساعت تصادف</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نوع خسارت</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نوع تجهیزات خسارت دیده</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">مبلغ برآورد اولیه</th>
<th style="botder: 1px solid black;text-align: center;background-color: #EBF1DE;">آخرین وضعیت</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">مبلغ وصولی به حساب اداره</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">میزان فرانشیز کسر شده</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">میزان داغی تجهیزات خسارت دیده موجود انبار اداره</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">مبلغ فیش</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">مبلغ بیمه</th>
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">مبلغ داغی</th>
</tr>
</thead>
<tbody>
@foreach ($data as $item)
<tr>
<td style="border: 1px solid black;text-align: center;">{{$item->id}}</td>
<td style="border: 1px solid black;text-align: center;">{{Hekmatinasser\Verta\Verta::instance($item->created_at)->format('Y/n/j')}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->province_fa}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->city_fa}}</td>
<td style="border: 1px solid black;text-align: center;">{{Hekmatinasser\Verta\Verta::instance($item->accident_date)->format('Y/n/j')}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->accident_time}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->accident_type_fa}}</td>
@php
$temp = '';
@endphp
@foreach ($item->damages as $damage)
@php
$temp .= $damage->title." (".$damage->pivot->value." ".$damage->unit.") - ";
@endphp
@endforeach
<td style="border: 1px solid black;text-align: center;">{{$temp}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->sum ?? 0}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->status_fa}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->deposit_insurance_amount + $item->final_amount}}</td>
<td style="border: 1px solid black;text-align: center;"></td>
<td style="border: 1px solid black;text-align: center;"></td>
<td style="border: 1px solid black;text-align: center;">{{$item->final_amount}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->deposit_insurance_amount}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->deposit_daghi_amount}}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>

View File

@@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>استانی</title>
</head>
<body dir="rtl" style="text-align: center;">
<table>
<thead>
<tr>
<th colspan="9"
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
</th>
</tr>
<tr>
<th colspan="9"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
</th>
</tr>
<tr>
<th colspan="9"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13;">
گزارش خسارات وارده به ابنیه فنی و تاسیسات راه از تاریخ
{{ verta($fromDate)->format('Y/n/j') }}
تا
تاریخ
{{ verta($toDate)->format('Y/n/j') }}
</th>
</tr>
<tr class="headercolortable">
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
اداره کل
</th>
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
تعداد کل
</th>
<th colspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
نحوه شناسایی خسارت
</th>
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
مبلغ کل خسارت ثبت شده (ریال)
</th>
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
کل مبلغ وصول شده (ریال)
</th>
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
مبلغ وصول شده به تفکیک نوع پرداخت (ریال)
</th>
</tr>
<tr>
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
گزارش پلیس راه
</th>
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
گزارش گشت راهداری
</th>
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
بیمه
</th>
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
کسر داغی
</th>
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
شخص
</th>
</tr>
</thead>
<tbody>
@foreach ($data as $road)
<tr>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['name'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['tedade'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['police_rah'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['gozaresh_gasht'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['kol_sabt_shode'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['vasel_shode'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['vasel_shode_bimeh'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['vasel_shode_daghi'] }}</td>
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
{{ $road['vasel_shode_final'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>

View File

@@ -270,8 +270,8 @@ Route::prefix('receipt_reports')
->name('receiptReports.')
->controller(AccidentReceiptReportController::class)
->group(function () {
Route::get('/country_report', 'countryReport')->name('countryReport');
Route::get('/province_report', 'provinceReport')->name('provinceReport');
Route::get('/city_report', 'cityReport')->name('cityReport');
Route::get('/country_excel_report', 'countryExcelReport')->name('countryExcelReport');
Route::get('/province_excel_report', 'provinceExcelReport')->name('provinceExcelReport');
Route::get('/city_excel_report', 'cityExcelReport')->name('cityExcelReport');
});