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,151 +1,151 @@
|
||||||
{% 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>
|
||||||
|
<table style="width:100%;">
|
||||||
|
<tbody>
|
||||||
|
<tr style="text-align:center;">
|
||||||
|
<td class="">
|
||||||
|
<p>
|
||||||
|
<b>نام:
|
||||||
|
</b>
|
||||||
|
{{ person.nikename }}
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<p>
|
||||||
|
<b>
|
||||||
|
شناسه ملی:
|
||||||
|
</b>
|
||||||
|
{{ person.shenasemeli }}
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<p>
|
||||||
|
<b>شماره ثبت:
|
||||||
|
</b>
|
||||||
|
{{ person.sabt }}
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<p>
|
||||||
|
<b>شماره اقتصادی:
|
||||||
|
</b>
|
||||||
|
{{ person.codeeghtesadi }}
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<p>
|
||||||
|
<b>تلفن / نمابر:</b>
|
||||||
|
{{ person.tel }}
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="" colspan="1">
|
||||||
|
<p>
|
||||||
|
<b>موبایل:</b>
|
||||||
|
{{ person.mobile }}
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td class="" colspan="1">
|
||||||
|
<p>
|
||||||
|
<b>کد پستی:</b>
|
||||||
|
{{ person.postalcode }}
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td class="" colspan="3">
|
||||||
|
<p>
|
||||||
|
<b>آدرس:
|
||||||
|
</b>
|
||||||
|
استان
|
||||||
|
{{ person.ostan }}، شهر
|
||||||
|
{{ person.shahr }}،
|
||||||
|
{{ person.address }}
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<table style="width:100%;">
|
<div style="width:100%;margin-top:5px;text-align:center;">
|
||||||
<tbody>
|
<table style="width:100%;">
|
||||||
<tr style="text-align:center;">
|
<tbody>
|
||||||
<td class="">
|
<tr style="text-align: center; background-color: grey; text-color: white">
|
||||||
<p>
|
<td style="width: 35px;">ردیف</td>
|
||||||
<b>نام:
|
<td class="center item">فاکتور/سند</td>
|
||||||
</b>
|
<td class="center item">تاریخ</td>
|
||||||
{{ person.nikename }}
|
<td class="center item">توضیحات</td>
|
||||||
</p>
|
<td class="center item">تفضیل</td>
|
||||||
</td>
|
<td class="center item">بدهکار</td>
|
||||||
<td class="center">
|
<td class="center item">بستانکار</td>
|
||||||
<p>
|
<td class="center item">سال مالی</td>
|
||||||
<b>
|
</tr>
|
||||||
شناسه ملی:
|
{% set sumBs = 0 %}
|
||||||
</b>
|
{% set sumBd = 0 %}
|
||||||
{{ person.shenasemeli }}
|
{% for item in items %}
|
||||||
</p>
|
{% set sumBs = sumBs + item.bs %}
|
||||||
</td>
|
{% set sumBd = sumBd + item.bd %}
|
||||||
<td class="center">
|
<tr class="stimol">
|
||||||
<p>
|
<td class="center item">{{ loop.index }}</td>
|
||||||
<b>شماره ثبت:
|
<td class="center item">{{ item.doc.code }}</td>
|
||||||
</b>
|
<td class="center item">{{ item.doc.date }}</td>
|
||||||
{{ person.sabt }}
|
<td class="center item">{{ item.des }}</td>
|
||||||
</p>
|
<td class="center item">{{ item.ref.name }}</td>
|
||||||
</td>
|
<td class="center item">{{ item.bd | number_format }}</td>
|
||||||
<td class="center">
|
<td class="center item">{{ item.bs | number_format }}</td>
|
||||||
<p>
|
<td class="center item">{{ item.year.label }}</td>
|
||||||
<b>شماره اقتصادی:
|
</tr>
|
||||||
</b>
|
{% endfor %}
|
||||||
{{ person.codeeghtesadi }}
|
</tbody>
|
||||||
</p>
|
</table>
|
||||||
</td>
|
</div>
|
||||||
<td class="center">
|
<div style="width:100%; border:1px solid black;border-radius: 8px;margin-top:5px;text-align:center;">
|
||||||
<p>
|
<div class="tg-wrap" style="width:100%;border-radius: 8px 8px 0px 0px;text-align:center;background-color:gray">
|
||||||
<b>تلفن / نمابر:</b>
|
<b style="color:white;">وضعیت حساب</b>
|
||||||
{{ person.tel }}
|
</div>
|
||||||
</p>
|
<table style="width:100%;">
|
||||||
</td>
|
<tbody>
|
||||||
</tr>
|
<tr style="text-align:center;">
|
||||||
<tr>
|
<td class="center">
|
||||||
<td class="" colspan="1">
|
<p>
|
||||||
<p>
|
<b>جمع بستانکار:
|
||||||
<b>موبایل:</b>
|
</b>
|
||||||
{{ person.mobile }}
|
{{ sumBs | number_format }}
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
<td class="" colspan="1">
|
<td class="center">
|
||||||
<p>
|
<p>
|
||||||
<b>کد پستی:</b>
|
<b>جمع بدهکار:
|
||||||
{{ person.postalcode }}
|
</b>
|
||||||
</p>
|
{{ sumBd | number_format }}
|
||||||
</td>
|
</p>
|
||||||
<td class="" colspan="3">
|
</td>
|
||||||
<p>
|
<td class="center">
|
||||||
<b>آدرس:
|
<p>
|
||||||
</b>
|
<b>تراز حساب:
|
||||||
استان
|
</b>
|
||||||
{{ person.ostan }}، شهر
|
<span>{{ (sumBs - sumBd) | abs |number_format }}</span>
|
||||||
{{ person.shahr }}،
|
</p>
|
||||||
{{ person.address }}
|
</td>
|
||||||
</p>
|
<td class="center">
|
||||||
</td>
|
<p>
|
||||||
</tr>
|
<b>
|
||||||
</tbody>
|
وضعیت:
|
||||||
</table>
|
</b>
|
||||||
</div>
|
{% if sumBs > sumBd%}
|
||||||
<div style="width:100%;margin-top:5px;text-align:center;">
|
بستانکار
|
||||||
<table style="width:100%;">
|
{% elseif sumBs == sumBd %}
|
||||||
<tbody>
|
تسویه شده
|
||||||
<tr style="text-align: center; background-color: grey; text-color: white">
|
{% else %}
|
||||||
<td style="width: 35px;">ردیف</td>
|
بدهکار
|
||||||
<td class="center item">فاکتور/سند</td>
|
{% endif %}
|
||||||
<td class="center item">تاریخ</td>
|
</p>
|
||||||
<td class="center item">توضیحات</td>
|
</td>
|
||||||
<td class="center item">تفضیل</td>
|
</tr>
|
||||||
<td class="center item">بدهکار</td>
|
</tbody>
|
||||||
<td class="center item">بستانکار</td>
|
</table>
|
||||||
<td class="center item">سال مالی</td>
|
|
||||||
</tr>
|
|
||||||
{% set sumBs = 0 %}
|
|
||||||
{% set sumBd = 0 %}
|
|
||||||
{% for item in items %}
|
|
||||||
{% set sumBs = sumBs + item.bs %}
|
|
||||||
{% set sumBd = sumBd + item.bd %}
|
|
||||||
<tr class="stimol">
|
|
||||||
<td class="center item">{{ loop.index }}</td>
|
|
||||||
<td class="center item">{{ item.doc.code }}</td>
|
|
||||||
<td class="center item">{{ item.doc.date }}</td>
|
|
||||||
<td class="center item">{{ item.des }}</td>
|
|
||||||
<td class="center item">{{ item.ref.name }}</td>
|
|
||||||
<td class="center item">{{ item.bd | number_format }}</td>
|
|
||||||
<td class="center item">{{ item.bs | number_format }}</td>
|
|
||||||
<td class="center item">{{ item.year.label }}</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<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">
|
|
||||||
<b style="color:white;">وضعیت حساب</b>
|
|
||||||
</div>
|
</div>
|
||||||
<table style="width:100%;">
|
|
||||||
<tbody>
|
|
||||||
<tr style="text-align:center;">
|
|
||||||
<td class="center">
|
|
||||||
<p>
|
|
||||||
<b>جمع بستانکار:
|
|
||||||
</b>
|
|
||||||
{{ sumBs | number_format }}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td class="center">
|
|
||||||
<p>
|
|
||||||
<b>جمع بدهکار:
|
|
||||||
</b>
|
|
||||||
{{ sumBd | number_format }}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td class="center">
|
|
||||||
<p>
|
|
||||||
<b>تراز حساب:
|
|
||||||
</b>
|
|
||||||
<span>{{ (sumBs - sumBd) | abs |number_format }}</span>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td class="center">
|
|
||||||
<p>
|
|
||||||
<b> وضعیت:
|
|
||||||
</b>
|
|
||||||
{% if sumBs > sumBd%}
|
|
||||||
بستانکار
|
|
||||||
{% elseif sumBs == sumBd %}
|
|
||||||
تسویه شده
|
|
||||||
{% else %}
|
|
||||||
بدهکار
|
|
||||||
{% endif %}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</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;">
|
||||||
<tbody>
|
<table style="width:100%;">
|
||||||
<tr style="text-align: center; background-color: grey; color: white">
|
<tbody>
|
||||||
<td style="width: 35px;">ردیف</td>
|
<tr class="stimol" style="text-align: center; background-color: grey; text-color: white">
|
||||||
<td style="border:1px solid black">کد حسابداری</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>
|
||||||
</tr>
|
<td class="center item">شرح</td>
|
||||||
{% for item in items %}
|
</tr>
|
||||||
<tr style="border:1px solid black" {% if loop.index is even%}class="bg-dark text-light"{% endif%}>
|
{% for item in items %}
|
||||||
<td style="border:1px solid black">{{ loop.index }}</td>
|
<tr class="stimol {% if loop.index is even%}bg-dark text-light{% endif%}">
|
||||||
<td style="border:1px solid black">{{ item.code }}</td>
|
<td class="center item">{{ loop.index }}</td>
|
||||||
<td style="border:1px solid black">{{ item.date }}</td>
|
<td class="center item">{{ item.code }}</td>
|
||||||
<td style="border:1px solid black">{{ item.amount | number_format }}</td>
|
<td class="center item">{{ item.date }}</td>
|
||||||
<td style="border:1px solid black">{{ item.des }}</td>
|
<td class="center item">{{ item.amount | number_format }}</td>
|
||||||
</tr>
|
<td class="center item">{{ item.des }}</td>
|
||||||
{% endfor %}
|
</tr>
|
||||||
</tbody>
|
{% endfor %}
|
||||||
</table>
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in a new issue