bug fix template of person recive list for pdf generator
This commit is contained in:
parent
779e422909
commit
6ec2fb99d7
|
@ -789,7 +789,9 @@ class PersonsController extends AbstractController
|
||||||
if (!array_key_exists('items', $params)) {
|
if (!array_key_exists('items', $params)) {
|
||||||
$transactions = $entityManager->getRepository(HesabdariRow::class)->findBy([
|
$transactions = $entityManager->getRepository(HesabdariRow::class)->findBy([
|
||||||
'bid' => $acc['bid'],
|
'bid' => $acc['bid'],
|
||||||
'person' => $person
|
'person' => $person,
|
||||||
|
'year' => $acc['year'],
|
||||||
|
'money' => $acc['money'],
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
$transactions = [];
|
$transactions = [];
|
||||||
|
@ -797,7 +799,9 @@ class PersonsController extends AbstractController
|
||||||
$prs = $entityManager->getRepository(HesabdariRow::class)->findOneBy([
|
$prs = $entityManager->getRepository(HesabdariRow::class)->findOneBy([
|
||||||
'id' => $param['id'],
|
'id' => $param['id'],
|
||||||
'bid' => $acc['bid'],
|
'bid' => $acc['bid'],
|
||||||
'person' => $person
|
'person' => $person,
|
||||||
|
'year' => $acc['year'],
|
||||||
|
'money' => $acc['money'],
|
||||||
]);
|
]);
|
||||||
if ($prs) {
|
if ($prs) {
|
||||||
$transactions[] = $prs;
|
$transactions[] = $prs;
|
||||||
|
@ -855,7 +859,9 @@ class PersonsController extends AbstractController
|
||||||
if (!array_key_exists('items', $params)) {
|
if (!array_key_exists('items', $params)) {
|
||||||
$transactions = $entityManager->getRepository(HesabdariRow::class)->findBy([
|
$transactions = $entityManager->getRepository(HesabdariRow::class)->findBy([
|
||||||
'bid' => $acc['bid'],
|
'bid' => $acc['bid'],
|
||||||
'person' => $person
|
'person' => $person,
|
||||||
|
'year' => $acc['year'],
|
||||||
|
'money' => $acc['money'],
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
$transactions = [];
|
$transactions = [];
|
||||||
|
@ -863,7 +869,9 @@ class PersonsController extends AbstractController
|
||||||
$prs = $entityManager->getRepository(HesabdariRow::class)->findOneBy([
|
$prs = $entityManager->getRepository(HesabdariRow::class)->findOneBy([
|
||||||
'id' => $param['id'],
|
'id' => $param['id'],
|
||||||
'bid' => $acc['bid'],
|
'bid' => $acc['bid'],
|
||||||
'person' => $person
|
'person' => $person,
|
||||||
|
'year' => $acc['year'],
|
||||||
|
'money' => $acc['money'],
|
||||||
]);
|
]);
|
||||||
if ($prs) {
|
if ($prs) {
|
||||||
$transactions[] = $prs;
|
$transactions[] = $prs;
|
||||||
|
@ -898,7 +906,7 @@ class PersonsController extends AbstractController
|
||||||
'bid' => $acc['bid'],
|
'bid' => $acc['bid'],
|
||||||
'type' => 'person_receive',
|
'type' => 'person_receive',
|
||||||
'year' => $acc['year'],
|
'year' => $acc['year'],
|
||||||
'money' => $acc['money']
|
'money' => $acc['money'],
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
$items = [];
|
$items = [];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% extends "pdf/base.html.twig" %}
|
{% extends "pdf/base.html.twig" %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div style="width:100%; border:1px solid black;border-radius: 8px;margin-top:5px;text-align:center;">
|
<div style="width:100%; border:1px solid black;border-radius: 8px;margin-top:5px;text-align:center;">
|
||||||
<div class="tg-wrap" style="width:100%;border-radius: 8px 8px 0px 0px;text-align:center;background-color:gray">
|
<div class="tg-wrap" style="width:100%;border-radius: 8px 8px 0px 0px;text-align:center;background-color:gray">
|
||||||
<b style="color:white;">مشخصات طرف حساب</b>
|
<b style="color:white;">مشخصات طرف حساب</b>
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,8 +69,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:100%;margin-top:5px;text-align:center;">
|
<div style="width:100%;margin-top:5px;text-align:center;">
|
||||||
<table style="width:100%;">
|
<table style="width:100%;">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr style="text-align: center; background-color: grey; text-color: white">
|
<tr style="text-align: center; background-color: grey; text-color: white">
|
||||||
|
@ -99,11 +99,10 @@
|
||||||
<td class="center item">{{ item.year.label }}</td>
|
<td class="center item">{{ item.year.label }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
<div style="width:100%; border:1px solid black;border-radius: 8px;margin-top:5px;text-align:center;">
|
||||||
<div style="width:100%; border:1px solid black;border-radius: 8px;margin-top:5px;text-align:center;">
|
|
||||||
<div class="tg-wrap" style="width:100%;border-radius: 8px 8px 0px 0px;text-align:center;background-color:gray">
|
<div class="tg-wrap" style="width:100%;border-radius: 8px 8px 0px 0px;text-align:center;background-color:gray">
|
||||||
<b style="color:white;">وضعیت حساب</b>
|
<b style="color:white;">وضعیت حساب</b>
|
||||||
</div>
|
</div>
|
||||||
|
@ -133,7 +132,8 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<p>
|
<p>
|
||||||
<b> وضعیت:
|
<b>
|
||||||
|
وضعیت:
|
||||||
</b>
|
</b>
|
||||||
{% if sumBs > sumBd%}
|
{% if sumBs > sumBd%}
|
||||||
بستانکار
|
بستانکار
|
||||||
|
@ -147,5 +147,5 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -1,23 +1,25 @@
|
||||||
{% extends "pdf/base.html.twig" %}
|
{% extends "pdf/base.html.twig" %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<table class="table mt-0 pt-0" style="border:2px solid black"><caption> </caption>
|
<div style="width:100%;margin-top:5px;text-align:center;">
|
||||||
|
<table style="width:100%;">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr style="text-align: center; background-color: grey; color: white">
|
<tr class="stimol" style="text-align: center; background-color: grey; text-color: white">
|
||||||
<td style="width: 35px;">ردیف</td>
|
<td style="width: 35px;">ردیف</td>
|
||||||
<td style="border:1px solid black">کد حسابداری</td>
|
<td class="center item">کد حسابداری</td>
|
||||||
<td style="border:1px solid black">تاریخ</td>
|
<td class="center item">تاریخ</td>
|
||||||
<td style="border:1px solid black">مبلغ</td>
|
<td class="center item">مبلغ</td>
|
||||||
<td style="border:1px solid black">شرح</td>
|
<td class="center item">شرح</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
<tr style="border:1px solid black" {% if loop.index is even%}class="bg-dark text-light"{% endif%}>
|
<tr class="stimol {% if loop.index is even%}bg-dark text-light{% endif%}">
|
||||||
<td style="border:1px solid black">{{ loop.index }}</td>
|
<td class="center item">{{ loop.index }}</td>
|
||||||
<td style="border:1px solid black">{{ item.code }}</td>
|
<td class="center item">{{ item.code }}</td>
|
||||||
<td style="border:1px solid black">{{ item.date }}</td>
|
<td class="center item">{{ item.date }}</td>
|
||||||
<td style="border:1px solid black">{{ item.amount | number_format }}</td>
|
<td class="center item">{{ item.amount | number_format }}</td>
|
||||||
<td style="border:1px solid black">{{ item.des }}</td>
|
<td class="center item">{{ item.des }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in a new issue