From 902d3f4829a983342d74de148695f2f35a1245d4 Mon Sep 17 00:00:00 2001 From: babak alizadeh Date: Mon, 24 Jun 2024 01:45:26 +0330 Subject: [PATCH] add cashdesk invoice to fast sell --- hesabixCore/src/Controller/SellController.php | 6 +- hesabixCore/src/Service/pdfMGR.php | 2 +- .../templates/pdf/posPrinters/sell.html.twig | 71 +++++++++++++++---- 3 files changed, 63 insertions(+), 16 deletions(-) diff --git a/hesabixCore/src/Controller/SellController.php b/hesabixCore/src/Controller/SellController.php index 29e9934..a7ebd38 100644 --- a/hesabixCore/src/Controller/SellController.php +++ b/hesabixCore/src/Controller/SellController.php @@ -338,9 +338,11 @@ class SellController extends AbstractController $this->renderView('pdf/posPrinters/sell.html.twig', [ 'bid' => $acc['bid'], 'doc'=>$doc, - 'rows'=>$doc->getHesabdariRows() + 'rows'=>$doc->getHesabdariRows(), + 'printInvoice'=>$params['posPrint'], + 'printcashdeskRecp'=>$params['posPrintRecp'], ]), - $posPrint + true ); return $this->json(['id' => $pid]); } diff --git a/hesabixCore/src/Service/pdfMGR.php b/hesabixCore/src/Service/pdfMGR.php index 152c489..69ef005 100644 --- a/hesabixCore/src/Service/pdfMGR.php +++ b/hesabixCore/src/Service/pdfMGR.php @@ -50,7 +50,7 @@ class pdfMGR { $mpdf = new \Mpdf\Mpdf([ - 'mode' => 'utf-8', 'format' => [80, 600], + 'mode' => 'utf-8', 'format' => [80, 300], 'fontdata' => [ 'vazirmatn' => [ 'R' => 'Vazir-Regular-FD.ttf', diff --git a/hesabixCore/templates/pdf/posPrinters/sell.html.twig b/hesabixCore/templates/pdf/posPrinters/sell.html.twig index 749ad89..95ce1bb 100644 --- a/hesabixCore/templates/pdf/posPrinters/sell.html.twig +++ b/hesabixCore/templates/pdf/posPrinters/sell.html.twig @@ -1,10 +1,10 @@ - + - +{% if printInvoice%}

{{ bid.name }}

@@ -135,10 +136,6 @@ {{doc.code | number_format}} - - - - صورتحساب @@ -174,17 +171,65 @@ -
-

+

+ از خرید شما متشکریم -

+
-

{{ bid.name }}

{{ bid.address }}

{{ bid.tel }}

hesabix.ir

+{% endif %} + +{% if printcashdeskRecp%} + {% if printInvoice %} +
+ {% endif %} + + + + + + + + + + +
تاریخ : + {{doc.date}} + شماره : + # + {{doc.code | number_format}} +
+ قبض صندوق +
+ + + + + + + + + + + {% for row in rows %} + {% if row.commodity != null %} + + + + + {% endif %} + {% endfor %} + +
کالاتعداد
{{row.commodity.name}}{{row.commdityCount}}
+ +{% endif %} +