diff --git a/hesabixCore/src/Controller/BuyController.php b/hesabixCore/src/Controller/BuyController.php
index a089ac8..ad46776 100644
--- a/hesabixCore/src/Controller/BuyController.php
+++ b/hesabixCore/src/Controller/BuyController.php
@@ -368,14 +368,14 @@ class BuyController extends AbstractController
$pid = $provider->createPrint(
$acc['bid'],
$this->getUser(),
- $this->renderView('pdf/posPrinters/justSell.html.twig', [
+ $this->renderView('pdf/posPrinters/justBuy.html.twig', [
'bid' => $acc['bid'],
'doc' => $doc,
'rows' => $doc->getHesabdariRows(),
]),
true
);
- $printers->addFile($pid, $acc, "fastSellInvoice");
+ $printers->addFile($pid, $acc, "fastBuyInvoice");
}
if ($params['posPrintRecp'] == true) {
$pid = $provider->createPrint(
@@ -388,7 +388,7 @@ class BuyController extends AbstractController
]),
true
);
- $printers->addFile($pid, $acc, "fastSellCashdesk");
+ $printers->addFile($pid, $acc, "fastBuyCashdesk");
}
return $this->json(['id' => $pdfPid]);
@@ -450,7 +450,7 @@ class BuyController extends AbstractController
}
$note = '';
$printSettings = $entityManager->getRepository(PrintOptions::class)->findOneBy(['bid'=>$acc['bid']]);
- if($printSettings){$note = $printSettings->getSellNoteString();}
+ if($printSettings){$note = $printSettings->getBuyNoteString();}
$pdfPid = $provider->createPrint(
$acc['bid'],
$this->getUser(),
@@ -472,14 +472,14 @@ class BuyController extends AbstractController
$pid = $provider->createPrint(
$acc['bid'],
$this->getUser(),
- $this->renderView('pdf/posPrinters/justSell.html.twig', [
+ $this->renderView('pdf/posPrinters/justBuy.html.twig', [
'bid' => $acc['bid'],
'doc' => $doc,
'rows' => $doc->getHesabdariRows(),
]),
false
);
- $printers->addFile($pid, $acc, "fastSellInvoice");
+ $printers->addFile($pid, $acc, "fastBuyInvoice");
}
return $this->json(['id' => $pdfPid]);
}
diff --git a/hesabixCore/src/Controller/RfbuyController.php b/hesabixCore/src/Controller/RfbuyController.php
index fcc1b8c..e5be2fe 100644
--- a/hesabixCore/src/Controller/RfbuyController.php
+++ b/hesabixCore/src/Controller/RfbuyController.php
@@ -63,7 +63,7 @@ class RfbuyController extends AbstractController
if (!$doc)
throw $this->createNotFoundException();
- return $this->json(Explore::ExploreSellDoc($doc));
+ return $this->json(Explore::ExploreRfbuyDoc($doc));
}
#[Route('/api/rfbuy/mod', name: 'app_rfbuy_mod')]
@@ -353,14 +353,14 @@ class RfbuyController extends AbstractController
$pid = $provider->createPrint(
$acc['bid'],
$this->getUser(),
- $this->renderView('pdf/posPrinters/justSell.html.twig', [
+ $this->renderView('pdf/posPrinters/justRfbuy.html.twig', [
'bid' => $acc['bid'],
'doc' => $doc,
'rows' => $doc->getHesabdariRows(),
]),
true
);
- $printers->addFile($pid, $acc, "fastSellInvoice");
+ $printers->addFile($pid, $acc, "fastRfbuyInvoice");
}
if ($params['posPrintRecp'] == true) {
$pid = $provider->createPrint(
@@ -373,7 +373,7 @@ class RfbuyController extends AbstractController
]),
true
);
- $printers->addFile($pid, $acc, "fastSellCashdesk");
+ $printers->addFile($pid, $acc, "fastRfbuyCashdesk");
}
return $this->json(['id' => $pdfPid]);
@@ -435,7 +435,7 @@ class RfbuyController extends AbstractController
}
$note = '';
$printSettings = $entityManager->getRepository(PrintOptions::class)->findOneBy(['bid'=>$acc['bid']]);
- if($printSettings){$note = $printSettings->getSellNoteString();}
+ if($printSettings){$note = $printSettings->getRfbuyNoteString();}
$pdfPid = $provider->createPrint(
$acc['bid'],
$this->getUser(),
@@ -457,14 +457,14 @@ class RfbuyController extends AbstractController
$pid = $provider->createPrint(
$acc['bid'],
$this->getUser(),
- $this->renderView('pdf/posPrinters/justSell.html.twig', [
+ $this->renderView('pdf/posPrinters/justRfbuy.html.twig', [
'bid' => $acc['bid'],
'doc' => $doc,
'rows' => $doc->getHesabdariRows(),
]),
false
);
- $printers->addFile($pid, $acc, "fastSellInvoice");
+ $printers->addFile($pid, $acc, "fastRfbuyInvoice");
}
return $this->json(['id' => $pdfPid]);
}
diff --git a/hesabixCore/src/Controller/RfsellController.php b/hesabixCore/src/Controller/RfsellController.php
index f74faaf..c5bef6d 100644
--- a/hesabixCore/src/Controller/RfsellController.php
+++ b/hesabixCore/src/Controller/RfsellController.php
@@ -450,7 +450,7 @@ class RfsellController extends AbstractController
}
$note = '';
$printSettings = $entityManager->getRepository(PrintOptions::class)->findOneBy(['bid'=>$acc['bid']]);
- if($printSettings){$note = $printSettings->getSellNoteString();}
+ if($printSettings){$note = $printSettings->getRfsellNoteString();}
$pdfPid = $provider->createPrint(
$acc['bid'],
$this->getUser(),
diff --git a/hesabixCore/src/Entity/PrintOptions.php b/hesabixCore/src/Entity/PrintOptions.php
index f542ea9..d0517df 100644
--- a/hesabixCore/src/Entity/PrintOptions.php
+++ b/hesabixCore/src/Entity/PrintOptions.php
@@ -90,6 +90,18 @@ class PrintOptions
#[ORM\Column(nullable: true)]
private ?bool $RfsellPays = null;
+ #[ORM\Column(length: 255, nullable: true)]
+ private ?string $sellPaper = null;
+
+ #[ORM\Column(length: 255, nullable: true)]
+ private ?string $buyPaper = null;
+
+ #[ORM\Column(length: 255, nullable: true)]
+ private ?string $rfbuyPaper = null;
+
+ #[ORM\Column(length: 255, nullable: true)]
+ private ?string $rfsellPaper = null;
+
public function getId(): ?int
{
return $this->id;
@@ -394,4 +406,52 @@ class PrintOptions
return $this;
}
+
+ public function getSellPaper(): ?string
+ {
+ return $this->sellPaper;
+ }
+
+ public function setSellPaper(?string $sellPaper): static
+ {
+ $this->sellPaper = $sellPaper;
+
+ return $this;
+ }
+
+ public function getBuyPaper(): ?string
+ {
+ return $this->buyPaper;
+ }
+
+ public function setBuyPaper(?string $buyPaper): static
+ {
+ $this->buyPaper = $buyPaper;
+
+ return $this;
+ }
+
+ public function getRfbuyPaper(): ?string
+ {
+ return $this->rfbuyPaper;
+ }
+
+ public function setRfbuyPaper(?string $rfbuyPaper): static
+ {
+ $this->rfbuyPaper = $rfbuyPaper;
+
+ return $this;
+ }
+
+ public function getRfsellPaper(): ?string
+ {
+ return $this->rfsellPaper;
+ }
+
+ public function setRfsellPaper(?string $rfsellPaper): static
+ {
+ $this->rfsellPaper = $rfsellPaper;
+
+ return $this;
+ }
}
diff --git a/hesabixCore/templates/pdf/posPrinters/buy.html.twig b/hesabixCore/templates/pdf/posPrinters/buy.html.twig
new file mode 100644
index 0000000..b48e835
--- /dev/null
+++ b/hesabixCore/templates/pdf/posPrinters/buy.html.twig
@@ -0,0 +1,234 @@
+
+
+
+
+
+
+{% if printInvoice%}
+
+
+
+
+ تاریخ :
+ {{doc.date}}
+ |
+ شماره :
+ #
+ {{doc.code | number_format}}
+ |
+
+
+
+ صورتحساب
+ |
+
+
+
+
+
+
+
+ کالا |
+ تعداد |
+ فی |
+ جمع |
+
+
+
+
+ {% for row in rows %}
+ {% if row.commodity != null %}
+
+ {{row.commodity.name}} |
+ {{row.commdityCount}} |
+ {{(row.bs / row.commdityCount) | number_format}} |
+ {{row.bs | number_format}} |
+
+ {% endif %}
+ {% endfor %}
+
+ جمع فاکتور |
+ {{doc.amount | number_format}} |
+
+
+
+
+
+ از خرید شما متشکریم
+
+
+
+{% endif %}
+
+{% if printcashdeskRecp%}
+ {% if printInvoice %}
+
+
+ {% endif %}
+
+
+
+ تاریخ :
+ {{doc.date}}
+ |
+ شماره :
+ #
+ {{doc.code | number_format}}
+ |
+
+
+
+ قبض صندوق
+ |
+
+
+
+
+
+
+
+ کالا |
+ تعداد |
+
+
+
+
+ {% for row in rows %}
+ {% if row.commodity != null %}
+
+ {{row.commodity.name}} |
+ {{row.commdityCount}} |
+
+ {% endif %}
+ {% endfor %}
+
+
+
+{% endif %}
+
+