add detail to api

This commit is contained in:
2025-01-25 13:34:45 +03:30
parent dab16915da
commit ac2cb74398
6 changed files with 98 additions and 15 deletions

View File

@@ -0,0 +1,70 @@
<!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="25" 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="25" style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;"></th>
</tr>
<tr>
<th colspan="26" 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>
<th rowspan="3" style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">اداره کل</th>
</tr>
@foreach($details as $detail)
<tr>
<th style="border:1px solid black;text-align:center;background-color: #C4D79B;">
<div style="display: flex; flex-direction: column; align-items: center;">
<span>{{ $detail->sub_item_str }}</span>
<div style="background-color: #FDE9D9;border: 1px solid black;text-align: center;">
<span>تعداد</span>
<span>{{ $detail->unit }}مجموع</span>
</div>
</div>
</th>
</tr>
</thead>
<tbody>
@foreach ($activities as $activity)
<tr>
<td style="border: 1px solid black;text-align: center;">{{ $activity->province_fa }}</td>
@if($activity->sub_item == $detail->sub_item)
<td style="border: 1px solid black;text-align: center;">{{ $activity->Count_ }}</td>
<td style="border: 1px solid black;text-align: center;">{{ round($activity->Sum_, 1) }}</td>
@endif
</tr>
@endforeach
@endforeach
</tbody>
</table>
</body>
</html>