some bug fix and add fastsell print options
This commit is contained in:
parent
e8f6c05159
commit
f1c1c4a593
|
@ -129,6 +129,7 @@ class CommodityController extends AbstractController
|
||||||
'name' => $item->getUnit()->getName(),
|
'name' => $item->getUnit()->getName(),
|
||||||
'floatNumber' => $item->getUnit()->getFloatNumber(),
|
'floatNumber' => $item->getUnit()->getFloatNumber(),
|
||||||
];
|
];
|
||||||
|
$temp['barcodes'] = $item->getBarcodes();
|
||||||
//calculate count
|
//calculate count
|
||||||
if ($item->isKhadamat()) {
|
if ($item->isKhadamat()) {
|
||||||
$temp['count'] = 0;
|
$temp['count'] = 0;
|
||||||
|
|
|
@ -86,6 +86,10 @@ class PrintersController extends AbstractController
|
||||||
$temp['rfsell']['pays'] = $settings->isRfsellPays();
|
$temp['rfsell']['pays'] = $settings->isRfsellPays();
|
||||||
$temp['rfsell']['paper'] = $settings->getRfsellPaper();
|
$temp['rfsell']['paper'] = $settings->getRfsellPaper();
|
||||||
|
|
||||||
|
$temp['fastsell']['cashdeskTicket'] = $settings->isFastsellCashdeskTicket();
|
||||||
|
$temp['fastsell']['invoice'] = $settings->isFastsellInvoice();
|
||||||
|
$temp['fastsell']['pdf'] = $settings->isFastsellPdf();
|
||||||
|
|
||||||
$temp['repservice']['noteString'] = $settings->getRepserviceNoteString();
|
$temp['repservice']['noteString'] = $settings->getRepserviceNoteString();
|
||||||
$temp['repservice']['paper'] = $settings->getRepServicePaper();
|
$temp['repservice']['paper'] = $settings->getRepServicePaper();
|
||||||
if(!$temp['rfsell']['paper']) { $temp['rfsell']['paper'] = 'A4-L'; }
|
if(!$temp['rfsell']['paper']) { $temp['rfsell']['paper'] = 'A4-L'; }
|
||||||
|
@ -151,6 +155,10 @@ class PrintersController extends AbstractController
|
||||||
$settings->setRepserviceNoteString($params['repservice']['noteString']);
|
$settings->setRepserviceNoteString($params['repservice']['noteString']);
|
||||||
$settings->setRepServicePaper($params['repservice']['paper']);
|
$settings->setRepServicePaper($params['repservice']['paper']);
|
||||||
|
|
||||||
|
$settings->setFastsellCashdeskTicket($params['fastsell']['cashdeskTicket']);
|
||||||
|
$settings->setFastsellInvoice($params['fastsell']['invoice']);
|
||||||
|
$settings->setFastsellPdf($params['fastsell']['pdf']);
|
||||||
|
|
||||||
$entityManager->persist($settings);
|
$entityManager->persist($settings);
|
||||||
$entityManager->flush();
|
$entityManager->flush();
|
||||||
$log->insert('تنظیمات چاپ', 'تنظیمات چاپ به روز رسانی شد.', $this->getUser(), $acc['bid']->getId());
|
$log->insert('تنظیمات چاپ', 'تنظیمات چاپ به روز رسانی شد.', $this->getUser(), $acc['bid']->getId());
|
||||||
|
@ -221,7 +229,7 @@ class PrintersController extends AbstractController
|
||||||
#[Route('/api/print/last', name: 'app_print_last')]
|
#[Route('/api/print/last', name: 'app_print_last')]
|
||||||
public function app_print_last(Provider $provider, Request $request, Access $access, Log $log, EntityManagerInterface $entityManager): Response
|
public function app_print_last(Provider $provider, Request $request, Access $access, Log $log, EntityManagerInterface $entityManager): Response
|
||||||
{
|
{
|
||||||
$acc = $access->hasRole('owner');
|
$acc = $access->hasRole('join');
|
||||||
if (!$acc)
|
if (!$acc)
|
||||||
throw $this->createAccessDeniedException();
|
throw $this->createAccessDeniedException();
|
||||||
$printer = $entityManager->getRepository(Printer::class)->findBy([
|
$printer = $entityManager->getRepository(Printer::class)->findBy([
|
||||||
|
|
|
@ -111,6 +111,15 @@ class PrintOptions
|
||||||
#[ORM\Column(length: 255, nullable: true)]
|
#[ORM\Column(length: 255, nullable: true)]
|
||||||
private ?string $repservicePaper = null;
|
private ?string $repservicePaper = null;
|
||||||
|
|
||||||
|
#[ORM\Column(nullable: true)]
|
||||||
|
private ?bool $fastsellInvoice = null;
|
||||||
|
|
||||||
|
#[ORM\Column(nullable: true)]
|
||||||
|
private ?bool $fastsellPdf = null;
|
||||||
|
|
||||||
|
#[ORM\Column(nullable: true)]
|
||||||
|
private ?bool $fastsellCashdeskTicket = null;
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
|
@ -499,4 +508,40 @@ class PrintOptions
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isFastsellInvoice(): ?bool
|
||||||
|
{
|
||||||
|
return $this->fastsellInvoice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFastsellInvoice(?bool $fastsellInvoice): static
|
||||||
|
{
|
||||||
|
$this->fastsellInvoice = $fastsellInvoice;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isFastsellPdf(): ?bool
|
||||||
|
{
|
||||||
|
return $this->fastsellPdf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFastsellPdf(?bool $fastsellPdf): static
|
||||||
|
{
|
||||||
|
$this->fastsellPdf = $fastsellPdf;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isFastsellCashdeskTicket(): ?bool
|
||||||
|
{
|
||||||
|
return $this->fastsellCashdeskTicket;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFastsellCashdeskTicket(?bool $fastsellCashdeskTicket): static
|
||||||
|
{
|
||||||
|
$this->fastsellCashdeskTicket = $fastsellCashdeskTicket;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue