more bug fix

This commit is contained in:
Hesabix 2025-10-01 14:08:55 +03:30
parent 5a1348a800
commit 61ff2d4ca7
12 changed files with 36 additions and 9 deletions

View file

@ -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']);

View file

@ -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;

View file

@ -178,7 +178,7 @@
<footer style="text-align:center">
<p>{{ bid.address }}</p>
<p>{{ bid.tel }}</p>
<p>hesabix.ir</p>
</footer>
{% endif %}

View file

@ -174,7 +174,7 @@
<footer style="text-align:center">
<p>{{ bid.address }}</p>
<p>{{ bid.tel }}</p>
<p>hesabix.ir</p>
</footer>
</body>
</html>

View file

@ -174,7 +174,7 @@
<footer style="text-align:center">
<p>{{ bid.address }}</p>
<p>{{ bid.tel }}</p>
<p>hesabix.ir</p>
</footer>
</body>
</html>

View file

@ -174,7 +174,7 @@
<footer style="text-align:center">
<p>{{ bid.address }}</p>
<p>{{ bid.tel }}</p>
<p>hesabix.ir</p>
</footer>
</body>
</html>

View file

@ -216,7 +216,7 @@
<footer style="text-align:center">
<p>{{ bid.address }}</p>
<p>{{ bid.tel }}</p>
<p>hesabix.ir</p>
</footer>
</body>
</html>

View file

@ -178,7 +178,7 @@
<footer style="text-align:center">
<p>{{ bid.address }}</p>
<p>{{ bid.tel }}</p>
<p>hesabix.ir</p>
</footer>
{% endif %}

View file

@ -178,7 +178,7 @@
<footer style="text-align:center">
<p>{{ bid.address }}</p>
<p>{{ bid.tel }}</p>
<p>hesabix.ir</p>
</footer>
{% endif %}

View file

@ -179,7 +179,7 @@
<footer style="text-align:center">
<p>{{ bid.address }}</p>
<p>{{ bid.tel }}</p>
<p>hesabix.ir</p>
</footer>
{% endif %}

View file

@ -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,

View file

@ -272,6 +272,9 @@
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.fastsell.cashdeskTicket" :label="$t('dialog.cashdeskTicket')" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.fastsell.pos" label="صورت حساب POS" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.fastsell.pdf" :label="$t('dialog.export_pdf')" color="primary" hide-details density="compact"></v-switch>
</v-col>