From 98645b24c3a0b4a3ddcb88914d49845ea71a20bf Mon Sep 17 00:00:00 2001 From: Babak Alizadeh Date: Wed, 22 Oct 2025 20:03:03 +0330 Subject: [PATCH] add person info in pos invoice --- .../pdf/posPrinters/cashdesk.html.twig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hesabixCore/templates/pdf/posPrinters/cashdesk.html.twig b/hesabixCore/templates/pdf/posPrinters/cashdesk.html.twig index aac46e3..adead0a 100644 --- a/hesabixCore/templates/pdf/posPrinters/cashdesk.html.twig +++ b/hesabixCore/templates/pdf/posPrinters/cashdesk.html.twig @@ -160,6 +160,23 @@ {% endfor %} + {% set firstPerson = null %} + {% for row in rows %} + {% if row.person != null and firstPerson is null %} + {% set firstPerson = row.person %} + {% endif %} + {% endfor %} + {% if firstPerson %} +
+

نام مستعار: {{ firstPerson.nikename|default(firstPerson.name) }}

+

آدرس: {{ firstPerson.address|default('-') }}

+

موبایل: + {% if firstPerson.mobile %}{{ firstPerson.mobile }} + {% elseif firstPerson.mobile2 is defined and firstPerson.mobile2 %}{{ firstPerson.mobile2 }} + {% else %}-{% endif %} +

+
+ {% endif %}