diff --git a/hesabixCore/src/Controller/PersonsController.php b/hesabixCore/src/Controller/PersonsController.php index 8277749..c2c9183 100644 --- a/hesabixCore/src/Controller/PersonsController.php +++ b/hesabixCore/src/Controller/PersonsController.php @@ -789,7 +789,9 @@ class PersonsController extends AbstractController if (!array_key_exists('items', $params)) { $transactions = $entityManager->getRepository(HesabdariRow::class)->findBy([ 'bid' => $acc['bid'], - 'person' => $person + 'person' => $person, + 'year' => $acc['year'], + 'money' => $acc['money'], ]); } else { $transactions = []; @@ -797,7 +799,9 @@ class PersonsController extends AbstractController $prs = $entityManager->getRepository(HesabdariRow::class)->findOneBy([ 'id' => $param['id'], 'bid' => $acc['bid'], - 'person' => $person + 'person' => $person, + 'year' => $acc['year'], + 'money' => $acc['money'], ]); if ($prs) { $transactions[] = $prs; @@ -855,7 +859,9 @@ class PersonsController extends AbstractController if (!array_key_exists('items', $params)) { $transactions = $entityManager->getRepository(HesabdariRow::class)->findBy([ 'bid' => $acc['bid'], - 'person' => $person + 'person' => $person, + 'year' => $acc['year'], + 'money' => $acc['money'], ]); } else { $transactions = []; @@ -863,7 +869,9 @@ class PersonsController extends AbstractController $prs = $entityManager->getRepository(HesabdariRow::class)->findOneBy([ 'id' => $param['id'], 'bid' => $acc['bid'], - 'person' => $person + 'person' => $person, + 'year' => $acc['year'], + 'money' => $acc['money'], ]); if ($prs) { $transactions[] = $prs; @@ -898,7 +906,7 @@ class PersonsController extends AbstractController 'bid' => $acc['bid'], 'type' => 'person_receive', 'year' => $acc['year'], - 'money' => $acc['money'] + 'money' => $acc['money'], ]); } else { $items = []; diff --git a/hesabixCore/templates/pdf/person_card.html.twig b/hesabixCore/templates/pdf/person_card.html.twig index e2f399f..e23806c 100644 --- a/hesabixCore/templates/pdf/person_card.html.twig +++ b/hesabixCore/templates/pdf/person_card.html.twig @@ -1,151 +1,151 @@ {% extends "pdf/base.html.twig" %} {% block body %} -
-
- مشخصات طرف حساب +
+
+ مشخصات طرف حساب +
+ + + + + + + + + + + + + + + +
+

+ نام: + + {{ person.nikename }} +

+
+

+ + شناسه ملی: + + {{ person.shenasemeli }} +

+
+

+ شماره ثبت: + + {{ person.sabt }} +

+
+

+ شماره اقتصادی: + + {{ person.codeeghtesadi }} +

+
+

+ تلفن / نمابر: + {{ person.tel }} +

+
+

+ موبایل: + {{ person.mobile }} +

+
+

+ کد پستی: + {{ person.postalcode }} +

+
+

+ آدرس: + + استان + {{ person.ostan }}، شهر + {{ person.shahr }}، + {{ person.address }} +

+
- - - - - - - - - - - - - - - -
-

- نام: - - {{ person.nikename }} -

-
-

- - شناسه ملی: - - {{ person.shenasemeli }} -

-
-

- شماره ثبت: - - {{ person.sabt }} -

-
-

- شماره اقتصادی: - - {{ person.codeeghtesadi }} -

-
-

- تلفن / نمابر: - {{ person.tel }} -

-
-

- موبایل: - {{ person.mobile }} -

-
-

- کد پستی: - {{ person.postalcode }} -

-
-

- آدرس: - - استان - {{ person.ostan }}، شهر - {{ person.shahr }}، - {{ person.address }} -

-
-
-
- - - - - - - - - - - - - {% set sumBs = 0 %} - {% set sumBd = 0 %} - {% for item in items %} - {% set sumBs = sumBs + item.bs %} - {% set sumBd = sumBd + item.bd %} - - - - - - - - - - - {% endfor %} - -
ردیففاکتور/سندتاریختوضیحاتتفضیلبدهکاربستانکارسال مالی
{{ loop.index }}{{ item.doc.code }}{{ item.doc.date }}{{ item.des }}{{ item.ref.name }}{{ item.bd | number_format }}{{ item.bs | number_format }}{{ item.year.label }}
- -
-
-
- وضعیت حساب +
+ + + + + + + + + + + + + {% set sumBs = 0 %} + {% set sumBd = 0 %} + {% for item in items %} + {% set sumBs = sumBs + item.bs %} + {% set sumBd = sumBd + item.bd %} + + + + + + + + + + + {% endfor %} + +
ردیففاکتور/سندتاریختوضیحاتتفضیلبدهکاربستانکارسال مالی
{{ loop.index }}{{ item.doc.code }}{{ item.doc.date }}{{ item.des }}{{ item.ref.name }}{{ item.bd | number_format }}{{ item.bs | number_format }}{{ item.year.label }}
- - - - - - - - - -
-

- جمع بستانکار: - - {{ sumBs | number_format }} -

-
-

- جمع بدهکار: - - {{ sumBd | number_format }} -

-
-

- تراز حساب: - - {{ (sumBs - sumBd) | abs |number_format }} -

-
-

- وضعیت: - - {% if sumBs > sumBd%} - بستانکار - {% elseif sumBs == sumBd %} - تسویه شده - {% else %} - بدهکار - {% endif %} -

-
-
-{% endblock %} \ No newline at end of file +
+
+ وضعیت حساب +
+ + + + + + + + + +
+

+ جمع بستانکار: + + {{ sumBs | number_format }} +

+
+

+ جمع بدهکار: + + {{ sumBd | number_format }} +

+
+

+ تراز حساب: + + {{ (sumBs - sumBd) | abs |number_format }} +

+
+

+ + وضعیت: + + {% if sumBs > sumBd%} + بستانکار + {% elseif sumBs == sumBd %} + تسویه شده + {% else %} + بدهکار + {% endif %} +

+
+
+{% endblock %} diff --git a/hesabixCore/templates/pdf/persons_receive.html.twig b/hesabixCore/templates/pdf/persons_receive.html.twig index 6349c65..bb600cb 100644 --- a/hesabixCore/templates/pdf/persons_receive.html.twig +++ b/hesabixCore/templates/pdf/persons_receive.html.twig @@ -1,23 +1,25 @@ {% extends "pdf/base.html.twig" %} {% block body %} - - - - - - - - - - {% for item in items %} - - - - - - - - {% endfor %} - -
 
ردیفکد حسابداریتاریخمبلغشرح
{{ loop.index }}{{ item.code }}{{ item.date }}{{ item.amount | number_format }}{{ item.des }}
-{% endblock %} \ No newline at end of file +
+ + + + + + + + + + {% for item in items %} + + + + + + + + {% endfor %} + +
ردیفکد حسابداریتاریخمبلغشرح
{{ loop.index }}{{ item.code }}{{ item.date }}{{ item.amount | number_format }}{{ item.des }}
+
+{% endblock %}