diff --git a/hesabixCore/src/Controller/SellController.php b/hesabixCore/src/Controller/SellController.php index 063f53c..32053a8 100644 --- a/hesabixCore/src/Controller/SellController.php +++ b/hesabixCore/src/Controller/SellController.php @@ -1013,6 +1013,7 @@ class SellController extends AbstractController 'doc' => $doc, 'rows' => array_map(function ($row) { return [ + 'person' => $row->getPerson(), 'commodity' => $row->getCommodity(), 'commodityCount' => $row->getCommdityCount(), 'des' => $row->getDes(), diff --git a/hesabixCore/src/Service/twigFunctions.php b/hesabixCore/src/Service/twigFunctions.php index 6b33b51..0b33ec3 100644 --- a/hesabixCore/src/Service/twigFunctions.php +++ b/hesabixCore/src/Service/twigFunctions.php @@ -148,4 +148,9 @@ class twigFunctions return $footerText; } + + public function getSystemFooterText(string $side) + { + return $this->getStaticData('system', $side); + } } \ No newline at end of file diff --git a/hesabixCore/templates/pdf/posPrinters/cashdesk.html.twig b/hesabixCore/templates/pdf/posPrinters/cashdesk.html.twig index adead0a..65692c2 100644 --- a/hesabixCore/templates/pdf/posPrinters/cashdesk.html.twig +++ b/hesabixCore/templates/pdf/posPrinters/cashdesk.html.twig @@ -122,11 +122,11 @@ - +
تاریخ : - {{doc.date}} + {{Jdate.jdate('Y/n/d H:i',doc.dateSubmit)}} شماره : # @@ -140,7 +140,36 @@
- + + {% 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.name|default(firstPerson.name) }} +

+

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

+

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

+
+ {% endif %} @@ -160,30 +189,12 @@ {% 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 %} -
-