diff --git a/hesabixCore/src/Controller/PrintersController.php b/hesabixCore/src/Controller/PrintersController.php index 6705ebe..7597c5f 100644 --- a/hesabixCore/src/Controller/PrintersController.php +++ b/hesabixCore/src/Controller/PrintersController.php @@ -104,6 +104,7 @@ class PrintersController extends AbstractController $temp['fastsell']['cashdeskTicket'] = $settings->isFastsellCashdeskTicket(); $temp['fastsell']['invoice'] = $settings->isFastsellInvoice(); $temp['fastsell']['pdf'] = $settings->isFastsellPdf(); + $temp['fastsell']['pos'] = $settings->isFastsellPos(); $temp['repservice']['noteString'] = $settings->getRepserviceNoteString(); $temp['repservice']['paper'] = $settings->getRepServicePaper(); @@ -225,6 +226,7 @@ class PrintersController extends AbstractController $settings->setFastsellCashdeskTicket($params['fastsell']['cashdeskTicket'] ?? false); $settings->setFastsellInvoice($params['fastsell']['invoice'] ?? false); $settings->setFastsellPdf($params['fastsell']['pdf'] ?? false); + $settings->setFastsellPos($params['fastsell']['pos'] ?? false); $settings->setLeftFooter($params['global']['leftFooter']); $settings->setRightFooter($params['global']['rightFooter']); diff --git a/hesabixCore/src/Entity/PrintOptions.php b/hesabixCore/src/Entity/PrintOptions.php index be80fcf..fed6cc6 100644 --- a/hesabixCore/src/Entity/PrintOptions.php +++ b/hesabixCore/src/Entity/PrintOptions.php @@ -120,6 +120,9 @@ class PrintOptions #[ORM\Column(nullable: true)] private ?bool $fastsellCashdeskTicket = null; + #[ORM\Column(nullable: true)] + private ?bool $fastsellPos = null; + #[ORM\Column(type: Types::TEXT, nullable: true)] private ?string $leftFooter = null; @@ -573,6 +576,18 @@ class PrintOptions return $this; } + public function isFastsellPos(): ?bool + { + return $this->fastsellPos; + } + + public function setFastsellPos(?bool $fastsellPos): static + { + $this->fastsellPos = $fastsellPos; + + return $this; + } + public function getLeftFooter(): ?string { return $this->leftFooter; diff --git a/hesabixCore/templates/pdf/posPrinters/buy.html.twig b/hesabixCore/templates/pdf/posPrinters/buy.html.twig index 4dadc8c..e18deaf 100644 --- a/hesabixCore/templates/pdf/posPrinters/buy.html.twig +++ b/hesabixCore/templates/pdf/posPrinters/buy.html.twig @@ -178,7 +178,7 @@ {% endif %} diff --git a/hesabixCore/templates/pdf/posPrinters/justBuy.html.twig b/hesabixCore/templates/pdf/posPrinters/justBuy.html.twig index f7add2d..d99d15d 100644 --- a/hesabixCore/templates/pdf/posPrinters/justBuy.html.twig +++ b/hesabixCore/templates/pdf/posPrinters/justBuy.html.twig @@ -174,7 +174,7 @@ diff --git a/hesabixCore/templates/pdf/posPrinters/justRfbuy.html.twig b/hesabixCore/templates/pdf/posPrinters/justRfbuy.html.twig index 7177fdf..e1c6025 100644 --- a/hesabixCore/templates/pdf/posPrinters/justRfbuy.html.twig +++ b/hesabixCore/templates/pdf/posPrinters/justRfbuy.html.twig @@ -174,7 +174,7 @@ diff --git a/hesabixCore/templates/pdf/posPrinters/justRfsellhtml.twig b/hesabixCore/templates/pdf/posPrinters/justRfsellhtml.twig index 7177fdf..e1c6025 100644 --- a/hesabixCore/templates/pdf/posPrinters/justRfsellhtml.twig +++ b/hesabixCore/templates/pdf/posPrinters/justRfsellhtml.twig @@ -174,7 +174,7 @@ diff --git a/hesabixCore/templates/pdf/posPrinters/justSell.html.twig b/hesabixCore/templates/pdf/posPrinters/justSell.html.twig index 612d906..86cb087 100644 --- a/hesabixCore/templates/pdf/posPrinters/justSell.html.twig +++ b/hesabixCore/templates/pdf/posPrinters/justSell.html.twig @@ -216,7 +216,7 @@ diff --git a/hesabixCore/templates/pdf/posPrinters/rfbuy.html.twig b/hesabixCore/templates/pdf/posPrinters/rfbuy.html.twig index 4dadc8c..e18deaf 100644 --- a/hesabixCore/templates/pdf/posPrinters/rfbuy.html.twig +++ b/hesabixCore/templates/pdf/posPrinters/rfbuy.html.twig @@ -178,7 +178,7 @@ {% endif %} diff --git a/hesabixCore/templates/pdf/posPrinters/rfsell.html.twig b/hesabixCore/templates/pdf/posPrinters/rfsell.html.twig index 4dadc8c..e18deaf 100644 --- a/hesabixCore/templates/pdf/posPrinters/rfsell.html.twig +++ b/hesabixCore/templates/pdf/posPrinters/rfsell.html.twig @@ -178,7 +178,7 @@ {% endif %} diff --git a/hesabixCore/templates/pdf/posPrinters/sell.html.twig b/hesabixCore/templates/pdf/posPrinters/sell.html.twig index 11447af..1cc50b9 100644 --- a/hesabixCore/templates/pdf/posPrinters/sell.html.twig +++ b/hesabixCore/templates/pdf/posPrinters/sell.html.twig @@ -179,7 +179,7 @@ {% endif %} diff --git a/webUI/src/views/acc/sell/fastMod.vue b/webUI/src/views/acc/sell/fastMod.vue index fbf1bf4..d9c2e5d 100755 --- a/webUI/src/views/acc/sell/fastMod.vue +++ b/webUI/src/views/acc/sell/fastMod.vue @@ -208,6 +208,13 @@ export default defineComponent({ axios.post("/api/printers/options/info").then((response) => { this.loading = false; this.printOptions = response.data.sell; + // مقداردهی پیش‌فرض سوییچ‌ها از تنظیمات فاکتور سریع + if (response.data.fastsell) { + this.canPrint = !!response.data.fastsell.invoice; + this.canPrintCashdeskRecp = !!response.data.fastsell.cashdeskTicket; + this.canPdf = !!response.data.fastsell.pdf; + this.canPos = !!response.data.fastsell.pos; + } }); }, save() { @@ -268,7 +275,7 @@ export default defineComponent({ this.loading = false; if (response.data.result == '1') { this.update = response.data.doc.code; - if (this.canPrint || this.canPrintCashdeskRecp) { + if (this.canPrint || this.canPrintCashdeskRecp || this.canPos) { axios.post('/api/sell/print/invoice', { code: this.update, pdf: this.canPdf, diff --git a/webUI/src/views/acc/settings/print.vue b/webUI/src/views/acc/settings/print.vue index 4dfabf0..4547f08 100755 --- a/webUI/src/views/acc/settings/print.vue +++ b/webUI/src/views/acc/settings/print.vue @@ -272,6 +272,9 @@ + + +