redesign costs and some bug fix
This commit is contained in:
parent
7e861c240d
commit
3c50c28d27
|
@ -503,8 +503,9 @@ class AdminController extends AbstractController
|
|||
#[Route('/api/admin/logs/last', name: 'api_admin_logs_last')]
|
||||
public function api_admin_logs_last(Jdate $jdate, EntityManagerInterface $entityManager): JsonResponse
|
||||
{
|
||||
$logs = $entityManager->getRepository(\App\Entity\Log::class)->findBy([], ['id' => 'ASC'], 250);
|
||||
$logs = $entityManager->getRepository(\App\Entity\Log::class)->findBy([], ['id' => 'DESC'], 250);
|
||||
$temps = [];
|
||||
$logs = array_reverse($logs);
|
||||
foreach ($logs as $log) {
|
||||
$temp = [];
|
||||
if ($log->getUser())
|
||||
|
|
|
@ -3,12 +3,6 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<head>
|
||||
<style>
|
||||
@page {
|
||||
margin: 3%;
|
||||
margin-header: 0;
|
||||
margin-footer: 0;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -243,14 +237,19 @@
|
|||
</td>
|
||||
<td class="item">
|
||||
<h4>
|
||||
جمع کل:
|
||||
مبلغ کل بدون تخفیف:
|
||||
{{ (doc.amount + discount) | number_format}}
|
||||
</h4>
|
||||
</td>
|
||||
<td class="item">
|
||||
<h4>
|
||||
جمع کل قابل پرداخت:
|
||||
{{doc.amount | number_format}}
|
||||
</h4>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="stimol">
|
||||
<td class="item" colspan="4">
|
||||
<td class="item" colspan="5">
|
||||
<h4>
|
||||
توضیحات:
|
||||
{{doc.des}}
|
||||
|
@ -260,7 +259,39 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="width:100%;margin-top:20px;text-align:center;">
|
||||
{% if doc.relatedDocs | length != 0 %}
|
||||
<h4 class="">
|
||||
پرداختها:
|
||||
</h4>
|
||||
<div style="width:60%;margin-top:0px;text-align:center;">
|
||||
<table style="width:100%;">
|
||||
<thead>
|
||||
<tr class="stimol" style="background-color:gray;">
|
||||
<th class="text-white" style="width:80px">ردیف</th>
|
||||
<th class="text-white">تاریخ</th>
|
||||
<th class="text-white">مبلغ</th>
|
||||
<th class="text-white">شرح</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody>
|
||||
{% set rowIndex = 0 %}
|
||||
{% for item in doc.relatedDocs%}
|
||||
{% set rowIndex = rowIndex + 1 %}
|
||||
<tr class="stimol">
|
||||
<td class="center item">{{rowIndex}}</td>
|
||||
<td class="center item">{{item.date}}</td>
|
||||
<td class="center item">{{ item.amount | number_format }}</td>
|
||||
<td class="center item">{{ item.des }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div style="width:40%;margin-top:20px;text-align:center;float:left;">
|
||||
<table style="width:100%;">
|
||||
<tbody>
|
||||
<tr class="">
|
||||
|
|
Loading…
Reference in a new issue